xclass.asp
上传用户:btntkt
上传日期:2021-04-16
资源大小:5296k
文件大小:8k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

DOS

  1. <!--#include file="conn.asp"-->
  2. <!--#include file="../md5.asp"-->
  3. <%
  4. dim cls
  5. if session("admin")="" then
  6. Response.Redirect("admin.asp")
  7. else
  8. if session("flag")<>"0" then
  9. cls = Instr(session("flag"), "zilei")
  10. if cls <= 0 then
  11. %>
  12. <script language="javascript">
  13. if (confirm("您的操作权限不够,系统拒绝你的访问,请点确定返回,或者点取消退出重新登录"))
  14.   location.href="login.asp";
  15. else
  16.   location.href="index.asp";
  17. </script>
  18. <%
  19. end if
  20. end if
  21. end if
  22. %>
  23. <%
  24. dim nclassid,nclass,paixu,aid,anclass
  25. nclass=request.QueryString("nclass")
  26. nclassid=request.QueryString("id")
  27. anclass=request.QueryString("anclass")
  28. aid=request.QueryString("aid")
  29. %>
  30. <html>
  31. <head>
  32. <title></title>
  33. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  34. <link href="Images/style.css" rel="stylesheet" type="text/css">
  35. </head>
  36. <body>
  37. <br>
  38. <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  39.   <tr>
  40.     <td height="30"><form name="myform" method="post" action="" onSubmit="return checkkk()" >
  41. <%set rs=server.createobject("adodb.recordset")
  42.         rs.open "select * from bsort order by anclassidorder",conn,1,1
  43. if rs.eof and rs.bof then
  44. response.write "请先添加栏目。"
  45. response.end
  46. else
  47. %>
  48. <select name="anclassid" size="1" id="anclassid" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}">
  49.           <option >选择商品分类</option>
  50.   <option value="xclass.asp?aid=<%=rs("anclassid")%>&anclass=<%=rs("anclass")%>" <%if rs("anclassid")=cint(request.QueryString("aid")) then %>selected<%end if%>><%=trim(rs("anclass"))%></option>
  51.      <%          rs.movenext
  52.         do while not rs.eof
  53. %>
  54.           <option value="xclass.asp?aid=<%=rs("anclassid")%>&anclass=<%=rs("anclass")%>" <%if rs("anclassid")=cint(request.QueryString("aid")) then %>selected<%end if%>><%=trim(rs("anclass"))%></option>
  55.     <%
  56.         rs.movenext
  57.         loop
  58. end if
  59.         rs.close
  60. %>
  61.   </select>
  62.   <font color="#FF0000">
  63.   <select name="Nclassid" id="Nclassid" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" >
  64.           <option >选择商品分类</option>
  65.           <%set rs=server.createobject("adodb.recordset")
  66.   if aid="" then
  67.   aid=0
  68.   end if
  69. rs.Open "select * from ssort where anclassid="&aid&" order by nclassidorder",conn,1,1
  70. do while not rs.eof %>
  71.           <option value="xclass.asp?id=<%=rs("nclassid")%>&nclass=<%=rs("nclass")%>&aid=<%=aid%>&anclass="<%=anclass%>"" <%if rs("nclassid")=cint(request.QueryString("id")) then %>selected<%end if%>><%=trim(rs("nclass"))%></option>
  72.           <%rs.movenext
  73. loop
  74. rs.close
  75. set rs=nothing
  76. %>
  77.       </select>
  78.         <%if request.QueryString("id")<>"" then
  79.         response.Write "当前查讯:"&request.QueryString("nclass")
  80.         end if%>
  81.         </form>
  82.     </td>
  83.   </tr>
  84. </table>
  85. <table width="95%" border="0" cellpadding="3" cellspacing="1" align="center" bgcolor="#6396D6">
  86.   <tr bgcolor="#C7D3E6"> 
  87.     <td width="23%" bgcolor="#7B9AE7"> <div align="center"><font color="#FFFFFF">分类名称</font></div></td>
  88.     <td width="15%" bgcolor="#7B9AE7"><div align="center">关键词(Keywords)</div></td>
  89.     <td width="15%" bgcolor="#7B9AE7"><div align="center">描述(Description)</div></td>
  90.     <td width="13%" bgcolor="#7B9AE7"> <div align="center"><font color="#FFFFFF">排序</font></div></td>
  91.     <td width="34%" bgcolor="#7B9AE7"> <div align="center"><font color="#FFFFFF">确定操作</font></div></td>
  92.   </tr>
  93.   <%
  94.         if nclassid="" then
  95.         response.Write "<div align=center><font color=red>请选择左测的分类</font></div>"
  96.         else
  97.         set rs=server.CreateObject("adodb.recordset")
  98.         rs.Open "select * from xsort where nclassid="&nclassid&" order by xpx",conn,1,1
  99.          if rs.EOF and rs.BOF then
  100.   response.Write "<div align=center><font color=red>还没有分类</font></center>"
  101.   paixu=0
  102.   else
  103.          do while not rs.EOF
  104.          %>
  105.   <form name="form1" method="post" action="savexclass.asp?action=edit&id=<%=rs("id")%>&nclass=<%=request.QueryString("nclass")%>">
  106.     <tr bgcolor="#F0F3F8"> 
  107.       <td bgcolor="#DEE7FF"> <div align="center"> 
  108.           <input name="xclass" type="text" id="xclass" size="12" value="<%=trim(rs("xclass"))%>">
  109.           <input name="nclassid" type="hidden" value="<%=request.QueryString("id")%>" id="Hidden1">
  110.           <input name="anclassid" type="hidden" value="<%=request.QueryString("aid")%>" id="anclassid">
  111.         </div></td>
  112.       <td bgcolor="#DEE7FF"><textarea name="key" id="key"><%=trim(rs("key"))%></textarea></td>
  113.       <td bgcolor="#DEE7FF"><textarea name="des" id="des"><%=trim(rs("des"))%></textarea></td>
  114.       <td bgcolor="#DEE7FF"> <div align="center"> 
  115.           <input name="xpx" type="text" id="xpx" size="4" value="<%=int(rs("xpx"))%>">
  116.         </div></td>
  117.       <td bgcolor="#DEE7FF" > <div align="center"> 
  118.           <input type="submit" name="Submit" value="修改">
  119.           &nbsp;<a href="savexclass.asp?id=<%=int(rs("id"))%>&action=del&nclassid=<%=request.QueryString("id")%>&nclass=<%=request.QueryString("nclass")%>&anclassid=<%=request.QueryString("aid")%>" onClick="return confirm('您确定进行删除操作吗?')"><font color=red>删除</font></a></div></td>
  120.     </tr>
  121.   </form>
  122.   <%rs.movenext
  123.         loop
  124.         paixu=rs.RecordCount
  125.         rs.close
  126.         set rs=nothing
  127.         end if
  128.         end if
  129. %>
  130. </table>
  131. <br>
  132. <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  133.   <tr>
  134.     <td height="30"><IMG height=5 src="images/block.gif" width=1><font color="#000000">添加商品分类</font> 当前分类 <%=request.QueryString("nclass")%></td>
  135.   </tr>
  136. </table>
  137. <table width="95%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6396D6" align="center">
  138.   <tr bgcolor="#C7D3E6"> 
  139.     <td width="22%" bgcolor="#7B9AE7"> <div align="center"><font color="#FFFFFF">分类名称</font></div></td>
  140.     <td width="17%" bgcolor="#7B9AE7"><div align="center">关键词(Keywords)</div></td>
  141.     <td width="21%" bgcolor="#7B9AE7"><div align="center">描述(Description)</div></td>
  142.     <td width="14%" bgcolor="#7B9AE7"> <div align="center"><font color="#FFFFFF">排序</font></div></td>
  143.     <td width="26%" bgcolor="#7B9AE7"> <div align="center"><font color="#FFFFFF">确定操作</font></div></td>
  144.   </tr>
  145.   <form name="form2" method="post" action="savexclass.asp?action=add&nclass=<%=request.QueryString("nclass")%>" onSubmit="return myshop()">
  146.     <script language="javascript">
  147. function myshop()
  148. {
  149. if(myform.anclassid.selectedIndex==0)
  150. {
  151. alert("请选择大类!")
  152. return false
  153. }
  154. if(myform.Nclassid.selectedIndex==0)
  155. {
  156. alert("请选择小类!")
  157. return false
  158. }
  159. }
  160. </script>
  161.     <tr bgcolor="#F0F3F8"> 
  162.       <td bgcolor="#DEE7FF"> <div align="center"> 
  163.           <input name="xclass" type="text" id="xclass" size="12">
  164.           <input name="nclassid" type="hidden" value="<%=request.QueryString("id")%>">
  165.           <input name="anclassid" type="hidden" value="<%=request.QueryString("aid")%>" id="anclassid">
  166.         </div></td>
  167.       <td bgcolor="#DEE7FF"><textarea name="key" id="textarea2"></textarea></td>
  168.       <td bgcolor="#DEE7FF"><textarea name="des" id="textarea3"></textarea></td>
  169.       <td bgcolor="#DEE7FF"> <div align="center"> 
  170.           <input name="xpx" type="text" id="xpx" size="4" value="<%=paixu+1%>">
  171.         </div></td>
  172.       <td bgcolor="#DEE7FF"> <div align="center"> 
  173.           <input type="submit" name="Submit2" value="添加">
  174.         </div></td>
  175.     </tr>
  176.   </form>
  177. </table>
  178. <br>
  179. </body>
  180. </html>