📄 bank.asp
字号:
<!--#include file="up.asp"-->
<%if myconn.execute("select top 1 name from [user] where name='"&lgname&"' and password='"&lgpwd&"'").eof then
response.redirect"login.asp"
response.end
end if
dim int_rate
int_rate=0.005
set rs=server.createobject("adodb.recordset")
sql="select qian,save,meili,jingyan,banktime from [user] where name='"&lgname&"' and password='"&lgpwd&"'"
rs.open sql,myconn,1,3
if rs("banktime")<>now() then
interest=ccur(rs("save"))*int(datediff("d",cdate(rs("banktime")),cdate(now())))*int_rate
rs("save")=interest+ccur(rs("save"))
rs("banktime")=now
rs.update
end if
qmoney=replace(request.form("qmoney"),"'","")
if qmoney<>"" then
if not isInteger(qmoney) then call errmsg("请输入正确的金额!","bank.asp")
qmoney=int(qmoney)
if qmoney<1 then call errmsg("就那么点钱,我看你就留着顾面子了,别拿出来了!","bank.asp")
end if
select case request.querystring("menu")
case "save"
save
case "draw"
draw
case "virement"
virement
case"convert"
convert
end select
%>
<%sub save
if qmoney>rs("qian") then call errmsg("拜托你先看看你口袋里有多少钱行不行?别老把一毛钱当一百!","bank.asp")
rs("save")=ccur(rs("save"))+qmoney
rs("qian")=rs("qian")-qmoney
rs("banktime")=now
rs.update
rs.close
set rs=nothing
call sucmsg("存款成功!","bank.asp")
end sub
%>
<%sub draw
if qmoney>ccur(rs("save")) then call errmsg("耶!这位漂亮的先生或英俊的小姐,您真是英勇无比,请问银行很好抢吗?小心飞毛腿呀你!(请注意你的存款还有多少)","bank.asp")
rs("save")=ccur(rs("save"))-qmoney
rs("qian")=rs("qian")+qmoney
rs.update
rs.close
set rs=nothing
call sucmsg("取款成功!","bank.asp")
end sub
%>
<%sub virement
if qmoney>ccur(rs("save")) then call errmsg("你是不是好心过头啦?还是人家催债催得太紧,让你自己还有多少钱都不知道?!","bank.asp")
set rs2=server.createobject("adodb.recordset")
sql2="select save from [user] where name='"&check2(request.form("dxname"))&"'"
rs2.open sql2,myconn,1,3
if rs2.eof then
rs2.close
call errmsg("查无此人,如果您实在想送出钱来的话,送给站长就好了!","bank.asp")
end if
if replace(request.form("dxname"),"'","''")=lgname then
call errmsg("给自己转帐很好玩吗?","bank.asp")
end if
rs2("save")=ccur(rs2("save"))+qmoney
rs2.update
rs2.close
set rs2=nothing
rs("save")=ccur(rs("save"))-qmoney
rs.update
rs.close
set rs=nothing
messag="天下掉下大馅饼啦,"&lgname&"通过友情转帐赠送您"&qmoney&"元现金![enter][color=red]您无需回复这封信[/color]"
myconn.execute("insert into hand(name,neirong,tname,riqi,isnew)VALUES('"&lgname&"','"&messag&"','"&check2(request.form("dxname"))&"',now(),0)")
call sucmsg("恭喜!转帐成功,系统已自动发信通知了您的朋友!","bank.asp")
end sub
%>
<%sub convert
tm_p=(rs("meili")+rs("jingyan"))*0.5
rs("save")=ccur(rs("save"))+ccur(tm_p)
rs("meili")=0
rs("jingyan")=0
rs.update
rs.close
set rs=nothing
call sucmsg("积分转换完成,转换后您得到存款"&tm_p&"元","bank.asp")
end sub
%>
<table border=0 cellpadding=4 cellspacing=0" style=border-collapse: collapse bordercolor=#111111 width=83% >
<center>
<tr>
<td width="50%" rowspan="4"><img src=pic/bank.gif width=249 height=107></td>
<td width="50%" colspan="2" align=center>
您的财务状况 [存款利率:<font color=red><%=int_rate*1000%></font>‰] <img border=0 src=pic/fl.gif> <a onclick="{if(confirm('这个操作将会把您所有的魅力和经验转换成金钱,\n转换比例2:1即2点魅力转换成1点金钱,存入您的\n存款账户中。您的魅力和经验将被清零,您确定\n要这么做么?')){return true;}return false;}" href="?menu=convert">积分转换</a><hr></td>
</tr>
<tr><td width="24%"> 现金:</td>
<td width="26%"><b><font color="aa0000"><%=rs("qian")%> </font></b>元</td>
</tr>
<tr>
<td width="24%"> 存款(其中利息:<%=interest%>元):</td>
<td width="26%"><b><font color="aa0000"><%=rs("save")%> </font></b>元</td>
</tr>
<tr><td width="24%"> 总共:</td>
<td width="26%"><b><font color="aa0000"><%=cdbl(rs("save"))+int(rs("qian"))%> </font></b>元</td>
</tr>
</center>
</table>
<p></p>
<table cellSpacing="0" cellPadding="0" border="0">
<center>
<tr bgColor="ffffff">
<td height="20" width="219"> <b>我要存钱</b> <br>
<form action="?menu=save" method="post">
<p> 现金:<b><font color="aa0000"><%=rs("qian")%></font></b> 元<br> 存储:
<input size="10" value="1000" name="qmoney"><b></b>元
<input type="submit" value=" 存钱 " name="B1"> </p></form></td>
<td height="20" width="219"> <b>我要支钱</b> <br>
<form action="?menu=draw" method="post">
<p> 存款(含利息):<b><font color="aa0000"> <%=rs("save")%></font></b> 元<br> 支取
<input size="10" value="1000" name="qmoney">
<b></b>元
<input type="submit" value=" 支取 " name="B1">
</form></td>
<td height="20" width="219"> <b>我要转帐</b>
<form action="?menu=virement" method="post">
转帐<br><input size="5" value="1000" name="qmoney"><b></b>元 给<input size="5" name="dxname">. 
<input type="submit" value=" 转帐 " name="B1"> </form></td></tr></table>
<marquee onmouseover=this.stop() direction=left width=488 onmouseout=this.start() scrollAmount=3>
<%set rs_bankmsg=server.createobject("adodb.recordset")
sql_bankmsg="select neirong,riqi from hand where name='社区银行' order by id desc"
rs_bankmsg.open sql_bankmsg,myconn
do while not rs_bankmsg.eof
response.write"<img src=pic/msg.gif> <font color=red>"&rs_bankmsg("neirong")&"</font> ["&rs_bankmsg("riqi")&"]"
rs_bankmsg.movenext
loop
rs_bankmsg.close
set rs_bankmsg=nothing
%>
</marquee>
<hr width=98% color=<%=c1%> size=1>
</center>
<%set rs=nothing%>
<%sub sucmsg(message,url)
%><script language=vbscript>
msgbox "<%=message%>",48,"操作完成!!"
location.href="<%=url%>"
</script>
<%response.end
end sub
sub errmsg(message,url)
%><script language=vbscript>
msgbox "<%=message%>",16,"出错提示!!"
location.href="<%=url%>"
</script>
<%response.end
end sub
function isInteger(para)
on error resume next
dim str
dim l,i
if isNUll(para) then
isInteger=false
exit function
end if
str=cstr(para)
if trim(str)="" then
isInteger=false
exit function
end if
l=len(str)
for i=1 to l
if mid(str,i,1)>"9" or mid(str,i,1)<"0" then
isInteger=false
exit function
end if
next
isInteger=true
if err.number<>0 then err.clear
end function
%>
<!--#include file="down.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -