📄 mb2_manage.asp
字号:
<!--#include file="chklogin.asp"-->
<%
call myobj.chkrq()
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>个人包月用户管理</title>
<link href="images/style2.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
a:link {
color: #0000FF;
text-decoration: none;
}
a:visited {
color: #0000FF;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: underline;
}
a:active {
text-decoration: none;
}
-->
</style>
<script language="vbscript">
function tb()
if document.GetElementById("tb_body").style.display="none" then
document.GetElementById("tb_body").style.display="inline"
else
document.GetElementById("tb_body").style.display="none"
end if
end function
</script>
<script language="JavaScript">
function tourl(form1_url){
location=form1_url;
for(var i=0;i<document.form1.elements.length;i++){
document.form1.elements[i].options[0].selected=true
}
}
</script>
</head>
<body leftMargin="0" topMargin="0" bgcolor="#FFFFFF">
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
<table width="550" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#3975CE">
<tr>
<td align="center"><a href="<%=filename%>" class="lfont1">所有个人包月用户</a> <strong class="font1">个人包月用户列表</strong> <a href="vbscript:tb()" class="lfont1">高级搜索</a></td>
</tr>
</table>
<table width="550" height="100" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7" id="tb_body" style="display:none">
<tr>
<td align="center" valign="bottom" bgcolor="#F7F7F7"><table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="500" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><form name="form7" method="post" action="<%=filename%>?sql=6">
●查看用户账号中包含:
<input name="var" type="text" class="input1" id="var" size="20">
的个人包月用户
<input name="Submit" type="submit" class="button1" value="确定">
</form></td>
</tr>
</table>
<table width="500" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><form name="form2" method="post" action="<%=filename%>?sql=1">
●查看服务期限少于:
<input name="var" type="text" class="input1" id="var" size="3">
天的个人包月用户
<input name="Submit" type="submit" class="button1" value="确定">
</form></td>
</tr>
</table>
<table width="500" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><form name="form3" method="post" action="<%=filename%>?sql=2">
●查看服务期限大于:
<input name="var" type="text" class="input1" id="var" size="3">
天的个人包月用户
<input name="Submit" type="submit" class="button1" value="确定">
</form></td>
</tr>
</table>
<table width="500" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><form name="form4" method="post" action="<%=filename%>?sql=3">
●查看
<input name="var" type="text" class="input1" id="var" size="3">
天未登陆过的个人包月用户
<input name="Submit" type="submit" class="button1" value="确定">
</form></td>
</tr>
</table>
<table width="500" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><form name="form5" method="post" action="<%=filename%>?sql=4">
●查看所有VIP个人包月用户
<input name="Submit" type="submit" class="button1" value="确定">
</form></td>
</tr>
</table>
<table width="500" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><form name="form6" method="post" action="<%=filename%>?sql=5">
●查看所有免费个人包月用户
<input name="Submit" type="submit" class="button1" value="确定">
</form></td>
</tr>
</table></td>
</tr>
</table>
<table width="550" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center">当前查询条件:<span class="font3"><%if request("sql")="" then%>
所有个人包月用户
<%end if%></span><%if request("sql")="1" then%>
查看服务期限少于<span class="font3"><%=request("var")%></span>天的个人包月用户
<%end if%><%if request("sql")="2" then%>
查看服务期限大于<span class="font3"><%=request("var")%></span>天的个人包月用户
<%end if%><%if request("sql")="3" then%>查看<span class="font3"><%=request("var")%></span>天未登陆过的个人包月用户
<%end if%><%if request("sql")="4" then%>
<span class="font3">查看所有VIP个人包月用户</span>
<%end if%><%if request("sql")="5" then%>
<span class="font3">查看所有免费个人包月用户</span>
<%end if%>
<%if request("sql")="6" then%>
查看用户账号中包含:<span class="font3"><%=request("var")%></span>的个人包月用户
<%end if%></td>
</tr>
</table>
<%
if request("sql")="" then
set rs=server.createobject("adodb.recordset")
rs.open "select * from member where u_type=2 order by id desc",conn,1,1
end if
if request("sql")=1 then
set rs=server.createobject("adodb.recordset")
rs.open "select * from member where u_type=2 and DATEDIFF(d,getdate(),end_time)<"&cint(request("var"))&" order by id desc",conn,1,1
end if
if request("sql")=2 then
set rs=server.createobject("adodb.recordset")
rs.open "select * from member where u_type=2 and DATEDIFF(d,getdate(),end_time)>"&cint(request("var"))&" order by id desc",conn,1,1
end if
if request("sql")=3 then
set rs=server.createobject("adodb.recordset")
rs.open "select * from member where u_type=2 and datediff(day,last_login,getdate())>"&cint(request("var"))&" order by id desc",conn,1,1
end if
if request("sql")=4 then
set rs=server.createobject("adodb.recordset")
rs.open "select * from member where u_type=2 and is_vip=1 order by id desc",conn,1,1
end if
if request("sql")=5 then
set rs=server.createobject("adodb.recordset")
rs.open "select * from member where u_type=2 and is_free=1 order by id desc",conn,1,1
end if
if request("sql")=6 then
set rs=server.createobject("adodb.recordset")
rs.open "select * from member where u_type=2 and userid like '%"&request("var")&"%' order by id desc",conn,1,1
end if
if rs.eof and rs.bof then
%>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<tr>
<td height="100" align="center" bgcolor="#F7F7F7">没有查询到任何符合条件的个人包月用户</td>
</tr>
</table>
<%
else
maxpage=10 '每页最大显示数
dim totalhow '数据库中的总记录数
dim totalpage '总共页数
dim CurrentPage '当前处于的页数
currentPage=request.Querystring("page")
totalhow=rs.recordcount
if totalhow mod maxpage=0 then
totalpage= totalhow \ maxpage
else
totalpage = totalhow \ maxpage +1
end if
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPage>totalhow then
if (totalhow mod MaxPage)=0 then
currentpage= totalhow \ MaxPage
else
currentpage= totalhow \ MaxPage + 1
end if
end if
if (currentPage-1)*MaxPage<totalhow then
rs.move (currentPage-1)*MaxPage
else
currentPage=1
end if
%>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<tr>
<td height="25" align="center" bgcolor="#F7F7F7">用户账号</td>
<td align="center" bgcolor="#F7F7F7">服务期限</td>
<td align="center" bgcolor="#F7F7F7">VIP用户</td>
<td align="center" bgcolor="#F7F7F7">免费用户</td>
<td align="center" bgcolor="#F7F7F7">到期时间</td>
<td align="center" bgcolor="#F7F7F7"> 操作 </td>
</tr>
<%
i=0
do while not rs.eof
i=i+1
%>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF"><%=rs("userid")%></td>
<td height="25" align="center" bgcolor="#FFFFFF"><%if DATEDIFF("d",now,rs("end_time"))<=0 then%><span class="font3">0</span><%else%><%=DATEDIFF("d",now,rs("end_time"))%><%end if%>
天</td>
<td height="25" align="center" bgcolor="#FFFFFF"><%if rs("is_vip")=true then%>√<%else%>×<%end if%></td>
<td height="25" align="center" bgcolor="#FFFFFF"><%if rs("is_free")=true then%>√<%else%>×<%end if%></td>
<td height="25" align="center" bgcolor="#FFFFFF"><%=rs("end_time")%></td>
<td height="25" align="center" bgcolor="#FFFFFF"><a href="mb_edit.asp?id=<%=rs("id")%>" title="<%=rs("userid")%>">编辑</a>/<a href="<%=filename%>?action=mb_del&id=<%=rs("id")%>" title="<%=rs("userid")%>" onclick="javascript:{if(confirm('确定要删除用户 <%=rs("userid")%> 吗?')){return true;}return false;}">删除</a></td>
</tr>
<%
if i>=maxpage then exit do
rs.movenext
loop
%>
</table>
<table width="550" height="40" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form1" method="post">
<tr>
<td width="421" align="right"><!-- ########### 开始判断分页类型 ############### -->
<font face="Webdings">7</font>
<%if currentpage>1 then%><a href="<%=filename%>?sql=<%=request("sql")%>&var=<%=request("var")%>"><%end if%>首页<%if currentpage>1 then%></a><%end if%>
<%if currentpage>1 then%><a href="<%=filename%>?page=<%=currentPage-1%>&sql=<%=request("sql")%>&var=<%=request("var")%>"><%end if%>上一页<%if currentpage>1 then%></a><%end if%>
<%if cint(currentpage)<totalpage then%><a href="<%=filename%>?page=<%=currentPage+1%>&sql=<%=request("sql")%>&var=<%=request("var")%>"><%end if%>下一页<%if cint(currentpage)<totalpage then%></a><%end if%>
<%if cint(currentpage)<totalpage then%><a href="<%=filename%>?page=<%=totalpage%>&sql=<%=request("sql")%>&var=<%=request("var")%>"><%end if%>尾页<%if cint(currentpage)<totalpage then%></a><%end if%>
<font face="Webdings">8</font> 共有<span class="font3"><%=totalhow%></span>条记录 共<span class="font3"><%=currentPage%></span>/<span class="font3"><%=totalpage%></span>页</td>
<td width="129">
<select name="topage" size="1" class="select1" onChange="JavaScript:tourl(document.form1.topage.options[document.form1.topage.selectedIndex].value)">
<%
for j=1 to totalpage
%>
<option value="<%=filename%>?page=<%=j%>&sql=<%=request("sql")%>&var=<%=request("var")%>" <%if cint(request.Querystring("page"))=j then%>selected<%end if%>> 第<%=j%>页 </option>
<%next%>
</select></td>
</form>
<!-- ############################ 判断分页类型结束 ######################## -->
</table>
<%
end if
%>
<%
if request.Querystring("action")="mb_del" then
set rs=server.createobject("adodb.recordset")
rs.open "select * from member where id="&request.Querystring("id")&"",conn,1,1
userid=rs("userid")
rs.close
conn.execute"delete from webmessage where from_userid='"&userid&"' or to_userid='"&userid&"'"
conn.execute"delete from member where id="&request.Querystring("id")&""
conn.execute"delete from film_fav where userid='"&userid&"'"
response.write"<script language=javascript>alert('用户删除成功');location.href = '"&filename&"';</Script>"
response.end
end if
%>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -