⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zclass.asp

📁 佳可商务购物程序v1.0
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');history.go(-1);</script>"
response.End
else
if session("flag")>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限!</b></font></div>"
response.End
end if
end if
%>
<%dim nclass,nclassid,anclass,anclassid,paixu
nclassid =request.QueryString("nclassid")
if nclassid<>"" then
	set rs_s=server.createobject("adodb.recordset")
	rs_s.open "select * from shop_nclass where nclassid="&nclassid,conn,1,1
	nclass=rs_s("nclass")
	anclassid=rs_s("anclassid")
	rs_s.close
	set rs_s=server.createobject("adodb.recordset")
	rs_s.open "select * from shop_anclass where anclassid="&anclassid,conn,1,1
	anclass=rs_s("anclass")
	rs_s.close
	set rs_s=nothing
else
	set rs_s=server.createobject("adodb.recordset")
	rs_s.open "select * from shop_anclass order by anclassidorder",conn,1,1
	if rs_s.recordcount>0 then
		anclass=rs_s("anclass")
		anclassid=rs_s("anclassid")
		set rs_s=server.createobject("adodb.recordset")
		rs_s.open "select * from shop_nclass where anclassid="&anclassid&" order by nclassidorder",conn,1,1
		if rs_s.recordcount>0 then
			nclass=rs_s("nclass")
			nclassid=rs_s("nclassid")
		end if
	end if
	rs_s.close
	set rs_s=nothing
end if
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css.css" rel="stylesheet" type="text/css">
<style>
td{font-size:9pt;line-height:120%;color:#353535} 
body{font-size:9pt;line-height:120%} 

a:link          { color: #000000; text-decoration: none }
a:visited       { color: #000000; text-decoration: none }
a:active        { color: #000000; text-decoration: none }
a:hover         { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
</style>
</head>

<body bgcolor="#799AE1">
<table width="80%" border="1" cellspacing="0" cellpadding="1" bordercolor="#6699FF" align="center">
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td background="../images/back_3.gif" rowspan="2"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
              <tr> 
                <td class="12v" > 
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
                    <tr> 
                      <td> 
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#006600">
                          <tr bgcolor="#FFFFFF"> 
                            <td height="16" colspan="2"> 
                              <div align="center"><font color="#000000">商品专题管理</font></div>
                            </td>
                          </tr>
                          <tr> 
                            <td width="24%" height="37" valign="top" bgcolor="#E8F1FF"> 
<script language=JavaScript>
<%dim i,j
	set rs_s=server.createobject("adodb.recordset")
	rs_s.open "select * from shop_anclass order by anclassidorder",conn,1,1
%>
	var selects=[];
<%
	for i=1 to rs_s.recordcount
%>
	selects['<%=rs_s("anclassid")%>']=new Array(
<%
	set rs_s1=server.createobject("adodb.recordset")
	rs_s1.open "select * from shop_nclass where anclassid="&rs_s("anclassid")&" order by nclassidorder",conn,1,1
	if rs_s1.recordcount>0 then 
		for j=1 to rs_s1.recordcount
		if j=rs_s1.recordcount then 
%>
		new Option('<%=rs_s1("nclass")%>','<%=trim(rs_s1("nclassid"))%>'));
<%		else
%>
		new Option('<%=rs_s1("nclass")%>','<%=trim(rs_s1("nclassid"))%>'),
<%
		end if
		rs_s1.movenext
		next
	else 
%>
		new Option('','0'));
<%
	end if
	rs_s1.close
	set rs_s1=nothing
	rs_s.movenext
	next
rs_s.close
set rs_s=nothing
%>
	function chsel(){
		with (document.shouhuoxx){
			if(DaLei.value) {
				XiaoLei.options.length=0;
				for(var i=0;i<selects[DaLei.value].length;i++){
					XiaoLei.add(selects[DaLei.value][i]);
				}
			}
		}
	}
</script>
                            <form name="shouhuoxx">
                              <div align="left"><br> 大类:<select name="DaLei"  onChange=chsel()><base target=Right> 
                <%set rs=server.createobject("adodb.recordset")
		rs.Open "select * from shop_anclass order by anclassidorder",conn,1,1
		do while not rs.eof %>
                                  <option value="<%=rs("anclassid")%>" <%if rs("anclassid")=anclassid then%>selected<%end if%>><%=trim(rs("anclass"))%></option>
                                  <%rs.movenext
		loop
		rs.close
		set rs=nothing
		%>
                                </select><br> 小类:<select name="XiaoLei" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location='zclass.asp?nclassid='+jmpURL;} else {this.selectedIndex=0 ;}" ><base target=Right>
                <%
                if anclassid<>"" then
                set rs=server.createobject("adodb.recordset")
		rs.Open "select * from shop_nclass where anclassid="&anclassid&" order by nclassidorder ",conn,1,1
		do while not rs.eof %>
                                  <option value="<%=rs("nclassid")%>" <%if cint(rs("nclassid"))=cint(nclassid) then%>selected<%end if%>><%=trim(rs("nclass"))%></option>
                                  <%rs.movenext
		loop
		rs.close
		set rs=nothing
		end if
		%>
                                </select>
                                <br>
                <% response.Write "<br> 当前查讯:"&anclass&"<br>    ->"&nclass %>
                              </div>
                              </form>
                            </td>
                            <td width="76%" bgcolor="#E8F1FF"> 
                              <table width="86%" border="0" cellpadding="1" cellspacing="0">
                                <tr> 
                                  <td> 
                                    <div align="center">分类名称</div>
                                  </td>
                                  <td> 
                                    <div align="center">分类排序</div>
                                  </td>
                                  <td> 
                                    <div align="center">常用分类</div>
                                  </td>
                                  <td> 
                                    <div align="center">确定操作</div>
                                  </td>
                                </tr>
                                <%
        if nclassid="" then
        response.Write "<div align=center><font color=red>请选择左测的分类</font></div>"
        else
        set rs=server.CreateObject("adodb.recordset")
        rs.Open "select * from shop_zclass where nclassid="&nclassid&" order by zclassidorder",conn,1,1
         if rs.EOF and rs.BOF then
		  response.Write "<div align=center><font color=red>还没有分类</font></div>"
		  paixu=0
		  else
         do while not rs.EOF

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -