<!--#include file="../here99login/0.asp"-->
<!--#include file="../conn/zkconn.asp" -->
<%
'合并分类别
if request("action")="hexlb" then

xlbid1=request("xlbid1")
xlbid2=request("xlbid2")
xlbidto=request("xlbidto")

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

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

if xlbid1=xlbid2 then 
response.write"<SCRIPT language=JavaScript>alert('分类选择错误，不要选择相同的！');history.back();"
response.write "</SCRIPT>"
response.end
end if


conn.execute "update xlb set xlbname='"&xlbidto&"' where xlbid="&xlbid1&""
conn.execute "delete * from xlb where xlbid="&xlbid2&""
conn.execute "update chanpin set xlbid="&xlbid1&" where xlbid="&xlbid2&""
response.write"<SCRIPT language=JavaScript>alert('分类合并成功！');location.href=""leibie.asp"";"
response.write "</SCRIPT>"
end if

'移动分类别
if request("action")="yd" then
yi=request("yi")
yito=request("yito")


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

if yito="0" then 
response.write"<SCRIPT language=JavaScript>alert('请填要移动到的主类别！');history.back();"
response.write "</SCRIPT>"
response.end
end if
conn.execute "update xlb set lbid="&yito&" where xlbid="&yi&""
conn.execute "update chanpin set lbid="&yito&" where xlbid="&yi&""
response.write"<SCRIPT language=JavaScript>alert('分类别移动成功！');location.href=""leibie.asp"";"
response.write "</SCRIPT>"
end if
%>