<!--#include file="../conn.asp"-->
<!--#include file="../admin.asp"-->
<%Call head()
Call saycarda("商场-修改分类")%>

<!--#include file="vvbb.asp"-->
<%
cw=request("cw")
cz=request("cz")
if cz="" or cz="2"then
%>
<%
dim id
id=request("id")
set rsp=Server.CreateObject("ADODB.Recordset")
rsppl="select * from shop_lm where CStr(id)="&id
rsp.open rsppl,connshop,1,2
flname=rsp("name")
fljj=rsp("fljj")
flpag=rsp("pag")
flpid=rsp("pid")
flbr=rsp("br")
%>
<%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="name1<%=minute(now)%><%=second(now)%>" title="分类名称：" type="text" format="*M" emptyok="true" maxlength="500" value="<%=ubb(flname)%>"/><br/>
分类简介[支持WML]：<br/>
<input name="jj1<%=minute(now)%><%=second(now)%>" title="分类简介：" type="text" format="*M" emptyok="true" value="<%=ubb(fljj)%>"/><br/>
分类分页数：<br/>
<input name="pag1<%=minute(now)%><%=second(now)%>" title="分类名称：" type="text" format="*M" emptyok="true" maxlength="500" value="<%=flpag%>"/><br/>
分类排序[小在前]：<br/>
<input name="pid1<%=minute(now)%><%=second(now)%>" title="分类名称：" type="text" format="*M" emptyok="true" maxlength="500" value="<%=flpid%>"/><br/>
是否换行
<select name="br1<%=minute(now)%><%=second(now)%>" value="<%=flbr%>">
<option value="0">否</option>
<option value="1">是</option>
</select><br/>
<anchor title="确定提交">[确定提交]
<go href="flxg.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>&amp;cz=1&amp;idxg=<%=id%>&amp;id=<%=id%>" method="post" accept-charset='utf-8'>
<postfield name="name1" value="$(name1<%=minute(now)%><%=second(now)%>)"/>
<postfield name="jj1" value="$(jj1<%=minute(now)%><%=second(now)%>)"/>
<postfield name="pag1" value="$(pag1<%=minute(now)%><%=second(now)%>)"/>
<postfield name="pid1" value="$(pid1<%=minute(now)%><%=second(now)%>)"/>
<postfield name="pd1" value="$(pd1<%=minute(now)%><%=second(now)%>)"/>
<postfield name="dy1" value="$(dy<%=minute(now)%><%=second(now)%>)"/>
<postfield name="dlpd1" value="$(dlpd1<%=minute(now)%><%=second(now)%>)"/>
<postfield name="br1" value="$(br1<%=minute(now)%><%=second(now)%>)"/>
</go>
</anchor>
<%end if%>
<%
if cz="1" then
'-----接收数据-----
idxg=request("idxg")
name2=usb(request("name1"))
jj2=usb(request("jj1"))
pag2=usb(request("pag1"))

pid2=usb(request("pid1"))
dy2=usb(request("dy1"))
pd2=request("pd1")
br2=request("br1")
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 "flxg.asp?sid=" & sid & "&cw=1&cz=2&id="&idxg&""

if jj2="" then response.redirect "flxg.asp?sid=" & sid & "&cw=2&cz=2&id="&idxg&""

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

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

'---开始修改----
set rs=Server.CreateObject("ADODB.Recordset")
rspl="select * from shop_lm where id="&idxg
rs.open rspl,connshop,1,2
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.update
'---关闭数据----
rs.close
set rs=nothing
%>
成功修改名为<u>[<%=ubb(name2)%>]</u>的分类

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