📄 product_edit.asp
字号:
<%@ LANGUAGE = VBScript %>
<!--#INCLUDE FILE="include/manager.asp" -->
<% REM ######################################################################### %>
<% REM %>
<% REM PRODUCT_EDIT.ASP %>
<% REM Microsoft Commerce Server v3.00 %>
<% REM %>
<% REM Copyright (c) 1996-98 Microsoft Corporation. All rights reserved. %>
<% REM %>
<% REM ######################################################################### %>
<% REM header: %>
<% pageTitle = "修改商品" %>
<%functionno=2%>
<!--#INCLUDE FILE="checkuser.asp" -->
<% REM body: %>
<%
dim errorList
cmdTemp.CommandText = "SELECT * FROM product where product_id =" & Request("pfid")
Set rsProduct = Server.CreateObject("ADODB.Recordset")
rsProduct.Open cmdTemp, , adOpenKeyset, adLockReadOnly
if rsProduct.RecordCount =0 then
errorList="该商品不存在。<br> "
end if
if errorList="" then
%>
<HTML>
<HEAD>
<TITLE> <% = pageTitle %> </TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html"; charset="gb2312">
<% stdListRange = 15 %>
<LINK REL=stylesheet HREF="manager.css" TYPE="text/css">
</HEAD>
<body topmargin="0" >
<!--#INCLUDE FILE = "include/header.asp" -->
<table border="0" width="100%" height="423" cellspacing="0" cellpadding="0">
<tr>
<td width="140" valign="top" >
<!--#INCLUDE FILE = "include/menu.asp" -->
</td>
<td width="1" bgcolor="#000000" ></td>
<td width="600" height="423" align="center" valign="top" class="main">
<br>
<BR>
<TABLE BORDER=0 CELLPADDING=5>
<FORM METHOD="POST" ACTION="xt_data_add_update.asp">
<INPUT TYPE="HIDDEN" NAME="op" VALUE="update">
<INPUT TYPE="HIDDEN" NAME="type" VALUE="product">
<INPUT TYPE="HIDDEN" NAME="goto" VALUE="product_image.asp">
<TR>
<TD VALIGN=TOP>
<TABLE CELLPADDING=5>
<TR>
<% REM label: %>
<TD VALIGN=TOP class=mainleft>
商品编号:
</TD>
<% REM value: %>
<TD VALIGN=TOP colspan=2 class=mainright>
<INPUT TYPE="hidden"
NAME="product_no"
VALUE="<% = rsProduct("product_no").Value %>">
<STRONG><% = rsProduct("product_no").Value %></STRONG>
</TD>
</TR>
<TR>
<% REM label: %>
<TD VALIGN=TOP class=mainleft>
商品名称:
</TD>
<% REM value: %>
<TD VALIGN=TOP colspan=2 class=mainright>
<INPUT
TYPE="text"
SIZE=32
MAXLENGTH="255"
NAME="name"
VALUE = "<% = rsProduct("name").Value %>">*
</TD>
</TR>
<TR>
<TD VALIGN=TOP class=mainleft>
供货商:
</TD>
<% REM value: %>
<TD VALIGN=TOP colspan=2 class=mainright>
<INPUT
TYPE="text"
SIZE=32
MAXLENGTH="50"
NAME="provider"
VALUE = "<% = rsProduct("provider").Value %>">
</TD>
</TR>
<TR>
<% REM label: %>
<TD VALIGN=TOP class=mainleft>
计价单位:
</TD>
<% REM value: %>
<TD VALIGN=TOP colspan=2 class=mainright>
<INPUT
TYPE="text"
SIZE=3
MAXLENGTH="2"
NAME="unit"
VALUE = "<% = rsProduct("unit").Value %>">
</TD>
</TR>
<TR>
<% REM label: %>
<TD VALIGN=TOP class=mainleft>
商品简介:
</TD>
<% REM value: %>
<TD VALIGN=TOP colspan=2 class=mainright>
<TEXTAREA
COLS=36
ROWS=5
NAME="short_description"
WRAP = "virtual"><% = rsProduct("short_description").Value %></TEXTAREA>
</TD>
</TR>
<TR>
<% REM label: %>
<TD VALIGN=TOP class=mainleft>
详细介绍:
</TD>
<% REM value: %>
<TD VALIGN=TOP colspan=2 class=mainright>
<TEXTAREA
COLS=36
ROWS=5
NAME="long_description"
WRAP = "virtual"><% = rsProduct("long_description").Value %></TEXTAREA>
</TD>
</TR>
<TR>
<% REM label: %>
<TD VALIGN=TOP class=mainleft>
价格:
</TD>
<% REM value: %>
<TD VALIGN=TOP colspan=2 class=mainright>
<INPUT
TYPE="text"
SIZE=32
MAXLENGTH="32"
NAME="list_price"
VALUE = "<% = rsProduct("list_price").Value %>">*
</TD>
</TR>
<TR>
<% REM label: %>
<TD VALIGN=TOP class=mainleft>
特价:
</TD>
<% REM value: %>
<TD VALIGN=TOP colspan=2 class=mainright>
<INPUT
TYPE="text"
SIZE=32
MAXLENGTH="32"
NAME="adjusted_price"
<% if Not IsNull(rsProduct("adjusted_price")) then %>
VALUE = "<% = rsProduct("adjusted_price").Value %>">
<% end if %>
</TD>
</TR>
<TR>
<% REM label: %>
<TD VALIGN=TOP class=mainleft>
促销:
</TD>
<% REM value: %>
<TD VALIGN=TOP colspan=2 class=mainright>
<INPUT
TYPE="checkbox"
NAME="hot"
<% if rsProduct("hot")="Y" then %>
checked
<% end if %>
>
</TD>
</TR>
<TR>
<% REM label: %>
<TD VALIGN=TOP class=mainleft>
商品分类:
</TD>
<% REM value: %>
<TD VALIGN=TOP colspan=2 class=mainright>
<SELECT NAME="dept_id">
<%' if rsProduct("level_id").Value="0" then %>
<%' <option value=0 selected> 首页%>
<%'else %>
<%' <option value=0> 首页%>
<%'end if%>
<%
'cmdTemp.CommandText = "select * from product_level order by level_id"
cmdTemp.CommandText = "select * from product_level where parent_id<>0 order by level_id"
Set rsParent = Server.CreateObject("ADODB.Recordset")
rsParent.Open cmdTemp, , adOpenKeyset, adLockReadOnly
If rsParent.RecordCount > 0 Then
While Not rsParent.EOF %>
<% if cstr(rsProduct("level_id")) <> Cstr(rsParent("level_id")) then %>
<option value=<%=Cstr(rsParent("level_id").Value)%>> <% = rsParent("name").Value %>
<% else %>
<option selected value=<%=Cstr(rsParent("level_id").Value)%>> <% = rsParent("name").Value %>
<% end if %>
<% rsParent.MoveNext
Wend
End If
%>
</SELECT>*
</TD>
</TR>
</TABLE>
<BR>
* 表示必须输入
<BR>
<IMG SRC="../prodimg/<% = rsProduct("image_filename").Value %>" width=200>
<BR>
<TABLE>
<TR>
<TD></TD>
<TD valign=top>
<INPUT TYPE="submit"
VALUE="修改">
</TD>
</FORM>
<TD valign=top>
<FORM METHOD="POST"
ACTION="product_delete.asp">
<INPUT TYPE="HIDDEN" NAME="goto" VALUE="product_list.asp">
<INPUT TYPE="HIDDEN" NAME="pfid" VALUE="<% = rsProduct("product_id").Value %>">
<INPUT TYPE="SUBMIT" VALUE="删除">
</FORM>
</TD>
</TR>
</TABLE>
</TR>
</TABLE>
</td>
</table>
<% REM footer: %>
<!--#INCLUDE FILE="include/copyright.asp" -->
</body>
</html>
<%else%>
<!--#INCLUDE FILE="error.asp" -->
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -