📄 goods_edit.asp
字号:
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center border=0 class=page>
<TBODY>
<TR> <td><!--#include file="top.asp"-->
<%
if session("user_id")="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('非法操作!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
else
set rs=server.createobject("adodb.recordset")
sql="select * from goods_info where goods_id="&request("goods_id")&" and user_id="&session("user_id")&""
rs.open sql,conn,1,3
if rs.eof or rs.bof then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('只能修改您发布的商品!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
else
%>
<SCRIPT language=JavaScript>
function CheckInput(){
if(input.goodsname.value==''){
alert("商品名称不能为空!");
input.goodsname.focus();
return false;
}
if(input.goodscontent.value==''){
alert("商品描述不能为空!");
input.goodscontent.focus();
return false;
}
if(input.goodsprice.value==''){
alert("商品价格不能为空!");
input.goodsprice.focus();
return false;
}
if(input.goodsamount.value==''){
alert("商品数量不能为空!");
input.goodsamount.focus();
return false;
}
if(input.goodslong.value==''){
alert("有效期不能为空!");
input.goodslong.focus();
return false;
}
return true;
}
</SCRIPT>
<TABLE width=760 border=0 align=center cellSpacing=0 cellPadding=0 >
<TBODY>
<TR>
<td width=176 valign=top>
<!--#include file="center.asp"--></td><td bgcolor="#59be48" width="1"></td>
<TD align="center" vAlign=top>
<TABLE cellSpacing=0 cellPadding=0 width="570" border=0>
<TBODY>
<TR>
<TD width=11 height=11><IMG height=11 src="images/kuai06.gif"
width=11></TD>
<TD background=images/kuai10.gif><IMG height=11
src="images/kuai10.gif" width=1></TD>
<TD width=11 height=11><IMG height=11 src="images/kuai07.gif"
width=11></TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="570" border=0>
<TBODY>
<TR>
<TD width=8 background=images/kuai12.gif> </TD>
<TD bgColor=#d3e1fd height=21> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD align=middle width=25><IMG height=15
src="images/y1.gif" width=13></TD>
<TD>商品管理</TD>
<TD width=90><a href="goods_add.asp">发布商品</a> </TD>
</TR>
</TBODY>
</TABLE></TD>
<TD width=8 background=images/kuai11.gif> </TD>
</TR>
<TR>
<TD width=8 background=images/kuai12.gif> </TD>
<TD align="center"><form action="goods_edit_save.asp" method="post" name="input" id="input" onsubmit=return(CheckInput())>
<table width="98%" border="0" align="center">
<tr>
<td>商品名称</td>
<td><input name="goodsname" type="text" id="goodsname" value="<%=rs("goods_name")%>" size="20" maxlength="20">
<font color="#FF0000">*</font> 不超过20个字符 注意:注册后不能修改</td>
</tr>
<tr>
<td>商品描述:</td>
<td><textarea name="goodscontent" cols="50" rows="6" id="goodscontent"><%=rs("goods_content")%></textarea>
<font color="#FF0000">*</font>不超过255个字符</td>
</tr>
<tr>
<td>价格:</td>
<td><input name="goodsprice" type="text" id="goodsprice" value="<%=rs("goods_price")%>" size="15" maxlength="15">
元</td>
</tr>
<tr>
<td>数量:</td>
<td><input name="goodsamount" type="text" id="goodsamount" value="<%=rs("goods_amount")%>" size="10" maxlength="10">
个 </td>
</tr>
<tr>
<td>有效期:</td>
<td><select name="goodslong" id="goodslong">
<option value="<%=rs("goods_long")%>" selected><%=rs("goods_long")%></option>
<option value="7">1个礼拜</option>
<option value="15">2个礼拜</option>
<option value="30">1个月</option>
<option value="90">3个月</option>
<option value="180">半年</option>
<option value="360">长期有效</option>
</select></td>
</tr>
<tr>
<td>图片:</td>
<td><input name="goodspic" type="text" id="goodspic" size="40" maxlength="40">
不修改商品图片请空 </td>
</tr>
<tr>
<td> </td>
<td><iframe border="0" frameBorder="0" frameSpacing="0" height="21" marginHeight="0" marginWidth="0" noResize scrolling="no" width="100%" vspale="0" src="upfile.asp"></iframe></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置">
<%
Randomize '初始代随机数种子
num1=rnd() '产生随机数num1
num1=int(26*num1)+65 '修改num1的范围以使其是A-Z范围的Ascii码,以防表单名出错
session("antry")="test"&chr(num1) '产生随机字符串
%>
<input name="temp" type="hidden" id="temp" value="<%=session("antry")%>">
<input name="goods_id" type="hidden" id="goods_id" value="<%=rs("goods_id")%>">
</td>
</tr>
</table>
</form> </TD>
<TD width=8 background=images/kuai11.gif> </TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="570" border=0>
<TBODY>
<TR>
<TD width=11 height=11><IMG height=11 src="images/kuai08.gif"
width=11></TD>
<TD background=images/kuai13.gif><IMG height=11
src="images/kuai10.gif" width=1></TD>
<TD width=11 height=11><IMG height=11 src="images/kuai09.gif"
width=11></TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
<%end if%>
<%end if%>
<!--#include file="bottom.asp"--></TD>
</TR>
</TBODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -