<!--#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
%>
<%
dim id
id=request("id")
set rsp=Server.CreateObject("ADODB.Recordset")
rsppl="select * from shop_zlm where CStr(id)='"&id&"'"
rsp.open rsppl,connshop,1,2
flname=rsp("name")
%>
<%if cw=1 then%>
错误：分类名称必填！<br/>
<%end If

If saytk>1 then
%>
<form name="form" method="post" action="xlxg.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>&amp;cz=1&amp;idxg=<%=id%>&amp;id=<%=id%>">
<%End if




%>
小类名称：<br/>
<input name="name1" title="小类名称：" type="text" format="*M" emptyok="true" maxlength="500" value="<%=ubb(flname)%>"/><br/>
<%If saytk>1 Then
response.write "<input type=""submit"" name=""Submit"" value=""确定提交""></form><br/>"
%>
<%else
%>
<anchor title="确定提交">[确定提交]
<go href="xlxg.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)"/>
</go>
</anchor>
<%end if%>
<%end if%>
<%
if cz="1" then
'-----接收数据-----
name2=usb(request("name1"))
id=request("id")
'----识别错误并跳转-----
if name2="" then response.redirect "xlxg.asp?sid=" & sid & "&cw=1&cz=2&id="&idxg&""


'---开始修改----
set rs=Server.CreateObject("ADODB.Recordset")
rspl="select * from shop_zlm where id="&id
rs.open rspl,connshop,1,2
if name2<>"" then rs("name")=name2
rs.update
iiid=rs("did")
rs.close
set rs=nothing
%>
成功修改名为<u>[<%=name2%>]</u>的小类
<%
end if
%>
<br/>-----------<br/>
<a href="fl_xl.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>&amp;id=<%=iiid%>">[返回小类]</a><br/><a href="fl.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>&amp;id=<%=iiid%>">[返回分类]</a>
<!--#include file="bq.asp"-->
<%Call headsay()%>