<!--#include file="vvbb.asp"-->
<!--#include file="../conn.asp"-->
<!--#include file="../admin.asp"-->
<%Call head()
Call saycarda("商场-增加小类")%>

<%
cw=request("cw")
cz=request("cz")
if cz="" or cz="2"then
id=request("id")

%>

小类名称：<br/>
<%If saytk>1 then
%>
<form name="form" method="post" action="zjxl.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>&amp;cz=1&amp;id=<%=id%>">
<%End if%>
<input name="name2" title="分类名称：" type="text" format="*M" emptyok="true" maxlength="500" value=""/><br/>
<%If saytk>1 Then
response.write "<input type=""submit"" name=""Submit"" value=""确定提交""></form><br/>"
%>
<%else
%>
<anchor title="确定提交">[确定提交]
<go href="zjxl.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>&amp;cz=1&amp;id=<%=id%>" method="post" accept-charset='utf-8'>
<postfield name="name2" value="$(name2)"/>
<postfield name="jj1" value="$(jj)"/>
<postfield name="pag1" value="$(pag)"/>
<postfield name="pid1" value="$(pid)"/>
<postfield name="pd1" value="$(pd)"/>
<postfield name="dy1" value="$(dy)"/>
<postfield name="dlpd1" value="$(dlpd)"/>
<postfield name="br1" value="$(br)"/>
</go>
</anchor>
<%end if%>
<%end if%>
<%
if cz="1" then
'-----接收数据-----
name2=usb(request("name2"))
id=usb(request("id"))
if name2=1 then%>
错误：分类名称必填！<br/>
<%end if%>
<%if name2=2 then%>
错误：分类简介必填！<br/>
<%end if%>
<%if name2=3 then%>
错误：分类分页数必填！<br/>
<%end if%>
<%if name2=4 then%>
错误：分类排序必填！<br/>
<%end if
'----识别错误并跳转-----
if name2="" then response.redirect "zjxl.asp?sid=" & sid & "&id="&id&"&cw=1&cz=2"


'---开始增加----
set rs=Server.CreateObject("ADODB.Recordset")
rspl="select * from shop_zlm"
rs.open rspl,connshop,1,2
rs.addnew
if name2<>"" then rs("name")=name2
rs("did")=id
rs.update
'---关闭数据----
rs.close
set rs=nothing

%>
成功增加名为<u>[<%=name2%>]</u>的小类
<%
end if
%>
<br/>-----------<br/>
<a href="fl_xl.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>&amp;id=<%=id%>">[管理小类]</a><br/><a href="fl.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[管理分类]</a>

<%Call headsay()%>
