📄 newname.asp
字号:
<%@ LANGUAGE="VBScript"%>
<% response.buffer=true %>
<%const title="新增品名"%>
<html>
<head>
<meta http-equiv="Content-Type"content="text/html; charset=gb_2312-80">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title><%=title%></title>
<link rel=stylesheet type=text/css href=forum.css>
</head>
<body topmargin="0" onload=this.document.input.name.focus();>
<!--#include file=myPrg.asp-->
<!--#include file=opendb.inc-->
<%
CheckLogin
Showtitle(title)
getStorage(session("storage"))
%>
<%
if Request.ServerVariables("REQUEST_METHOD")="POST" then
msg=""
if request("name")="" then
msg=msg+"请输入物品名称!<br>"
end if
if request("unit")="" then
msg=msg+"请输入计量单位!<br>"
end if
if request("gg")="" then
msg=msg+"请输入规格!<br>"
end if
if request("hh")="" then
msg=msg+"请输入货号!<br>"
end if
if request("hm")="" then
msg=msg+"请输入货名!<br>"
end if
if not IsNumeric(request("max")) then
msg=msg+"请检查最高存量的正确性!(要为数字)<br>"
else
if request("max")<=0 then
msg=msg+"请检查最高数量的正确性!(要为大于0)<br>"
end if
end if
if not IsNumeric(request("min")) then
msg=msg+"请检查最低存量的正确性!(要为数字)<br>"
else
if request("min")<=0 then
msg=msg+"请检查最低存量的正确性!(要为大于0)<br>"
end if
end if
if msg<>"" then
showerror(msg)
end if
sql="select * from stock where name='"&request.form("name")&"' and storage_id="&session("storage")&" and unit='"&request.form("unit")&"' and rule='"&request.form("gg")&"'"
rs.open sql,conn,3,2
if rs.eof then
rs.addnew
rs("name")=request.form("name")
rs("storage_id")=session("storage")
rs("type_id")=session("prnt")
rs("unit")=request.form("unit")
rs("rule")=request.form("gg")
rs("no")=request.form("hh")
rs("hm")=request.form("hm")
rs("max")=request.form("max")
rs("min")=request.form("min")
rs("address")=request.form("address")
rs("memo")=request.form("memo")
rs.update
ShowSuccess("数据已经成功保存!")
else
showerror("该名称及其单位和规格的品名已经存在,请重新输入")
end if
rs.close
else
%>
<form action="newname.asp" method="POST" name="input">
<p align=center><font color=red>请在以下的表格中填入相关的数据</font>
<p>
<table align=center border=0>
<tr>
<td nowrap><font color=blue>类别:</td>
<td><%gettype(session("prnt"))%></td>
</tr>
<tr>
<td nowrap><font color=blue>名称:</td>
<td><input class=smallInput type=textbox name="name" value=''>**</td>
</tr>
<tr>
<td nowrap><font color=blue>计量单位:</td>
<td><input class=smallInput type=textbox name="unit" value=''>**</td>
</tr>
<tr>
<td nowrap><font color=blue>规格:</td>
<td><input class=smallInput type=textbox name="gg" value=''>**</td>
</tr>
<tr>
<td nowrap><font color=blue>货号:</td>
<td><input class=smallInput type=textbox name="hh" value=' '>**</td>
</tr>
<tr>
<td nowrap><font color=blue>货名:</td>
<td><input class=smallInput type=textbox name="hm" value=' '>**</td>
</tr>
<tr>
<td nowrap><font color=blue>最高存量:</td>
<td><input class=smallInput type=textbox name="max" value=''>**</td>
</tr>
<tr>
<td nowrap><font color=blue>最低存量:</td>
<td><input class=smallInput type=textbox name="min" value=''>**</td>
</tr>
<tr>
<td nowrap><font color=blue>储存地点:</td>
<td><input class=smallInput type=textbox name="address" value=''>**</td>
</tr>
<tr>
<td valign="top"><font color=blue>相关说明:</td>
<td><textarea class=smallarea name=memo rows=3 cols=40> </textarea></td>
</tr>
<tr>
<td>
<td><br><input class=buttonface type=submit name=ok value=确定>
<input class=buttonface type=reset name=reset value=复原>
<input class=buttonface type=button name=retu value=返回 onclick=history.go(-1)>
</tr>
</table>
</form>
<%end if%>
<!--#include file=copyright.asp-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -