?? faction.asp
字號:
<!-- #include file="setup.asp" -->
<%
if Request.Cookies("username")="" then
error("<li>您還還未<a href=login.asp>登陸</a>社區(qū)")
end if
if instr(Request.Cookies("username")," ")>0 then:error("<li>非法操作"):end if
sql="select * from user where username='"&Request.Cookies("username")&"'"
rs.Open sql,Conn
if Request.Cookies("userpass")<>rs("userpass") then
error2("密碼錯誤!")
end if
faction=rs("faction")
experience=rs("experience")
money=rs("money")
rs.close
if Request("menu")="factionadd" then
if instr(Request.ServerVariables("http_referer"),"faction.asp") = 0 then
error("<li>來源錯誤")
end if
if faction<>"" then
error("<li>您已經(jīng)加入 "&faction&" 了!<li>請先退出 "&faction&" 才能加入新幫派!")
end if
if experience<100 then
error("<li>您的經(jīng)驗值小于 100 !")
end if
sql="select * from faction where id="&Request("id")&""
rs.Open sql,Conn
conn.execute("update [user] set faction='"&rs("factionname")&"' where username='"&Request.Cookies("username")&"'")
succtitle="加入"&rs("factionname")&"成功"
rs.close
message=message&"<li><a href=faction.asp>返回社區(qū)幫派</a><li><a href=index.asp>返回論壇首頁</a>"
succeed(""&message&"<meta http-equiv=refresh content=3;url=faction.asp>")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
elseif Request("menu")="factionout" then
if instr(Request.ServerVariables("http_referer"),"faction.asp") = 0 then
error("<li>來源錯誤")
end if
if ""&faction&""="" then
error("<li>您目前沒有加入任何幫派!")
end if
conn.execute("update [user] set faction='',experience=experience-experience/10 where username='"&Request.Cookies("username")&"'")
succtitle="退出幫派成功"
message=message&"<li><a href=faction.asp>返回社區(qū)幫派</a><li><a href=index.asp>返回論壇首頁</a>"
succeed(""&message&"<meta http-equiv=refresh content=3;url=faction.asp>")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
elseif Request("menu")="factiondel" then
if instr(Request.ServerVariables("http_referer"),"faction.asp") = 0 then
error("<li>來源錯誤")
end if
sql="select * from faction where id="&Request("id")&""
rs.Open sql,Conn,1,3
if rs("buildman")<>""&Request.Cookies("username")&"" then
error("<li>您不是該幫的幫主無法解散該幫")
end if
conn.execute("update [user] set faction='' where faction='"&rs("factionname")&"'")
rs.close
conn.execute("delete from [faction] where id="&Request("id")&"")
succtitle="解散幫派成功"
message=message&"<li><a href=faction.asp>返回社區(qū)幫派</a><li><a href=index.asp>返回論壇首頁</a>"
succeed(""&message&"<meta http-equiv=refresh content=3;url=faction.asp>")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
elseif Request("menu")="look" then
sql="select * from faction where id="&Request("id")&""
rs.Open sql,Conn
%>
<HTML><META http-equiv=Content-Type content="text/html; charset=gb2312">
<link href=images/bbs.css rel=stylesheet>
<title><%=rs("factionname")%></title>
<body onload=resizeTo(650,460)>
<table height=269 cellspacing=0 cellpadding=0 width=576 border=0 align="center">
<tbody>
<tr>
<td width="19"><img height=51 alt=""
src="images/plus/index_01.gif" width=19></td>
<td width=557 background=images/plus/index_02.gif
height=51><img height=26 src="images/plus/niu01.gif"
width=26><img height=26
src="images/plus/hyuan2.gif" width=95 border=0></td>
<td width="10"><img height=51 alt=""
src="images/plus/index_03.gif" width=30></td>
</tr>
<tr>
<td width=19 background=images/plus/index_04.gif
height=199></td>
<td width=557 height=199>
<table width="82%" border="0" align="center" cellspacing="1" cellpadding="0" bgcolor="#CCCCCC" height="132">
<tr bgcolor="#FFFFFF">
<td width="26%">
<div align="center"><font color="#000066"><b>幫派名稱:</b></font></div>
</td>
<td width="74%"> <%=rs("factionname")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="26%">
<div align="center"><font color="#000066"><b>幫派全稱:</b></font></div>
</td>
<td width="74%"> <%=rs("allname")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="26%">
<div align="center"><font color="#000066"><b>幫派宗旨:</b></font></div>
</td>
<td width="74%"> <%=rs("tenet")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="26%">
<div align="center"><font color="#000066"><b>創(chuàng)建時間:</b></font></div>
</td>
<td width="74%"> <%=rs("addtime")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="26%">
<div align="center"><font color="#000066"><b>幫主名稱:</b></font></div>
</td>
<td width="74%"> <%=rs("buildman")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="26%">
<div align="center"><font color="#000066"><b>現(xiàn)有弟子:</b></font></div>
</td>
<td width="74%"> <%=conn.execute("Select count(id)from user where faction='"&rs("factionname")&"'")(0)%> 人</td>
</tr>
</table>
</td>
<td height=199 width="10"><img height=200 alt=""
src="images/plus/index_06.gif" width=30></td>
</tr>
<tr>
<td width="19"><img height=31 src="images/plus/index_07.gif" width=19></td>
<td width=557 background=images/plus/index_08.gif
height=31></td>
<td width="10"><img height=31 src="images/plus/index_09.gif"
width=30></td>
</tr>
</tbody>
</table>
<%
rs.close
responseend
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
elseif Request("menu")="addok" then
if Request("factionname")="" then
message=message&"<li>幫派名字沒有填寫"
end if
if Request("allname")="" then
message=message&"<li>幫派全稱沒有填寫"
end if
if Request("tenet")="" then
message=message&"<li>幫派宗旨沒有填寫"
end if
sql="select * from user where username='"&Request.Cookies("username")&"'"
rs.Open sql,Conn,1,3
if experience< 5000 then
message=message&"<li>您的經(jīng)驗值小于 5000 !"
end if
if money< 5000 then
message=message&"<li>您的銀兩少于 5000 !"
end if
if message<>"" then
error(""&message&"")
end if
rs("money")=rs("money")-5000
rs("faction")=server.htmlencode(Request("factionname"))
rs.update
rs.close
rs.Open "faction",conn,1,3
rs.addnew
rs("factionname")=server.htmlencode(Request("factionname"))
rs("allname")=server.htmlencode(Request("allname"))
rs("tenet")=server.htmlencode(Request("tenet"))
rs("buildman")=Request.Cookies("username")
rs.update
rs.close
succtitle="創(chuàng)建幫派成功"
message=message&"<li><a href=faction.asp>返回社區(qū)幫派</a><li><a href=index.asp>返回論壇首頁</a>"
succeed(""&message&"<meta http-equiv=refresh content=3;url=faction.asp>")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
elseif Request("menu")="xiuok" then
factionname=server.htmlencode(Trim(Request("factionname")))
if factionname="" then
message=message&"<li>幫派名稱沒有填寫"
end if
if Request("tenet")="" then
message=message&"<li>幫派宗旨沒有填寫"
end if
if message<>"" then
error(""&message&"")
end if
sql="select * from faction where id="&Request("id")&""
rs.Open sql,Conn,1,3
if rs("buildman")<>""&Request.Cookies("username")&"" then
error("<li>您不是該幫的幫主無法修改信息")
end if
oldfactionname=rs("factionname")
rs("factionname")=factionname
rs("allname")=server.htmlencode(Request("allname"))
rs("tenet")=server.htmlencode(Request("tenet"))
rs.update
rs.close
conn.execute("update [user] set faction='"&factionname&"' where faction='"&oldfactionname&"'")
succtitle="修改幫派成功"
message=message&"<li><a href=faction.asp>返回社區(qū)幫派</a><li><a href=index.asp>返回論壇首頁</a>"
succeed(""&message&"<meta http-equiv=refresh content=3;url=faction.asp>")
end if
top
%>
<title>社區(qū)幫派</title>
<script>function checkclick(msg){if(confirm(msg)){event.returnValue=true;}else{event.returnValue=false;}}</script>
<table width="750" 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="index.asp"><%=clubname%></a><br>
<img src="images/bar.gif" border="0"><img src="images/openfold.gif" border="0"> <a href=faction.asp>社區(qū)幫派</a></td>
</tr>
</table>
<br>
<center>
<%
if Request("menu")="add" then
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -