⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userinfo.asp

📁 视频点播系统
💻 ASP
字号:
<!--#include file="articleconn.asp"-->
<%if chkcookie(request.cookies("userid"))="" or chkcookie(request.cookies("password"))="" then
%>
<script language="JavaScript">
<!--
function checkinput()
{
	if (document.search.userid.value=="")
	 {	
		alert("请输入用户名!");
		document.search.userid.focus();
		return false;
	 }

        if (document.search.password.value=="")
	 {	
		alert("请输入密码!");
		document.search.password.focus();
		return false;
	 }
	 return true;
}
-->
</script>
<title></title>
<body scroll="no" marginwidth="0" leftmargin="0" topmargin="0">

</p>
<p> </p>
<p> </p>
<div align="center">
  <center>
  <form method="POST" action="userpass.asp" name="search" onsubmit="return checkinput()">
    <table border="0" cellpadding="0" cellspacing="1" style="border-collapse: collapse" width="223" id="AutoNumber1" bgcolor="#986800">
      <tr>
        <td width="100%">
        <table border="0" cellspacing="0" style="border-collapse: collapse" width="233" id="AutoNumber1" cellpadding="4" height="109">
          <tr>
            <td width="223" colspan="2" bgcolor="#986800" height="3">
            <font size="2" color="#FFFFFF">点播观看影视,请先<b>登陆</b>!</font></td>
          </tr>
          <tr>
            <td width="58" bgcolor="#EEEEEE" height="17"><font size="2">用<span lang="en-us">&nbsp;
            </span>户</font><span lang="en-us"><font size="2">:</font></span></td>
            <td width="165" bgcolor="#EEEEEE" height="17">
            <input type="text" name="userid" size="20" style="color: #000000; border-style: solid; border-width: 1; background-color: #FFCC30"></td>
          </tr>
          <tr>
            <td width="58" bgcolor="#EEEEEE" height="17"><font size="2">密&nbsp; 
            码:</font></td>
            <td width="165" bgcolor="#EEEEEE" height="17">
            <input type="password" name="password" size="20" style="color: #000000; border-style: solid; border-width: 1; background-color: #FFCC30"></td>
          </tr>
          <tr>
            <td width="58" bgcolor="#EEEEEE" height="19"> </td>
            <td width="165" bgcolor="#EEEEEE" height="19">
            <input type="submit" value="提交" name="B1" style="color: #000000; border-style: solid; border-width: 1; background-color: #FFCC30">
            <input type="reset" value="重置" name="B2" style="color: #000000; border-style: solid; border-width: 1; background-color: #FFCC30"></td>
          </tr>
          <tr>
            <td width="223" colspan="2" bgcolor="#EEEEEE" height="13">
            <font size="2">你还没有注册? </font>
            <a target="_blank" href="USER/JOIN.asp">
            <font size="2" color="#ff0000">点击这里立刻申请</font></a></td>
          </tr>
        </table>
        </td>
      </tr>
    </table>
  </form>
  </center>
</div>
<%response.end
end if

const MaxPerPage=10
   dim totalPut,infoID   
   dim CurrentPage 
   dim i,j 
   if  isempty(trim(request("page"))) then 
      currentPage=cint(trim(request("page")))
   else 
      currentPage=1 
   end if
%>
<html>
<LINK href="css/style.css" type=text/css rel=stylesheet>

<title>用户短消息列表</title>
<body>
<center>
  <table width="100%" height="48" border="0">
    <tr> 
  <td height="30"><table width="100%" border="0" cellspacing="1" cellpadding="0" height="8" align="center"> 
    <tr> <td height="2" colspan="2" bgcolor="#FFFFFF"> 
              <DIV ALIGN="CENTER"><font color="#FF9900"><%=request.cookies("userid")%></font>短 消 息 列 表<br>
                <hr size="1" width="100%" noshade>
              </DIV>
              <table width="100%" border="0" cellspacing="1" cellpadding="0" height="100%" ALIGN="CENTER"> 
<tr> <td bgcolor="#FFFFFF" height="166" VALIGN="TOP">
<table width="100%" border="1" bordercolor="#FFFFFF" cellpadding="0" cellspacing="0" >
  <tr align="center" bgcolor="#CCCCCC"> 
	<td width="10%">状态</td>
    <td width="7%">操作</td>
    <td width="18%">来自</td>
    <td width="36%">主题</td>
    <td width="29%">日期</td>
  </tr>
  <form action="userinfo.asp" name="msg" method="post">
<% 
dim userinfoSQL,userinfoRS,TotalPages,userID
userID=chkcookie(trim(request("userID")))
infoID=chkcookie(request("infoID"))
'删除信息

if infoID<>"" and userID<>"" then
 conn.execute "delete from UserMsg where UserId="&userID&" and MsgId in ("&infoID&")"
 response.Redirect "userinfo.asp?userID="&userID&""
 response.End
end if

set userinfoRS=server.createobject("adodb.recordset")
  userinfoSQL="select * from UserMsg where UserId="&userID&" order by sendtime DESC" 
  userinfoRS.open userinfoSQL,conn,1,1 
   if userinfoRS.eof and userinfoRS.bof then 
      response.write "<tr align='center'><td  colspan='5'>对不起,您暂无信息!</td></tr></table>"
      TotalPages=0
else
   totalPut=userinfoRS.recordcount
   TotalPages=int(totalPut\MaxPerPage)+1
   if currentpage<1 then
      currentpage=1
   end if

 if (currentpage-1)*MaxPerPage>totalput then
   if (totalPut mod MaxPerPage)=0 then
     currentpage= totalPut \ MaxPerPage
   else
     currentpage= totalPut \ MaxPerPage + 1
   end if
 end if
 
 if currentPage=1 then
   showContent
   showpage totalput,MaxPerPage,"userinfo.asp"
   showpage1 totalput,MaxPerPage,"userinfo.asp"
 else
  if (currentPage-1)*MaxPerPage<totalPut then
    userinfoRS.move  (currentPage-1)*MaxPerPage
    dim bookmark
    bookmark=userinfoRS.bookmark
    showContent
	showpage totalput,MaxPerPage,"userinfo.asp"
    showpage1 totalput,MaxPerPage,"userinfo.asp"
   else
    currentPage=1
    showContent
	showpage totalput,MaxPerPage,"userinfo.asp"
    showpage1 totalput,MaxPerPage,"userinfo.asp"
   end if
 end if
end if
sub showContent
  i=0
do while not userinfoRS.eof%>
   <tr align="center" bgcolor="#ECECEC">
    <td><% if not userinfoRS("readle") then
	response.write("<img src='img/new.gif'>") 
	end if%> </td>
    <td><input type="checkbox" name="infoID" id="infoID" value="<%=userinfoRS("MsgId")%>"></td>
    <td><%=userinfoRS("sendman")%> </td>
    <td><a href="#" onClick="javascript:window.open('detailMSG.asp?MsgId=<%=userinfoRS("MsgId")%>&userID=<%=userinfoRS("userID")%>','信息内容','width=432,height=288,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes')"><%=userinfoRS("infoName")%></a> </td>
    <td><%=userinfoRS("sendtime")%> </td>
  </tr>
  
<% i=i+1
if i>=MaxPerPage then exit do
userinfoRS.movenext
loop
%>
<tr align="right" bgcolor="#ECECEC">
<td colspan="5"><input type="hidden" name="userID" value="<%=userID%>">
 选中所显示信息<input type="checkbox" name="chkall" id="chkall" value="" onClick="CheckAll(this.form);">&nbsp;
 <input type="submit" name="submit0" id="submit0" style="height:17px;font-size:11px;" value="删 除">&nbsp;&nbsp;&nbsp;&nbsp;
 </td></tr>
<script language="JavaScript" type="text/javascript">
 function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.name != 'chkall')
       e.checked = form.chkall.checked;
    }
  }

</script>
 </form>
</table>
 <%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
Response.Write "<table border=""0"" cellspacing=""1"" bgcolor=#CCCCCC width=""100%"" align=center>"
response.write "<form action="&filename&" method='post' name='tiaozhuan1' target='_self'><tr><td width=""30%"">"
Response.Write "&nbsp;&nbsp;您共有信息:<font color=""red"">"&totalnumber&"</font> 条 <font color=""red"">"&CurrentPage&"/"&n&"</font> 页"
response.Write "&nbsp;&nbsp;转到&nbsp;<input name='userID' type=hidden class=text value="&userID&">"&_ 
            "<input style=""font-size:10px;height:17px;BACKGROUND-COLOR: #cccccc;""  value='页码' type=text name=""page"" size=3 onFocus=""this.value=''"">"&_ 
            "&nbsp;&nbsp;<input name='submit' type=submit STYLE=""BORDER-RIGHT: #000000 1px solid;height:17px; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid;font-size:11px; COLOR: #000000; BORDER-BOTTOM: #000000 1px "&_
			 "solid; BACKGROUND-COLOR: #cccccc"" value=""确 定"">&nbsp;&nbsp;"
end function

function showpage1(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
if CurrentPage<2 then
response.write "<font color='999966'>&nbsp;首页 上一页</font>&nbsp;"
else
response.write "<a href="&filename&"?userID="&userID&"&page=1&>&nbsp;首页</a>&nbsp;"
response.write "<a href="&filename&"?userID="&userID&"&page="&CurrentPage-1&">上一页</a>&nbsp;"
end if
if n-currentpage<1 then
response.write "<font color='999966'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?userID="&userID&"&page="&(CurrentPage+1)
response.write ">下一页</a> <a href="&filename&"?userID="&userID&"&page="&n&">尾页</a>"
end if
Response.Write "</td></tr></form></table>"
end function

userinfoRS.close
set userinfoRS=nothing
set conn=nothing

%> 
</td></tr> </table></td></tr> </table></td></tr> </table>
</center>
</body>
</html>
 <script language="VBScript" type="text/VBScript">
	  function tiaozhuan1_onSubmit()
		dim shuru
		shuru=document.tiaozhuan1.page.value
		if isNumeric(shuru) then
		  if shuru><%=TotalPages%> OR shuru<=0 then
			alert"对不起,您的输入页码不存在"
			tiaozhuan1_onSubmit=false
			document.tiaozhuan1.page.focus()
		  end if
		else 
		  alert"对不起,您的输入有误" 
		  tiaozhuan1_onSubmit=false
		  document.tiaozhuan1.page.focus()
		end if
	  end function									    
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -