<!-- #include file="setup.asp" -->
<%
if adminpassword<>session("pass") then
response.redirect "admin.asp?menu=login"
end if
%>
<META http-equiv=Content-Type content=text/html;charset=gb2312>
<link href=images/skins/<%=Request.Cookies("skins")%>/bbs.css rel=stylesheet>
<br><center>
<p></p>

<%

select case Request("menu")
case "alluserok"
alluserok
case "honor"
honor
case "honorok"
honorok
case "unhonorok"
unhonorok
case "reghonor"
reghonor
case "clearhonor"
clearhonor
case "clearjobinfo"
clearjobinfo
case "clearjobinfook"
clearjobinfook
case "toollist"
toollist
case "changetool"
changetool
case "changetoolok"
changetoolok
case "addtool"
addtool
case "deltool"
deltool
case "addtoolok"
addtoolok


sub reghonor
%>

<table width="80%" border="0" cellspacing="1" cellpadding="2" height="20" align="center" class=a2>
  <tr align="center"> 
    <td width="100%" colspan="4" class=a1 height="25"> </b></font><b>头衔申请列表</b></td>
  </tr>
  <tr align="center" class=a3 height="20"> 
    <td width="20%">会员名</td>
    <td width="20%">申请头衔</td>
    <td width="40%">申请理由</td>
    <td width="20%">申请时间</td>
 

<%
rs.Open "select * from reghonor",Conn,1,3
while not rs.eof
%>
  <tr align="center" class=a3 height="20"> 
    <td width="20%"><a target="_blank" href=Profile.asp?username=<%=rs("user")%>><%=rs("user")%></a></td>
    <td width="20%"><%=rs("honor")%></td>
    <td width="40%"><%=rs("info")%></td>
    <td width="20%"><%=rs("regdate")%></td>
  </tr>
</table></td>
</tr>
</table>  <br>
<%
rs.movenext
wend
rs.close
%><table border="0" width="64%" id="table1">
	<tr>
		<td><form id="form10" name="form10" method="post" action="?menu=clearhonor">
<p align="center">
<input type="submit" name="Submit" onclick=checkclick('您确定要删除申请列表?') value=" 清 除 " class="a7" style="width:70px;height:22px"></p>
		</form></td>
	</tr>
</table>

<%
end sub


sub clearhonor
%>
<b>已经清除了所有申请会员列表</b>
          <br><br><a href=javascript:history.back()>返 回</a><br> <hr width="80%">
        <br><%
rs.Open "select * from reghonor",Conn,1,3
while not rs.eof
rs.delete
rs.update
rs.movenext
wend
rs.close
end sub

sub alluserok
%>
 奖励结果报告</b></font></td>
</tr>
</table>
<br>
<%
if Request("num")="" or Request("moneynum")="" or Request("content")="" then
error2("您没有输入数据！")
Response.End
end if
n=0


num=int(Request("num"))
moneynum=int(Request("moneynum"))
content=Request("content")

select case content
case "degree"
dis="登陆次数"
sql="select * from user"
rs.Open sql,Conn,1,3
rs.movefirst
do while not rs.eof
if rs("degree")>num then
n=n+1
rs("money")=rs("money")+moneynum
rs.update
end if
rs.movenext
loop
rs.close

case "post"
dis="发表文章总数"
sql="select * from user"
rs.Open sql,Conn,1,3
rs.movefirst
do while not rs.eof

if (rs("posttopic")+rs("postrevert")) > num then
n=n+1
rs("money")=rs("money")+moneynum
rs.update
end if
rs.movenext
loop
rs.close

case "experience"
dis="经验值"
sql="select * from user"
rs.Open sql,Conn,1,3
rs.movefirst
do while not rs.eof
if rs("experience") > num then
n=n+1
rs("money")=rs("money")+moneynum
rs.update
end if
rs.movenext
loop
rs.close

end select
if n<>0 then
sql="select * from clubconfig"
rs.Open sql,Conn,1,3
rs("affichetitle")="社区办公室奖励了"&dis&"超过"&num&"的"&n&"位会员！"
rs("affichecontent")="奖励货币为"&moneynum
rs("affichetime")=now
rs("afficheman")=Request.Cookies("username")
rs.update
rs.close
end if
%>
已经为<%=dis%>超过<%=num%>的<%=n%>个人发了<%=moneynum%>社区货币
          <br><br><a href=javascript:history.back()>返 回</a><br> <hr width="80%">
        <br>
<%
if n<>0 then
Response.write "同时已经自动发布社区公告......."
end if

end sub



sub honor
%> 
<br>

<table width="64%" border="0" cellspacing="1" cellpadding="2" height="20" align="center" class=a2>
	<tr height="25" align="center" class=a1>
		<td>
		<b>头衔颁发管理</b></font></td></td>
	</tr>
	<tr align="center" class=a3>
		<td><form id="form08" name="form08" method="post" action="?menu=honorok">
社区办公室将给
  <input type="text" name="yhname" size="10">
  会员颁发
  <input type="text" name="honorname" size="10">的荣誉头衔<br><br>
   头衔颁发说明(不超过225字,用于描述该会员授予该头衔的理由)<br><textarea name="honorinfo" cols="50" rows="5"></textarea>
  <br><br><input type="submit" name="Submit" value=" 确 定 " class="a7" style="width:70px;height:22px">
</form></td>
	</tr>
</table>
<br><br>

<table width="64%" border="0" cellspacing="1" cellpadding="2" height="20" align="center" class=a2>
	<tr height="25" align="center" class=a1>
		<td>
		<b>头衔收回</b></font></td></td>
	</tr>
	<tr align="center" class=a4>
		<td><form method="post" action="?menu=unhonorok">
社区办公室将把
  <input type="text" name="yhname" size="10">
  会员的头衔收回 <br><br>
   头衔收回理由(不超过225字,用于描述收回该会员头衔的理由)<br><textarea name="unhonorinfo" cols="50" rows="5"></textarea>
  <br><br><input type="submit" name="Submit" value=" 确 定 " class="a7" style="width:70px;height:22px">
</form>
</td>
	</tr>
</table>

<%
end sub

sub honorok
%> 头衔颁发结果报告</b></font></td>
</tr>
</table>
<br>
<%
if Request("yhname")="" or Request("honorname")="" then
error2 ("请输入全部数据！")
Response.End
end if


yhname=Request("yhname")
sql="select * from user where username='"&request("yhname")&"'"
rs.Open sql,Conn,1,3
if rs.eof then
error2 ("不存在该用户！")
Response.end
end if
rs.close
honorname=Request("honorname")
honorinfo=Request("honorinfo")

rs.Open "select * from user where username='"&yhname&"'",Conn,1,3
rs("honor")=honorname
rs("honordate")=date
rs("honorinfo")=honorinfo
rs.update
rs.close

sql="select * from clubconfig"
rs.Open sql,Conn,1,3
rs("affichetitle")="社区办公室为"&yhname&"颁发了名誉头衔！"
rs("affichecontent")="头衔为:"&honorname&"<br>颁发说明:"&honorinfo
rs("affichetime")=now
rs("afficheman")=Request.Cookies("username")
rs.update
rs.close

%>
颁发成功,<%=yhname%>的头衔现在为<%=honorname%>,同时在社区公告中已经自动公布于众...
<br><br><a href=javascript:history.back()>返 回</a><br> <hr width="80%"><br>

<%
end sub

sub unhonorok
%> 头衔收回结果报告</b></font></td>
</tr>
</table>
<br>
<%
if Request("yhname")="" then
error2("您没有输入数据！")
Response.End
end if

yhname=Request("yhname")
unhonorinfo=Request("unhonorinfo")
sql="select * from user where username='"&request("yhname")&"'"
rs.Open sql,Conn,1,3
if rs.eof then
error2 ("不存在该用户！")
Response.end
end if
rs.close

rs.Open "select * from user where username='"&yhname&"'",Conn,1,3
rs("honor")=""
rs("honordate")=null
rs("honorinfo")=""
rs("newmessage")=rs("newmessage")+1
rs.update
rs.close

sql="select * from message"
rs.Open sql,Conn,1,3
rs.addnew
rs("author")=mastera
rs("incept")=Request("yhname")
rs("content")="你的头衔被社区办公室收回,理由是:"&Request("unhonorinfo")

rs("time")=now
rs.update
rs.close





%>
成功收回头衔,为了不挫伤<%=yhname%>的积极性,我们不在社区公告中公布,但是已经给该会员发送消息...
<br><br><a href=javascript:history.back()>返 回</a><br> <hr width="80%"><br>
<%
end sub

sub alluserok
%> 奖励结果报告</b></font></td>
</tr>
</table>
<br>
<%
if Request("num")="" or Request("moneynum")="" or Request("content")="" then
error2("您没有输入数据！")
Response.End
end if
n=0


num=int(Request("num"))
moneynum=int(Request("moneynum"))
content=Request("content")

select case content
case "degree"
dis="登陆次数"
sql="select * from user"
rs.Open sql,Conn,1,3
rs.movefirst
do while not rs.eof
if rs("degree")>num then
n=n+1
rs("money")=rs("money")+moneynum
rs.update
end if
rs.movenext
loop
rs.close

case "post"
dis="发表文章总数"
sql="select * from user"
rs.Open sql,Conn,1,3
rs.movefirst
do while not rs.eof

if (rs("posttopic")+rs("postrevert")) > num then
n=n+1
rs("money")=rs("money")+moneynum
rs.update
end if
rs.movenext
loop
rs.close

case "experience"
dis="经验值"
sql="select * from user"
rs.Open sql,Conn,1,3
rs.movefirst
do while not rs.eof
if rs("experience") > num then
n=n+1
rs("money")=rs("money")+moneynum
rs.update
end if
rs.movenext
loop
rs.close

end select
if n<>0 then
sql="select * from clubconfig"
rs.Open sql,Conn,1,3
rs("affichetitle")="社区办公室奖励了"&dis&"超过"&num&"的"&n&"位会员！"
rs("affichecontent")="奖励货币为"&moneynum
rs("affichetime")=now
rs("afficheman")=Request.Cookies("username")
rs.update
rs.close
end if
%>
已经为<%=dis%>超过<%=num%>的<%=n%>个人发了<%=moneynum%>社区货币
<br><br><a href=javascript:history.back()>返 回</a><br> <hr width="80%">
<br><br>
<%
if n<>0 then
Response.write "同时已经自动发布社区公告......."
end if


end sub

sub clearjobinfo
%>
<table cellspacing="1" cellpadding="0" width="64%" border="0" class="a2" align="center">
<tr><td>
<table cellspacing="0" cellpadding="0" width="100%" border="0" align="center">
  <tr height=25>
      <td class=a1 align=middle colspan=2>招聘信息列表</td>
  </tr>

<%
rs.Open "select * from app",Conn,1,3
while not rs.eof
          
%>
  <tr class="a3"></tr>
  <tr class="a3">
      <td colspan="2">　招聘公司：<a href=# onclick=javascript:open('showcompany.asp?company=<%=rs("appcompany")%>','','width=330,height=160')><%=rs("appcompany")%></a></td>
    </tr>
  <tr class="a3">
      <td width="50%">　招聘人数：<%=rs("appnum")%></td>
      <td width="50%">　基本日薪：<%=rs("apppay")%></td>
    </tr>
  <tr class="a3">
      <td width="50%">　招聘职位：<%=rs("apppost")%></td>
      <td width="50%">　招聘信息发布时间：<%=rs("appdate")%></td>
    </tr>
  <tr class="a3">
      <td colspan="2">　职位要求：<%=rs("appinfo")%></td>
  <tr class="a3">
      <td colspan="2">　</td>
    </tr>  
    </tr></td></tr>
  <%
  rs.movenext
  wend
  rs.close
  %>
    </td></tr></table></td></tr></table>
        <br><br>
<form id="form09" name="form09" method="post" action="?menu=clearjobinfook">
<input type="submit" onclick=checkclick('您确定要删除招聘信息的所有资料?') name="Submit" value="全部清除" class="a7" style="width:70px;height:22px"></form>
<%
end sub

sub clearjobinfook
%> 已清除所有的招聘信息</b></font></td>
</tr>
</table><br><br><a href=javascript:history.back()>返 回</a><br> <hr width="80%"><br>
<br>
<%
sql="select * from app"
rs.Open sql,Conn,1,3
while not rs.eof
rs.delete
rs.movenext
wend
rs.close
end sub


sub toollist
%><table cellspacing="1" cellpadding="0" width="<%=dkuan%>" border="0" class="a2" align="center">
	<tr height=25>
		<td class=a1 colspan=2 align="center">
		物品列表</td>
	</tr>
	<tr>
		<td class=a3> 
<br>
<%
rs.Open "select * from tools",Conn,1,1
while not rs.eof
%>
<table width="97%" border="0" cellspacing="0" cellpadding="0" align="center" class=a3>
  <tr> 
    <td width="19%"><a href=# onclick=javascript:open('showtool.asp?toolname=<%=rs("toolname")%>','','width=220,height=170')><%=rs("toolname")%></a></td>
    <td width="19%"></td>
    <td width="40%"><a href=?menu=changetool&toolname=<%=rs("toolname")%>>编辑物品</a></td>
    <td width="19%"><a onclick=checkclick('您确定要删除该物品的所有资料?') href=?menu=deltool&toolname=<%=rs("toolname")%>>删除物品</a></td>
  </tr>
</table><br>
<%
rs.movenext
wend
rs.close
%>
</td>
	</tr>
</table>
<%
end sub

sub changetool
%>
<table cellspacing="1" cellpadding="0" width="<%=dkuan%>" border="0" class="a2" align="center">
	<tr height=25>
		<td class=a1 colspan=2 align="center">
		编辑社区物品</td>
	</tr>
          <tr>
            <td class=a3>
<%
toolname=Request("toolname")
rs.Open "select * from tools where toolname='"&toolname&"'",Conn,1,3
%>
<form method="post" action="?menu=changetoolok&tool=<%=toolname%>">
<table width="400." border="0" cellspacing="0" cellpadding="0" height="169" align="center">
  <tr><br>
    <td valign="top">　物品名称：
      <input type="text" name="toolname" size="12" readOnly value="<%=rs("toolname")%>">
      物品图片：
      <input type="text" name="toolimg" size="12" value="<%=rs("toolimg")%>">
      <br>
      　物品价格：
      <input type="text" name="price" size="12" value="<%=rs("price")%>">
        物品类别： <select size="1" name="use">
                <option value=0 <%if rs("use")=0 then%>selected<%end if%>>可转的送礼品</option>
                <option value=1 <%if rs("use")=1 then%>selected<%end if%>>直接使用物品</option>
                <option value=2 <%if rs("use")=2 then%>selected<%end if%>>社区打擂武器</option>
                <option value=3 <%if rs("use")=3 then%>selected<%end if%>>社区打擂暗器</option>
                <option value=4 <%if rs("use")=4 then%>selected<%end if%>>社区打擂防具</option>
                </select><br>
      　物品介绍：
      <textarea rows="3" name="info" cols="36"><%=rs("info")%></textarea>
      <br>
      　如果能使用的话，请填写下面的属性，不增加的话填写0<br>
      　增加经验/攻击：
      <input type="text" name="exp" size="10" value="<%=rs("exp")%>">
      　增加体力：
      <input type="text" name="life" size="10" value="<%=rs("life")%>">
      <br>
      　增加魅力/防御：
      <input type="text" name="magicpower" size="10" value="<%=rs("magicpower")%>">
      <br>
      　　　　　　　　　　　　　　　　　　　<input type="submit" name="Submit" value=" 修 改 " class="a7" style="width:70px;height:22px">
    </td>
  </tr>
</table>

</form>    </td>
  </tr>
</table>

<%
rs.close
end sub

sub changetoolok
toolname=Request("tool")
rs.Open "select * from tools where toolname='"&toolname&"'",Conn,1,3
rs("price")=Request("price")
rs("toolimg")=Request("toolimg")
rs("use")=Request("use")
rs("exp")=Request("exp")
rs("magicpower")=Request("magicpower")
rs("life")=Request("life")
rs("info")=Request("info")
rs.update
rs.close
%>更新成功</b></font></td>
</tr></table><br><br><a href=javascript:history.back()>返 回</a><br> <hr width="80%"><br><%

end sub

sub addtool
%><table cellspacing="1" cellpadding="0" width="<%=dkuan%>" border="0" class="a2" align="center">
	<tr height=25>
		<td class=a1 colspan=2 align="center">
		增加社区物品</td>
	</tr>
          <tr>
            <td class=a3><br>

<form method="post" action="?menu=addtoolok">
<table width="400." border="0" cellspacing="0" cellpadding="0" height="169" align="center">
  <tr>
    <td valign="top">　物品名称：
      <input type="text" name="toolname" size="13">
      物品图片：
      <input type="text" name="toolimg" size="13">
      <br>
      　物品价格：
      <input type="text" name="price" size="13">
        物品类别： <select size="1" name="use">
                <option value=0>可转的送礼品</option>
                <option value=1 selected>直接使用物品</option>
                <option value=2>社区打擂武器</option>
                <option value=3>社区打擂暗器</option>
                <option value=4>社区打擂防具</option>
                </select>
<br>
      　物品介绍：
      <textarea rows="3" name="info" cols="37"></textarea>
      <br>
      　如果能使用的话，请填写下面的属性，不增加的话填写0<br>
      　增加经验/攻击：
      <input type="text" name="exp" size="10" value=0 onfocus="this.value = &quot;&quot;;">
      　增加体力：
      <input type="text" name="life" size="10" value=0 onfocus="this.value = &quot;&quot;;">
      <br>
      　增加魅力/防御：
      <input type="text" name="magicpower" size="10" value=0 onfocus="this.value = &quot;&quot;;">
      <br>
      　　　　　　　　　　　　　　　　　　　<input type="submit" name="Submit" value=" 增 加 " class="a7" style="width:70px;height:22px">
    </td>
  </tr>
</table><br>
    </td>
  </tr>
</table>
</form>

<%
end sub

sub addtoolok
if Request("toolname")="" or Request("price")="" or Request("toolimg")="" or Request("use")="" or Request("exp")="" or Request("magicpower")="" or Request("life")="" or Request("info")="" then
error2("请输入完整数据！")
Response.End
end if
rs.Open "select * from tools",Conn,1,3
rs.addnew
rs("toolname")=request("toolname")
rs("price")=Request("price")
rs("toolimg")=Request("toolimg")
rs("use")=Request("use")
rs("exp")=Request("exp")
rs("magicpower")=Request("magicpower")
rs("life")=Request("life")
rs("info")=Request("info")
rs.update
rs.close
%>增加成功</b></font></td>
</tr></table><br><br><a href=javascript:history.back()>返 回</a><br> <hr width="80%"><br><%

end sub

sub deltool
toolname=Request("toolname")
rs.Open "select * from tools where toolname='"&toolname&"'",Conn,1,3
rs.delete
rs.update
rs.close
%>删除成功</b></font></td>
</tr></table><br><br><a href=javascript:history.back()>返 回</a><br> <hr width="80%"><br><%

end sub






end select
htmlend
%>