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

📄 editarea.asp

📁 订单管理系统源码
💻 ASP
字号:
<!--#include file="adminconn.inc" -->
<html>
<head>
<title>腾科B2C购物系统-商品管理</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">.:: 您可以在这里修改、合并与移动分类别</font></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="50">&nbsp;</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">一个分类别</font></b></p>
            </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">
              <select name="modiarea" class="bk">
                <option value="0" selected>请选择分类别</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">一个分类别</font></b></p>
            </td>
          </tr>
          <tr> 
            <td bgcolor="#7C96B8" align="center" height="25" width="69"><font color="#FFFFFF">原分类别1</font></td>
            <td bgcolor="#7C96B8" align="center" height="25" width="210">
              <select name="area1" class="bk">
                <option value="0" selected>请选择分类别</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">原分类别2</font></td>
            <td bgcolor="#7C96B8" align="center" height="25" width="210">
              <select name="area2" class="bk">
                <option value="0" selected>请选择分类别</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">(此功能谨用,将合并所有分类及商品<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">移动</font></b><b><font color="#FFFFFF">一个分类别</font></b></p>
            </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"> 
              <select name="movearea" class="bk">
                <option value="0" selected>要移动的分类别</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"> 
              <select name="moveareato" class="bk">
                <option value="0" selected>移动到主分类</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="移动" class="Tips_bo">
                <input type="hidden" name="action" value="movearea">
              </p>
              <p><font color="#FFFFFF">(此功能谨用,将合并所有分类及商品<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
'修改分类别名
if request("action")="modiarea" then
modiarea=request("modiarea")
modiareato=request("modiareato")



if modiarea="0" then 
response.write"<SCRIPT language=JavaScript>alert('请选择要改名的分类别!');"
response.write "</SCRIPT>"
response.end
end if

if modiareato="" then 
response.write"<SCRIPT language=JavaScript>alert('请输入更改后的名称!');"
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('分类别修改成功!');"
response.write "</SCRIPT>"
end if

'合并分类别
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('分类别选择错误!');"
response.write "</SCRIPT>"
response.end
end if

if areato="" then 
response.write"<SCRIPT language=JavaScript>alert('请填写合并后的分类别名!');"
response.write "</SCRIPT>"
response.end
end if

if area1=area2 then 
response.write"<SCRIPT language=JavaScript>alert('主分类选择错误,不要选择相同的!');"
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('分类别合并成功!');"
response.write "</SCRIPT>"
end if

'移动分类别
if request("action")="movearea" then
movearea=request("movearea")
moveareato=request("moveareato")


if movearea="0" then
response.write"<SCRIPT language=JavaScript>alert('请选择要移动的分类别!');"
response.write "</SCRIPT>"
response.end
end if

if moveareato="0" then 
response.write"<SCRIPT language=JavaScript>alert('请填要移动到的主类别!');"
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('分类别移动成功!');"
response.write "</SCRIPT>"
end if

end if
%>

⌨️ 快捷键说明

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