<!--#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
%>
<%if cw=1 then%>
错误：分类名称必填！<br/>
<%end if%>
<%if cw=2 then%>
错误：分类简介必填！<br/>
<%end if%>
<%if cw=3 then%>
错误：分类分页数必填！<br/>
<%end if%>
<%if cw=4 then%>
错误：分类排序必填！<br/>
<%end if%>
分类名称：<br/>
<input name="name" title="分类名称：" type="text" format="*M" emptyok="true" maxlength="500" value=""/><br/>
分类简介[支持WML]：<br/>
<input name="jj" title="分类简介：" type="text" format="*M" emptyok="true" value=""/><br/>
分类分页数：<br/>
<input name="pag" title="分类名称：" type="text" format="*M" emptyok="true" maxlength="500" value=""/><br/>
分类排序[小在前]：<br/>
<input name="pid" title="分类名称：" type="text" format="*M" emptyok="true" maxlength="500" value=""/><br/>
是否换行
<select name="br" value="0">
<option value="0">否</option>
<option value="1">是</option>
</select><br/>
<anchor title="确定提交">[确定提交]
<go href="zjfl.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>&amp;cz=1" method="post" accept-charset='utf-8'>
<postfield name="name1" value="$(name)"/>
<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%>
<%
if cz="1" then
'-----接收数据-----
name2=usb(request("name1"))
jj2=usb(request("jj1"))
pag2=usb(request("pag1"))
pid2=usb(request("pid1"))
pd2=request("pd2")
br2=request("br1")
dy2=request("dy1")
if br2="" then br2="0"
dlpd2=request("dlpd1")
if dlpd2="" then dlpd2="0"
wd2=request("wd1")
if wd2="" then wd2="0"
'----识别错误并跳转-----
if name2="" then response.redirect "zjfl.asp?sid=" & sid & "&cw=1&cz=2"

if jj2="" then response.redirect "zjfl.asp?sid=" & sid & "&cw=2&cz=2"

if pag2="" then response.redirect "zjfl.asp?sid=" & sid & "&cw=3&cz=2"

if pid2="" then response.redirect "zjfl.asp?sid=" & sid & "&cw=4&cz=2"

'---开始增加----
set rs=Server.CreateObject("ADODB.Recordset")
rspl="select * from shop_lm"
rs.open rspl,connshop,1,2
rs.addnew
if name2<>"" then rs("name")=name2
if jj2<>"" then rs("fljj")=jj2
if pag2<>"" then rs("pag")=pag2
if pid2<>"" then rs("pid")=pid2
if br2<>"" then rs("br")=br2
rs("lx")=2
rs.update
'---关闭数据----
rs.close
set rs=nothing

%>
成功增加名为<u>[<%=name2%>]</u>的分类
<%
end if
%>
<br/>-----------<br/>
<a href="fl.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[管理分类]</a>
<!--#include file="bq.asp"-->
<%Call headsay()%>