addsort.jsp
上传用户:helenhuo66
上传日期:2007-06-01
资源大小:865k
文件大小:4k
源码类别:

百货/超市行业

开发平台:

Java

  1. <%@ page contentType="text/html;charset=GBK" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ include file="conn.jsp"%>
  3. <%
  4. if(session.getAttribute("admin_name")==null){
  5. ;}else{
  6. %>
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  9. <link href=../css.css rel=STYLESHEET type=text/css>
  10. </head>
  11. <%
  12.     sql="select * from sort";
  13. rs=mdb.executeQuery(sql);
  14.     
  15. %>
  16. <table border="0" width="100%" cellspacing="1">
  17.   <tr>
  18.     <td width="100%">
  19.       <form method="POST" action="addsort1.jsp">
  20. <input type="hidden" name="options" value>
  21.   <table border="0" cellpadding="0" cellspacing="0" width="95%" align="center">
  22.     <tr>
  23.       <td><div align="center"><center><p>类别: 
  24. <select name="subject" size="1"style="font-size: 9pt">
  25.       
  26. <%
  27. if(!rs.next())
  28.      out.print("<option value=>请增加类别");
  29. else{
  30. rs.previous();
  31.          while(rs.next()){
  32.  int sort_id=rs.getInt("sort_id");
  33.  String sort_name=rs.getString("sort_name");
  34.              out.print("<option value=" +sort_id+">" +sort_name+ "</option>");
  35.  }
  36. }
  37. %>
  38.       </select>
  39.       <input type="submit" value="删除" name="B2" onclick="form.options.value='del'" ></td>
  40.     </tr>
  41.     <tr align="center">
  42.       <td><br>
  43.       </td>
  44.     </tr>
  45.     <tr align="center">
  46.       <td><p>新名字:<input type="text" name="reTitle" size="20" class=smallinput>
  47.       <input type="submit" value="改名" name="B1" onclick="form.options.value='rename'">
  48.       </td>
  49.     </tr>
  50.     <tr align="center">
  51.       <td><br>
  52.       </td>
  53.     </tr>
  54.     <tr align="center">
  55.       <td><p>新类别:<input type="text" name="newTitle" size="20" class=smallinput>
  56.       <input type="submit" value="新增" name="B3" onclick="form.options.value='new'"></td>
  57.     </tr>
  58.   </table>
  59. </form>
  60.     </td>
  61.   </tr>
  62. </table>
  63. <% 
  64.    sql="select * from Nsort order by Nsort_id";
  65.    rs=mdb.executeQuery(sql);
  66. %>
  67. <table width="758" border="0" cellspacing="0" cellpadding="0" height="75">
  68.   <tr>
  69.     <td>
  70. <form method="POST" action="addsort2.jsp">
  71. <input type="hidden" name="options" value>
  72.   <table border="0" cellpadding="0" cellspacing="0" width="95%" align="center">
  73.     <tr>
  74.       <td align="center"><hr><b>子专题管理</b></td>
  75.     </tr>
  76.     <tr align="center">
  77.       <td><br>
  78.       </td>
  79.     </tr>
  80.     <tr>
  81.       <td><div align="center"><center><p>子专题: 
  82. <select name="subject" size="1" style="font-size: 9pt">
  83.      
  84. <%
  85. if(!rs.next())
  86.      out.print("<option value=>请增加专题");
  87. else{
  88. rs.previous();
  89.         while(rs.next()){
  90. int Nsort_id=rs.getInt("Nsort_id");
  91.  String Nsort_name=rs.getString("Nsort_name");
  92.              out.print("<option value='" +Nsort_id + "'>" +Nsort_name + "</option>");
  93. }
  94. }
  95. %>
  96.       </select>
  97.       <input type="submit" value="删除" name="B2" onclick="form.options.value='del'"></td>
  98.     </tr>
  99.     <tr align="center">
  100.       <td><br>
  101.       </td>
  102.     </tr>
  103. <% 
  104.    sql="select * from sort order by sort_id";
  105.    rs=mdb.executeQuery(sql);
  106. %>
  107.     <tr align="center">
  108.       <td><p>专题修改:<input type="text" name="reTitle" size="20"  class=smallinput>
  109. 在 <select name="sort_id" size="1"style="font-size: 9pt">
  110.       
  111. <%
  112. if(!rs.next())
  113.      out.print("<option value=>请增加类别");
  114. else{rs.first();
  115. rs.previous();
  116.          
  117.          while(rs.next()){
  118.  int sort_id=rs.getInt("sort_id");
  119.  String sort_name=rs.getString("sort_name");
  120.              out.print("<option value='" +sort_id+ "'>" +sort_name + "</option>");
  121.  }
  122. }
  123. %>
  124.       </select> 中 
  125.       <input type="submit" value="改名" name="B1" onclick="form.options.value='rename'"><br>(请选择上方相应子类别,然后输入新名字和选择类别)
  126.       </td>
  127.     </tr>
  128.     <tr align="center">
  129.       <td><br>
  130.       </td>
  131.     </tr>
  132.     <tr align="center">
  133.       <td><p>新专题:<input type="text" name="newTitle" size="20"  class=smallinput>
  134.       在 <select name="psubject" size="1"style="font-size: 9pt">
  135.       
  136. <%
  137. if(!rs.next())
  138.      out.print("<option value=>请增加类别");
  139. else{rs.first();
  140. rs.previous();
  141.          
  142.          while(rs.next()){
  143.  int sort_id=rs.getInt("sort_id");
  144.  String sort_name=rs.getString("sort_name");
  145.              out.print("<option value='" + sort_id + "'>" +sort_name + "</option>");
  146.  }
  147. }
  148. %>
  149.       </select> 中
  150.       <input type="submit" value="新增" name="B3" onclick="form.options.value='new'"></td>
  151.     </tr>
  152.   </table>
  153. </form></td>
  154.   </tr>
  155. </table>
  156. <%
  157. mdb.Close();}%>