📄 prison.asp
字号:
<!-- #include file="setup.asp" -->
<%
if Request.Cookies("username")="" then
error("<li>您还还未<a href=login.asp>登陆</a>社区")
end if
if Request("menu")="ok" then
sql="select * from user where username='"&HTMLEncode(Request.Cookies("username"))&"'"
rs.Open sql,Conn
if rs("membercode") < 4 then
error("<li>您的权限不够,无法抓人入狱!")
end if
if Request.Cookies("userpass")<>rs("userpass") then
error("<li>您的密码错误")
end if
rs.close
if Request("username")="" then
error("<li>犯人的名称没有添写")
end if
if Request("causation")="" then
error("<li>您没有输入入狱原因")
end if
sql="select * from user where username='"&HTMLEncode(Request("username"))&"'"
rs.Open sql,Conn,1,3
if rs.eof then
error("<li>"&Request("username")&"的用户资料不存在")
end if
if rs("membercode") > 1 then
select case rs("membercode")
case 2
membercode="特邀嘉宾"
case 3
membercode="论坛版主"
case 4
membercode="管 理 员"
case 5
membercode="社区区长"
end select
error("<li>"&Request("username")&"的等级是"&membercode&",不能抓入监狱!")
end if
rs("membercode")=0
rs.update
rs.close
rs.Open "prison",Conn,1,3
rs.addnew
rs("username")=""&Request("username")&""
rs("causation")=server.htmlencode(Request("causation"))
rs("constable")=""&Request.Cookies("username")&""
rs.update
rs.close
response.redirect "prison.asp"
end if
if Request("menu")="release" then
sql="select * from user where username='"&HTMLEncode(Request.Cookies("username"))&"'"
rs.Open sql,Conn
if rs("membercode") < 4 then
error("<li>您的权限不够,无法释放犯人!")
end if
if Request.Cookies("userpass")<>rs("userpass") then
error("<li>您的密码错误")
end if
rs.close
conn.execute("update [user] set membercode=1 where username='"&HTMLEncode(Request("username"))&"'")
conn.execute("delete from [prison] where username='"&HTMLEncode(Request("username"))&"'")
response.redirect "prison.asp"
end if
if Request("menu")="look" then
sql="select * from prison where username='"&HTMLEncode(Request("username"))&"'"
rs.Open sql,Conn
%>
<HTML><HEAD><meta http-equiv=Content-Type content=text/html; charset=gb2312><link href=images/skins/<%=Request.Cookies("skins")%>/bbs.css rel=stylesheet>
</HEAD>
<TITLE>探 监</TITLE>
<BODY background="images/plus/qiu.gif" topMargin=0>
<br><table width="90%"><tr><b><%=rs("username")%></b>
<SCRIPT>
tips = new Array(6);
tips[0] = "斜着眼睛瞟了一眼看守,嘟哝着:最近的点儿太背!";
tips[1] = "两眼汪汪的说:都是我不好!对不起大家了!";
tips[2] = "脸上露出诡异的笑容:嘿嘿!要不要进来看看!";
tips[3] = "感慨万分道:一失足,成千古恨!我一定重新做人!";
tips[4] = "毒毒地点点头:哼!二十天后,老子要重新做人!";
tips[5] = "望着布满电网和铁丝网的高墙,摇头叹息着!";
index = Math.floor(Math.random() * tips.length);
document.write("" + tips[index] + "");
</SCRIPT><br><br>
入狱原因:<br> <%=rs("causation")%><br><br>
入狱时间:<br> <%=rs("cometime")%><br><br>
执行警官:<%=rs("constable")%></tr></table></BODY></HTML>
<%
rs.close
responseend
end if
top
%>
<TITLE>社区临时看守所</TITLE><table width=97% align="center" border="0">
<tr>
<td vAlign="top" width="30%"><img src="images/logo.gif" border="0"></td>
<td vAlign="center" align="top"> <img src="images/closedfold.gif" border="0"> <a href=Default.asp?menu=listtitle><%=clubname%></a><br>
<img src="images/bar.gif" border="0"><img src="images/openfold.gif" border="0"> 社区监狱</td>
</tr>
</table>
<br>
<CENTER><TABLE cellSpacing=1 cellPadding=0 border=0 class=a2 width=600><TBODY>
<TR><TD valign=middle>
<TABLE cellSpacing=0 cellPadding=3 border=0 width=100%><TBODY><TR class=a1><TD vAlign=bottom align=center><b>名字</b></TD>
<TD vAlign=bottom align=center><b>入狱时间</b></TD>
<TD vAlign=bottom align=center><b>执行警官</b></TD>
<TD vAlign=bottom align=center><b>动作</b></TD>
</TR>
<%
pagesetup=20 '设定帖子每页的显示数量
count=conn.execute("Select count(username)from prison")(0)
rs.Open "prison order by cometime Desc",Conn
If Count/pagesetup > (Count\pagesetup) then
TotalPage=(Count\pagesetup)+1
else TotalPage=(Count\pagesetup)
End If
PageCount= 0
on error resume next
RS.MoveFirst
if Request.QueryString("ToPage")<>"" then PageCount = cint(Request.QueryString("ToPage"))
if PageCount <=0 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
RS.Move (PageCount-1) * pagesetup
i=0
Do While Not RS.EOF and i<pagesetup
i=i+1
response.write "<tr class=a3><TD align=center><a href=Profile.asp?username="&rs("username")&">"&rs("username")&"</a></TD><TD align=center>"&rs("cometime")&"</TD><TD align=center><a href=Profile.asp?username="&rs("constable")&">"&rs("constable")&"</a></TD><TD align=center><a href=?menu=release&username="&rs("username")&">释 放</a> | <a href='#' onClick=javascript:open('?menu=look&username="&rs("username")&"','','resizable,scrollbars,width=210,height=160')>探 监</a></TD></tr>"
RS.MoveNext
loop
RS.Close
%>
<tr class=a4><TD align=center colspan="4">Page:[
<%
for i=1 to TotalPage
If i<>PageCount then
Response.Write "<a href=?topage="& i &">" & i & "</a> "
else
Response.Write ""&i&" "
end if
next
%>
]<br>
</TD></tr>
<form METHOD=POST><input type=hidden name=menu value=ok><tr>
<TD align=center colspan="4" class=a3>将
<input name="username" size="13"> 抓入监狱<br>
入狱原因:<input name="causation" size="20"> <input type="submit" value="确定"></TD></tr></form>
</TBODY></TABLE></TD></TR></TBODY></TABLE></CENTER></BODY>
<%
htmlend
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -