<%
'商易仿淘宝4.0(多用户)
'ACCESS版演示网站：http://www.ftaobao.com(商易仿淘宝商城)
'SQL版演示网站：http://sql.ftaobao.com
'电话：0571-56907100
'QQ：1147100
%>
<%qx=4%>
<!--#include file="check.asp"-->
<!--#include file="../include/conn.asp"-->
<%if request("add")="yes" then

lbid1=shopnet("lbid1")
lbid2=shopnet("lbid2")
lbto=shopnet("lbto")
if lbid1="0" or lbid2="0" then 
response.write"<SCRIPT language=JavaScript>alert('主分类选择错误！');history.back();"
response.write "</SCRIPT>"
response.end
end if
if lbid1=lbid2 then 
response.write"<SCRIPT language=JavaScript>alert('主分类选择错误，不要选择相同的！');history.back();"
response.write "</SCRIPT>"
response.end
end if
if lbto<>"" then
conn.execute "update lb set lbname='"&lbto&"' where lbid="&lbid1&""
end if
conn.execute "update chanpin set lbid="&lbid1&" where lbid="&lbid2&""
conn.execute "update slb set lbid="&lbid1&" where lbid="&lbid2&""
conn.execute "update xlb set lbid="&lbid1&" where lbid="&lbid2&""
conn.execute "Delete * from lb where lbid="&lbid2&""
response.write"<SCRIPT language=JavaScript>alert('主分类合并成功！');location.href=""leibie.asp"";"
response.write "</SCRIPT>"

end If
'商易仿淘宝4.0.1演示地址
'http://www.ftaobao.com
%>
<html>
<head>
<title>管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../include/css.css" rel="stylesheet" type="text/css">
</head>
<body marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="6" cellspacing="0">
  <tr>
    <td align="center" valign="middle"> 
      <form name="he" method="post" action="?add=yes">
        <table width="350" border="0" cellpadding="4" cellspacing="1" bgcolor="#183789">
          <tr valign="middle" bgcolor="#CCCCCC"> 
            <td height="25" colspan="2" align="center" background="images/admin_bg_4.gif" bgcolor="#FFFFFF"> 
            <p class="White_txt"><strong>合并或移动一个主分类</strong></p></td>
          </tr>
          <tr valign="middle" bgcolor="#f1f1f1"> 
            <td width="76" height="25" align="center" bgcolor="#FFFFFF">原主分类1</td>
            <td width="262" height="25" bgcolor="#FFFFFF"> 
<select name="lbid1" class="wenbenkuang">
<option value="0" selected>请选择主分类</option>
<%set rs = conn.execute("select lbid,lbname from lb order by lbid")
while not rs.eof
Response.Write("<option value="&rs("lbid")&">"&rs("lbname")&"</option>")
rs.movenext
wend
rs.Close%>
</select> </td>
          </tr>
          <tr valign="middle" bgcolor="#f1f1f1"> 
            <td height="25" align="center" bgcolor="#FFFFFF">原主分类2</td>
            <td width="262" height="25" bgcolor="#FFFFFF"> 
              <select name="lbid2" class="wenbenkuang">
                <option value="0" selected>请选择主分类</option>
<%set rs = conn.execute("select lbid,lbname from lb order by lbid")
while not rs.eof
Response.Write("<option value="&rs("lbid")&">"&rs("lbname")&"</option>")
rs.movenext
wend
rs.Close%>
              </select> </td>
          </tr>
          <tr valign="middle" bgcolor="#f1f1f1"> 
            <td height="25" align="center" bgcolor="#FFFFFF">合并为：</td>
            <td height="25" nowrap bgcolor="#FFFFFF"> 
              <input name="lbto" type="text" class="wenbenkuang" size="13">
            为空，原主类2将转移到主类1</td>
          </tr>
          <tr valign="middle" bgcolor="#f1f1f1"> 
            <td height="25" colspan="2" align="center" bgcolor="#FFFFFF"> 
              
              <input type="submit" name="Submit" value="合并" class="go-wenbenkuang">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input name="Submit2" type="button" class="go-wenbenkuang" value="返回" onClick="javascript:window.history.go(-1)"> </td>
          </tr>
          <tr valign="middle" bgcolor="#f1f1f1"> 
            <td height="25" colspan="2" bgcolor="#FFFFFF">(此功能谨用，将合并转移所有分类别及产品为不可逆操作) </td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
</table>
</body>
</html>
