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

📄 sclass.asp

📁 时代购物系统 4.0功能升级说明 <1>完善了3.0的VIP
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
else
if session("rank")>1 then
response.Write "<div align=center><font size=5 color=red><b>你的权限不够!</b></font></div>"
response.End
end if
end if
%>
<%dim categoryid,category,follows
category=request.QueryString("sorts")
categoryid=request.QueryString("id")
%>
<title>商品小类管理</title>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#6699cc">
  <tr bgcolor="#6699cc"> 
    <td height="20" colspan="2" align="center"><font color="#FFFFFF">商品小类管理</font></td>
  </tr>
  <tr> 
    <td width="24%" height="37" valign="top" bgcolor="#FFFFFF" align="center"><br>
        <select name="select" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" ><base target=Right> 
          <option selected>选择商品分类</option>
          <%set rs=server.createobject("adodb.recordset")
		rs.Open "select * from category order by categoryorder",conn,1,1
		do while not rs.eof %>
          <option value="sclass.asp?id=<%=rs("categoryid")%>&category=<%=rs("category")%>" ><%=trim(rs("category"))%></option>
          <%rs.movenext
		loop
		rs.close
		set rs=nothing
		%>
        </select>
        <br>
        <%if request.QueryString("id")<>"" then
        response.Write "当前查询:"&request.QueryString("category")
        end if%>
      </td>
    <td width="100%" bgcolor="#FFFFFF"><br>
	 <table width="90%" align="center" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
        <tr align="center" bgcolor="#FFFFFF" height="20"> 
          <td width="40%">分类名称</td>
          <td width="20%">分类排序</td>
          <td width="20%">一级分类</td>
          <td width="20%">确定操作</td>
        </tr>
        <%
        if categoryid="" then
        response.Write "<div align=center><font color=red>请选择左测的分类</font></div>"
        else
        set rs=server.CreateObject("adodb.recordset")
        rs.Open "select * from sorts where categoryid="&categoryid&" order by sortsorder",conn,1,1
         if rs.EOF and rs.BOF then
		  response.Write "<div align=center><font color=red>还没有分类</font></center>"
		  follows=0
		  else
         do while not rs.EOF
         %>
        <form name="form1" method="post" action="savesclass.asp?action=edit&id=<%=rs("sortsid")%>&category=<%=request.QueryString("category")%>">
          <tr align="center" bgcolor="#FFFFFF"> 
            <td><input name="sorts" type="text" id="sorts" size="16" value="<%=trim(rs("sorts"))%>">
                <input name="categoryid2" type="hidden" value="<%=request.QueryString("id")%>" id="Hidden1"></td>
            <td><input name="sortsorder" type="text" id="sortsorder" size="4" value="<%=int(rs("sortsorder"))%>"></td>
            <td><input name="first2" type="checkbox" id="first2" value="1">
                <%if rs("first")=1 then
                response.Write "<font color=red>一级</font>"
                else
                response.Write "二级"
                end if%>
              </td>
            <td><input type="submit" name="Submit" value="修 改">
                &nbsp;<a href="savesclass.asp?id=<%=int(rs("sortsid"))%>&action=del&categoryid=<%=request.QueryString("id")%>&category=<%=request.QueryString("category")%>" onClick="return confirm('您确定进行删除操作吗?')"><font color=red>删除</font></a> 
              </td>
          </tr>
        </form>
        <%rs.movenext
        loop
        follows=rs.RecordCount
        rs.close
        set rs=nothing
        end if
        end if
				%>
      </table><br></td>
  </tr>
</table>
<br>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#6699cc">
  <tr bgcolor="#6699cc"> 
    <td height="20" colspan="2" align="center"><font color="#FFFFFF">添加商品分类</font></td>
  </tr>
  <tr> 
    <td width="24%" valign="top" bgcolor="#FFFFFF" align="center"><br>
        当前分类:<%=request.QueryString("category")%></div></td>
    <td width="100%" bgcolor="#FFFFFF" align="center"><br>
	 <table width="90%" align="center"border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
        <tr bgcolor="#FFFFFF" align="center" height="20"> 
          <td width="40%">分类名称</td>
          <td width="20%">分类排序</td>
          <td width="20%">一级分类</td>
          <td width="20%">确定操作</td>
        </tr>
        <form name="form2" method="post" action="savesclass.asp?action=add&category=<%=request.QueryString("category")%>">
          <tr bgcolor="#FFFFFF" align="center"> 
            <td><input name="sorts2" type="text" id="sorts2" size="16"></td>
            <td><input name="sortsorder2" type="text" id="sortsorder2" size="4" value="<%=follows+1%>">
                <input name="categoryid" type="hidden" value="<%=categoryid%>"></td>
            <td><input name="first" type="checkbox" id="first3" value="1">
                <font color="#FF0000">二级</font></div></td>
            <td><input type="submit" name="Submit2" value="添 加"></td>
          </tr>
        </form>
      </table><br></td>
  </tr>
</table>
<br>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#6699cc">
  <tr> 
    <td height="20" bgcolor="#6699cc" align="center"><font color="#FFFFFF">操作注意事项及说明</font></td>
  </tr>
  <tr> 
    <td bgcolor="#FFFFFF"> <table width="80%" border="0" align="center" cellpadding="5" cellspacing="0">
        <tr> 
          <td height="16"><font color="#FF0000">·请注意分类名称不要含有非法字符。<br>
            ·增加一级分类时,如果没有选择此小类所属大类为一级分类,则被列为&quot;其它&quot;分类。<br>
            ·进行删除操作的同时,会删除此分类下的所有商品。</font></td>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="footer.asp"-->

⌨️ 快捷键说明

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