📄 admin_vipapplyuser.asp
字号:
<!--#include file=conn.asp-->
<!-- #include file="inc/const.asp" -->
<head>
<title><%=Forum_info(0)%>--管理页面</title>
<link rel="stylesheet" href="forum_admin.css" type="text/css">
<meta NAME=GENERATOR Content="Microsoft FrontPage 4.0" CHARSET=GB2312>
</head>
<BODY leftmargin="0" bottommargin="0" rightmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<%
if not master or session("flag")="" then
Errmsg=Errmsg+"<br>"+"<li>本页面为管理员专用,请<a href=admin_index.asp target=_top>登陆</a>后进入。<br><li>您没有管理本页面的权限。"
call dvbbs_error()
else
dim title,currentPage,idlist
const MaxPerPage=25
title=request("txtitle")
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
if not isempty(request("delAnnounce")) then
idlist=request("delAnnounce")
if instr(idlist,",")>0 then
dim idarr
idArr=split(idlist)
dim id
for i = 0 to ubound(idarr)
id=clng(idarr(i))
if request("agree")="批准" then
call agreeannounce(id)
end if
if request("noagree")="不批准" then
call noagreeannounce(id)
end if
next
else
if request("agree")="批准" then
call agreeannounce(clng(idlist))
end if
if request("noagree")="不批准" then
call noagreeannounce(clng(idlist))
end if
end if
end if
%>
<div align="center"><center>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<form method=Post action="admin_vipapplyuser.asp">
<div align="center">
<%
'dim sql,rs
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from [user] where vip=4 order by userid desc"
rs.open sql,conn,0,1
dim totalPut
if rs.eof and rs.bof then
response.write "<p align='center'> 还 没 有 任 何 申 请 </p>"
else
totalPut=rs.recordcount
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
showpage totalput,MaxPerPage,"admin_vipapplyuser.asp"
showContent
showpage totalput,MaxPerPage,"admin_vipapplyuser.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"admin_vipapplyuser.asp"
showContent
showpage totalput,MaxPerPage,"admin_vipapplyuser.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"admin_vipapplyuser.asp"
showContent
showpage totalput,MaxPerPage,"admin_vipapplyuser.asp"
end if
end if
rs.close
end if
sub showContent
' dim i
i=0
%>
<div align="center"><center><table class="tableBorder" cellspacing="1" width="95%" cellpadding="0">
<tr>
<th width="30%" align="center" height="20" ><strong>用户名</strong></td>
<th width="30%" align="center" height="20" ><b>注册时间</b></td>
<th width="40%" align="center" ><input type='submit' name="agree" class=buttonface value='批准'>
<input type='submit' name="noagree" class=buttonface value='不批准'>全选:<input type=checkbox value="on" name="chkall" onclick="CheckAll(this.form)">
</tr>
<%do while not rs.eof%>
<tr>
<td height="23" width="198" class=forumrow><p align="center"><a href=DISPUSER.ASP?name=<%=rs("username")%> target=_blank><%=rs("username")%></a></td>
<td height="23" width="159" class=forumrow>
<p align="center"><%=rs("addDate")%></td>
<td width="362" class=forumrow><p align="center"><input type='checkbox' name='delAnnounce' value='<%=cstr(rs("UserID"))%>'></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
</center></div></form>
<%
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 "<p align='center'> "
if CurrentPage<2 then
response.write "<font color='#000080'>首页 上一页</font> "
else
response.write "<a href="&filename&"?page=1>首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&">上一页</a> "
end if
if n-currentpage<1 then
response.write "<font color='#000080'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&">"
response.write "下一页</a> <a href="&filename&"?page="&n&">尾页</a>"
end if
response.write "<font color='#000080'> 页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
response.write "<font color='#000080'> 共<b>"&totalnumber&"</b>个事件 <b>"&maxperpage&"</b>个事件/页</font> "
end function
sub noagreeannounce(id)
dim rss,rs2,sql2,rs,sql
set rss=conn.execute("select * from [user] where userid="&cstr(id)&"")
set rs2=server.createobject("adodb.recordset")
sql2="select * from [message]"
rs2.open sql2,conn,1,3
rs2.addnew
rs2("sender")=forum_info(0)
rs2("incept")=rss("username")
rs2("title")="您的VIP会员申请没有得到批准!"
rs2("content")="您的VIP会员申请没有得到批准!请与管理员联系!"
rs2("flag")=0
rs2("issend")=1
rs2.update
rs2.close
rss.close
conn.execute("update [user] set vip=0 where userid="&cstr(id)&"")
if err.Number<>0 then
err.clear
response.write "拒 绝 失 败 !<br>"
else
response.write " 拒 绝 成 功!<br>"
end if
End sub
sub agreeannounce(id)
dim rsl,rs,sql,uid,rs1,sql1,rs2,sql2,rs3,sql3,user
set rsl=conn.execute("select * from [user] where userid="&cstr(id)&"")
user=rsl("username")
set rs=server.createobject("adodb.recordset")
sql="update [user] set vip=1 where userid="&cstr(id)
conn.execute sql
if err.Number<>0 then
err.clear
response.write "批 准 失 败 !<br>"
else
response.write "批 准 成 功!<br>"
end if
set rs2=server.createobject("adodb.recordset")
sql2="select * from [message]"
rs2.open sql2,conn,1,3
rs2.addnew
rs2("sender")=forum_info(0)
rs2("incept")=user
rs2("title")="您的VIP会员申请已经得到批准!"
rs2("content")="您的VIP会员申请已经得到批准!您现在已经是正式的VIP会员了!"
rs2("flag")=0
rs2("issend")=1
rs2.update
rs2.close
End sub
%>
</center></div>
</body>
<%end if%>
<script language="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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -