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

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

开发平台:

DOS

  1. <!--#include file="conn.asp"-->
  2. <%
  3. dim cls
  4. if session("admin")="" then
  5. Response.Redirect("admin.asp")
  6. else
  7. if session("flag")<>"0" then
  8. cls = Instr(session("flag"), "pinpaifig")
  9. if cls <= 0 then
  10. %>
  11. <script language="javascript">
  12. if (confirm("您的操作权限不够,系统拒绝你的访问,请点确定返回,或者点取消退出重新登录"))
  13.   location.href="login.asp";
  14. else
  15.   location.href="index.asp";
  16. </script>
  17. <%
  18. end if
  19. end if
  20. end if
  21. %>
  22. <html>
  23. <head>
  24. <title>品牌管理</title>
  25. <script>
  26. function IsDigit()
  27. {
  28.   return ((event.keyCode >= 48) && (event.keyCode <= 57));
  29. }
  30. </script>
  31. <meta http-equiv="目录类型" content="文本/html; 字符集=gb2312">
  32. <link href="../images/css.css" rel="stylesheet" type="text/css">
  33. </head>
  34. <body>
  35. <center>
  36. <table cellpadding="3" cellspacing="1" border="0" width="100%" class="tableBorder" align=center>
  37.     <form method="post" action="SaveBrand.asp?action=update">
  38.       <td class="forumRowHighlight" colspan="5" align="center" background="../images/admin_bg_1.gif"><b><font color="#ffffff">品牌设置与修改</font></b></td>
  39.       </tr>
  40.       <tr align=center height=25> 
  41.         <td class="forumRowHighlight">序号</td>
  42.         <td class="forumRowHighlight">品牌名称</td>
  43.         <td class="forumRowHighlight">是否推荐</td>
  44.         <td class="forumRowHighlight">排序(必填项,数字)</td>
  45.         <td class="forumRowHighlight">删除</td>
  46.       </tr>
  47. <%
  48. Set rs = Server.CreateObject("ADODB.Recordset")
  49. rs.open "SELECT  * from brand  order by pingpaiorder",conn,1,1
  50. if rs.recordcount=0 then 
  51. %>
  52.       <tr> 
  53.         <td colspan="8" height=25 align="center" width="100%" class="forumRowHighlight"> 还没有添加品牌 </td>
  54.       </tr>
  55. <%
  56. else
  57.     do while not rs.eof
  58. %>
  59.       <tr height=25> 
  60.         <td align=center class="forumRowHighlight"><%=rs("ID")%></td>
  61.         <td align=center class="forumRowHighlight"> 
  62.           <input type="hidden" name="pingpaiid" value="<%=rs("id")%>">
  63.           <input class=text type="text" name="pingpainame" size="10" value="<%=trim(rs("pingpainame"))%>">
  64.         </td>
  65.         <td align=center class="forumRowHighlight"> 
  66.           <select class=text name="tuijian" size="1">
  67.             <option value="1" <%if rs("tuijian")=1 then %>selected<%end if%>>推荐</option>
  68.             <option value="0" <%if rs("tuijian")=0 then %>selected<%end if%>>不推荐</option>
  69.           </select>
  70.         </td>
  71.         <td align=center class="forumRowHighlight"> 
  72.           <input class=text type="text" name="pingpaiorder" size="10" value="<%=rs("pingpaiorder")%>" ONKEYPRESS="event.returnValue=IsDigit();" >
  73.         </td>
  74.         <td align=center class="forumRowHighlight"> 
  75.           <a href="KillBrand.asp?pingpaiid=<%=rs("id")%>">删除</a> 
  76.         </td>
  77.       </tr>
  78.       <%
  79.     rs.MoveNext
  80.     Loop
  81. %>
  82.       <tr> 
  83.         <td colspan="8" height=25 align="center" width="100%" class="forumRowHighlight"> 
  84.           <input  type="submit" name="Submit2" value="保存修改" style="font-family: 宋体; font-size: 9pt" >
  85.           &nbsp; 
  86.           <input type="reset" value="重新设定" style="font-family: 宋体; font-size: 9pt" name="重置" >
  87.         </td>
  88.       </tr>
  89. <%
  90. end if
  91. rs.close
  92. set rs=nothing
  93. conn.close
  94. set conn=nothing
  95. %>
  96.     </form>
  97.     <form method="post" action="SaveBrand.asp?action=add">
  98.       <tr height=25> 
  99.         <td align=center class="forumRowHighlight">添加品牌 
  100.         </td>
  101.         <td align=center class="forumRowHighlight"> 
  102.           <input class=text type="text" name="pingpainame" size="10">
  103.         </td>
  104.         <td align=center class="forumRowHighlight"> 
  105.           <select class=text name="tuijian" size="1">
  106.             <option value="1" >推荐</option>
  107.             <option value="0" >不推荐</option>
  108.           </select>
  109.         </td>
  110.         <td align=center class="forumRowHighlight"> 
  111.           <input class=text type="text" name="pingpaiorder" size="10" ONKEYPRESS="event.returnValue=IsDigit();">
  112.         </td>
  113.         <td align=center colspan="2" class="forumRowHighlight"> 
  114.           <input class="button" type="submit" name="Submit2" value="添加" style="font-family: 宋体; font-size: 9pt">
  115.         </td>
  116.       </tr>
  117.     </form>
  118.   </table>
  119. </center>
  120. </body>
  121. </html>