⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pay_typeadd.asp

📁 泡泡堂单机版(含ASL游戏引擎源码)
💻 ASP
字号:
<!--#include file="Conn.asp"-->
<!--#include file="Check.asp"-->
<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")="add" Then
   Call PaySave
Response.write "<script language='javascript'>" & chr(13)
		Response.write "alert('费用添加完成!');" & Chr(13)
		Response.write "window.document.location.href='Pay_Type.asp';"&Chr(13)
		Response.write "</script>" & Chr(13)
    Response.End
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="?action=add" 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" size="30" 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">
          <option value="1">收入</option>
		  <option value="0">支出</option>
        </select></td>
    </tr>
    <tr  bgcolor=ffffff> 
      <td class=forumrow>&nbsp;</td>
      <td class=forumrow><input type="submit" name="Submit" value="提交"></td>
    </tr>
  </form>
</table>
<%End if%>
</html>

<%
Sub PaySave
Dim paytype,io,payadd,Sql
Dim fai
paytype = Trim(Request.Form("paytype"))
io = Trim(Request.Form("io"))
Set fai=Conn.Execute("Select PayType From [PayType] Where PayType='"&paytype&"'")
If Not (fai.Eof or fai.Bof) Then
Response.Write "<script language=javascript>alert('该费用类型已经存在!');"
Response.Write "window.document.location.href='Pay_Type.asp';</script>"
Else
Set payadd = Server.CreateObject("ADODB.RecordSet")
Sql = "Select * From [PayType] Where (ID is null)"
payadd.Open Sql,Conn,1,3
payadd.addNew
payadd("PayType") = paytype
payadd("InOut") = io
payadd.Update
payadd.Close
Set payadd=Nothing
fai.Close
Set fai=Nothing
Conn.Clsoe
Set Conn=Nothing
End if
End Sub


%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -