📄 z_faction.asp
字号:
<!-- #include file="up.asp" -->
<script>function checkclick(msg){if(confirm(msg)){event.returnValue=true;}else{event.returnValue=false;}}</script>
<%
dim action,fid,t1,t2,d1,d2,founduser,faction,ep,wealth,pagesetup,sql,count,TotalPage,PageCount,message,cy,cyname,cyname1,factionname,oldfactionname
action=Request("action")
fid=replace(Request("fid"),"'","''")
if fid<>"" and not isnumeric(fid) then response.redirect"login.asp"
t1="<div align='center'><center><table border='1' bordercolor='"&c1&"' cellpadding='0' cellspacing='0' style='border-collapse: collapse' width='"&tbw&"'><tr><td align=center><b>"
t2="</b></font></td></tr></table></center></div><div align=center><center><table border=1 cellpadding=0 cellspacing=0 style='border-collapse: collapse' bordercolor=#111111 width="&tbw&" >"
d1="<tr><td width="&tbw&" >"
d2="</td></tr></table></center></div>"
if isnull(lguserid) or lguserid="" then
response.redirect"login.asp"
response.end
end if
set rs=conn.execute("select faction,mark from [user] where name='"&lgname&"'")
faction=rs("faction")
ep=rs("mark")
set rs=nothing%>
<%=ttop%>
<div align='center'>
<center>
<table width="<%=tbw%>" border="1" bordercolor="<%=c1%>" cellspacing="0" class=tableBorder6 cellspacing='0' style='border-collapse: collapse'>
<tr>
<td class=td1 bgcolor="<%=c1%>" background="<%=tbg%>" height="28"> <img src="pic/gl.gif" border="0"><font color=<%=c3%>>☆</font><a href=z_faction.asp><font color=<%=c3%>>社区帮派</font></a><font color=<%=c3%>>☆</font></td>
</tr>
</table>
</center>
</div>
<%if action="" then %>
<div align='center'>
<center>
<table border='1' align='center' bordercolor="<%=c1%>" cellpadding='0' cellspacing='0' style='border-collapse: collapse' width='<%=tbw%>'>
<tr> <td align=center>
<p> <br><a href="?action=add"><img src="plus/faction/niu05.gif" width="26" height="26" border="0"><img src="plus/faction/cj.gif" width="95" height="26" border="0"></a> <a onclick=checkclick('确定要退出您现在所加入的帮派?\n\n您的积分将会减去10%') href="?action=factionout"><img src="plus/faction/niu05.gif" width="26" height="26" border="0"><img src="plus/faction/tc.gif" width="95" height="26" border="0"></a>
<br>
</p>
<table style='border-collapse: collapse' width=<%=tbw%> id=AutoNumber5 align="center" class=TBhead border="<%=c1%>">
<tr>
<td width="15%" align="center" height="25">派别</td>
<td width="40%" align="center" height="25" >宗旨</td>
<td width="15%" align="center" height="25" >创始人</td>
<td width="10%" align="center" height="25">动作</td>
<td width="20%" align="center" height="25" >帮主管理</td>
</tr>
<%pagesetup=6
faction=conn.execute("select faction from [user] where name='"&lgname&"'")(0)
set rs=server.createobject("adodb.recordset")
sql="select * from faction order by ctime desc"
rs.Open sql,conn,1
count=rs.recordcount
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")<>"" and isInteger(Request.QueryString("ToPage")) then PageCount = int(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
%>
<tr>
<td width="10%" align="center" height="25" class=TBBG1 ><a href=?action=look&fid=<%=rs("fid")%>><%=rs("name")%></a> </td>
<td width="50%" align="center" height="25" class=TBBG9 ><%=rs("zz")%> </td>
<td width="10%" align="center" height="25" class=TBBG1 ><a href=userinfo.asp?userid=<%=conn.execute("select userid from [user] where name='"&rs("cuser")&"'")(0)%>><%=rs("cuser")%></a> </td>
<td width="10%" align="center" height="25" class=TBBG9 ><%
if faction=rs("name") then
response.write "<a onclick=checkclick('您确定要退出该帮派?\n\n您的积分将会减去10%') href=?action=factionout><img alt='退出此帮' src=plus/faction/factionout.gif border=0></a>"
else
response.write "<a onclick=checkclick('您确定要加入该帮派?\n\n您的积分必须100以上') href=?action=factionadd&fid="&rs("fid")&"><img alt='加入此帮' src=plus/faction/factionadd.gif border=0></a>"
end if
%> </td>
<td width="20%" align="center" height="25" class=TBBG1><a href="?action=xiu&fid=<%=rs("fid")%>"><img height="19" alt="修改资料" src="plus/faction/factionxiu.gif" border="0"></a><a onclick=checkclick('您确定要解散该帮派?') href="?action=factiondel&fid=<%=rs("fid")%>"><img height="19" alt="解散此帮" src="plus/faction/factiondel.gif" border="0"></a></td>
</tr>
<%
RS.MoveNext
loop
RS.Close
%>
</table>
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
%>]
</CENTER><%else
select case action
case "factionadd"
if faction<>"无" then%>
<%=t1%>错误信息<%=t2&d1%><P style="MARGIN: 10px">您已经加入<%=faction%>了! 请先退出 <%=faction%> 才能加入新帮 <a href='javascript:history.go(-1)'><img border=0 src=pic/re.gif align=absmiddle> 请返回</a><%=d2%>
<%else
if ep<100 then%>
<%=t1%>错误信息<%=t2&d1%><P style="MARGIN: 10px">您的积分值小于 100 ! <a href=index.asp>返回论坛首页</a><%=d2%>
<%else
set rs=server.createobject("adodb.recordset")
sql="select * from faction where fid="&fid&""
rs.Open sql,conn
conn.execute("update [user] set faction='"&rs("name")&"' where name='"&lgname&"'")%>
<%=t1%>加入<%=rs("name")%>成功<%=t2&d1%><P style="MARGIN: 10px"><a href=z_faction.asp>返回社区帮派</a><br><br><a href=index.asp>返回论坛首页</a><%=d2%>
<% rs.close
end if
end if
case "factionout"
if ""&faction&""="无" then%>
<%=t1%>错误信息<%=t2&d1%><P style="MARGIN: 10px">您目前没有加入任何帮派<a href='javascript:history.go(-1)'><img border=0 src=pic/re.gif align=absmiddle> 请返回</a><%=d2%>
<%else
conn.execute("update [user] set faction='无',mark=mark-mark/10 where name='"&lgname&"'")%>
<%=t1%>退出帮派成功<%=t2&d1%><P style="MARGIN: 10px"><a href=z_faction.asp>返回社区帮派</a><br><br><a href=index.asp>返回论坛首页</a><%=d2%>
<%end if%>
<%case "factiondel"
set rs=server.createobject("adodb.recordset")
sql="select * from faction where fid="&fid&""
rs.Open sql,conn,1,3
if rs("cuser")<>""&lgname&"" then%>
<%=t1%>错误信息<%=t2&d1%><P style="MARGIN: 10px">您不是该帮的帮主无法解散该帮 <a href='javascript:history.go(-1)'><img border=0 src=pic/re.gif align=absmiddle> 请返回</a><%=d2%>
<%else
conn.execute("update [user] set faction='无' where faction='"&rs("name")&"'")
rs.close
conn.execute("delete from [faction] where fid="&fid&"")%>
<div align='center'>
<center>
<table border='1' bordercolor="<%=c1%>" cellpadding='0' cellspacing='0' style='border-collapse: collapse' width='<%=tbw%>'>
<tr><td align=center><b>
解散帮派成功</b></td></tr>
<div align='center'>
<center>
<table border='1' bordercolor="<%=c1%>" cellpadding='0' cellspacing='0' style='border-collapse: collapse' width='<%=tbw%>'>
<tr>
<td class=TBBG1> <P style="MARGIN: 10px"><a href=z_faction.asp>返回社区帮派</a><br><br><a href=index.asp>返回论坛首页</a></td></tr></table></center></div>
<%end if
case "look"
set rs=server.createobject("adodb.recordset")
sql="select * from faction where fid="&fid&""
rs.Open sql,conn
%>
<div align='center'>
<center>
<table border='1' bordercolor="<%=c1%>" cellpadding='0' cellspacing='0' style='border-collapse: collapse' width='<%=tbw%>'>
<tr><td align=center><b>帮派信息</b></td></tr>
<div align='center'>
<center>
<table border='1' bordercolor="<%=c1%>" cellpadding='0' cellspacing='0' style='border-collapse: collapse' width='<%=tbw%>'>
<tr>
<td width="26%" class=TBBG1>
<div align="center"><b>帮派名称:</b></div>
</td>
<td width="74%"> <%=rs("name")%></td>
</tr>
<tr>
<td width="26%" class=TBBG1>
<div align="center"><b>帮派全称:</b></div>
</td>
<td width="74%"> <%=rs("fullname")%></td>
</tr>
<tr >
<td width="26%" class=TBBG1>
<div align="center"><b>帮派宗旨:</b></div>
</td>
<td width="74%"> <%=rs("zz")%></td>
</tr>
<tr >
<td width="26%">
<div align="center"><b>创建时间:</b></div>
</td>
<td width="74%"> <%=rs("ctime")%></td>
</tr>
<tr >
<td width="26%">
<div align="center"><b>帮主名称:</b></div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -