?? editarea.asp
字號(hào):
<!--#include file="adminconn.inc" -->
<html>
<head>
<title>騰科B2C購(gòu)物系統(tǒng)-商品管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../inc/guhongying.css" type="text/css">
</head>
<body bgcolor="#6699CC" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="#000000" vspace="0" hspace="0">
<tr>
<td bgcolor="#316395" height="27"><font color="#FFFFFF">.:: 您可以在這里修改、合并與移動(dòng)分類(lèi)別</font></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="50"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td align="center">
<form name="modiarea" method="post" action="editarea.asp">
<table border="0" cellspacing="1" cellpadding="4" bgcolor="#000000" width="300">
<tr>
<td bgcolor="#336699" colspan="2">
<p><b><font color="#FFFFFF">修改</font></b><b><font color="#FFFFFF">一個(gè)分類(lèi)別</font></b></p>
</td>
</tr>
<tr>
<td bgcolor="#7C96B8" align="center" height="25" width="69"><font color="#FFFFFF">原分類(lèi)別名</font></td>
<td bgcolor="#7C96B8" align="center" height="25" width="210">
<select name="modiarea" class="bk">
<option value="0" selected>請(qǐng)選擇分類(lèi)別</option>
<%
sql="select * from area"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof
%>
<option value="<%=rs("area")%>"><%=rs("area")%></option>
<%
rs.movenext
wend
rs.Close()
%>
</select>
</td>
</tr>
<tr>
<td bgcolor="#7C96B8" align="center" height="25" width="69"><font color="#FFFFFF">更改為:</font></td>
<td bgcolor="#7C96B8" align="center" height="25" width="210">
<input type="text" name="modiareato" size="13">
</td>
</tr>
<tr>
<td bgcolor="#336699" align="center" colspan="2">
<input type="submit" name="Submit" value="修改" class="Tips_bo">
<input type="hidden" name="action" value="modiarea">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td align="center">
<form name="hebibigarea" method="post" action="editarea.asp">
<table border="0" cellspacing="1" cellpadding="4" bgcolor="#000000" width="300">
<tr>
<td bgcolor="#336699" colspan="2">
<p><b><font color="#FFFFFF">合并</font></b><b><font color="#FFFFFF">一個(gè)分類(lèi)別</font></b></p>
</td>
</tr>
<tr>
<td bgcolor="#7C96B8" align="center" height="25" width="69"><font color="#FFFFFF">原分類(lèi)別1</font></td>
<td bgcolor="#7C96B8" align="center" height="25" width="210">
<select name="area1" class="bk">
<option value="0" selected>請(qǐng)選擇分類(lèi)別</option>
<%
sql="select * from area"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof
%>
<option value="<%=rs("area")%>"><%=rs("area")%></option>
<%
rs.movenext
wend
rs.Close()
%>
</select>
</td>
</tr>
<tr>
<td bgcolor="#7C96B8" align="center" height="25" width="69"><font color="#FFFFFF">原分類(lèi)別2</font></td>
<td bgcolor="#7C96B8" align="center" height="25" width="210">
<select name="area2" class="bk">
<option value="0" selected>請(qǐng)選擇分類(lèi)別</option>
<%
sql="select * from area"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof
%>
<option value="<%=rs("area")%>"><%=rs("area")%></option>
<%
rs.movenext
wend
rs.Close()
%>
</select>
</td>
</tr>
<tr>
<td bgcolor="#7C96B8" align="center" height="25" width="69"><font color="#FFFFFF">合并為:</font></td>
<td bgcolor="#7C96B8" align="center" height="25" width="210">
<input type="text" name="areato" size="13">
</td>
</tr>
<tr>
<td bgcolor="#336699" align="center" colspan="2" height="81">
<p>
<input type="submit" name="Submit" value="合并" class="Tips_bo">
<input type="hidden" name="action" value="hebiarea">
</p>
<p><font color="#FFFFFF">(此功能謹(jǐn)用,將合并所有分類(lèi)及商品<br>為不可逆操作) </font></p>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td align="center">
<form name="hebibigarea" method="post" action="editarea.asp">
<table border="0" cellspacing="1" cellpadding="4" bgcolor="#000000" width="300">
<tr>
<td bgcolor="#336699" colspan="2">
<p><b><font color="#FFFFFF">移動(dòng)</font></b><b><font color="#FFFFFF">一個(gè)分類(lèi)別</font></b></p>
</td>
</tr>
<tr>
<td bgcolor="#7C96B8" align="center" height="25" width="69"><font color="#FFFFFF">原分類(lèi)別</font></td>
<td bgcolor="#7C96B8" align="center" height="25" width="210">
<select name="movearea" class="bk">
<option value="0" selected>要移動(dòng)的分類(lèi)別</option>
<%
sql="select * from area"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof
%>
<option value="<%=rs("area")%>"><%=rs("area")%></option>
<%
rs.movenext
wend
rs.Close()
%>
</select>
</td>
</tr>
<tr>
<td bgcolor="#7C96B8" align="center" height="25" width="69"><font color="#FFFFFF">移動(dòng)到:</font></td>
<td bgcolor="#7C96B8" align="center" height="25" width="210">
<select name="moveareato" class="bk">
<option value="0" selected>移動(dòng)到主分類(lèi)</option>
<%
sql="select * from bigarea"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof
%>
<option value="<%=rs("bigarea")%>"><%=rs("bigarea")%></option>
<%
rs.movenext
wend
rs.Close()
%>
</select>
</td>
</tr>
<tr>
<td bgcolor="#336699" align="center" colspan="2" height="81">
<p>
<input type="submit" name="Submit" value="移動(dòng)" class="Tips_bo">
<input type="hidden" name="action" value="movearea">
</p>
<p><font color="#FFFFFF">(此功能謹(jǐn)用,將合并所有分類(lèi)及商品<br>
為不可逆操作) </font></p>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
<%
if request("action")<>"modiarea" and request("action")<>"hebiarea" and request("action")<>"movearea" then
response.end
else
'修改分類(lèi)別名
if request("action")="modiarea" then
modiarea=request("modiarea")
modiareato=request("modiareato")
if modiarea="0" then
response.write"<SCRIPT language=JavaScript>alert('請(qǐng)選擇要改名的分類(lèi)別!');"
response.write "</SCRIPT>"
response.end
end if
if modiareato="" then
response.write"<SCRIPT language=JavaScript>alert('請(qǐng)輸入更改后的名稱(chēng)!');"
response.write "</SCRIPT>"
response.end
end if
conn.execute "update area set area='"&modiareato&"' where area='"&modiarea&"'"
conn.execute "update subs set area='"&modiareato&"' where area='"&modiarea&"'"
response.write"<SCRIPT language=JavaScript>alert('分類(lèi)別修改成功!');"
response.write "</SCRIPT>"
end if
'合并分類(lèi)別
if request("action")="hebiarea" then
area1=request("area1")
area2=request("area2")
areato=request("areato")
if area1="0" or area2="0" then
response.write"<SCRIPT language=JavaScript>alert('分類(lèi)別選擇錯(cuò)誤!');"
response.write "</SCRIPT>"
response.end
end if
if areato="" then
response.write"<SCRIPT language=JavaScript>alert('請(qǐng)?zhí)顚?xiě)合并后的分類(lèi)別名!');"
response.write "</SCRIPT>"
response.end
end if
if area1=area2 then
response.write"<SCRIPT language=JavaScript>alert('主分類(lèi)選擇錯(cuò)誤,不要選擇相同的!');"
response.write "</SCRIPT>"
response.end
end if
conn.execute "update area set area='"&areato&"' where area='"&area1&"'"
conn.execute "delete * from area where area='"&area2&"'"
conn.execute "update area set area='"&areato&"' where area='"&area1&"' or area='"&area2&"'"
conn.execute "update subs set area='"&areato&"' where area='"&area1&"' or aera='"&area2&"'"
response.write"<SCRIPT language=JavaScript>alert('分類(lèi)別合并成功!');"
response.write "</SCRIPT>"
end if
'移動(dòng)分類(lèi)別
if request("action")="movearea" then
movearea=request("movearea")
moveareato=request("moveareato")
if movearea="0" then
response.write"<SCRIPT language=JavaScript>alert('請(qǐng)選擇要移動(dòng)的分類(lèi)別!');"
response.write "</SCRIPT>"
response.end
end if
if moveareato="0" then
response.write"<SCRIPT language=JavaScript>alert('請(qǐng)?zhí)钜苿?dòng)到的主類(lèi)別!');"
response.write "</SCRIPT>"
response.end
end if
conn.execute "update area set bigarea='"&moveareato&"' where area='"&movearea&"'"
conn.execute "update subs set bigarea='"&moveareato&"' where area='"&movearea&"'"
response.write"<SCRIPT language=JavaScript>alert('分類(lèi)別移動(dòng)成功!');"
response.write "</SCRIPT>"
end if
end if
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -