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

📄 newaccountperiod.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 ASP
字号:
<!--#include file="../config.ini" -->
<%
if request("id")<>"" then
	dim connq
	dim rsq
	set connq=server.CreateObject("adodb.connection")
	set rsq=server.CreateObject("adodb.recordset")
	connq.Open connstring
	rsq.Open "select * from account where accountid="&request("id"),connq,2,3,1
	straccount=rsq("accountid")
	straccountname=rsq("account")
	strAccountPeriod=rsq("AccountPeriod")
	rsq.Close
	set rsq=nothing
	connq.Close
	set connq=nothing
end if

if request("account")<>"" then
	dim conn
	dim rs
	set conn=server.CreateObject("adodb.connection")
	set rs=server.CreateObject("adodb.recordset")
	conn.Open connstring
	if request("id")="" then
		rs.Open "select * from account where accountid="&request("account"),conn,2,3,1
		rs("AccountPeriod")=request("AccountPeriod")
	else
		if request("type")<>"删除" then
			rs.Open "select * from account where accountid="&request("id"),conn,2,3,1
			'rs("AccountPeriod")=request("AccountPeriod")			
			rs("AccountPeriod")=request("AccountPeriod")
		else
			rs.Open "select * from account where accountid="&request("id"),conn,2,3,1
			rs("AccountPeriod")=null
		end if
	end if

	rs("lastmoduser")=session("loginId")
	rs("lastmoddate")=now()	
	rs.Update 
	rs.Close 
	set rs=nothing
	conn.Close 
	set conn=nothing
%>
<script language=javascript>
	window.opener.location.reload();
	window.close();
</script>
<%
end if
%>
<HTML><HEAD><TITLE>客户帐期</TITLE>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<script language=javascript src="../tools/calendar.js"></script>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
<script language="javascript">
function pickup(theForm,theName,theValue){
	var theWindow;
	var theAccount;
	theWindow = window.open("selectaccountperiod.asp?theForm="+theForm+"&theName="+theName+"&theValue="+theValue,"Select","toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=520,height=320,top=150,left=160");
	theWindow.opener = this;
}
function save(){
	if (form1.accountname.value==''){
		alert('请选择客户!');
		form1.accountname.focus();
		return;
	}							
	if (form1.AccountPeriod.value==''){
		alert('请输入帐期!');
		form1.AccountPeriod.focus();
		return;
	}
form1.submit();
}
</script>
<body>
 <form name=form1  method="post"  id=form1>
   <table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
   <tr> 
    <td height="25"><strong><font size="2" class=title><b><%=request("type")%>客户帐期</b></font></strong></td>
      <td>&nbsp;</td>
    </tr>
    <tr > 
      <td height="16" colspan="2" background="../images/title.gif">&nbsp;</td>
    </tr>
    <tr>
      <td height=4></td>
    </tr>
    <tr><td><div align="center" style="cursor:hand">
<%if request("type")<>"删除" then%>
		<a onclick="save();"><img src="../images/button_save.gif"></a>&nbsp;&nbsp;&nbsp;&nbsp;
<%else%>
		<a onclick="form1.submit();"><img src="../images/button_confirm.gif"></a>&nbsp;&nbsp;&nbsp;&nbsp;
		<input name="account" type="hidden" size="8" value="<%=straccount%>"> 
<%end if%>
		<a onclick="window.close();"><img src="../images/button_cancel.gif"></a></DIV></td>
    </tr>
 </table>
<%if request("type")<>"删除" then%>
  <table width="100%" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF">
    <tr  bgcolor="white"> 
      <td width="15%" height="23" bgcolor="DEDFDE" > <div align="center"><font color=red>*&nbsp;</font>客户</div></td>
      <td width="85%" bgcolor="EFEFEF"> <div align="center"></div>
        <input name="account" type="hidden" size="8" value="<%=straccount%>"> 
        <input name="accountname" type="text" size="25" value="<%=straccountname%>" readonly> 
<%if request("type")="新建" then%>
        <input type="button" name="bnaccount" onClick="JavaScript:pickup('form1','account','AccountPeriod')"    value=... class=black> 
<%end if%>
      </td>
    </tr>
    <tr  bgcolor="white"> 
      <td width="15%" bgcolor="DEDFDE" > <div align="center">帐期</div></td>
      <td bgcolor="EFEFEF"> <input name=AccountPeriod type=text value="<%=strAccountPeriod%>" size="10">天
      </td>
    </tr>
  </table>
<%end if%>
</form>

⌨️ 快捷键说明

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