www.gusucode.com > 运动用品商城网站系统源代码程序 > feyok/ad_ziduan.asp

    <!--#include file="conn.asp"-->
<!--#include file="ad_chk.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href=inc/css.css rel=STYLESHEET type=text/css>
<body topmargin="5" leftmargin="5" rightmargin="5" bottommargin="5">
<%
if Request.Cookies("venshop")("admin_class")<>0 and Request.Cookies("venshop")("admin_class")<>1 then
response.write "你没有这个权限!"
response.end
end if
%>
<%
errmes1="没有这个分类"

host=lcase(request.servervariables("HTTP_HOST"))

if request("action")="edit" then
sort_id=request.QueryString("sort_id")
set rs=server.createobject("adodb.recordset")
sql="select * from venshop_sort where sort_id="&sort_id&""
rs.open sql,conn,1,3
rs("ziduan")=request("ziduan1")
for i=2 to 50
rs("ziduan")=rs("ziduan")&"##"&request("ziduan"&i)
next
rs.update
rs.close
set rs=nothing
call editok(editt,"ad_ziduan.asp?sort_id="&sort_id&"","ad_z.asp")
elseif request("action")="fuzhi" then
sort_id=request("sort_id")
sortfrom=request("sortfrom")
set rsa=server.createobject("adodb.recordset")
sql="select * from venshop_sort where sort_id="&sortfrom&""
rsa.open sql,conn,1,1
set rsb=server.createobject("adodb.recordset")
sql="select * from venshop_sort where sort_id="&sort_id&""
rsb.open sql,conn,1,3
for i=1 to 50
rsb("ziduan")=rsa("ziduan")
next
rsb.update
rsb.close
set rsb=nothing
rsa.close
set rsa=nothing
call editok(editt,"ad_ziduan.asp?sort_id="&sort_id&"","ad_z.asp")
end if
sort_id=request("sort_id")
set rs=server.createobject("adodb.recordset")
sql="select * from venshop_sort where sort_id="&sort_id&""
rs.open sql,conn,1,1
if rs.eof then
response.write errmes1
Response.End 
end if
zc=0
sort_id=rs("sort_id")
sort_name=rs("sort_name")
if rs("ziduan")<>"" then
zd=split(rs("ziduan"),"##")
redim ziduan(1),ziduan(2),ziduan(3),ziduan(4),ziduan(5),ziduan(6),ziduan(7),ziduan(8),ziduan(9),ziduan(10),ziduan(11),ziduan(12),ziduan(13),ziduan(14),ziduan(15),ziduan(16),ziduan(17),ziduan(18),ziduan(19),ziduan(20),ziduan(21),ziduan(22),ziduan(23),ziduan(24),ziduan(25),ziduan(26),ziduan(27),ziduan(28),ziduan(29),ziduan(30),ziduan(31),ziduan(32),ziduan(33),ziduan(34),ziduan(35),ziduan(36),ziduan(37),ziduan(38),ziduan(39),ziduan(40),ziduan(41),ziduan(42),ziduan(43),ziduan(44),ziduan(45),ziduan(46),ziduan(47),ziduan(48),ziduan(49),ziduan(50)
for i=1 to ubound(zd)+1
ziduan(i)=trim(zd(i-1))
next
zc=ubound(zd)+1
end if

%>
<table border="0" cellpadding="5" class=st cellspacing="0">
<form method="POST" action="ad_ziduan.asp?action=fuzhi&sort_id=<%=rs("sort_id")%>">	
<tr><td align="center" colspan="2" class="s1">目前分类:<font color="#FF0000"><%=sort_name%></font>&nbsp;&nbsp;&nbsp;&nbsp;从其它分类复制:<select size="1" name="sortfrom">
<option selected>选择分类</option>	
<%set rsx=server.createobject("adodb.recordset")
sql="select * from venshop_sort order by sort_xu desc,sort_id desc"
rsx.open sql,conn,1,1
if rsx.eof then
response.write errmes1
Response.End 
else
do while not rsx.eof%><option value="<%=rsx("sort_id")%>"><%=rsx("sort_name")%></option><%rsx.movenext
loop
end if
rsx.close
set rsx=nothing%></select><input type="submit" value="提交"></td></tr></form>

<form method="POST" action="ad_ziduan.asp?action=edit&sort_id=<%=rs("sort_id")%>"><tr>
	<td class="s0">
<%for i=1 to 25%>
参数<%if i<10 then response.write "0"%><%=i%>:<input type="text" name="ziduan<%=i%>"<%if i<=zc then%> value="<%=ziduan(i)%>"<%end if%> style="height: 18; width: 200"><br>
<%next%></td>
<td class="s0"><%for i=26 to 50%>
参数<%=i%>:<input type="text" name="ziduan<%=i%>"<%if i<=zc then%> value="<%=ziduan(i)%>"<%end if%> style="height: 18; width: 200"><br>
<%next%></td></tr>
<tr><td align="center" colspan="2"><input type="submit" value=" 修 改 " name="cmdok" style="font-family: 宋体; font-size: 9pt"></td></tr></form></table>
<%rs.close
set rs=nothing%><!--#include file="ad_bottom.asp"-->