⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 goods_edit.asp

📁 soft.studa.com大家一起加油啊,好痛苦啊,呵呵
💻 ASP
字号:
<!--#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 cellpadding="4">
  <TBODY>
    <TR> 
      <TD vAlign=top  width=161><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
          <TBODY>
            <TR> 
              <TD><IMG height=10 src="images/kuai01.gif" width=161></TD>
            </TR>
            <TR> 
              <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                  <TBODY>
                    <TR> 
                      <TD width=11 background=images/kuai04.gif>&nbsp;</TD>
                      <TD bgColor=#f8f8fa><table width="100%" border="0">
                          <tr> 
                            <td><IMG height=8 src="images/dot.gif" width=4> <a href="user.asp">店铺管理中心</a></td>
                          </tr>
                          <tr> 
                            <td><a href="user_edit.asp">&nbsp; 基本资料管理</a></td>
                          </tr>
                          <tr> 
                            <td><a href="shop_img.asp">&nbsp; 店铺图片管理</a></td>
                          </tr>
                          <tr> 
                            <td><a href="goods.asp">&nbsp; 商品管理</a></td>
                          </tr>
                          <tr> 
                            <td>&nbsp; <a href="help.asp" target="_blank">店铺帮助</a></td>
                          </tr>
                          <tr> 
                            <td>&nbsp; <a href="user_logout.asp">店长退出</a></td>
                          </tr>
                        </table></TD>
                      <TD width=11 background=images/kuai05.gif>&nbsp;</TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
            <TR> 
              <TD><IMG height=15 src="images/kuai02.gif" width=161></TD>
            </TR>
            <TR> 
              <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                  <TBODY>
                    <TR> 
                      <TD width=11 background=images/kuai04.gif>&nbsp;</TD>
                      <TD bgColor=#f8f8fa><table width="100%" border="0">
                          <tr> 
                            <td><IMG height=8 src="images/dot.gif" width=4> <strong></strong>本站新闻</td>
                          </tr>
                          <tr> 
                            <td><table width="100%" border="0" style="border-collapse: collapse">
                                <% 
Set rs1= conn.execute("select * from news order by news_id desc" ) 
do while not rs1.eof
%>
                                <tr> 
                                  <td height=18 >·<a href="news_info.asp?news_id=<%=rs1("news_id")%>" target="_blank"><%=rs1("news_title")%></a></td>
                                  <% i=i+1 
if i>=6 then exit do 
rs1.movenext 
loop 
rs1.close 
set rs1=nothing 
%>
                                </tr>
                              </table></td>
                          </tr>
                        </table></TD>
                      <TD width=11 background=images/kuai05.gif>&nbsp;</TD>
                    </TR>
                </TABLE></TD>
            </TR>
            <TR> 
              <TD bgColor=#dbdbdb><IMG height=10 src="images/kuai03.gif" width=161></TD>
            </TR>
            <TR> 
              <TD height=5 bgColor=#dbdbdb><IMG height=5 
            src="images/kuai14.gif" width=161></TD>
            </TR>
        </TABLE></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>&nbsp;</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>&nbsp;</TD>
            </TR>
            <TR> 
              <TD width=8 background=images/kuai12.gif>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -