?? z_bank_acuser.asp
字號:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!--#include file="Z_bankconn.asp"-->
<!--#include file="Z_bankconfig.asp"-->
<%
'chentitle="電子銀行"
'chenbackasp="bank.asp"
stats="電子銀行 儲戶用戶管理"
call nav()
call head_var(0,0,"電子銀行","Z_bank.asp")
dim rs1
if not master then
Errmsg=Errmsg+"<br>"+"<li>本頁面為銀行行長專用,請登陸后進入。<br><li>您沒有管理本頁面的權限。"
call dvbbs_error()
else
call main()
set rs1=nothing
conn1.close
set conn1=nothing
end if
call activeonline()
call footer()
sub main()
%>
<table cellpadding=3 cellspacing=1 align=center class=tableborder1>
<tr>
<th height=25>歡迎 <%=membername%> 進入銀行管理頁面</th>
</tr>
<tr>
<td class=tablebody2 width="100%">
<%call bankhead()%>
<table cellspacing="0" width="100%" cellpadding="0" class=tableborder1 align=center style="width:97%">
<tr>
<td width="100%" class=tablebody2>
<br>
<%
if request("action")="save" then
call update()
else
call userinfo()
end if
%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" class=tablebody2><a href=Z_bank.asp>返回銀行首頁</a> <a href=javascript:history.go(-1)>返回上一頁</a></td>
</tr>
</table>
<%
end sub
sub userinfo()
dim money
set rs=server.createobject("adodb.recordset")
sql="select userwealth from [user] where username='"&checkStr(trim(request("name")))&"' "
rs.open sql,conn,1,3
if rs.eof and rs.bof then
rs.close
errmsg=errmsg+"<br>"+"<li>該帳戶名在論壇中已經不存在了,可以刪除賬號"
call dvbbs_error()
exit sub
else
money=rs(0)
end if
rs.close
sql="Select * from [bank] where username='"&checkStr(trim(request("name")))&"'"
rs.open sql,conn1,1,3
if rs.eof and rs.bof then
rs.close
errmsg=errmsg+"<br>"+"<li>該帳戶名不存在。"
call dvbbs_error()
exit sub
else
dim dkdu,saveday,smoney
saveday=datediff("d",rs("date"),date())
smoney=rs("savemoney")
bankuser_setting=split(rs("bankuser_setting"),",")
'計算貸款信譽額
if rs("daikuang")>0 then
dkdu=0
elseif cint(bankuser_setting(0))=1 then
dkdu=int(money*bankuser_setting(1))
else
dkdu=int(money*bank_setting(4))
end if
%>
<form method="POST" action=Z_bank_acuser.asp?action=save>
<table cellspacing="1" cellpadding="3" class=tableborder1 align="center" style="width:100%">
<tr >
<th height="20" colspan="2" ><%=(rs("username"))%> 的銀行信息</th>
</tr>
<tr>
<td width="41%" height="7" class=tablebody2>帳戶名</td>
<td width="59%" height="7" class=tablebody1><%=rs("username")%>
<input type="hidden" name="name" size="35" value="<%=rs("username")%>">
</td>
</tr>
<tr>
<td width="41%" height="9" class=tablebody2>存款</td>
<td width="59%" height="9" class=tablebody1>
<input type="text" name="savemoney" size="20" value="<%=rs("savemoney")%>"> 元
</td>
</tr>
<tr>
<td width="41%" height="-1" class=tablebody2>貸款</td>
<td width="59%" height="-1" class=tablebody1>
<input type="text" name="daikuang" size="20" value="<%=rs("daikuang")%>"> 元
</td>
</tr>
<tr>
<td width="41%" height="-1" class=tablebody2>信譽系數(注:自定義只對本用戶生效)</td>
<td width="59%" height="-1" class=tablebody1>
<input type=radio name="credit" value=0 <%if cint(bankuser_setting(0))=0 then%>checked<%end if%>>默認
<input type=radio name="credit" value=1 <%if cint(bankuser_setting(0))=1 then%>checked<%end if%>>自定義
自定義信譽系數 <input type="text" name="creditvalue" size="10" value="<%=bankuser_setting(1)%>">
</td>
</tr>
<tr>
<td width="41%" height="-1" class=tablebody2>存款利息</td>
<td width="59%" height="-1" class=tablebody1><%if saveday<Chen_StartLixiDay then%>0<%else%><%=clng((formatnumber(smoney)*(formatnumber(culi)/100))*saveday)%><%end if%> 元
</td>
</tr>
<tr>
<td width="41%" height="-1" class=tablebody2>信貸度</td>
<td width="59%" height="-1" class=tablebody1><%=dkdu%> 元
</td>
</tr>
<tr>
<td width="41%" height="18" class=tablebody2><font color=red>凍結帳戶</font></td>
<td width="59%" height="18" class=tablebody1>
<input type=radio name=lockac value="1" <%if rs("lockac") then%>checked<%end if%>>是
<input type=radio name=lockac value="0" <%if not rs("lockac") then%>checked<%end if%>>否
</td>
</tr>
<tr >
<td height="25" colspan="2" align="center" class=tablebody2>
<input type="submit" name="Submit" value="提交">
</td>
</tr>
</table>
</form>
<%
end if
rs.close
set rs=nothing
end sub
sub update()
if request.form("savemoney")="" or (not isnumeric(request.form("savemoney"))) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>存款金額必須為數字"
elseif request.form("savemoney")<0 then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>存款金額不能是負數"
end if
if request.form("daikuang")="" or (not isnumeric(request.form("daikuang"))) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>貸款金額必須為數字"
elseif request.form("daikuang")<0 then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>貸款金額不能是負數"
end if
if request.form("creditvalue")="" or (not isnumeric(request.form("creditvalue"))) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>信譽系數必須為數字"
elseif request.form("creditvalue")<0 then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>貸款金額不能是負數"
end if
if founderr then
call bank_err()
exit sub
end if
set rs1=server.createobject("adodb.recordset")
sql="Select * from [bank] where username='"&checkStr(trim(request("name")))&"'"
rs1.open sql,conn1,1,3
if rs1.eof and rs1.bof then
errmsg=errmsg+"<br>"+"<li>該帳戶名不存在。"
call dvbbs_error()
exit sub
else
rs1("savemoney")=abs(request.form("savemoney"))
rs1("daikuang")=abs(request.form("daikuang"))
rs1("bankuser_setting")=request.form("credit")&","&abs(request.form("creditvalue"))
if request.form("lockac")="1" then
rs1("lockac")=true
else
rs1("lockac")=false
end if
rs1.update
rs1.close
end if
set rs1=nothing
sucmsg=""
if cint(log_setting(0))=1 and cint(log_setting(3))=1 then
content="更新用戶[<font color=navy>"&checkStr(trim(request("name")))&"</font>]在銀行的資料"
call logs("管理","儲戶信息管理",membername)
sucmsg=sucmsg+"<br>"+"<li>您的操作信息已經記錄在案"
end if
%>
<table cellspacing=1 cellpadding=3 align=center class=tableborder1 style="width:75%">
<tr><th height=25>銀行操作成功</th></tr>
<tr><td width="100%" class=tablebody1><b>操作成功:</b><br><br><li>歡迎光臨<%=Forum_info(0)%>電子銀行
<font color=navy><li>更新儲戶資料成功<%=sucmsg%></font><br></td></tr>
<tr><td align=center height=26 class=tablebody2><a href=<%=Request.ServerVariables("HTTP_REFERER")%>>返回上一頁</a></td></tr>
</table>
<%
end sub
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -