⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shop.asp

📁 BBSXP插件!社区比赛用的
💻 ASP
📖 第 1 页 / 共 2 页
字号:
conn.execute("update [user] set newmessage=newmessage+1 where username='"&p5&"'")

Application(CacheName&"choco") = p5
error2(""&p5&"已增加了28的金币!")

'新增物品
case "cake"
p6=HTMLEncode(Request("p6"))
if p6=Request.Cookies("username") then error("<li>不能自己送自己!")


if Application(CacheName&"cake")=p6 then error("<li>请勿对同一个用户进行操作!")

If conn.Execute("Select id From [user] where username='"&p6&"'" ).eof Then
error("<li>系统不存在"&p6&"的资料")
end if



if rs("money")<50 then
error("<li>您的金币不够!")
end if

rs("money")=rs("money")-50
rs.update
rs.close
conn.execute("update [user] set savemoney=savemoney+"&38&" where username='"&p6&"'")
sql="insert into message(author,incept,content) values ('"&Request.Cookies("username")&"','"&p6&"','【系统消息】:"&Request.Cookies("username")&"送您1个精美的生日蛋糕,您的存款中增加了38的金币!')"
conn.Execute(SQL)
conn.execute("update [user] set newmessage=newmessage+1 where username='"&p6&"'")

Application(CacheName&"cake") = p6
error2(""&p6&"已增加了38的金币!")


'新增物品
case "perfume"
p7=HTMLEncode(Request("p7"))
if p7=Request.Cookies("username") then error("<li>不能自己送自己!")


if Application(CacheName&"perfume")=p7 then error("<li>请勿对同一个用户进行操作!")

If conn.Execute("Select id From [user] where username='"&p7&"'" ).eof Then
error("<li>系统不存在"&p7&"的资料")
end if



if rs("money")<100 then
error("<li>您的金币不够!")
end if

rs("money")=rs("money")-100
rs.update
rs.close
conn.execute("update [user] set savemoney=savemoney+"&88&" where username='"&p7&"'")
sql="insert into message(author,incept,content) values ('"&Request.Cookies("username")&"','"&p7&"','【系统消息】:"&Request.Cookies("username")&"送您1瓶法国的高级香水,您的存款中增加了88的金币!')"
conn.Execute(SQL)
conn.execute("update [user] set newmessage=newmessage+1 where username='"&p7&"'")

Application(CacheName&"perfume") = p7
error2(""&p7&"已增加了28的金币!")

'新增物品
case "dai"
p8=HTMLEncode(Request("p8"))
if p8=Request.Cookies("username") then error("<li>不能自己送自己!")


if Application(CacheName&"dai")=p8 then error("<li>请勿对同一个用户进行操作!")

If conn.Execute("Select id From [user] where username='"&p8&"'" ).eof Then
error("<li>系统不存在"&p8&"的资料")
end if



if rs("money")<100 then
error("<li>您的金币不够!")
end if

rs("money")=rs("money")-100
rs.update
rs.close
conn.execute("update [user] set savemoney=savemoney+"&88&" where username='"&p8&"'")
sql="insert into message(author,incept,content) values ('"&Request.Cookies("username")&"','"&p8&"','【系统消息】:"&Request.Cookies("username")&"送您1条意大利领带,您的存款中增加了88的金币!')"
conn.Execute(SQL)
conn.execute("update [user] set newmessage=newmessage+1 where username='"&p8&"'")

Application(CacheName&"dai") = p8
error2(""&p8&"已增加了28的金币!")

'新增物品
case "block"
p9=HTMLEncode(Request("p9"))
if p9=Request.Cookies("username") then error("<li>不能自己送自己!")



if Application(CacheName&"block")=p9 then error("<li>请勿对同一个用户进行操作!")

If conn.Execute("Select id From [user] where username='"&p9&"'" ).eof Then
error("<li>系统不存在"&p9&"的资料")
end if
If conn.Execute("Select experience From [user] where username='"&p9&"'" )(0)<100 Then error("<li>对方存款少于50,您不能再向他(她)丢砖块了")

if rs("money")<50 then
error("<li>你身上没那么多钱!~")
end if

if rs("experience")<100 then
error("<li>喂~你经验不够100还想害人!~")
end if

rs("money")=rs("money")-50
rs("experience")=rs("experience")-10
rs.update
rs.close
conn.execute("update [user] set savemoney=savemoney-"&48&" where username='"&p9&"'")
sql="insert into message(author,incept,content) values ('"&Request.Cookies("username")&"','"&p9&"','【系统消息】:"&Request.Cookies("username")&"丢了你1个砖头,正中你额头。。医药费从你的存款扣48金币!')"
conn.Execute(SQL)
conn.execute("update [user] set newmessage=newmessage+1 where username='"&p9&"'")

Application(CacheName&"block") = p9
error2(""&p9&"已经少了48的金币,但你自己经验少了10!")

%>

<script>
alert("你已经成功送出一份礼物给<%=touser%>。");
document.location.href="shop.asp";
</script>
<%

end select
%>

<title>其他商品</title>
<%=city%>
<table border=0 width=97% 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><br>


<table border="0" cellpadding="0" align="center" cellspacing="0" style="border-collapse: collapse; border-width: 0" width="97%" id="AutoNumber1">
  <tr>
    <td width="3%"><img src="images/announce.gif" align="middle"></td>
    <td width="67%">社区公告:<marquee onmouseover="this.stop()" onmouseout="this.start()" width="400" scrollAmount="3"><a href="#" onclick="javascript:open('affiche.asp','','width=400,height=180,resizable,scrollbars')"><%=affichetitle%></a> [<%=affichetime%>]</marquee></td>
      </tr>
</table>

<SCRIPT>valigntop()</SCRIPT>
<table cellspacing="1" cellpadding="1" width="97%" align="center" border="0" class="a2"><tr><td height="25" class="a1" colspan="2"> ■<b>社区物品选购<font color=#000000>  <a href="shop2.asp"><font color=#000000>礼品店</font></a> | <a href="wqshop.asp"><font color=#000000>武器店</font></a> | <a href="aqshop.asp"><font color=#000000>暗器店</font></a> | <a href="fjshop.asp"><font color=#000000>防具店</font></a> | <a href="dangpu.asp"><font color=#000000>社区当铺</font></a>  &nbsp;&nbsp;| <a href="shop.asp"><font color=#000000>其他商品</font></a> | <a href="mytools.asp"><font color=#000000>我的物品</font></a></font></b></td></tr>

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

function experience(){
var id=prompt("请输入您要购买的数量!","1");if(id){document.location='?menu=experience&sessionid=<%=session.sessionid%>&how='+id+'';}
}

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

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

function VIPUser(){
document.location='?menu=VIPUser&sessionid=<%=session.sessionid%>';
}

function honor(){
var id=prompt("请输入荣获的头衔!","");if(id){document.location='?menu=honor&honor='+id+'';}
}
</SCRIPT>
<center>



<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="111111" width="97%">




















<!--新增物品开始-->
<tr><td width="100%" align="center" colspan="2">
<TABLE cellSpacing=1 cellPadding=1 width=100% align=center border=0 class=a2>
<TR align=middle class=a1>
<TD height=23>商品名称</TD>
<TD height=23>价钱</TD>
<TD height=23>功效</TD>
<TD height=23>简介</TD>
<TD height=23>对方</TD>
<TD height=23>确定</TD></tr>
<form method=POST action=?menu=diamond>
<TR align=middle class=a4><TD height=24>钻石戒指</TD><TD height=24>728金币</TD><TD height=24>对方加668金币</TD><TD height=24>真情能永远,一颗永流传。。</TD><TD height=24><input size="9" name="p1" value="对方名称" onfocus="this.value = &quot;&quot;;"></TD><TD height=24><input type="submit" value=" 购 买 " name="Submit"></td></TD></TR></form>

<form method=POST action=?menu=tv>
<TR align=middle class=a4><TD height=24>彩电</TD><TD height=24>588金币</TD><TD height=24>对方加588金币</TD><TD height=24>不会连这也不知道吧</TD><TD height=24><input size="9" name="p2" value="对方名称" onfocus="this.value = &quot;&quot;;"></TD><TD height=24><input type="submit" value=" 购 买 " name="Submit"></td></TD></TR></form>

<form method=POST action=?menu=redbao>
<TR align=middle class=a4><TD height=24>大红包</TD><TD height=24>600金币</TD><TD height=24>对方加588金币</TD><TD height=24>过年过节都送这</TD><TD height=24><input size="9" name="p3" value="对方名称" onfocus="this.value = &quot;&quot;;"></TD><TD height=24><input type="submit" value=" 购 买 " name="Submit"></td></TD></TR></form>

<form method=POST action=?menu=rose>
<TR align=middle class=a4><TD height=24>玫瑰花</TD><TD height=24>20金币</TD><TD height=24>对方加18金币</TD><TD height=24>MM最喜欢的花啦,浪漫的感觉~</TD><TD height=24><input size="9" name="p4" value="对方名称" onfocus="this.value = &quot;&quot;;"></TD><TD height=24><input type="submit" value=" 购 买 " name="Submit"></td></TD></TR></form>

<form method=POST action=?menu=choco>
<TR align=middle class=a4><TD height=24>巧克力</TD><TD height=24>30金币</TD><TD height=24>对方加28金币</TD><TD height=24>浓密的味道犹如爱情的味道。</TD><TD height=24><input size="9" name="p5" value="对方名称" onfocus="this.value = &quot;&quot;;"></TD><TD height=24><input type="submit" value=" 购 买 " name="Submit"></td></TD></TR></form>

<form method=POST action=?menu=cake>
<TR align=middle class=a4><TD height=24>生日蛋糕</TD><TD height=24>50金币</TD><TD height=24>对方加38金币</TD><TD height=24>庆祝生日用的。</TD><TD height=24><input size="9" name="p6" value="对方名称" onfocus="this.value = &quot;&quot;;"></TD><TD height=24><input type="submit" value=" 购 买 " name="Submit"></td></TD></TR></form>

<form method=POST action=?menu=perfume>
<TR align=middle class=a4><TD height=24>法国香水</TD><TD height=24>100金币</TD><TD height=24>对方加88金币</TD><TD height=24>想让她变得香香的吗。</TD><TD height=24><input size="9" name="p7" value="对方名称" onfocus="this.value = &quot;&quot;;"></TD><TD height=24><input type="submit" value=" 购 买 " name="Submit"></td></TD></TR></form>

<form method=POST action=?menu=dai>
<TR align=middle class=a4><TD height=24>意大利领带</TD><TD height=24>100金币</TD><TD height=24>对方加88金币</TD><TD height=24>有品味的男人所拥有的。</TD><TD height=24><input size="9" name="p8" value="对方名称" onfocus="this.value = &quot;&quot;;"></TD><TD height=24><input type="submit" value=" 购 买 " name="Submit"></td></TD></TR></form>

<form method=POST action=?menu=block>
<TR align=middle class=a4><TD height=24>砖头</TD><TD height=24>50金币</TD><TD height=24>对方加-48金币</TD><TD height=24>你不仁,我不义(自己也会扣10点的经验)</TD><TD height=24><input size="9" name="p9" value="对方名称" onfocus="this.value = &quot;&quot;;"></TD><TD height=24><input type="submit" value=" 购 买 " name="Submit"></td></TD></TR></form>
</TABLE></td></tr>
<br><br><!--物品结束-->
<!--打工开始-->
<tr><td width="100%" align="center"><br><table border="0" cellpadding="1" cellspacing="1" width="100%" class=a2>
<tr class=a1><td height="5" align="center" colspan="2"><b>如果你很想送给某人一些礼物却又囊中羞涩的话,你可以选择用下面的工作来赚一点外快</b></td></tr></table></td></tr><tr><td width="100%" height="97">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="111111" width="100%" align="center">
<tr>
<td width="100%">
<table border="0" cellpadding="3" cellspacing="1" width="100%" class=a2>
<tr>
<td width="25%" height="2" bgcolor="FFFFFF">名称:志愿工作<br>
增加:经验值<font color="#FF0000">60</font>点<br>
减少:金币<font color="#FF0000">40</font>个、体力<font color="#FF0000">10</font>点</td>
<td width="25%" height="2" bgcolor="FFFFFF">
  名称:联盟绿化<br>
  增加:经验值<font color="#FF0000">55</font>点<br>
  减少:金币<font color="#FF0000">20</font>个、体力<font color="#FF0000">25</font>点</td>
<td width="25%" height="2" bgcolor="FFFFFF">
  名称:市场调研<br>
  增加:金币<font color="#FF0000">20</font>个、经验值<font color="#FF0000">20</font>点<br>
  减少:体力<font color="#FF0000">30</font>点</td>
</tr>
<tr>
<td width="25%" height="2" bgcolor="FFFFFF"><form method=POST action=?menu=w1>
<input type="submit" value="志愿工作" name="Submit"></td>
</form>
<td width="25%" height="2" bgcolor="FFFFFF"><form method=POST action=?menu=w2>
<input type="submit" value="联盟绿化" name="Submit"></td>
</form>
<td width="25%" height="2" bgcolor="FFFFFF"><form method=POST action=?menu=w6>
<input type="submit" value="市场调研" name="Submit"></td>
</form>
</tr>
</table>
</td>
</tr>

<tr>
<td width="100%" height="97">
<table border="0" cellpadding="3" cellspacing="1" width="100%" class=a2>
<tr>
<td width="25%" height="2" bgcolor="FFFFFF">名称:做搬运工<br>
增加:金币<font color="#FF0000">55</font>个、经验值<font color="#FF0000">5</font>点<br>
减少:体力<font color="#FF0000">50</font>点</td>
<td width="25%" height="2" bgcolor="FFFFFF">
  名称:超市打工<br>
  增加:金币<font color="#FF0000">30</font>个、经验值<font color="#FF0000">20</font>点<br>
  减少:体力<font color="#FF0000">40</font>点</td>
<td width="25%" height="2" bgcolor="FFFFFF">名称:夜总会打工<br>
增加:金币<font color="#FF0000">40</font>个、经验值<font color="#FF0000">5</font>点<br>
减少:体力<font color="#FF0000">35</font>点</td>
</tr>
<tr>
<td width="25%" height="2" bgcolor="FFFFFF"><form method=POST action=?menu=w3>
<input type="submit" value="做搬运工" name="Submit"></td>
</form>
<td width="25%" height="2" bgcolor="FFFFFF"><form method=POST action=?menu=w4>
<input type="submit" value="超市打工" name="Submit"></td>
</form>
<td width="25%" height="2" bgcolor="FFFFFF"><form method=POST action=?menu=w5>
<input type="submit" value="夜总会打工" name="Submit"></td>
</form>
</tr>
</table>
<br><!--打工结束-->
</td>
</tr>
</table>
</td>
</tr>
<tr>
  <td height="97"><table border="0" cellpadding="1" cellspacing="1" width="100%" class=a2 align=center>
    <tr class=a1>
      <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" class=a3><FONT color=cccccc> 名称:改名<br>
减少:金币<font color="#FF0000">100</font>个、经验10,体力10</FONT></td>
      <td width="25%" height="2" bgcolor="FFFFFF"> “旧名”改成“新名”</td>
    </tr>
    <tr>
      <td width="25%" height="2" bgcolor="FFFFFF" align=center><form method=POST action=?menu=kill>
          <input size="9" name="n1" value="旧名" onfocus="this.value = &quot;&quot;;">
          <input size="9" name="n2" value="新名" onfocus="this.value = &quot;&quot;;">
          <input type="submit" value=" 改 名 " name="Submit22">
      </form></td>
    </tr>
  </table></td>
</tr>
</table>



<%
htmlend
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -