📄 client_spbase_edit.asp
字号:
<%
'==============================================================
'OA 表单生成器
'版本: 1.1.0 -- 2005-5-24
'程序版权:(c) 2004 by 展亮
'说明:本代码为自由代码,用户可以自由使用,但请保留作者文件头部说明
' 在使用过程中如出现什么问题请及时与作者联系。
' 电子邮件:zlbox@yeah.net QQ:2343397
'=============================================================
'功能:添加/编辑食品商品库
'参数: request.form("addedit_subed")="true"#表单提交; request("id")#要编辑记录的ID;
'=============================================================
%>
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<!--#include file="../inc/ronger.asp"-->
<%
'response.buffer=false
'------------------------------------------------设置参数
LoginID=trim(Session("LoginID")) : if LoginID="" then LoginID=0 '当前用户ID
pid=request("id"):if pid="" then pid=0 '记录ID
'------------------------------------------------
'------------------------------------------------添加/修改记录
table="tbioaClient_SpBase" '表名
if request.form("addedit_subed")="true" then
'表单提交后
if pid=0 then
call insert(table,false)
response.write "<script>alert('食品商品库录入成功!');this.location='Client_SpBase_list.asp'</script>"
response.end
else
call update(table,"id",pid,false)
response.write "<script>alert('食品商品库修改成功!');history.go(-2)</script>"
response.end
end if
end if
'--------------------------------------------取记录
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from " & table & " where ID="&pid
rs.open sql,oConn,1,1
'------------------------------------------------
function showvalue(field)
if rs.eof then
showvalue=""
else
if (isnull(rs(field))) then showvalue="" else showvalue=Server.HTMLEncode(rs(field))
end if
end function
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css" type=text/css>
<title>main</title>
<script src="../js/Popup.js"></script>
<script src="../js/formatdate.js"></script>
<script src="../js/front_chec.js"></script>
<script language="javascript" src="../js/input_select.js"></script>
<script language="javascript" src="../js/AutoFinishInput.js"></script>
<script language="vbscript">
Function rsB(vIn)
rsB=MidB(vIn,1)
End Function
Function rsChar(ss)
rsChar = Chr(ss)
End Function
</script>
</head>
<body topmargin="10" leftmargin="10">
<!--#include file="Client_SpBase_menu.html"-->
<hr width="100%" size=1 color="#000000">
<br>
<div align="center">
<table width="500" cellspacing="1" cellpadding="2" class="tab">
<tr>
<td width="100%" class="tdTop">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="tdTop">
<p align="left"><img border="0" src="../images/icon_title.gif" align="left">录入食品商品库</p>
</td>
<td width="90" class="tdTop">
<p align="left"><img border="0" src="../images/icon_return.gif" align="left">
<a href="javascript:history.back()" class="linkTop">返回列表</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="25%" class="td1">
<form name="eventfrm" method="POST" action="?id=<%=pid%>" onSubmit="javascript:return checknull(this)">
<input type=hidden name="addedit_subed" value="true">
<input type=hidden name="userid" value="<%=LoginID%>">
<table border="0" width="100%" cellspacing="10" cellpadding="0">
<tr>
<td width="120" align="right" valign="top" nowrap>食品名称:</td>
<td width="380" nowrap><input type="text" name="cpmc" autocomplete="off" smod="sp" zd="mc" value="<%=showvalue("cpmc")%>" size="40" maxlength="250" class="input" check_null="请填写食品名称"> <font COLOR="RED">*</font>
<script language="JavaScript">
var acbar1 = new CLASS_AUOTCOMPLETE();
acbar1.setup(document.all.cpmc);
</script>
</td>
</tr>
<tr>
<td width="120" align="right" valign="top" nowrap>注册商标:</td>
<td width="380" nowrap><input type="text" name="sbbs" autocomplete="off" smod="sp" zd="sb" value="<%=showvalue("sbbs")%>" size="40" maxlength="250" class="input" check_null="请填写注册商标"> <font COLOR="RED">*</font>
<script language="JavaScript">
var acbar2 = new CLASS_AUOTCOMPLETE();
acbar2.setup(document.all.sbbs);
</script>
</td>
</tr>
<tr>
<td width="120" align="right" valign="top" nowrap>生产厂家:</td>
<td width="380" nowrap><input type="text" name="sccj" autocomplete="off" smod="sp" zd="cj" value="<%=showvalue("sccj")%>" size="40" maxlength="250" class="input">
<script language="JavaScript">
var acbar3 = new CLASS_AUOTCOMPLETE();
acbar3.setup(document.all.sccj);
</script>
</td>
</tr>
<tr>
<td width="120" align="right" valign="top" nowrap>规格型号或生产批号:</td>
<td width="380" nowrap><input type="text" name="scph" value="<%=showvalue("scph")%>" size="40" maxlength="250" class="input">
</td>
</tr>
<tr>
<td width="120" align="right" valign="top" nowrap>检验结果:</td>
<td width="380" nowrap><input type="text" name="jyjg" value="<%=showvalue("jyjg")%>" size="40" maxlength="250" class="input">
</td>
</tr>
<tr>
<td width="120" align="right" valign="top" nowrap>备注:</td>
<td width="380" nowrap><input type="text" name="bz" value="<%=showvalue("bz")%>" size="40" maxlength="250" class="input">
</td>
</tr>
<tr>
<td width="100%" colspan="2" align="center">
<input type="submit" value="确定" class="button0" onmouseout=className="button0" onmouseover=className="button1"> <input type="reset" value="全部重写" class="button0" onmouseout=className="button0" onmouseover=className="button1">
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td width="25%" class="tdBottom">
</td>
</tr>
</table>
</div>
</body>
</html>
<%'释放对象变量
rs.close
oConn.close
%> <font face="宋体" size=2><p>Microsoft VBScript 运行时错误</font> <font face="宋体" size=2>错误 '800a005b'</font><p><font face="宋体" size=2>对象变量未设置: 'stream'</font><p><font f
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -