自由分配现有点数的ASP程序
以下是代码:<!--#include file=\"conn.asp\" --><!--#include file=\"top.asp\" --><%money=5000000 '自由配点服务收费if request(\"action\")=\"dl\" thenstats=\"提交\"call jd_1()elseif request(\"action\")=\"jd\" thenstats=\"分配点数\"call jd_2()elsestats=\"协议\"call jd_3()end if'-------------------------------------开始分配点数------------------------------------------sub jd_2()id=session(\"usern\")pass=session(\"userp\")char=session(\"userc\")llt=int(request(\"llt\"))tlt=int(request(\"tlt\"))mjt=int(request(\"mjt\"))zlt=int(request(\"zlt\"))jds=llt+tlt+mjt+zltcall check()tpt=session(\"totalPoint\")if (llt < 0 ) or (zlt < 0 ) or (tlt < 0) or (mlt < 0) thenresponse.write \"<script language=javascript>alert('GM:\n\不能输入负点数!小心扣你点呀~~~');window.parent.close()</script>\"response.endend ifif tpt<>jds thenresponse.write \"<script language=javascript>alert('GM:\n\分配的点数不对呀!重新来过吧~~~');window.parent.close()</script>\"response.endend ifcall jiadian(llt,tlt,mjt,zlt,jds)response.write \"<script language=javascript>alert('GM:\n\弄好了,你去看看还满意吧?');location.href='default.asp'</script>\"response.endend sub'--------------------------------------加点----------------------------FUNCTION jiadian(llt,tlt,mjt,zlt,jds)id=session(\"usern\")char=session(\"userc\")set rs8 = Server.CreateObject(\"ADODB.Recordset\")sql8=\"select * from Character where AccountID='\"&id&\"' and Name='\"&char&\"'\"rs8.open sql8,conn,1,3rs8(\"Money\")=rs8(\"Money\")-moneyrs8(\"Strength\")=lltrs8(\"Dexterity\")=mjtrs8(\"Vitality\")=tltrs8(\"Energy\")=zltrs8(\"Inventory\") = Null'rs8(\"IsChanged\") = 1'这是我数据库里面自己加的东西,套用的时候要删掉这句。rs8.updaters8.CloseEND FUNCTION'--------------------------------检验提交的表单的数据--------------------------------------------sub jd_1()char=request.form(\"userc\")id=request.form(\"usern\")pass=request.form(\"passw\")'检查非法字符hk=0if instr(id,\"'\")<>0 then hk=1if instr(id,\"=\")<>0 then hk=1if instr(id,\"%\")<>0 then hk=1if instr(pass,\"'\")<>0 then hk=1if instr(pass,\"=\")<>0 then hk=1if instr(pass,\"%\")<>0 then hk=1if instr(char,\"'\")<>0 then hk=1if instr(char,\"=\")<>0 then hk=1if instr(char,\"%\")<>0 then hk=1session(\"userc\")=charsession(\"usern\")=idsession(\"userp\")=passif id=\"\" or pass=\"\" or char=\"\"or hk=1 thenresponse.write \"<script language=javascript>alert('GM:\n\n资料未填写完整或用户名含有非法字符!');history.back()</script>\"response.endelsecall check()end ifcall jd()end sub'-----------------------------检验-----------------------------------sub check()id=session(\"usern\")pass=session(\"userp\")char=session(\"userc\")set rs = Server.CreateObject(\"ADODB.Recordset\")sql=\"select * from MEMB_INFOwhere memb___id = '\"&id&\"' and memb__pwd='\"&pass&\"'\"set rs=conn.execute(sql)if rs.eof or rs.bof thenresponse.write \"<script language=javascript>alert('GM:\n\n帐号信息错误,请重新填写!');history.back()</script>\"response.endelseset rs1 = Server.CreateObject(\"ADODB.Recordset\")sql1=\"select * from Character where AccountID='\"&id&\"' and Name='\"&char&\"'\"rs1.open sql1,conn,1,3if rs1.eof or rs1.bof thenresponse.write \"<script language=javascript>alert('GM:\n\n帐号信息错误,请重新填写!');history.back()</script>\"response.endend if' if rs1(\"Fee\") <= 0 then money = money * 10'这是我数据库里面自己加的东西,套用的时候要去掉。if rs1(\"money\")<money thenresponse.write \"<script language=javascript>alert('收你\"&money&\"MU币不算很多吧,去拿点钱再来吧!');history.back()</script>\"response.endend ifend ifsession(\"ll\")=rs1(\"Strength\")session(\"mj\")=rs1(\"Dexterity\")session(\"tl\")=rs1(\"Vitality\")session(\"zl\")=rs1(\"Energy\")session(\"totalPoint\") = rs1(\"Strength\") + rs1(\"Dexterity\") + rs1(\"Vitality\") + rs1(\"Energy\")rs1.Closers.Close end sub'-----------------------------登陆---------------------------------sub jd_3()%><HTML><HEAD><TITLE><%=sitename%>-自由配点</TITLE><META content=\"text/html; charset=gb2312\" http-equiv=Content-Type><LINK href=\"images/mu.css\" rel=stylesheet type=text/css></HEAD><BODY bgColor=#000000 leftMargin=0 text=#666666 topMargin=0 marginheight=\"0\" marginwidth=\"0\"><DIV align=center><FORM method=post name=chgform action=\"freepoint.asp\"><input type=\"hidden\" name=\"action\" value=\"dl\"><TABLE background=images/top_bg5.gif border=0 cellPadding=0 cellSpacing=0 width=775><TBODY><TR><TD align=middle vAlign=top><BR><TABLE border=0 cellPadding=0 cellSpacing=0 width=510><TBODY><TR><TD height=1><IMG height=1 src=\"\" width=466></TD></TR><TR><TD align=right> <TABLE align=center border=0 cellPadding=5 cellSpacing=1 width=\"336\"><TBODY><TR><TD align=right class=txt_gray width=\"344\" colspan=\"2\"><ul><li><p align=\"left\">自由配点程序是为练了一半又后悔加错点的朋友制作的,可以重新分配你所有的点数(剩余点数不参加分配)。注意:在一个350级期间,精灵或圣射手使用过自由配点后,此次转生将不再有机会获得免费会员待遇。</p></li><li><p align=\"left\">收费标准:<font color=\"Blue\"><%=money%></font>MU币,非会员价格为10倍。</p></li><li><p align=\"left\"><b><font size=\"3\" color=\"#FF0000\">特别注意:使用自由配点必须将身上和包裹中的所有重要装备放仓库或转给其他朋友保管,配点的时候将清光身上所有物品,切记切记!</font></b></p></li></ul></TD></TR><TD align=right class=txt_gray width=\"83\"><DIV align=left>角色名称</DIV></TD><TD class=txt_gray width=\"261\"><INPUT maxLength=12 name=userc size=17> <DIV align=center></DIV></TD></TR><TR><TD align=right class=txt_gray width=\"83\"><DIV align=left>用户帐号</DIV></TD><TD class=txt_gray width=\"261\"><INPUT maxLength=12 name=usern size=17> <DIV align=center></DIV></TD></TR><TR><TD align=right class=txt_gray width=\"83\"><DIV align=left>用户密码</DIV></TD><TD class=txt_gray width=\"261\"><INPUT maxLength=12 name=passw size=17 type=\"password\"> <DIV align=center></DIV></TD></TR><TR><TD height=1 colspan=2 width=\"323\"><p align=\"center\"><BR><A href=\"javascript:document.chgform.submit()\"><IMG src=\"images/bt_confirm.gif\" width=\"82\" height=\"30\" border=0></A><img src=\"images/bt_back.gif\" width=\"82\" height=\"30\" style=\"cursor:hand\" onclick=\"javascript:location.href='default.asp'\"><BR><BR></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></FORM></table><Br><center><font color=red><!--#include file=\"Copyright.asp\" --></font></div></BODY></HTML><%end sub'----------------------------分配点数--------------------------------sub jd()char=session(\"userc\")id=session(\"usern\")lls=session(\"ll\")tls=session(\"tl\")mjs=session(\"mj\")zls=session(\"zl\")tpt = lls + tls + mjs + zls%><HTML><HEAD><TITLE><%=sitename%>-自由配点</TITLE><META content=\"text/html; charset=gb2312\" http-equiv=Content-Type><LINK href=\"images/mu.css\" rel=stylesheet type=text/css></HEAD><BODY bgColor=#000000 leftMargin=0 text=#666666 topMargin=0 marginheight=\"0\" marginwidth=\"0\"><DIV align=center><FORM method=post name=chgpoint action=\"freepoint.asp\"><input type=\"hidden\" name=\"action\" value=\"jd\"><TABLE background=images/top_bg5.gif border=0 cellPadding=0 cellSpacing=0 width=775><TBODY><TR><TD align=middle vAlign=top><BR><TABLE border=0 cellPadding=0 cellSpacing=0 width=510><TBODY><TR><TD height=1><IMG height=1 src=\"\" width=466></TD></TR><TR><TD align=right> <TABLE align=center border=0 cellPadding=5 cellSpacing=1 width=\"336\"><TBODY><TR><TD align=right class=txt_gray width=\"83\"><img border=\"0\" src=\"images/m2.jpg\"></TD><TD align=left class=txt_gray width=\"261\"> <font size=\"5\" color=\"#0000FF\">注意!</font><p align=\"left\">总点数是你的人物现在已经有的所有点的总数,不包括未加的剩余点数,提交前请确认你要加的各项点数和正好等于总点数,否则不能继续操作!!!</p></TD></TR><TR><TD align=right class=txt_gray width=\"83\"><DIV align=left>角色名称</DIV></TD><TD class=txt_gray width=\"261\"><%=char%><DIV align=center></DIV></TD></TR><TR><TD align=right class=txt_gray width=\"83\"><DIV align=left>用户帐号</DIV></TD><TD class=txt_gray width=\"261\"><%=id%><DIV align=center></DIV></TD></TR><TR><TD align=right class=txt_gray width=\"83\"><DIV align=left>总点数</DIV></TD><TD class=txt_gray width=\"261\"><%=tpt%><DIV align=center></DIV></TD></TR><TR><TD align=right class=txt_gray width=\"83\"><DIV align=left>力量<%=lls%></DIV></TD><TD class=txt_gray width=\"261\"><INPUT maxLength=12 name=llt size=17 value=0> <DIV align=center></DIV></TD></TR><TR><TD align=right class=txt_gray width=\"83\"><DIV align=left>敏捷<%=mjs%></DIV></TD><TD class=txt_gray width=\"261\"><INPUT maxLength=12 name=mjt size=17 value=0> <DIV align=center></DIV></TD></TR><TD align=right class=txt_gray width=\"83\"><DIV align=left>体力<%=tls%></DIV></TD><TD class=txt_gray width=\"261\"><INPUT maxLength=12 name=tlt size=17 value=0> <DIV align=center></DIV></TD></TR><TR><TD align=right class=txt_gray width=\"83\"><DIV align=left>智力<%=zls%></DIV></TD><TD class=txt_gray width=\"261\"><INPUT maxLength=12 name=zlt size=17 value=0> <DIV align=center></DIV></TD></TR><TR><TR><TD height=1 colspan=2 width=\"323\"><p align=\"center\"><BR><A href=\"javascript:document.chgpoint.submit()\"><IMG src=\"images/bt_confirm.gif\" width=\"82\" height=\"30\" border=0></A><img src=\"images/bt_back.gif\" width=\"82\" height=\"30\" style=\"cursor:hand\" onclick=\"javascript:location.href='default.asp'\"><BR><BR></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></FORM></table><Br><center><font color=red><!--#include file=\"Copyright.asp\" --></font></div></BODY></HTML><%end sub%>
商业完整版游戏发布站程序免费下载:www.98youx.com
Tags:
作者:佚名评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)
查看完整评论