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

📄 newlocation.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 ASP
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "inventory","edit"
set objcheck=nothing


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 location where locationid="&request("id"),connq,2,3,1
	strlocation=rsq("location")
	strlocationtype=rsq("locationtype")
	strnonnet=rsq("nonnet")
	strdescription=rsq("description")
	rsq.Close
	set rsq=nothing
	connq.Close
	set connq=nothing
end if

if request("location")<>"" 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 location",conn,2,3,1
		rs.AddNew 
		rs("whseid")=request("whseid")
	else
		rs.Open "select * from location where locationid="&request("id"),conn,2,3,1
	end if
	
	rs("location")=request("location")
	rs("locationtype")=request("locationtype")
	if request("nonnet")<>"" then
		rs("nonnet")=1
	else
		rs("nonnet")=0
	end if
	rs("description")=request("description")
	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">
function save(){
	if (form1.location.value==''){
		alert('请输入货位');
		form1.location.focus();
		return;
	}
form1.submit();
}
</script>
 <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><%if request("id")="" then%>新建货位<%else%>编辑货位<%end if%></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>
 </table>

  <table width="100%" cellpadding="2" cellspacing="1" bgcolor="999999">
    <tr bgcolor="white"> 
      <td width="10%" bgcolor="DEDFDE"><div align="center">货位</div></td>
      <td width="40%" bgcolor="efefef" > <input name=location type=text value="<%=strlocation%>" size="20"> 
      </td>
      <td width="10%" bgcolor="DEDFDE"><div align="center">仓库</div></td>
      <td width="40%" bgcolor="efefef"><%=request("whse")%></td>
    </tr>
    <tr  bgcolor="white"> 
      <td width="10%" nowrap bgcolor="DEDFDE"><div align="center">货位类型</div></td>
      <td bgcolor="efefef"> <select name=locationtype>
          <option value=-1></option>
          <%getdefine "货位类型",strlocationtype%>
        </select></td>
      <td bgcolor="DEDFDE"><div align="center">非净货位</div></td>
      <td bgcolor="efefef"> <input type="checkbox" name="nonnet" value=1 <%if strnonnet=true then Response.Write "checked"%>></td>
    </tr>
    <tr  bgcolor="white"> 
      <td width="10%" bgcolor="DEDFDE" ><div align="center">描述</div></td>
      <td colspan="3" bgcolor="efefef"> <textarea name="description" cols="45" rows="4"><%=strdescription%></textarea> 
      </td>
    </tr>
  </table>
	<table>
    <tr> 
      <td height=10 colspan="4"></a></td>
    </tr>
    <tr> 
      <td></td>
      <td style="cursor:hand">&nbsp;&nbsp;<a onclick="save();"><img src="../images/button_save.gif"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a onclick="window.close();"><img src="../images/button_cancel.gif"></a> 
      </td>
      <td style="cursor:hand">&nbsp;</td>
      <td style="cursor:hand">&nbsp;</td>
    </tr>
  </table>
</form>

⌨️ 快捷键说明

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