📄 g_admin.asp
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<%
stats="留言管理"
dim candel,canistop,cannotop
dim id,postid,postuser,postuserid
candel=false
canistop=false
cannotop=false
if not founduser then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>请登陆后进行操作。"
end if
if request("id")="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>请指定相关贴子。"
elseif not isInteger(request("id")) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>非法的贴子参数。"
else
id=request("id")
end if
if not founderr then
set rs=conn.execute("select postid,postuser,postuserid from gbook where postid="&id)
if rs.eof and rs.bof then
Errmsg=Errmsg+"<br><li>没有找到相关留言!"
founderr=true
else
postid=CheckStr(rs(0))
postuser=CheckStr(rs(1))
postuserid=CheckStr(rs(2))
end if
if master or supermaster then
candel=true
canistop=true
cannotop=true
elseif postuser=membername then
candel=true
canistop=false
cannotop=false
end if
end if
if founderr then
call head()
call head_var("错误信息",Request.ServerVariables("HTTP_REFERER"))
call txl_error()
else
call head()
call head_var("","")
select case request("action")
case "del"
if not candel then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
stats="删除留言"
call del()
end if
case "istop"
if not canistop then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
stats="固顶留言"
call istop()
end if
case "notop"
if not cannotop then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
else
stats="解顶留言"
call notop()
end if
end select
if founderr then
call txl_error()
else
call suc()
end if
end if
call foot()
sub del()
conn.execute("delete from gbook where postid="&postid)
conn.execute("update [user] set bookcount=bookcount-1,usermoney=usermoney-"&txl_user(8)&" where userid="&postuserid)
end sub
sub istop()
conn.execute("update gbook set istop=1 where postid="&postid)
end sub
sub notop()
conn.execute("update gbook set istop=0 where postid="&postid)
end sub
sub suc()
%>
<meta http-equiv=refresh content="3;URL=g_index.asp">
<table width="<%=txl_body(0)%>" cellpadding="0" cellspacing="0" align="center" style="border:1px <%=txl_body(9)%> solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 1px;">
<tr>
<td bgcolor=<%=txl_body(10)%>><br>
<table cellpadding=3 cellspacing=1 align=center class=tableborder1 style="width:75%">
<tr align=center>
<th width="100%">状态:<%=stats%>成功</th>
</tr>
<tr>
<td width="100%" class=tablebody1>本页面将在3秒后自动返回班级留言,<b>您可以选择以下操作:</b><br><ul>
<li><a href="index.asp">返回首页</a></li>
<li><a href="g_index.asp">班级留言</a></li>
</ul></td>
</tr>
</table>
<br>
</td>
</tr>
</table>
<%
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -