channelManage.jsp
上传用户:junmaots
上传日期:2022-07-09
资源大小:2450k
文件大小:2k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@page contentType="text/html; charset=gbk" language="java" %>
  2. <%@page import="com.mycompany.news.service.ChannelService"%>
  3. <%@page import="com.mycompany.news.dto.Channel"%>
  4. <%@page import="java.util.List"%>
  5. <%
  6. ChannelService cs = new ChannelService();
  7. List channels = cs.listAllChannels();
  8. %>
  9. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  10. <html>
  11.  <head>
  12. <meta http-equiv="Content-Type" content="text/html; charset=gbk">
  13.    <title>频道管理</title>
  14.    <link href="../css/common.css" rel="stylesheet" type="text/css">
  15.  </head>
  16.  
  17. <body>
  18. <br>
  19. <br>
  20. <br>
  21. <br>
  22. <br>
  23. <table align="center" border=0>
  24. <tr>
  25. <th width="40">顺序</th><th width="100">频道</th><th>修改</th><th>删除</th>
  26. </tr>
  27. <%
  28. for(int i=0;i<channels.size();i++){
  29. Channel channel = (Channel)channels.get(i);
  30. %>
  31. <tr>
  32.  <td>· <%=channel.getChannelOrder()%></td>
  33.  <td><a href='column.jsp?channelid=<%=channel.getChannelID()%>' target="_blank"><%=channel.getChannelName()%></a></td>
  34.  <td><a href='channelModify.jsp?channelid=<%=channel.getChannelID()%>'><image src="../images/modify.gif" border=0/></a></td>
  35.  <td><a href='javascript:confirmdelete(<%=channel.getChannelID()%>)'><image src="../images/delete.gif" border=0/></a></td>
  36. </tr>
  37. <%}
  38. %>
  39. <tr>
  40. <td>·</td>
  41.  <td colspan=3><a href='channelNew.jsp'>添加新频道</a></td>
  42. </tr>
  43. </table>
  44.  
  45. </body>
  46. <script language="javascript">
  47. function confirmdelete(channelid){
  48. if(confirm('确定要删除该频道?')){
  49. location.replace('<%=request.getContextPath()%>/servlet/DeleteChannel?channelid='+channelid);
  50. }
  51. }
  52. </script>
  53. </html>