📄 pay_typeedit.asp
字号:
<!--#include file="Conn.asp"-->
<!--#include file="Check.asp"-->
<%
Dim typeid,PT,InOut
Dim rs
typeid = Request("id")
Set rs=Conn.Execute("Select PayType,InOut From [PayType] Where ID="&typeid)
PT=rs(0)
InOut=rs(1)
rs.Close
Set rs=Nothing
%>
<html>
<head>
<title>管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="Image/style.css" type=text/css rel=stylesheet>
<script language="JavaScript" src="Image/js.js"></SCRIPT>
</head>
<%
If Request.QueryString("action")="edit" Then
Call PaySave
Else
%>
<script language="JavaScript">
<!--
function chk(theForm){
if (theForm.paytype.value == ""){
alert("请输入费用类型!");
theForm.paytype.focus();
return (false);
}
}
//-->
</script>
<body text="#000000">
<table cellpadding="2" cellspacing="1" border="0" width="95%" class="tableBorder" align=center>
<form action="?id=<%=typeid%>&action=edit" method=post id=form1 name=form1 onSubmit="return chk(this)">
<tr bgcolor=ffffff>
<th height=25 colspan=2 align="center"> </th>
</tr>
<tr bgcolor=ffffff>
<td width="28%" class=forumrow><div align="right">费用类型:</div></td>
<td class=forumrow><input name="paytype" type="text" id="paytype" value="<%=PT%>" size="20" maxlength="30">
</td>
</tr>
<tr bgcolor=ffffff>
<td width="28%" class=forumrow><div align="right">所属类型:</div></td>
<td class=forumrow><select name="io" id="io">
<%If InOut=1 Then
Response.Write " <option value='1'>收入</option>"
Response.Write "<option value='0'>支出</option>"
Else
Response.Write "<option value='0'>支出</option>"
Response.Write " <option value='1'>收入</option>"
End if
%>
</select></td>
</tr>
<tr bgcolor=ffffff>
<td class=forumrow> </td>
<td class=forumrow><input type="submit" name="Submit" value=" 提 交 "></td>
</tr>
</form>
</table>
<%End if%>
</html>
<%
Sub PaySave
Dim paytype,io,payadd,Sql
paytype = Trim(Request.Form("paytype"))
io = Trim(Request.Form("io"))
Conn.Execute("Update [PayList] Set PayType='"&paytype&"' Where PayType='"&PT&"'")
Set payadd = Server.CreateObject("ADODB.RecordSet")
Sql = "Select * From [PayType] Where ID="&Request("id")
payadd.Open Sql,Conn,1,3
payadd("PayType") = paytype
payadd("InOut") = io
payadd.Update
payadd.Close
Set payadd=Nothing
Conn.Close
Set Conn=Nothing
Response.Write "<script language=javascript>alert('费用类型修改成功!');"
Response.Write "window.document.location.href='Pay_Type.asp';</script>"
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -