?? bank_add.asp
字號:
<%
if session("yida_username")="" then
%>
<script language="javascript">
top.location.href="../index.asp"
</script>
<%
response.end
end if
%>
<!-- #include file="../conn2.asp" -->
<!-- #include file="../const.asp" -->
<html>
<head>
<title><%=dianming%> - 添加銀行</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style/style.css" rel="stylesheet" type="text/css">
<style>
body {
background-color:#FFFFFF;
}
</style>
</HEAD>
<BODY>
<%
if fla82="0" and session("shiwei_id")<>"1" then
%>
<br><center><img src="../images/note.gif" align="absmiddle"> <font color="#FF0000">你不具備此權限,請與管理員聯系!</font></center>
<%
response.end
end if
%>
<%if request("hid1")="" then%>
<script language="javascript">
function check()
{
if (document.form1.bank.value=="")
{
alert("有*號的必須填寫!");
return false;
}
}
</script>
<form name="form1">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td><img src="../images/r_1.gif" alt="" /></td>
<td width="100%" background="../images/r_0.gif">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td> 添加銀行(帶*號的為必填項)</td>
<td align="right"> </td>
</tr>
</table>
</td>
<td><img src="../images/r_2.gif" alt="" /></td>
</tr>
<tr>
<td></td>
<td>
<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
<tr>
<td width="25%" height="30" align="right">銀行名稱:</td>
<td width="75%" class="category">
<input type="text" name="bank" style="width:200px">
<font color="#ff0000">*</font></td>
</tr>
<tr>
<td height="30" align="right">金額:</td>
<td class="category">
<input type="text" name="price" style="width:200px" onKeyUp="value=value.replace(/[^\d.]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))" value="0" readonly="true">
</td>
</tr>
<tr>
<td height="30" align="right">銀行備注:</td>
<td class="category">
<textarea name="beizhu" cols="60" rows="3"></textarea>
</td>
</tr>
<tr>
<td height="30" align="right">默認銀行:</td>
<td class="category">
<input type="checkbox" name="moren" value="1"></td>
</tr>
<tr>
<td height="30"> </td>
<td class="category">
<input name="submit" type="submit" onClick="return check()" value=" 確 認 " class="button">
<input type="hidden" name="hid1" value="ok">
<input name="reset" type="reset" value=" 重新填寫 " class="button">
</td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td><img src="../images/r_4.gif" alt="" /></td>
<td></td>
<td><img src="../images/r_3.gif" alt="" /></td>
</tr>
</table>
</form>
<%
else
bank=request("bank")
price=request("price")
if price="" then price=0
beizhu=request("beizhu")
moren=request("moren")
sql="select * from bank where bank='"&bank&"'"
set rs=conn.execute(sql)
if rs.eof=false then
%>
<script language="javascript">
alert("您輸入的銀行名已經存在!")
window.history.go(-1)
</script>
<%
response.end
end if
set rs=server.createobject("ADODB.RecordSet")
sql="select * from bank where 1=2"
rs.open sql,conn,1,3
rs.addnew
rs("bank")=bank
rs("price")=price
rs("beizhu")=beizhu
if moren="1" then
sql="update bank set moren=false"
conn.execute(sql)
rs("moren")=true
end if
rs.update
%>
<script language="javascript">
alert("銀行添加成功!")
window.location.href="bank.asp"
</script>
<%
end if
%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -