📄 product_fenlei.asp
字号:
<%
if request.cookies("汕头商城")<>"9988" then
response.redirect "../default.asp"
end if
%>
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>汕头商城</title>
<STYLE>BODY {
FONT-SIZE: 11pt
}
TD {
FONT-SIZE: 11pt
}
a { text-decoration: none; color: #000000 }
a:hover { text-decoration: underline; color: #0000FF }
</STYLE>
</head>
<body leftmargin="0" topmargin="0" bgcolor="#FFFFFF" text="#000000">
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><iframe src=top.htm noresize scrolling=no frameborder=0 width=778 height=50 hspace="0" vspace="0" marginheight="0"></iframe>
</td>
</tr>
</table>
<br>
<br>
<br>
<table width="630" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#FFFFFF" bordercolordark="#E0E0E0" align="center" bordercolor="#33CC66">
<tr>
<td height="273" align="center"> <br>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="center">
<td>
<input type="button" name="submit22" value="一级分类名称管理" onClick="javascript:window.location='product_fenlei.asp'">
</td>
<td>
<input type="button" name="submit2" value="二级分类名称管理" onClick="javascript:window.location='product_fenlei2.asp'">
</td>
</tr>
</table>
<br>
<%
'----------------------------///////////////修改一条记录//////---------------------
Class_1_Name=request("Class_1_Name")
oldClass_1_Name=request("oldClass_1_Name")
id=request("id")
if request("submit")="修改" and Class_1_Name<>"" then
'判断是否有与修改的部门相同的
set rs=server.createobject("adodb.recordset")
sql="select * from Class_1 where Class_1_Name='"& Class_1_Name &"'and id<>" & id
rs.open sql,conn,1
if not rs.eof and not rs.bof then
%>
<font color=#FF0000>一级分类名称<font color="#0000FF">[<%=Class_1_Name%>]</font>已经存在,不能修改为此名称!</font><br>
<br>
<%
else
sql = "update Class_1 set Class_1_Name='"& Class_1_Name &"' where id=" & id
conn.Execute sql
'修改属于此一级分类的二级分类
sql = "update Class_2 set Class_1_Name='"& Class_1_Name &"' where Class_1_Name='"& oldClass_1_Name &"'"
conn.Execute sql
'修改属于此一级分类的商品资料
sql = "update Product set Class_1='"& Class_1_Name &"' where Class_1='"& oldClass_1_Name &"'"
conn.Execute sql
%>
<font color=#FF0000>修改成功!<br><br></font>
<%
end if
end if
rs.close
'------------------------------完成修改/////////////////---------------------
%>
<table width="320" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<%
'读取一级目录=========================================
set rs=server.createobject("adodb.recordset")
sql="select * from Class_1 "
rs.open sql,conn,1
while not rs.eof and not rs.bof
%>
<tr align="center">
<form method="post" action="product_fenlei.asp">
<td width="182">
<input type="hidden" name="oldClass_1_Name" value="<%=rs("Class_1_Name")%>">
<input type="hidden" name="id" value=<%=rs("id")%>>
<input type="text" name="Class_1_Name" src style="height:13pt;BORDER-RIGHT: #eeeeee 1px solid; BORDER-TOP: #aaaaaa 1px solid; BORDER-LEFT: #aaaaaa 1px solid; BORDER-BOTTOM: #eeeeee 1px solid; BACKGROUND-COLOR: #FFFFFF; color: #0000FF" value="<%=rs("Class_1_Name")%>" size="15">
</td>
<td width="65">
<input type="submit" name="submit" src style="height:14pt" value="修改">
</td>
</form>
</tr>
<%
rs.movenext
wend
%>
</table>
<br>
<br>
注:为了页面美观,请尽量使用4个字符</td>
</table>
<p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -