<!--#include file="conn.asp"-->
<!--#include file="conn1.asp"-->
<!--#include file="const.asp"-->
<!--#include file="chkuser.asp"-->
<%
dim menu,savem,rsbank,rssql
menu=request.querystring("menu")
%>


<html>
<head>
<title><%dim dtitle
dtitle="社区收费服务"%><%=dtitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="Forum.css" type="text/css">
</head>
<BODY "<%=Forumbody%>">
<!--#include file="theme.asp"-->


<% if lockuser=0 then
if menu="" then
    call main()
   elseif menu=1 then
    call jy()
   elseif menu=2 then
    call ml()
   elseif menu=3 then
    call ft()
   elseif menu=4 then
    call uplevel()
   elseif menu=5 then
    call fgg()
   elseif menu=6 then
    call fdx()
   elseif menu=7 then
    call kip()
   elseif menu=8 then
    call syj()
   elseif menu=9 then
    call admin()
   elseif menu=10 then
    call admin1()
end if
%>

<%
'----------------------------------修改价格-----------------------------------
sub admin1()
set rs=server.createobject("adodb.recordset")
sql="select * from [fuwu]"
rs.open sql,conn1,1,3
rs("addtili")=request.form("tili")
rs("addjinyan")=request.form("jinyan")
rs("addfatie")=request.form("fatie")
rs("addjibie")=request.form("jibie")
rs("fagonggao")=request.form("gonggao")
rs("faduangxun")=request.form("duangxun")
rs("kanip")=request.form("kanip")
rs.update
rs.close
call endinfo("完成请返回!")
end sub
%>


<% '-------------------------------删除邮件-----------------------------------
sub syj()
  set rs=server.createobject("adodb.recordset")
  sql="select * from [message] where incept='"&membername&"'and flag=1"
  rs.open sql,conn,1,3
  if not rs.eof then
    do while not rs.eof
       rs.delete
       rs.movenext
    loop
    rs.close
    sql="select * from [user] where username='"&membername&"' "
    rs.open sql,conn,1,3
    rs("userwealth") = rs("userwealth")+100
    rs.update
    rs.close    
         sql = "select * from info"
         rs.open sql,conn1,1,3            
         rs("chubei")=rs("chubei")-100
         rs.update
         rs.close
    call endinfo("你的收件箱已经清空，请返回")
  else
    call err("你的收件箱中无旧邮件了!")
  end if
  
  
end sub
%>


<% '------------------------------看IP--------------------------------
sub kip()
  dim rsip,sqlip
  set rs=server.createobject("adodb.recordset")
  set rsip=server.createobject("adodb.recordset")
  sql="select * from [user] where username='"&membername&"' "
  rs.open sql,conn,1,3
if request.form("user")="" then
   call err("你要看谁的IP呀？")
elseif rs("userwealth")<kanip then
   call err("你的现金不够!")
else
   sqlip="select * from [online] where username='"&request.form("user")&"' "
   rsip.open sqlip,conn,1,3
      if rsip.eof then
         call err("对不起此用户不在线")
      else
%>    
<table width="<%=TableWidth%>" border=0 cellspacing=1 cellpadding=3 align=center bgcolor="<%=Tablebackcolor%>"><tr bgcolor="<%=Tabletitlecolor%>" ><td align=center height=26 bgcolor="<%=Tabletitlecolor%>"><b>信息提示</b></td></tr><tr><td align=center height=70 bgcolor="<%=aTabletitlecolor%>">会员：<%=request.form("user")%>的IP是：<%=rsip("ip")%> 来自：<%=rsip("comefrom")%><br></td></tr><tr><td align=center height=26 bgcolor="<%=Tabletitlecolor%>"><a href="fuwu.asp">返回</a></td></tr></table>
<%
     rsip.close
   rs("userwealth")=rs("userwealth")-kanip
   rs.update
   rs.close
         sql = "select * from info"
         rs.open sql,conn1,1,3            
         rs("chubei")=rs("chubei")+kanip
         rs.update
         rs.close
      end if
end if

end sub%>





<% '-------------------------------群发短信------------------------------------
sub fdx()
  dim rsdx,sqldx
  set rs=server.createobject("adodb.recordset")
  set rsdx=server.createobject("adodb.recordset")
  sql="select * from [user] where username='"&membername&"' "
  rs.open sql,conn,1,3
if request.form("title")="" then
   call err("标题不能为空,请输入标题")
elseif request.form("content")="" then
   call err("你的内容是空的,必须填写内容")
elseif rs("userwealth")<fagonggao then
   call err("你的现金不够!")
else
   rs("userwealth")=rs("userwealth")-fagonggao
   rs.update
   rs.close
        if request.form("stype") = 1 then
              sql="select * from [online]"
              rs.open sql,conn,1,3
              do while not rs.eof
                  sqldx="select * from [message]"
                  rsdx.open sqldx,conn,1,3
                  rsdx.addnew
                  rsdx("sender")=membername
                  rsdx("incept")=rs("username")
                  rsdx("title")=request.form("title")
                  rsdx("content")=request.form("content")
                  rsdx("issend")=1
				  rsdx("sendtime")=now()
                  rsdx.update
                  rsdx.close
                  rs.movenext
               loop
               rs.close
         elseif request.form("stype") = 2 then
              sql="select * from [user] where userclass=18"
              rs.open sql,conn,1,3
              do while not rs.eof
                  sqldx="select * from [message]"
                  rsdx.open sqldx,conn,1,3
                  rsdx.addnew
                  rsdx("sender")=membername
                  rsdx("incept")=rs("username")
                  rsdx("title")=request.form("title")
                  rsdx("content")=request.form("content")
                  rsdx("issend")=1
				  rsdx("sendtime")=now()
                  rsdx.update
                  rsdx.close
                  rs.movenext
               loop
         elseif request.form("stype") = 3 then
              sql="select * from [user] where userclass=19"
              rs.open sql,conn,1,3
              do while not rs.eof
                  sqldx="select * from [message]"
                  rsdx.open sqldx,conn,1,3
                  rsdx.addnew
                  rsdx("sender")=membername
                  rsdx("incept")=rs("username")
                  rsdx("title")=request.form("title")
                  rsdx("content")=request.form("content")
                  rsdx("issend")=1
				  rsdx("sendtime")=now()
                  rsdx.update
                  rsdx.close
                  rs.movenext
               loop
         elseif request.form("stype") = 4 then
              sql="select * from [user] where userclass=20"
              rs.open sql,conn,1,3
              do while not rs.eof
                  sqldx="select * from [message]"
                  rsdx.open sqldx,conn,1,3
                  rsdx.addnew
                  rsdx("sender")=membername
                  rsdx("incept")=rs("username")
                  rsdx("title")=request.form("title")
                  rsdx("content")=request.form("content")
                  rsdx("issend")=1
				  rsdx("sendtime")=now()
                  rsdx.update
                  rsdx.close
                  rs.movenext
               loop
         elseif request.form("stype") = 5 then
              sql="select * from [user] where userclass>17"
              rs.open sql,conn,1,3
              do while not rs.eof
                  sqldx="select * from [message]"
                  rsdx.open sqldx,conn,1,3
                  rsdx.addnew
                  rsdx("sender")=membername
                  rsdx("incept")=rs("username")
                  rsdx("title")=request.form("title")
                  rsdx("content")=request.form("content")
                  rsdx("issend")=1
				  rsdx("sendtime")=now()
                  rsdx.update
                  rsdx.close
                  rs.movenext
               loop
         end if
         rs.close
         sql = "select * from info"
         rs.open sql,conn1,1,3            
         rs("chubei")=rs("chubei")+faduangxun
         rs.update
         rs.close
         call endinfo("完成请返回")

end if
end sub %>




<%
'---------------------------------发公告=-------------------------------
 sub fgg()
  set rs=server.createobject("adodb.recordset")
  sql="select * from [user] where username='"&membername&"' "
  rs.open sql,conn,1,3
if request.form("title")="" then
   call err("标题不能为空,请输入标题")
elseif request.form("content")="" then
   call err("你的内容是空的,必须填写内容")
elseif rs("userwealth")<fagonggao then
   call err("你的现金不够!")
else
   rs("userwealth")=rs("userwealth")-fagonggao
   rs.update
   rs.close
   sql="select * from [bbsnews]"
   rs.open sql,conn,1,3
   rs.addnew
   rs("boardid")=int(request.form("boardid"))
   rs("username")=request.form("username")
   rs("title")=request.form("title")
   rs("content")=request.form("content")
   rs.update
   rs.close
         sql = "select * from info"
         rs.open sql,conn1,1,3            
         rs("chubei")=rs("chubei")+fagonggao
         rs.update
         rs.close
         call endinfo("完成请返回")
end if
end sub %>




<%
'--------------------------------升级-------------------------
sub uplevel()
  set rs=server.createobject("adodb.recordset")
  sql="select * from [user] where username='"&membername&"' "
  rs.open sql,conn,1,3
      if rs("userwealth")<addjibie then
         call err("你没有那么多的钱")
      elseif rs("userclass")>16 then
         call err("你已经无法升级了")
      else
         rs("userwealth")=rs("userwealth")-addjibie
         rs("userclass")=rs("userclass")+1
         rs.update
         rs.close
         sql = "select * from info"
         rs.open sql,conn1,1,3            
         rs("chubei")=rs("chubei")+addjibie
         rs.update
         rs.close
         call endinfo("完成请返回")
      end if 
%>
<% end sub %>

<%
'--------------------------------购买发贴数-------------------------
sub ft()
  dim fatie
  set rs=server.createobject("adodb.recordset")
  sql="select * from [user] where username='"&membername&"' "
  rs.open sql,conn,1,3
  if request.form("fatie")="" then
  call err("请输入要购买的发贴数")
  elseif  request.form("fatie")<0 then
  call err("怎么可以买负贴？又想骗钱！")
  else
  fatie=int(request.form("fatie"))
      if rs("userwealth")<fatie*addfatie then
         call err("你没有那么多的钱")
      else
         rs("userwealth")=rs("userwealth")-fatie*addfatie
         rs("Article")=rs("Article")+fatie
         rs.update
         rs.close
         sql = "select * from info"
         rs.open sql,conn1,1,3            
         rs("chubei")=rs("chubei")+fatie*addfatie
         rs.update
         rs.close
         call endinfo("完成请返回")
      end if 
  end if
%>
<% end sub %>


<%
'--------------------------------购买魅力值-------------------------
sub ml()
  dim tili
  set rs=server.createobject("adodb.recordset")
  sql="select * from [user] where username='"&membername&"' "
  rs.open sql,conn,1,3
  if request.form("tili")="" then
  call err("请输入要购买的魅力值")
   elseif  request.form("tili")<0 then
  call err("怎么可以买负魅力？又想骗钱！")
  else
  tili=int(request.form("tili"))
      if rs("userwealth")<tili*addtili then
         call err("你没有那么多的钱")
      else
         rs("userwealth")=rs("userwealth")-tili*addtili
         rs("usercp")=rs("usercp")+tili
         rs.update
         rs.close
         sql = "select * from info"
         rs.open sql,conn1,1,3            
         rs("chubei")=rs("chubei")+tili*addtili
         rs.update
         rs.close
         call endinfo("完成请返回")
      end if 
  end if
%>
<% end sub %>



<%
'--------------------------------购买经验值-------------------------
sub jy()
  dim jinyan
  set rs=server.createobject("adodb.recordset")
  sql="select * from [user] where username='"&membername&"' "
  rs.open sql,conn,1,3
  if request.form("jinyan")="" then
  call err("请输入要购买的经验值")
   elseif  request.form("jinyan")<0 then
  call err("怎么可以买负经验？又想骗钱！")
  else
  jinyan=int(request.form("jinyan"))
      if rs("userwealth")<jinyan*addjinyan then
         call err("你没有那么多的钱")
      else
         rs("userwealth")=rs("userwealth")-jinyan*addjinyan
         rs("userep")=rs("userep")+jinyan
         rs.update
         rs.close
         sql = "select * from info"
         rs.open sql,conn1,1,3            
         rs("chubei")=rs("chubei")+jinyan*addjinyan
         rs.update
         rs.close
         call endinfo("完成请返回")
      end if 
  end if
%>
<% end sub %>


<%
'-------------------------------------------主程序-----------------------------------
sub main()
%>
<br><table width="<%=TableWidth%>" border=0 cellspacing=1 cellpadding=3 align=center bgcolor="<%=Tablebackcolor%>">
<tr bgcolor="<%=Tabletitlecolor%>" ><td align=center height=26 bgcolor="<%=Tabletitlecolor%>"><b>社区服务中心</b></td></tr>
<tr bgcolor="<%=aTabletitlecolor%>" ><td align=left height=26 >欢迎来到社区服务中心,你现有的现金<%=money%>$我们将给您提供优质的服务,请选择您的服务项目吧!</td></tr>

<form name="form1" method="post" action="fuwu.asp?menu=1"><tr bgcolor=<%=TableBodyColor%>><td align=left height=30>　　　　<b>购买经验值</b> 请输入您要购买多少经验值:<INPUT name=jinyan> <INPUT type=submit value=购买 name=submit> 单价:<%=addjinyan%>$</td></tr></form>

<form name="form2" method="post" action="fuwu.asp?menu=2"><tr bgcolor=<%=TableBodyColor%>><td align=left height=30>　　　　<b>购买魅力值</b> 请输入您要购买多少魅力值:<INPUT name=tili> <INPUT type=submit value=购买 name=submit> 单价:<%=addtili%>$ </td></tr></form>

<form name="form3" method="post" action="fuwu.asp?menu=3"><tr bgcolor=<%=TableBodyColor%>><td align=left height=30>　　　　<b>购买发贴数</b> 请输入您要购买多少发贴数:<INPUT name=fatie> <INPUT type=submit value=购买 name=submit> 单价:<%=addfatie%>$ </td></tr></form>

<form name="form4" method="post" action="fuwu.asp?menu=4"><tr bgcolor=<%=TableBodyColor%>><td align=left height=30>　　　　<b>升级服务</b> 提升一级需要<%=addjibie%>$ <INPUT type=submit value=升级 name=submit> </td></tr></form>

<tr bgcolor=<%=TableBodyColor%>><td align=left height=30>　　　　<b>公告发布</b> 公告发布每次需要<%=fagonggao%>$ </td></tr>
<form name="form5" method="post" action="fuwu.asp?menu=5"><tr bgcolor=<%=TableBodyColor%> ><td align=center height=30 >        

<table width="60%">
<tr>
<td width="20%" align=center>发布版面:</td>
<td align=left>
<% sql="select boardid,boardtype from board"
   rs.open sql,conn,1,1
%>
        <select name="boardid" size="1">
          <option value="0">论坛首页</option>
          <%
	do while not rs.eof
        response.write "<option value='"+CStr(rs("BoardID"))+"'>"+rs("Boardtype")+"</option>"+chr(13)+chr(10)
	rs.movenext
	loop
	rs.close
%>
        </select>
</td></tr>
<tr> 
      <td width="20%" valign=top> 
        <div align="center"><font color="<%=TableContentColor%>">发布人： </font></div>
      </td>
      <td width="80%">
        <input type=text name=username size=36 value="<%=membername%>" disabled>
        <input type=hidden name=username value="<%=membername%>">
      </td>
    </tr>
    <tr> 
      <td width="20%" valign=top> 
        <div align="center"><font color="<%=TableContentColor%>">标题： </font></div>
      </td>
      <td width="80%">
        <input type=text name=title size=36>
      </td>
    </tr>
    <tr> 
      <td width="20%" valign=top> 
        <div align="center"><font color="<%=TableContentColor%>">内容： </font></div>
      </td>
      <td width="80%">
        <textarea cols=35 rows=6 name="content"></textarea>
      </td>
    </tr>
    <tr>
      <td width="100%" valign=top colspan="2" align=center> 
        <input type=Submit value="发 送" name=Submit">
        &nbsp; 
        <input type="reset" name="Clear" value="清 除">
      </td>
    </tr>
</table>

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

<tr bgcolor=<%=TableBodyColor%> ><td align=left height=30 >　　　　<b>短消息群发</b> 每次<%=faduangxun%>$</td></tr>


<form name="form6" method="post" action="fuwu.asp?menu=6"><tr bgcolor=<%=TableBodyColor%> ><td align=center height=30 >  
<table width="60%">
<tr> 
                  <td width="22%"><font color="<%=TableContentColor%>">消息标题</font></td>
                  <td width="78%"> 
                    <input type="text" name="title" size="50">
                  </td>
                </tr>
<tr> 
                  <td width="22%"><font color="<%=TableContentColor%>">接收方选择</font></td>
                  <td width="78%"> 
                    <select name=stype size=1>
					<option value="1">所有在线用户</option>
					<option value="2">所有贵宾</option>
					<option value="3">所有版主</option>
					<option value="4">所有管理员</option>
					<option value="5">贵宾/版主/管理员</option>
					</select>
                  </td>
                </tr>
                <tr> 
                  <td width="22%" height="20" valign="top"><font color="<%=TableContentColor%>">
                    <p>消息内容</p></font>
                  </td>
                  <td width="78%" height="20"> 
                    <textarea name="content" cols="50 " rows="10"></textarea>
                  </td>
                </tr>
                <tr> 
                  <td width="22%" height="23" valign="top" align="center"> 
                    <div align="left"> </div>
                  </td>
                  <td width="78%" height="23"> 
                    <div align="center"> 
                      <input type="submit" name="Submit" value="发送消息">
                      <input type="reset" name="Submit2" value="重新填写">
                    </div>
                  </td>
                </tr>
</table>
</td></tr></form>

<form name="form7" method="post" action="fuwu.asp?menu=7">
<tr bgcolor=<%=TableBodyColor%> ><td align=left height=30 >　　　　<b>查看在线会员IP</b>  每次<%=kanip%>$ 查看<INPUT name=user>IP <INPUT type=submit value=查看 name=submit></td></tr>
</form>

<form name="form8" method="post" action="fuwu.asp?menu=8">
<tr bgcolor=<%=TableBodyColor%> ><td align=left height=30 >　　　　<b>删除已读邮件</b>  每次删除将得到银行<font color=red>100$环保奖金</font>  <INPUT type=submit value=删除 name=submit> (注意：此功能将删除你的所有以读邮件，不可恢复！)</td></tr>
</form>

<tr bgcolor="<%=Tabletitlecolor%>" height=30 ><td align=center height=26 bgcolor="<%=Tabletitlecolor%>"><%if membername=adminname then%><a href="fuwu.asp?menu=9">服务中心管理</a><%end if%></td></tr>
</table>
<%
end sub
%>
<%sub err(message) 
'-------------------------------出错信息-------------------------------
%>
<table width="<%=TableWidth%>" border=0 cellspacing=1 cellpadding=3 align=center bgcolor="<%=Tablebackcolor%>"><tr bgcolor="<%=Tabletitlecolor%>" ><td align=center height=26 bgcolor="<%=Tabletitlecolor%>"><b>出错提示</b></td></tr><tr><td align=center height=70 bgcolor="<%=aTabletitlecolor%>"><font color=black><b><%=message%></b></font><br></td></tr><tr><td align=center height=26 bgcolor="<%=Tabletitlecolor%>"><a href="javascript:history.go(-1)">返回</a></td></tr></table>
<%end sub%>


<%sub endinfo(message) 
'-------------------------------信息提示-------------------------------
%>
<table width="<%=TableWidth%>" border=0 cellspacing=1 cellpadding=3 align=center bgcolor="<%=Tablebackcolor%>"><tr bgcolor="<%=Tabletitlecolor%>" ><td align=center height=26 bgcolor="<%=Tabletitlecolor%>"><b>信息提示</b></td></tr><tr><td align=center height=70 bgcolor="<%=aTabletitlecolor%>"><%=message%><br></td></tr><tr><td align=center height=26 bgcolor="<%=Tabletitlecolor%>"><a href="fuwu.asp">返回</a></td></tr></table>
<%end sub%>


<% '-----------------------------变量设置---------------------------------
sub admin() %>
<br><table width="<%=TableWidth%>" border=0 cellspacing=1 cellpadding=3 align=center bgcolor="<%=Tablebackcolor%>">
<tr bgcolor="<%=Tabletitlecolor%>" height=22><td align=center colspan=3  height=26 bgcolor="<%=Tabletitlecolor%>"><b>服务中心管理</b></td></tr>
<tr bgcolor="<%=TableBodyColor%>" height=22><td align=center colspan=3  height=26 bgcolor="<%=aTabletitlecolor%>"><b>服务价格设置</b></td></tr>
<form name="form1" method="post" action="fuwu.asp?menu=10">
<tr bgcolor=<%=TableBodyColor%>>
<td align=right width="35%">每点经验的价格：</td>
<td align=left width="65%" colspan=2><INPUT name=jinyan value="<%=addjinyan%>"> $</td>
</tr>
<tr bgcolor=<%=TableBodyColor%>>
<td align=right width="35%">每点魅力的价格：</td>
<td align=left width="65%" colspan=2><INPUT name=tili value="<%=addtili%>"> $</td>
</tr>
<tr bgcolor=<%=TableBodyColor%>>
<td align=right width="35%">每点发贴的价格：</td>
<td align=left width="65%" colspan=2><INPUT name=fatie value="<%=addfatie%>"> $</td>
</tr>
<tr bgcolor=<%=TableBodyColor%>>
<td align=right width="35%">每提升一级的价格：</td>
<td align=left width="65%" colspan=2><INPUT name=jibie value="<%=addjibie%>"> $</td>
</tr>
<tr bgcolor=<%=TableBodyColor%>>
<td align=right width="35%">发公告的价格：</td>
<td align=left width="65%" colspan=2><INPUT name=gonggao value="<%=fagonggao%>"> $</td>
</tr>
<tr bgcolor=<%=TableBodyColor%>>
<td align=right width="35%">群发短信的价格：</td>
<td align=left width="65%" colspan=2><INPUT name=duangxun value="<%=faduangxun%>"> $</td>
</tr>
<tr bgcolor=<%=TableBodyColor%>>
<td align=right width="35%">看IP的价格：</td>
<td align=left width="65%" colspan=2><INPUT name=kanip value="<%=kanip%>"> $</td>
</tr>
<tr bgcolor=<%=TableBodyColor%>>
<td align=center colspan=3 ><INPUT type=submit value=修改 name=submit></td>
</tr>
</table>
</form>
<% end sub 
else
call err("您的银行账号被冻结，社区拒绝对您提供服务！")

end if%>



<!--#include file="footer.asp"-->