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

📄 admin_user.asp

📁 QQ呱唧网
💻 ASP
字号:
<!--#include file="../conn.asp"-->
<!--#include file="Admin_ChkPurview.asp"-->
<!--#include file="../inc/md5.asp"-->
<!--#include file="../inc/function.asp"-->
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<link href='Admin_Style.css' rel='stylesheet' type='text/css'>
</head>
<body leftmargin='2' topmargin='0' marginwidth='0' marginheight='0'>
<table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>
<form name='form1' action='' method='get'>
<tr class='topbg'> 
      <td height='22' colspan='2' align='center'><strong>用 户 管 理</strong></td>
</tr>
<tr class='tdbg'> 
      <td width='100' height='30'><strong>快速查找:</strong></td>
      <td width='687' height='30'> &nbsp;&nbsp;<a href='admin_user.asp'>用户管理首页</a>&nbsp;|<a href="?keyword=offline">下线的用户</a>|<a href="?keyword=online">上线的用户</a>|<a href="?keyword=lastreg">24小时注册的用户</a>|<a href="?keyword=lastlogin">24小时登陆用户</a><a href="admin_user.asp?keyword=enddate">|</a> 
        <a href="?action=delfree"  onClick='return confirm("确定要删除所有免费用户么吗?");'>清理免费用户</a></td>
</tr>
</form>
</table>
<% 
select case lcase(request("action"))
case "add"
call add()
case "modifyl"
case "del"
call del()
call main()
case "savemodifyl"
case "saveadd"
call saveadd()
case "userinfo"
call userinfo()
call main()
case "delfree"
conn.execute "delete from QQ Where datediff('D' ,now(),EndTime)<" & maxDay
response.Redirect("Admin_User.asp")
case "saveuserinfo"
call saveuserinfo()
call main()
case "update"
call UpdateUser()
case "doupdate"
call doupdate()
case else
call main()
end select

sub saveuserinfo()
Set rs=Server.CreateObject("Adodb.RecordSet")
sql="select * from  QQ   where id="&request("id")
rs.Open sql,Conn,1,3
rs("QQ_State")=request("EndTime")
rs("EndTime")=request("ReMsg")
rs("ReMsg")=request("ReMsg")
rs.update
end sub

sub del()
conn.execute  "delete  from  QQ where id="&cint(trim(request("id")))
end sub

sub main()
if request("command")="edit" then
select case lcase(request("action"))
case "delselect"
for each id in split(request("typeID"),",")
conn.execute  "delete from  QQ where id="&id
next
case "offline"
for each id in split(request("typeID"),",")
set rs=server.createobject("adodb.recordset")
conn.execute  "update QQ set  qq_state='下线' where id ="&id
next
case "online"
for each id in split(request("typeID"),",")
conn.execute  "update qq set qq_state='上线'  where id ="&id
next
end select
end if
%>
<SCRIPT language=javascript>
function unselectall(){
if(document.myform.chkAll.checked){
document.myform.chkAll.checked = document.myform.chkAll.checked&0;
}
}
function CheckAll(form){
for (var i=0;i<form.elements.length;i++){
var e = form.elements[i];
if (e.Name != 'chkAll'&&e.disabled==false)
e.checked = form.chkAll.checked;
}
}
</SCRIPT>
<%
Set rs=Server.CreateObject("Adodb.RecordSet")
sqltype="select * from  QQ  order by id desc"
if request.form("search")>"" then
sqltype="select * from  QQ  where QQ like '%"&request.form("search")& "%'"
else
sqltype="select * from  QQ  where QQ like '%"&request.QueryString("search")& "%'"
end if
if  request("Keyword")="lastlogin" then 
sqltype="select * from  QQ  where datediff('h' ,LoginDate,now())<25 order  by id desc"
end if
if  request("Keyword")="lastreg" then 
sqltype="select * from  QQ  where datediff('h' ,RegDate,now())<25  order by id desc"
end if
if  request("Keyword")="offline" then 
sqltype="select * from  QQ  where qq_state='下线'"
end if
if  request("Keyword")="online" then 
sqltype="select * from QQ  where qq_state='上线'"
end if
rs.Open sqltype,Conn,1,1
rs.PageSize = 20
pgnum=rs.Pagecount
page=request("page")
if page="" or clng(page)<1 then page=1
if clng(page) > pgnum then page=pgnum
if pgnum>0 then rs.AbsolutePage=page
%>
<br><table width='100%'><tr>
    <td align='left'>您现在的位置:<a href="admin_user.asp">用户管理</a>&gt;&gt;<a href="admin_user.asp">&nbsp;所有QQ挂级用户</a></td>
<td align='right'>共找到 <font color=red><%=rs.recordcount%></font> 个用户</td>
</tr></table><table width='100%' border='0' cellpadding='0' cellspacing='0'>  <tr>  <form name='myform' method='Post' action='?command=edit' onsubmit="return confirm('确定要执行选定的操作吗?');">	  <td>	  <table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>
          <tr class='title'> 
            <td width='38' align='center'><strong>选中</strong></td>
            <td width='33' align='center'><strong>ID</strong></td>
            <td width='85' height='21' align='center'><strong>QQ号码</strong></td>
            <td width='108' align='center'><strong>登陆时间</strong></td>
            <td width="92" height='21' align='center'><strong>最后登陆IP</strong></td>
            <td width='140' align='center'> <p><strong>登陆次数</strong></p></td>
            <td width='88' height='21' align='center'> <p><strong>挂级状态</strong></p></td>
            <td width='138' height='21' align='center'><strong> 操作</strong></td>
          </tr>
          <%
if rs.eof then response.Write("<tr class='tdbg'><td colspan='20' align='center'><br>没有任何用户信息!<br><br></td></tr>")
do until rs.eof or i>=rs.pagesize 
%>
          <tr class='tdbg' onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'"> 
            <td width='38' height="24" align='center'> <input name='typeID' type='checkbox' onclick="unselectall()" id='UserID' value='<%=rs("id")%>'></td>
            <td width='33' align='center'><%=rs("id")%></td>
            <td width='85' align='center'><a href='?action=userinfo&id=<%=rs("id")%>' title=""><%=rs("QQ")%></a> 
            </td>
            <td width='108' align='center'><%=rs("LoginDate")%> </td>
            <td align='center'><font color=green><%=rs("LoginIP")%></font> 
            </td>
            <td width='140' align='center'><%=rs("LoginTimes")%> </td>
            <td width='88' align='center'> 
              	<%=RS("QQ_State")%>
            </td>
            <td width='138' align='center'><a href="?action=userinfo&id=<%=rs("id")%>">详细信息</a> 
              <a href='?Action=Del&ID=<%=rs("id")%>' onClick='return confirm("确定要删除此用户吗?");'>删除</a>&nbsp;</td>
          </tr>
          <%i=i+1
rs.movenext
loop
%>
        </table>
<table width='100%' border='0' cellpadding='0' cellspacing='0'>
<tr> 
            <td width='191' height='23'> 
              <input name='chkAll' type='checkbox' id='chkAll2' onclick='CheckAll(this.form)' value='checkbox'>
              选中本页所有QQ用户</td>
            <td width="574"> <div align="left"><strong>操作:</strong> 
                <input name='Action' type='radio' value='Delselect' checked>
                删除&nbsp;&nbsp;&nbsp;&nbsp; 
                <input name='Action' type='radio' value='offline'>
                下线用户&nbsp;&nbsp; 
                <input name='Action' type='radio' value='online'>
                上线用户 
                <input type='submit' name='Submit' value=' 执 行 '>
              </div></td>
</tr>
</table> </td>
</form>  </tr></table><table align='center'><tr>
<td>
<%if  page-1>0 then %>
<a href=?Page=<%=page-1%>&usergroup=<%=request("usergroup")%>&Keyword=<%=request("Keyword") %>>上一页</a>&nbsp;&nbsp; 
<% else 
response.Write("上一页")
end if
%>
<%if  page+1=< pgnum then %>
<a href=?Page=<%=page+1%>&usergroup=<%=request("usergroup")%>&Keyword=<%=request("Keyword") %>>下一页</a> 
<% else 
response.Write("下一页")
end if%></a>
转到 
<select name=userlist id="userlist"   onChange="window.location.href=this.options[this.selectedIndex].value">
<%for i=1 to rs.pagecount %>
<option value="?Page=<%=i%>&usergroup=<%=request("usergroup")%>&Keyword=<%=request("Keyword") %>"   <%if   cint(request("page")) =i  then response.write  "selected"  %>><%= i %></option>
<% next %>
</select>
</td>
</tr></table>
<form name='search_request' method='get' action=''>
<table width='100%' border='0' cellspacing='1' cellpadding='2' class='border'>  <tr class='tdbg'>    
<td width='120'><strong>用户高级查询:</strong></td>
<td width='300'>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <input name='Search' type='text' id="Search"  size='20' maxlength='30'> 
<input type='submit' name='Submit2' value=' 查 询 '>
</td>
<td>若为空,则查询所有用户</td>
</tr></table></form>
<%end sub
sub UpdateUser()
strHTML="<br></br><form name='myform' action='Admin_User.asp' method='post'>"
strHTML=strHTML & "<table width='100%' border='0' cellspacing='1' cellpadding='2' class='border'>"
strHTML=strHTML & "  <tr align='center' class='title'>"
strHTML=strHTML & "    <td height='22' colspan='2'><strong>更 新 用 户 数 据</strong></td>"
strHTML=strHTML & "  </tr>"
strHTML=strHTML & "  <tr class='tdbg'>"
strHTML=strHTML & "      <td colspan='2'><p>说明:<br>"
strHTML=strHTML & "          1、本操作将重新计算扣点的电影用户的观看记录。<br>"
strHTML=strHTML & "          2、本操作可能将非常消耗服务器资源,而且更新时间很长,请仔细确认每一步操作后执行。</p>"
strHTML=strHTML & "      </td>"
strHTML=strHTML & "  </tr>"
strHTML=strHTML & "  <tr class='tdbg'>"
strHTML=strHTML & "    <td height='25'>开始用户ID:</td>"
strHTML=strHTML & "    <td height='25'><input name='BeginID' type='text' id='BeginID' value='1' size='10' maxlength='10'>"
strHTML=strHTML & "      用户ID,可以填写您想从哪一个ID号开始进行修复</td>"
strHTML=strHTML & "  </tr>"
strHTML=strHTML & "  <tr class='tdbg'>"
strHTML=strHTML & "    <td height='25'>结束用户ID:</td>"
strHTML=strHTML & "    <td height='25'><input name='EndID' type='text' id='EndID' value='1000' size='10' maxlength='10'>"
strHTML=strHTML & "      将更新开始到结束ID之间的用户数据,之间的数值最好不要选择过大</td>"
strHTML=strHTML & "  </tr>"
strHTML=strHTML & "  <tr class='tdbg'>"
strHTML=strHTML & "    <td height='25'>&nbsp;</td>"
strHTML=strHTML & "    <td height='25'><input name='Submit' type='submit' id='Submit' value='更新用户数据'> <input name='Action' type='hidden' id='Action' value='DoUpdate'></td>"
strHTML=strHTML & "  </tr>"
strHTML=strHTML & "</table>"
strHTML=strHTML & "</form>"
response.write strHTML
end sub

sub userinfo() 
Set rs=Server.CreateObject("Adodb.RecordSet")
sql="select * from  QQ   where id="&request("id")
rs.Open sql,Conn,1,3
%>
<form name='myform' action='?action=saveuserinfo&id=<% =request("id") %>' method='post'>
  <table width='100%' border='0' cellspacing='1' cellpadding='2' class='border'>
    <tr class='title'> 
      <td height=22 colspan=2 align='center'> <b>修改注册用户信息</b></td>
    </tr>
    <tr class='tdbg'> 
      <td width='37%'><div align="right"><strong>OICQ号码:</strong></div></td>
      <td width='63%'><%= rs("QQ") %> </td>
    </tr>
    <tr class='tdbg'> 
      <td><div align="right"><strong>注册日期:</strong></div></td>
      <td><%= rs("RegDate") %> </td>
    </tr>
    <tr class='tdbg'> 
      <td><div align="right"><strong>最后一次登陆IP</strong></div></td>
      <td><%= rs("LoginIP") %></td>
    </tr>
    <tr class='tdbg'> 
      <td><div align="right"><strong>本次登陆会话密钥</strong></div></td>
      <td><%= rs("SEQ") %></td>
    </tr>
    <tr class='tdbg'> 
      <td width='37%'><div align="right"><strong>登陆次数</strong></div></td>
      <td width='63%'> <%= rs("LoginTimes") %> </td>
    </tr>
    <tr class='tdbg'> 
      <td><div align="right"><strong>用户挂级状态:</strong></div></td>
      <td> <input name='QQ_State' type='radio' value='上线' <% if rs("QQ_State")="上线" then response.Write("checked ") %>>
        上线 
        <input type='radio' name='QQ_State' value='下线' <% if  rs("QQ_State")="下线" then response.Write("checked ") %>>
        下线 </td>
    </tr>
    <tr class='tdbg'> 
      <td><div align="right"><strong>挂级再线时长:</strong></div></td>
      <td><%= rs("OnlineTime") %></td>
    </tr>
    <tr class='tdbg'> 
      <td><div align="right"><strong>结束日期:</strong></div></td>
      <td><input name='EndTime' type='text' id="EndTime" value="<%=rs("EndTime")%>"  size='30' maxlength='30'></td>
    </tr>
    <tr class='tdbg'> 
      <td width='37%'><div align="right"><strong>回复信息</strong></div></td>
      <td width='63%'><textarea name="ReMsg" cols="30"><%= rs("ReMsg") %></textarea></td>
    </tr>
    <tr class='tdbg'> 
      <td height='40' colspan='2' align='center'> <input name=Submit3   type=submit id='Submit2' value='保存修改结果'> 
      </td>
    </tr>
  </table>
</form>
<%
response.End()
end sub
%>

⌨️ 快捷键说明

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