📄 bankedit.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/char.asp"-->
<!--#include file="inc/stats.asp"-->
<!--#include file="inc/grade.asp"-->
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 3.0">
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb_2312">
<link rel="stylesheet" type="text/css" href="forum.css">
<title><%=ForumName%>--社区银行</title>
</head>
<!--#include file="inc/theme.asp"-->
<body bgcolor="#ffffff" alink="#333333" vlink="#333333" link="#333333" topmargin="0" leftmargin="0">
<br>
<TABLE border=0 width="95%" align=center>
<TBODY>
<TR>
<TD vAlign=top width=30%><a href="<%=HostURL%>"><img border="0" src="<%=logo%>"></a></TD>
<TD valign=middle align=top>
<img src="<%=picurl%>closedfold.gif" border=0> <a href="index.asp"><%=ForumName%></a><br>
<img src="<%=picurl%>bar.gif" border=0 width=15 height=15><img src="<%=picurl%>openfold.gif" border=0> 社区银行</a>
</TD></TR></TBODY></TABLE>
<br>
<%
set rs = server.createobject("adodb.recordset")
sql = "select userwealth,bankwealth from [user] where username='"&membername&"'"
rs.open sql,conn,1,1
u_m_max = rs("userwealth")
b_m_max = rs("bankwealth")
rs.close
set rs = nothing
dim m_save
dim m_output
dim m_change
m_save = request("save")
m_output =request("m_output")
if IsNumeric(m_save) = false or IsNumeric(m_output) = false or IsNumeric(m_change) = false then
Errmsg=ErrMsg+"<Br>"+"<li>请填写操作数值!!!"
call error()
response.end
end if
if m_save<> "" then
if Clng(m_save) < 0 or u_m_max = 0 or Clng(m_save) > u_m_max then
Errmsg=ErrMsg+"<Br>"+"<li>请填写正数!!!"
Errmsg=ErrMsg+"<Br>"+"<li>您现在没有现金!!!"
Errmsg=ErrMsg+"<Br>"+"<li>您现在没有足够的现金!!!"
call error()
response.end
else
call save_user_money()
response.redirect "bank.asp"
end if
end if
if m_output<>"" then
if Clng(m_output)=0 or Clng(m_output) > b_m_max or Clng(m_output) < 0 then
Errmsg=ErrMsg+"<Br>"+"<li>请填写正数!!!"
Errmsg=ErrMsg+"<Br>"+"<li>您现在的存款数目不足!!!"&b_m_max&"--"&m_output
Errmsg=ErrMsg+"<Br>"+"<li>您可能取了负值,那样要亏本的呀!:)!!!"
call error()
else
call output_user_money()
response.redirect "bank.asp"
end if
end if
%>
</body>
</html>
<%
sub save_user_money()
sql="update [user] set userWealth=userWealth-"&m_save&",bankWealth=bankWealth+"&m_save&" where username='"&replace(trim(membername),"'","''")&"'"
conn.execute(sql)
end sub
sub output_user_money()
sql="update [user] set userWealth=userWealth+"&m_output&",bankWealth=bankWealth-"&m_output&" where username='"&replace(trim(membername),"'","''")&"'"
conn.execute(sql)
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -