📄 edit.asp
字号:
<%
if id=session("id") then
session("pageid")="cpadd"
response.redirect "../../login/login1.asp"
else
id=session("id")
%>
<!--#include file="../../conn/dbconn2.asp"-->
<!--#include file="../../inc/config.asp"-->
<!--#include file="../../inc/hylb1.asp"-->
<script LANGUAGE="JavaScript">
function check()
{
if (document.Form1.cpmc.value=="")
{
alert("产品名称不能为空")
document.Form1.cpmc.focus()
document.Form1.cpmc.select()
return
}
if (document.Form1.cpbh.value=="")
{
alert("产品编号不能为空")
document.Form1.cpbh.focus()
document.Form1.cpbh.select()
return
}
if (document.Form1.cpsb.value=="")
{
alert("产品商标不能为空")
document.Form1.cpsb.focus()
document.Form1.cpsb.select()
return
}
if (document.Form1.cpcd.value=="")
{
alert("产品产地不能为空")
document.Form1.cpcd.focus()
document.Form1.cpcd.select()
return
}
if ((document.Form1.cpjg.value=="") || isNaN(document.Form1.cpjg.value))
{
alert("请认真输入参考价格(输入数字)!");
document.Form1.cpjg.focus();
document.Form1.cpjg.select();
return false;
}
if (document.Form1.cat_sel_name.value=="")
{
alert("行业类别不能为空")
document.Form1.cat_sel_name.focus()
return
}
if (document.Form1.cpgg.value=="")
{
alert("产品规格不能为空")
document.Form1.cpgg.focus()
document.Form1.cpgg.select()
return
}
if (document.Form1.jysm.value=="")
{
alert("简要说明不能为空!")
document.Form1.jysm.focus()
document.Form1.jysm.select()
return
}
if (document.Form1.xxsm.value=="")
{
alert("详细说明不能为空!")
document.Form1.xxsm.focus()
document.Form1.xxsm.select()
return
}
if (document.Form1.lxr.value=="")
{
alert("联系人不能为空")
document.Form1.lxr.focus()
document.Form1.lxr.select()
return
}
if (document.Form1.sccj.value=="")
{
alert("公司名称不能为空")
document.Form1.sccj.focus()
document.Form1.sccj.select()
return
}
if (document.Form1.address.value=="")
{
alert("联系地址不能为空")
document.Form1.address.focus()
document.Form1.address.select()
return
}
if (document.Form1.sf.value=="")
{
alert("所在区域不能为空")
document.Form1.sf.focus()
document.Form1.sf.select()
return
}
if (document.Form1.city.value=="")
{
alert("所在城市不能为空")
document.Form1.city.focus()
document.Form1.city.select()
return
}
if (document.Form1.phone.value=="")
{
alert("联系电话不能为空")
document.Form1.phone.focus()
document.Form1.phone.select()
return
}
if (document.Form1.email.value=="")
{
alert("电子邮件不能为空")
document.Form1.email.focus()
document.Form1.email.select()
return
}
document.Form1.submit()
}
</SCRIPT>
<SCRIPT language=javascript>
function PopupCatSel()
{
var selProdWnd=window.open("select_sort.asp","new","resizable=yes,width=580,height=320,top=0,scrollbars=yes");
if(selProdWnd.opener== null)
selProdWnd.opener = self;
return (false);
}
</SCRIPT>
<SCRIPT language=javascript>
var upfile_obj;
function OnUpFile()
{
upfile_obj.src=upfile_obj.lowsrc;
upfile_obj.src=document.forms["form1"].upfile.value;
}
</SCRIPT>
<SCRIPT language=javascript
src="../images/car.JS"></SCRIPT>
<script language="javascript">
function show_sader(mylink)
{
window.open(mylink,'','top=140,left=200,width=480,height=200,scrollbars=yes')
}
</script>
<%
if not isEmpty(request("id")) then
id=request("id")
else
id=1
end if
sql="select * from spzs where id="&cstr(id)
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
Set rssort= Server.CreateObject("ADODB.Recordset")
sortsql="select * from class_1 where sortid="&rs("sortid")&""
rssort.open sortsql,conn,1,1
sortname=rssort("sort")
rssort.close
set rstype=server.createobject("adodb.recordset")
typesql="select * from class_2 where typeid="&rs("typeid")&""
rstype.open typesql,conn,1,1
name=rstype("typename")
rstype.close
%>
<head>
<LINK href="../../css/Style.css" rel=stylesheet type=text/css>
<STYLE type=text/css>
TD {
COLOR: #000; FONT-FAMILY: 宋体; FONT-SIZE: 12px
}
.GR {
COLOR: #666
}
</STYLE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -