📄 product_update.asp
字号:
<!--#include file="conn.asp"--><!--#include file="Check.asp"-->
<%
id=request("id")
set rs=server.createobject("adodb.recordset")
sql="select * from Product where Product_Id='"&id&"'"
rs.open sql,conn,1,3
if rs.eof then
response.Write("没有此商品资料")
response.end()
end if
%>
<html>
<head>
<title>商品添加</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
BODY { FONT-SIZE: 9pt }
a:link { color: #000000; text-decoration: none}
a:visited { color:#000000; text-decoration: none}
a:hover { color: #CC0000; text-decoration: underline}
td {font-size:9pt;line-height:12pt;}
-->
</style>
<SCRIPT language=javascript id=clientEventHandlersJS>
<!--
function form1_onsubmit()
{
if(document.FORM1.p_name.value.length<1)
{
alert("您必须输入商品名称!");
document.FORM1.p_name.focus();
return false;
}
if(document.FORM1.units.value.length<1)
{
alert("对不起,商品的单位不能为空!");
document.FORM1.units.focus();
return false;
}
if(document.FORM1.guige.value.length<1)
{
alert("对不起,商品的规格不能为空!");
document.FORM1.guige.focus();
return false;
}
if(document.FORM1.newprice.value.length<1)
{
alert("您必须输入会员价!");
document.FORM1.newprice.focus();
return false;
}
if ((fucCheckNUM(document.FORM1.newprice.value)==0) )
{ alert ("会员价有非法字符,请填写正确会员价。");
document.FORM1.newprice.focus();
return false;
}
if(document.FORM1.oldprice.value.length<1)
{
alert("您必须输入市场价!");
document.FORM1.oldprice.focus();
return false;
}
if ((fucCheckNUM(document.FORM1.oldprice.value)==0) )
{ alert ("市场价有非法字符,请填写正确市场价。");
document.FORM1.oldprice.focus();
return false;
}
if(document.FORM1.small_pic.value.length<1)
{
alert("请点击上传小图片!");
document.FORM1.small_pic.focus();
return false;
}
if(document.FORM1.big_pic.value.length<1)
{
alert("请点击上传大图片!");
document.FORM1.big_pic.focus();
return false;
}
if(document.FORM1.p_intro.value.length<1)
{
alert("您必须输入商品简介!");
document.FORM1.p_intro.focus();
return false;
}
if(document.FORM1.p_show.value.length<1)
{
alert("您必须输入商品说明!");
document.FORM1.p_show.focus();
return false;
}
}
function fucCheckNUM(NUM)
{
var i,j,strTemp;
strTemp="0123456789.";
if ( NUM.length== 0)
return 0
for (i=0;i<NUM.length;i++)
{
j=strTemp.indexOf(NUM.charAt(i));
if (j==-1)
{
//说明有字符不是数字
return 0;
}
}
//说明是数字
return 1;
}
//-->
</SCRIPT>
</head>
<body background="../pic/user/bg.jpg" leftmargin="0" topmargin="0">
<div align="center"><br>
<strong>商品资料修改<br>
</strong><font color="#FF0000">(注意:此商品属网店所有,除非必要,请留给商家处理。)</font> </div>
<table width=528 height="304" border="1" align="center" cellpadding=0 cellspacing=0 bordercolor=#375956 bordercolordark=#ffffff>
<form language="javascript" name="FORM1" onSubmit="return form1_onsubmit()" action="product_update_ok.asp" method="post">
<tr>
<td class=main1 width=91 height=25 align="right"><span
class=main1>产品名称:</span></td>
<td class=main1 width=415 height=25> <input name="p_name" type="text" style="font-size: 14px" value="<%=rs("Product_name")%>" size="25">
<input type=hidden value=<%=request("page")%> name="page">
<input type=hidden value=<%=request("id")%> name="Product_Id"></td>
</tr>
<tr>
<td class=main1 height=25 align="right"><span
class=main1>单 位:</span></td>
<td height=25> <input name="units" type="text" style="font-size:
14px" value="<%=rs("units")%>" size="5">
(请选择:<a href="#" onclick="window.document.FORM1.units.value='每件';" >每件</a>
<a href="#" onclick="window.document.FORM1.units.value='每个';" >每个</a>
<a href="#" onclick="window.document.FORM1.units.value='每台';" >每台</a>
<a href="#" onclick="window.document.FORM1.units.value='每套';" >每套</a>
<a href="#" onclick="window.document.FORM1.units.value='每张';" >每张</a>
<a href="#" onclick="window.document.FORM1.units.value='每瓶';" >每瓶</a>
<a href="#" onclick="window.document.FORM1.units.value='每部';" >每部</a>
<a href="#" onclick="window.document.FORM1.units.value='每盒';" >每盒</a>)</td>
</tr>
<tr>
<td class=main1 height=25 align="right"><span
class=main1>规 格:</span></td>
<td height=25> <input name="guige" type="text" style="font-size:
14px" value="<%=rs("guige")%>" size="20"> </td>
</tr>
<tr>
<td class=main1 width=91 height=25 align="right"><span
class=main1>会员价格:</span></td>
<td width=415 height=25> <input name="newprice" type="text" style="font-size:
14px" value="<%=rs("p_newprice")%>" size="10"> <span class=main1>(人民币:元)</span></td>
</tr>
<tr>
<td class=main1 width=91 height=25 align="right"><span
class=main1>市场价格:</span></td>
<td width=415 height=25> <input name="oldprice" type="text" style="font-size:
14px" value="<%=rs("P_oldprice")%>" size="10"> <span class=main1>(人民币:元)</span></td>
</tr>
<tr>
<td class=main1 height=25 align="right"><span
class=main1>生产厂家:</span></td>
<td height=25> <input type="text" name="factory" size="20" style="font-size:
14px" value="<%=rs("factory")%>"> </td>
</tr>
<tr>
<td class=main1 height=25 align="right"><span
class=main1>商品所在地:</span></td>
<td height=25> <input type="text" name="locus" size="20" style="font-size:
14px" value="<%=rs("locus")%>"> </td>
</tr>
<tr>
<td class=main1 height=25 align="right"><span
class=main1>商品小图:</span></td>
<td height=25> <input name="small_pic" type="text" style="font-size:
14px" value="<%=rs("small_pic")%>" size="20"> <a href="#" onClick="window.open('../upload_pic.asp?FM_name=FORM1&editname=small_pic&filepath=<%=P_shop%>','','status=yes,scrollbars=no,top=20,left=110,width=420,height=165')"><font color="#0000FF">上传小图片</font></a></td>
</tr>
<tr>
<td class=main1 height=25 align="right"><span
class=main1>商品大图:</span></td>
<td height=25> <input name="big_pic" type="text" style="font-size:
14px" value="<%=rs("big_pic")%>" size="20"> <a href="#" onClick="window.open('../upload_pic.asp?FM_name=FORM1&editname=big_pic&filepath=<%=P_shop%>','','status=no,top=20,left=110,width=420,height=165')"><font color="#0000FF">上传大图片</font></a> <a href="#" onclick="document.FORM1.big_pic.value=document.FORM1.small_pic.value" >使用小图片</a></td>
</tr>
<tr>
<td width=91 height=25 align="right" valign="top" class=main1><span
class=main1>产品简介:</span></td>
<td class=main1 width=415 height=25> <textarea rows="8" name="p_intro" cols="50"><%=rs("Product_intro")%></textarea>
</td>
</tr>
<tr>
<td width=91 height=25 align="right" valign="top" class=main1><span
class=main1>相关说明:</span></td>
<td class=main1 width=415 height=25> <textarea rows="3" name="p_show" cols="50"><%=rs("Product_show")%></textarea>
</td>
</tr>
<tr>
<td class=main1 colspan=2 height="27"> <p align="center">
<input type="button" value="返 回" name="B4" onClick="javascript:window.history.go(-1)">
<input class="main" type="submit" size=3 value="完 成" name="Submit2">
</td>
</tr>
</form>
</table>
<br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -