Manage_Column.jsp
上传用户:zdly666
上传日期:2022-08-09
资源大小:6511k
文件大小:3k
源码类别:

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

开发平台:

JavaScript

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ include file="conn.jsp"%>
  3. <%
  4. /*if(session.getAttribute("Uid")==null){
  5. out.print("<script language='javascript'>");
  6. out.print("alert('用户名或密码错误,请重新登陆');");
  7. out.print("window.location.href='Bokee_Index.jsp';");
  8. out.print("</script>");
  9. response.sendRedirect("Bokee_Index.jsp");
  10. }*/
  11. %>
  12. <html>
  13. <head>
  14. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  15. <link rel="stylesheet" type="text/css" href="../Admin_Style.css">
  16. <title>栏目管理</title>
  17. </head>
  18. <body background="img/beijing.gif">
  19. <p>
  20. <jsp:include page="Menu.jsp" flush="true"/>
  21. </p>
  22. <table width="97%" height="88" border="0" align="center" cellspacing="2">
  23.       <tr> 
  24.       <td height="100%" colspan="3"><div align="center"><strong>文件栏目管理</strong></div></td>
  25.     </tr>
  26.   <tr>
  27.     <td><div align="center"><strong>栏目名称</strong></div></td>
  28.     <td><div align="center"><strong>修改操作</strong></div></td>
  29.     <td><div align="center"><strong>删除操作</strong></div></td>
  30.   </tr>
  31.   <% 
  32. String condition="select * from S_fileColumn";
  33.  rs=stmt.executeQuery(condition);
  34. %>
  35.   <%
  36. rs.beforeFirst();
  37. while (rs.next())
  38. String column_name = rs.getString("column_name");
  39. String column_id = String.valueOf(rs.getInt("column_id"));
  40.   %>
  41.   <tr>
  42.     <td><div align="center"><%=column_name%></div></td>
  43.     <td><div align="center"><a href="#" onClick="window.open('Edit_Column_Name.jsp?columnid=<%=column_id%>&columnname=<%=column_name%>','','width=330,height=160','menubar=no');">修改</a></div></td>
  44.     <td><div align="center"><a href="Operate_Column.jsp?EditType=columnDel&columnid=<%=column_id%>" onClick="return isok()">删除</a></div></td>
  45.   </tr>
  46.   <%
  47.   }
  48.   rs.close();
  49.   rs=null;
  50.       stmt.close(); 
  51.       conn.close();
  52.   %>
  53. </table>
  54. <form name="form1" method="post" action="Operate_Column.jsp?&EditType=columnAdd" onSubmit="return showtip()">
  55.   <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
  56.     <tr> 
  57.       <td height="25" colspan="2"><div align="center">添加文件栏目</div></td>
  58.     </tr>
  59.     <tr> 
  60.       <td width="380" height="33" align="right" valign="middle">请输入你要添加的栏目名称:</td>
  61.       <td width="397"><input type="text" name="column_name" value=""></td>
  62.     </tr>
  63.     <tr>    </tr>
  64.     <tr> 
  65.       <td width="380" height="24" align="right" valign="middle"> <input type="submit" name="Submit" value=" 确 定 "></td>
  66.       <td width="397" height="24" align="left" valign="middle"> <input type="reset" name="Submit2" value="重置" >      </td>
  67.     </tr>
  68.     <tr> 
  69.       <td height="25" colspan="2" align="right" valign="middle">&nbsp;</td>
  70.     </tr>
  71.   </table>
  72. </form>
  73. </body>
  74. </html>
  75. <script language="JavaScript">
  76. function showtip()
  77. {
  78. if (form1.column_name.value=="")
  79. {alert("请输入栏目名称!");form1.column_name.focus();return false;}
  80. }
  81. function isok()
  82. {
  83. if(confirm("确认删除?将会同时删除n该栏目的所有记录和文件!"))
  84. {return true;}
  85. else
  86. {return false;}
  87. }
  88. </script>