<!--#include file="../include/hf_conn.asp"-->
<!--#include file="checkadmin.asp"-->
<script language=javascript src=../include/mouse_on_title.js></script>
<%call checkmanage("08")%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="manage.css" type="text/css">
</head>
<BODY background="../images/admin/back.gif">
<%
on error resume next
action=request("ok")

'显示银行帐号信息
if action="" then 
  Set rs = conn.Execute("select * from pay") 
er=0
if rs("bank1")="" or isnull(rs("bank1")) then er=er+1
if rs("bank2")="" or isnull(rs("bank2")) then er=er+1
if rs("bank3")="" or isnull(rs("bank3")) then er=er+1
if rs("bank4")="" or isnull(rs("bank4")) then er=er+1
if rs("bank5")="" or isnull(rs("bank5")) then er=er+1
if rs("bank6")="" or isnull(rs("bank6")) then er=er+1
if rs("bank7")="" or isnull(rs("bank7")) then er=er+1
if rs("bank8")="" or isnull(rs("bank8")) then er=er+1
if rs("bank9")="" or isnull(rs("bank9")) then er=er+1
if rs("bank10")="" or isnull(rs("bank10")) then er=er+1
if rs("bank11")="" or isnull(rs("bank11")) then er=er+1
if rs("bank12")="" or isnull(rs("bank12")) then er=er+1
if rs("bank13")="" or isnull(rs("bank13")) then er=er+1
if rs("bank14")="" or isnull(rs("bank14")) then er=er+1
if rs("bank15")="" or isnull(rs("bank15")) then er=er+1


  if er=15 then'如果er=15，则表明没有全部银行帐号信息为空
response.write "<script language='javascript'>"
response.write "alert('您还没有添加银行帐号信息，请单击“确定”开始添加。！');"
response.write "location.href='pay2.asp?ok=edit';"
response.write "</script>"
response.end
  end if

'显示银行帐号信息
response.write "<table width=98% border='1'  style='border-collapse: collapse; border-style: dotted; border-width: 0px'  bordercolor='#333333' cellspacing='0' cellpadding='2'>"
response.write "<form action=pay2.asp method=post name=setup>"
response.write "<tr class=backs><td colspan=2 class=td height=18>银行帐号设置</td></tr>"

for N=1 to 15
bankN="bank"&N
if rs(bankN)="" or isnull(rs(bankN)) then
else
response.write "<tr><td width=20% valign='middle' align='center'><img border=0 src='../IMAGES/bank/"&bankN&".gif'></td><td  valign='middle'>"&rs(bankN)&"</td></tr>"
end if
next

response.write "<tr><td colspan=2 height='30' ><INPUT name='ok' TYPE='hidden' value='edit'><INPUT name=action TYPE='submit' value='修改内容'></td></tr></form></table>"

rs.close
conn.close
set rs=nothing
set conn=nothing
end if


'编辑帐号信息
if action="edit" then 
  Set rs = conn.Execute("select * from pay") 
%>
<table width="98%" border="1"  style="border-collapse: collapse; border-style: dotted; border-width: 0px"  bordercolor="#333333" cellspacing="0" cellpadding="2">
<form action=pay2.asp method=post name=setup>
<tr class=backs><td colspan=2 class=td height=18>银行帐号设置</td></tr>

<tr><td width=20% align=right valign="middle" align="center"><img border="0" src="../IMAGES/bank/bank1.gif">&nbsp;</td><td  valign="middle"> <textarea NAME="bank1" ROWS=8  style="overflow:auto;width=90%"><%=replace(rs("bank1"),"<BR>",vbCRLF)%></textarea>&nbsp;</td></tr>
  <tr>
  <td width=20% align=right valign="middle" align="center"><img border="0" src="../IMAGES/bank/bank2.gif">&nbsp;</td><td  valign="middle"> <textarea NAME="bank2" ROWS=8  style="overflow:auto;width=90%"><%=replace(rs("bank2"),"<BR>",vbCRLF)%></textarea>
  &nbsp;</td>
  </tr>
  <tr>
  <td width=20% align=right valign="middle" align="center"><img border="0" src="../IMAGES/bank/bank3.gif">&nbsp;</td><td  valign="middle"> <textarea NAME="bank3" ROWS=8  style="overflow:auto;width=90%"><%=replace(rs("bank3"),"<BR>",vbCRLF)%></textarea>
  &nbsp;</td>
  </tr>
  <tr>
  <td width=20% align=right valign="middle" align="center"><img border="0" src="../IMAGES/bank/bank4.gif">&nbsp;</td><td  valign="middle"> <textarea NAME="bank4" ROWS=8  style="overflow:auto;width=90%"><%=replace(rs("bank4"),"<BR>",vbCRLF)%></textarea>
  &nbsp;</td>
  </tr>
  <tr>
  <td width=20% align=right valign="middle" align="center"><img border="0" src="../IMAGES/bank/bank5.gif">&nbsp;</td><td  valign="middle"> <textarea NAME="bank5" ROWS=8  style="overflow:auto;width=90%"><%=replace(rs("bank5"),"<BR>",vbCRLF)%></textarea>
  &nbsp;</td>
  </tr>
  <tr>
  <td width=20% align=right valign="middle" align="center"><img border="0" src="../IMAGES/bank/bank6.gif">&nbsp;</td><td  valign="middle"> <textarea NAME="bank6" ROWS=8  style="overflow:auto;width=90%"><%=replace(rs("bank6"),"<BR>",vbCRLF)%></textarea>
  &nbsp;</td>
  </tr>
  <tr>
  <td width=20% align=right valign="middle" align="center"><img border="0" src="../IMAGES/bank/bank7.gif">&nbsp;</td><td  valign="middle"> <textarea NAME="bank7" ROWS=8  style="overflow:auto;width=90%"><%=replace(rs("bank7"),"<BR>",vbCRLF)%></textarea>
  &nbsp;</td>
  </tr>
  <tr>
  <td width=20% align=right valign="middle" align="center"><img border="0" src="../IMAGES/bank/bank8.gif">&nbsp;</td><td  valign="middle"> <textarea NAME="bank8" ROWS=8  style="overflow:auto;width=90%"><%=replace(rs("bank8"),"<BR>",vbCRLF)%></textarea>
  &nbsp;</td>
  </tr>
  <tr>
  <td width=20% align=right valign="middle" align="center"><img border="0" src="../IMAGES/bank/bank9.gif">&nbsp;</td><td  valign="middle"> <textarea NAME="bank9" ROWS=8  style="overflow:auto;width=90%"><%=replace(rs("bank9"),"<BR>",vbCRLF)%></textarea>
  &nbsp;</td>
  </tr>
  <tr>
  <td width=20% align=right valign="middle" align="center"><img border="0" src="../IMAGES/bank/bank10.gif">&nbsp;</td><td  valign="middle"> <textarea NAME="bank10" ROWS=8 style="overflow:auto;width=90%"><%=replace(rs("bank10"),"<BR>",vbCRLF)%></textarea>
  &nbsp;</td>
  </tr>
  <tr>
  <td width=20% align=right valign="middle" align="center"><img border="0" src="../IMAGES/bank/bank11.gif">&nbsp;</td><td  valign="middle"> <textarea NAME="bank11" ROWS=8 style="overflow:auto;width=90%"><%=replace(rs("bank11"),"<BR>",vbCRLF)%></textarea>
  &nbsp;</td>
  </tr>
  <tr>
  <td width=20% align=right valign="middle" align="center"><img border="0" src="../IMAGES/bank/bank12.gif">&nbsp;</td><td  valign="middle"> <textarea NAME="bank12" ROWS=8 style="overflow:auto;width=90%"><%=replace(rs("bank12"),"<BR>",vbCRLF)%></textarea>
  &nbsp;</td>
  </tr>
  <tr>
  <td width=20% align=right valign="middle" align="center"><img border="0" src="../IMAGES/bank/bank13.gif">&nbsp;</td><td  valign="middle"> <textarea NAME="bank13" ROWS=8 style="overflow:auto;width=90%"><%=replace(rs("bank13"),"<BR>",vbCRLF)%></textarea>
  &nbsp;</td>
  </tr>
  <tr>
  <td width=20% align=right valign="middle" align="center"><img border="0" src="../IMAGES/bank/bank14.gif">&nbsp;</td><td  valign="middle"> <textarea NAME="bank14" ROWS=8 style="overflow:auto;width=90%"><%=replace(rs("bank14"),"<BR>",vbCRLF)%></textarea>
  &nbsp;</td>
  </tr>

  <tr>
  <td width=20% align=right valign="middle" align="center"><img border="0" src="../IMAGES/bank/bank15.gif">&nbsp;</td><td  valign="middle"> <textarea NAME="bank15" ROWS=8 style="overflow:auto;width=90%"><%=replace(rs("bank15"),"<BR>",vbCRLF)%></textarea>
  &nbsp;</td>
  </tr>

<tr><td colspan=2 height="30" ><INPUT name="ok" TYPE="hidden" value="ok"><INPUT name=action TYPE="submit" value="保存设置">&nbsp;</td></tr>
</form></table>
<%
rs.close
conn.close
set rs=nothing
set conn=nothing
end if

'修改保存
if action="ok" then
if request.form("bank1")="" and  request.form("bank2")="" and  request.form("bank3")="" and  request.form("bank4")="" and request.form("bank5")="" and  request.form("bank6")="" and  request.form("bank7")="" and  request.form("bank8")="" and  request.form("bank9")="" and  request.form("bank10")="" and  request.form("bank11")="" and  request.form("bank12")="" and  request.form("bank13")="" and  request.form("bank14")="" then
response.write "<script language='javascript'>"
response.write "alert('至少应填写一种银行帐号，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if

 Set rs=Server.CreateObject("ADODB.Recordset")
 sql="select * from pay"
 rs.open sql,conn,1,3

  bank=replace(request.form("bank1"),vbCRLF,"<BR>")
 rs("bank1")=bank

  bank=replace(request.form("bank2"),vbCRLF,"<BR>")

 rs("bank2")=bank

  bank=replace(request.form("bank3"),vbCRLF,"<BR>")

 rs("bank3")=bank

  bank=replace(request.form("bank4"),vbCRLF,"<BR>")

 rs("bank4")=bank

  bank=replace(request.form("bank5"),vbCRLF,"<BR>")

 rs("bank5")=bank

  bank=replace(request.form("bank6"),vbCRLF,"<BR>")

 rs("bank6")=bank

  bank=replace(request.form("bank7"),vbCRLF,"<BR>")

 rs("bank7")=bank

  bank=replace(request.form("bank8"),vbCRLF,"<BR>")

 rs("bank8")=bank

  bank=replace(request.form("bank9"),vbCRLF,"<BR>")

 rs("bank9")=bank

  bank=replace(request.form("bank10"),vbCRLF,"<BR>")

 rs("bank10")=bank

  bank=replace(request.form("bank11"),vbCRLF,"<BR>")

 rs("bank11")=bank

  bank=replace(request.form("bank12"),vbCRLF,"<BR>")

 rs("bank12")=bank

  bank=replace(request.form("bank13"),vbCRLF,"<BR>")

 rs("bank13")=bank

  bank=replace(request.form("bank14"),vbCRLF,"<BR>")

 rs("bank14")=bank

  bank=replace(request.form("bank15"),vbCRLF,"<BR>")

 rs("bank15")=bank

  rs.update
url="pay2.asp"
rs.close
set rs=nothing

response.write "<script language='javascript'>"
response.write "alert('银行帐号信息更新成功！');"
response.write "location.href='"&url&"';"
response.write "</script>"
end if%>

&nbsp;</td></tr>
</table> 
&nbsp;</td></tr>
</table>
</body></html>
