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

📄 editbigarea.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="modibigarea" method="post" action="editbigarea.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="modibigarea" 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="#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="modibigareato" 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="modibigarea">
            </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="editbigarea.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="bigarea1" 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="#7C96B8" align="center" height="25" width="69"><font color="#FFFFFF">原主分类2</font></td>
            <td bgcolor="#7C96B8" align="center" height="25" width="210">
              <select name="bigarea2" 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="#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="bigareato" 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="hebibigarea">
              </p>
              <p><font color="#FFFFFF">(此功能谨用,将合并所有分类及商品<br>为不可逆操作) </font></p>
            </td>
          </tr>
        </table>
        </form>
    </td>
  </tr>
</table>
</body>
</html>
<%
if request("action")<>"modibigarea" and request("action")<>"hebibigarea" then 
response.end
else

if request("action")="modibigarea" then
modibigarea=request("modibigarea")
modibigareato=request("modibigareato")

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

if modibigareato="" then 
response.write"<SCRIPT language=JavaScript>alert('请输入更改后的名称!');"
response.write "</SCRIPT>"
response.end
end if

conn.execute "update bigarea set bigarea='"&modibigareato&"' where bigarea='"&modibigarea&"'"
conn.execute "update area set bigarea='"&modibigareato&"' where bigarea='"&modibigarea&"'"
conn.execute "update subs set bigarea='"&modibigareato&"' where bigarea='"&modibigarea&"'"
response.write"<SCRIPT language=JavaScript>alert('主分类修改成功!');"
response.write "</SCRIPT>"
end if

if request("action")="hebibigarea" then

bigarea1=request("bigarea1")
bigarea2=request("bigarea2")
bigareato=request("bigareato")

if bigarea1="0" or bigarea2="0" then 
response.write"<SCRIPT language=JavaScript>alert('主分类选择错误!');"
response.write "</SCRIPT>"
response.end
end if

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

if bigarea1=bigarea2 then 
response.write"<SCRIPT language=JavaScript>alert('主分类选择错误,不要选择相同的!');"
response.write "</SCRIPT>"
response.end
end if


conn.execute "update bigarea set bigarea='"&bigareato&"' where bigarea='"&bigarea1&"'"
conn.execute "delete * from bigarea where bigarea='"&bigarea2&"'"
conn.execute "update area set bigarea='"&bigareato&"' where bigarea='"&bigarea1&"' or bigarea='"&bigarea2&"'"
conn.execute "update subs set bigarea='"&bigareato&"' where bigarea='"&bigarea1&"' or bigaera='"&bigarea2&"'"
response.write"<SCRIPT language=JavaScript>alert('主分类合并成功!');"
response.write "</SCRIPT>"
end if

end if
%>

⌨️ 快捷键说明

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