<!-- #include file="Setup.asp" -->
<%
top
if CookieUserName=empty then error("<li>您还未<a href=Login.asp>登录</a>论坛")
If Not isNumeric(Request("how")) Then error"<li>非法提交数据哦！请与管理员联系"

money=Conn.Execute("Select UserMoney From [BBSXP_Users] where username='"&CookieUserName&"'")(0)

select case Request("menu")

case "experience1"
how=int(Request("how"))
if how<1 then error("<li>数量不能小于1")

if money<100*how then error("<li>您的金币不够！")

Randomize
d1=fix(rnd*50)+1


sql="select * from [BBSXP_Users] where username='"&CookieUserName&"'"
rs.Open sql,Conn,1,3
rs("Experience")=rs("experience")+d1*how
rs("UserMoney")=rs("UserMoney")-100*how
rs.update
rs.close

error2("已经增加了 "&d1*how&" 点经验值！")



case "experience2"
how=int(Request("how"))
if how<1 then error("<li>数量不能小于1")

if money<100*how then error("<li>您的金币不够！")

Randomize
d1=40


sql="select * from [BBSXP_Users] where username='"&CookieUserName&"'"
rs.Open sql,Conn,1,3
rs("experience")=rs("experience")+d1*how
rs("UserMoney")=rs("UserMoney")-100*how
rs.update
rs.close

error2("已经增加了 "&d1*how&" 点经验值！")


case "experience3"
how=int(Request("how"))
if how<1 then error("<li>数量不能小于1")

if money<1000*how then error("<li>您的金币不够！")

Randomize
d1=500


sql="select * from [BBSXP_Users] where username='"&CookieUserName&"'"
rs.Open sql,Conn,1,3
rs("experience")=rs("experience")+d1*how
rs("UserMoney")=rs("UserMoney")-1000*how
rs.update
rs.close

error2("已经增加了 "&d1*how&" 点经验值！")


case "experience4"
how=int(Request("how"))
if how<1 then error("<li>数量不能小于1")

if money<3000*how then error("<li>您的金币不够！")

Randomize
d1=1600


sql="select * from [BBSXP_Users] where username='"&CookieUserName&"'"
rs.Open sql,Conn,1,3
rs("experience")=rs("experience")+d1*how
rs("usermoney")=rs("usermoney")-3000*how
rs.update
rs.close

error2("已经增加了 "&d1*how&" 点经验值！")





case "honor"
honor=HTMLEncode(Request("honor"))
if Len(honor)>10 then error("<li>头衔不能大于10个字符！")
if honor="" then error("<li>头衔修改失败,没有扣你的金币！")
if money<1000 then error("<li>您的金币不够！")
conn.execute("update [BBSXP_Users] set UserHonor='"&honor&"',[usermoney]=[usermoney]-1000 where username='"&CookieUserName&"'")
error2("您已经获得了该头衔！")




case "colony"
content=HTMLEncode(Request("content"))
if content="" then error("<li>请填写群发内容!")
if money<500 then error("<li>您的金币不够！")
conn.execute("update [BBSXP_Users] set [usermoney]=[usermoney]-500 where username='"&CookieUserName&"'")

sql="select username from BBSXP_UsersOnline where username<>''"
Set Rs=Conn.Execute(sql)
do while not rs.eof
Count=Count+1
conn.Execute("insert into BBSXP_Messages (UserName,incept,content) values ('"&CookieUserName&"','"&rs("username")&"','【会员广播】："&content&"')")
conn.execute("update [BBSXP_Users] set NewMessage=NewMessage+1 where username='"&rs("username")&"'")
rs.movenext
loop
Set Rs = Nothing
error2("发送成功！\n\n共发送给 "&Count&" 位在线会员")


case "flowers"
if money<50 then error("<li>您的金币不够！")
vs=HTMLEncode(Request("vs"))
id=int(Request("id"))
if vs=CookieUserName then error("<li>不能自己送自己！")
If conn.Execute("Select id From [BBSXP_Users] where username='"&vs&"'" ).eof Then error("<li>系统不存在"&vs&"的资料")
conn.execute("update [BBSXP_Users] set [usermoney]=[usermoney]-50 where username='"&CookieUserName&"'")
Randomize
d1=fix(rnd*25)+1
conn.execute("update [BBSXP_Users] set experience=experience+"&d1&" where username='"&vs&"'")
sql="insert into BBSXP_Messages(UserName,incept,content) values ('"&CookieUserName&"','"&vs&"','【系统消息】："&CookieUserName&"送您1束鲜花，您增加了"&d1&"点经验值！')"
conn.Execute(SQL)
conn.execute("update [BBSXP_Users] set newmessage=newmessage+1 where username='"&vs&"'")
error2(""&vs&"已经增加了"&d1&"点经验值！")



case "egg"
if money<50 then error("<li>您的金币不够！")
vs=HTMLEncode(Request("vs"))
if vs=CookieUserName then error("<li>不能自己送自己！")
If conn.Execute("Select id From [BBSXP_Users] where username='"&vs&"'" ).eof Then error("<li>系统不存在"&vs&"的资料")
If conn.Execute("Select experience From [BBSXP_Users] where username='"&vs&"'" )(0)<50 Then error("<li>对方经验值少于50，您不能向他丢鸡蛋")
conn.execute("update [BBSXP_Users] set [usermoney]=[usermoney]-50 where username='"&Request.Cookies("username")&"'")
Randomize
d1=fix(rnd*25)+1
conn.execute("update [BBSXP_Users] set experience=experience-"&d1&" where username='"&vs&"'")
sql="insert into BBSXP_Messages(UserName,incept,content) values ('"&CookieUserName&"','"&vs&"','【系统消息】："&CookieUserName&"送您1粒鸡蛋，您减少了"&d1&"点经验值！')"
conn.Execute(SQL)
conn.execute("update [BBSXP_Users] set newmessage=newmessage+1 where username='"&vs&"'")
error2(""&vs&"已经减少了"&d1&"点经验值！")

end select

%>
<title>社区商店</title>
<div class="mainnav">
<table border=0 width=100% align=center cellspacing=1 cellpadding=4 class=a2>
<tr class=a3>
<td height=25>&nbsp;<img src=images/Forum_nav.gif>&nbsp; <%ClubTree%> → <a href="shop.asp">社区商店</a></td>
</tr>
</table></div><br>


<SCRIPT>
function colony(){
var id=prompt("请输入您要群发的讯息！","");if(id){document.location='?menu=colony&content='+id+'';}
}

function experience1(){
var id=prompt("请输入您要购买的数量！","1");if(id){document.location='?menu=experience1&how='+id+'';}
}

function experience2(){
var id=prompt("请输入您要购买的数量！","1");if(id){document.location='?menu=experience2&how='+id+'';}
}

function experience3(){
var id=prompt("请输入您要购买的数量！","1");if(id){document.location='?menu=experience3&how='+id+'';}
}

function experience4(){
var id=prompt("请输入您要购买的数量！","1");if(id){document.location='?menu=experience4&how='+id+'';}
}

function power(){
var id=prompt("请输入您要购买的数量！","1");if(id){document.location='?menu=power&how='+id+'';}
}

function flowers(){
var id=prompt("请输入对方用户名！","");if(id){document.location='?menu=flowers&vs='+id+'';}
}

function egg(){
var id=prompt("请输入对方用户名！","");if(id){document.location='?menu=egg&vs='+id+'';}
}

function honor(){
var id=prompt("请输入你想要的头衔！","");if(id){document.location='?menu=honor&honor='+id+'';}
}

</SCRIPT>
<center>


<div class="mainnav">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="111111" width="100%">
<tr>
<td width="100%">
<div align="center">
<center>
<table border="0" cellpadding="3" cellspacing="1" width="100%" class=a2>
<tr class=a1>
  <td width="50%" height="5" colspan="2" align="center"><b>头　衔</b></td>
<td width="50%" height="5" align="center" colspan="2"><b>
巧克力</b></td>
</tr>
<tr>
  <td width="15%" height="4" rowspan="2" align="center" bgcolor="FFFFFF"> <FONT color=cccccc> <IMG src="images/plus/honor.gif" border=1></FONT>
  <td width="25%" height="4" bgcolor="FFFFFF"> 名称：头衔<br>
  价格：1000 <b>金币</b><br>
  功能：自定义头衔  
<td width="15%" height="4" align="center" bgcolor="FFFFFF" rowspan="2"><FONT color=cccccc>
<IMG src="images/plus/qiaoke.gif" border=1></FONT></td>
<td width="25%" height="2" bgcolor="FFFFFF">
  名称：巧克力<br>
  价格：100 <b>金币</b><br>
  功能：随机增加50点以下经验</td>
</tr>
<tr>
  <td width="25%" height="2" bgcolor="FFFFFF">
      <input type="submit" value="我要购买" name="Submit4" onclick="honor()">
<td width="25%" height="2" bgcolor="FFFFFF">

<input type="submit" value="我要购买" name="Submit" onclick="experience1()"></td>
</tr>
</table>
</center>
</div><br>
</td>
</tr>


<tr>
<td width="100%" height="97"><div align="center">
<center>
<table border="0" cellpadding="3" cellspacing="1" width="100%" class=a2>
<tr class=a1>
<td width="50%" height="5" align="center" colspan="2"><b>
欢乐冰淇淋</b></td>
<td width="50%" height="5" align="center" colspan="2"><b>
水果拼盘</b></td>
</tr>
<tr>
<td width="15%" height="4" align="center" bgcolor="FFFFFF" rowspan="2"><FONT color=cccccc>
<IMG src="images/plus/hlbjl.gif" border=1></FONT></td>
<td width="25%" height="2" bgcolor="FFFFFF">名称：欢乐冰淇淋<br>
价格：100 <b>金币</b><br>
功能：固定增加40点经验值</td>
<td width="15%" height="4" align="center" bgcolor="FFFFFF" rowspan="2"><FONT color=cccccc>
<IMG src="images/plus/sgpp.gif" border=1></FONT></td>
<td width="25%" height="2" bgcolor="FFFFFF">
  名称：水果拼盘<br>
  价格：1000 <b>金币</b><br>
  功能：固定增加500点经验值</td>
</tr>
<tr>
<td width="25%" height="2" bgcolor="FFFFFF">
<input type="submit" value="我要购买" name="Submit5" onclick="experience2()"></td>
<td width="25%" height="2" bgcolor="FFFFFF">
<input type="submit" value="我要购买" name="Submit6"  onclick="experience3()"></td>
</tr>
</table>
</center>
</div><br>
</td>
</tr>

<tr>
<td width="100%" height="97"><div align="center">
<center>
<table border="0" cellpadding="3" cellspacing="1" width="100%" class=a2>
<tr class=a1>
<td width="50%" height="5" align="center" colspan="2"><b>
芝华士</b></td>
<td width="50%" height="5" colspan="2" align="center"><b> 讯息群发器</b></td>
</tr>
<tr>
<td width="15%" height="4" align="center" bgcolor="FFFFFF" rowspan="2"><FONT color=cccccc>
<IMG src="images/plus/zhs.gif" border=1></FONT></td>
<td width="25%" height="2" bgcolor="FFFFFF">名称：芝华士<br>
价格：3000 <b>金币</b><br>
功能：固定增加1600点经验值</td>
<td width="15%" height="4" rowspan="2" align="center" bgcolor="FFFFFF"><FONT color=cccccc> <IMG src="images/plus/colony.gif" border=1></FONT></td>
<td width="25%" height="2" bgcolor="FFFFFF">名称：讯息群发器<br>
  价格：500 <b>金币</b><br>
  功能：群发讯息给在线会员</td>
</tr>
<tr>
<td width="25%" height="2" bgcolor="FFFFFF">
<input type="submit" value="我要购买" name="Submit7" onclick="experience4()"></td>
<td width="25%" height="2" bgcolor="FFFFFF">
  <input type="submit" value="我要购买" name="Submit3" onclick="colony()"></td>
</tr>
</table>
</center>
</div><br>
</td>
</tr>

<tr>
<td width="100%" ><div align="center">
<center>
<table border="0" cellpadding="3" cellspacing="1" width="100%" class=a2>
<tr class=a1>
<td width="50%" height="5" align="center" colspan="2"><b>
鲜</b>　<b>花</b></td>
<td width="50%" height="5" align="center" colspan="2"><b>
鸡</b>　<b>蛋</b></td>
</tr>
<tr>
<td width="15%" height="4" align=center rowspan="2" bgcolor="FFFFFF"><FONT color=cccccc>
<IMG src="images/plus/flowers.gif" border=1></FONT></td>
<td width="25%" height="2" bgcolor="FFFFFF">名称：鲜花<br>
价格：50 <b>金币</b><br>
功能：增加对方的经验值</td>
<td width="15%" height="4" align="center" rowspan="2" bgcolor="FFFFFF"><FONT color=cccccc>
<IMG src="images/plus/egg.gif" border=1></FONT></td>
<td width="25%" height="2" bgcolor="FFFFFF">名称：鸡蛋<br>
价格：50 <b>金币</b><br>
功能：降低对方的经验值</td>
</tr>
<tr>
<td width="25%" height="2" bgcolor="FFFFFF">
<input type="submit" value="我要购买" name="Submit1" onclick="flowers()"></td>
<td width="25%" height="2" bgcolor="FFFFFF">
<input type="submit" value="我要购买" name="Submit2"  onclick="egg()"></td>
</tr>
</table>
</center>
</div><br>
</td>
</tr>


<tr><td>
</td></tr>
</table></div>




<%htmlend%>