<!--#include file="../here99login/0.asp"-->
<!--#include file="../conn/zkconn.asp" -->
<%
lbid1=request("lbid1")
lbid2=request("lbid2")
lbto=request("lbto")

if lbid1="0" or lbid2="0" then 
response.write"<SCRIPT language=JavaScript>alert('主分类选择错误！');history.back();"
response.write "</SCRIPT>"
response.end
end if

if lbto="" 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


conn.execute "update lb set lbname='"&lbto&"' where lbid="&lbid1&""
conn.execute "delete * from lb where lbid="&lbid2&""
conn.execute "update xlb set lbid="&lbid1&" where lbid="&lbid2&""
conn.execute "update chanpin set lbid="&lbid1&" where lbid="&lbid2&""
response.write"<SCRIPT language=JavaScript>alert('主分类合并成功！');location.href=""leibie.asp"";"
response.write "</SCRIPT>"
%>