list_video.jsp 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <%@taglib uri="/struts-tags" prefix="s"%>
  5. <%@ page pageEncoding="utf-8"%>
  6. <%@ page language="java" import="java.util.*"%>
  7. <%@ page import=" com.ccgj.database.manager.*" %>
  8. <%@ page import=" com.ccgj.database.factory.*" %>
  9. <%@ page import=" com.ccgj.database.beans.*" %>
  10. <%
  11. long id = Long.parseLong(request.getParameter("param").split("_")[0]);
  12. LMBManager lmManager= DatabaseFactory.getLMBIF().getLMBService().getLmbManager();
  13. WZBManager wzManager= DatabaseFactory.getWZBIF().getWZBService().getWzbManager();
  14. LMB lmb = lmManager.getLMBByLmid(id);
  15. LMB flm =lmManager.getLMBByLmid(Long.parseLong(lmb.getFlmid()));
  16. List<LMB> list = lmManager.getVaildLmbByFlmid(flm.getId().toString(),1);
  17. //取得当前页数
  18. String currentPageStr = request.getParameter("param").split("_")[1]==null?"0":request.getParameter("param").split("_")[1];
  19. int currentPage = Integer.valueOf(currentPageStr);
  20. //文章总数
  21. int wzCount = wzManager.getAllWzb(id,"1").size();
  22. //本页显示条数
  23. int pageSize = 12;
  24. //分页首条记录游标
  25. int firstSize = currentPage*pageSize;
  26. //总页数
  27. int totalPage = wzCount%pageSize==0?wzCount/pageSize:wzCount/pageSize+1;
  28. %>
  29. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  30. <title>长春经济技术开发区内网</title>
  31. <link rel="stylesheet" href="<s:property value="#application['basePath']"/>/main/images/base.css" />
  32. </head>
  33. <body>
  34. <!--头部 开始-->
  35. <%@include file="top.jsp"%>
  36. <!--头部 结束-->
  37. <!--中间内容开始-->
  38. <div class="content">
  39. <%@include file="weather.jsp"%>
  40. <div class="innercont">
  41. <div class="current" style="margin-bottom:5px"> <img style="float:left" src="<s:property value="#application['basePath']"/>/main/images/home1.png" width="23px" height="23px"><p style="text-indent:10px">当前位置 :<a href="<s:property value="#application['basePath']"/>/">首页 </a>>><a href="<s:property value="#application['basePath']"/>/main/<%=lmb.getId() %>_0/list.html"><%="".equals(flm.getLmmc())?"":flm.getLmmc()+">>" %></a> <a href="list.html"> <%=lmb.getLmmc() %></a></p></div>
  42. <div class="imglistdiv">
  43. <p><%=lmb.getLmmc()%></p>
  44. <%
  45. List<WZB> wzList=wzManager.getWzbForPage(lmb.getId(),1,firstSize,pageSize);
  46. for(WZB wzb : wzList){
  47. if(wzb.getFjdz()!=null&&wzb.getFjdz().endsWith(".flv")||wzb.getFjdz().endsWith(".webm")){
  48. %>
  49. <dl>
  50. <dt><a target="_blank" href="<s:property value="#application['basePath']"/>/main/<%=wzb.getId()%>_0/news.html"> <center><iframe src="../../video/video-small.jsp?id=<%=wzb.getId()%>" border="0" width="300px" height="200px" frameborder="no" scrolling="no"></iframe></center></a></dt>
  51. <dd><a target="_blank" href="<s:property value="#application['basePath']"/>/main/<%=wzb.getId()%>_0/news.html"><%=wzb.getWzbt(15)%></a></dd>
  52. </dl>
  53. <%}%>
  54. <%} %>
  55. <div class="clear"></div>
  56. <!--分页开始-->
  57. <script type="text/javascript">
  58. function page(cpage) {
  59. pageform.action = "<s:property value="#application['basePath']"/>/main/<%=id%>_" + cpage + "/list_video.html";
  60. pageform.submit();
  61. }
  62. </script>
  63. <center>
  64. <form name="pageform" method="post"
  65. action="<s:property value="#application['basePath']"/>/main/<%=id%>_0/list_video.html">
  66. <table cellspacing="0" align="center" style="margin-top:30px">
  67. <tbody>
  68. <tr height="30" class="gray" >
  69. <td>
  70. &nbsp;
  71. 总共:<span class="red">&nbsp;<%=wzCount %>&nbsp;</span>条记录
  72. &nbsp;
  73. 当前:<span class="red"><%=currentPage+1%></span><span class="web">/</span><span class="red"><%=totalPage %></span>&nbsp;页<span class="web">
  74. &nbsp;
  75. <%=pageSize %>条/页&nbsp;
  76. 本页显示第</span><span class="red">&nbsp;<%=(pageSize*(currentPage))+1 %>&nbsp;</span><span class="web">条到第</span><span class="red">&nbsp;<%= (pageSize*(currentPage))+pageSize%>&nbsp;</span><span class="web">条</span>
  77. &nbsp;&nbsp;
  78. <span class="web"><a href="<s:property value="#application['basePath']"/>/main/<%=id %>_0/list_video.html" class="red" >首页</a></span>
  79. <span class="web"><a href="<s:property value="#application['basePath']"/>/main/<%=id %>_<%=currentPage-1<0?0:currentPage-1 %>/list_video.html" class="red">上页</a></span>
  80. <span class="web"><a href="<s:property value="#application['basePath']"/>/main/<%=id %>_<%=currentPage>=totalPage-1?currentPage:currentPage+1%>/list_video.html" class="red">下页</a></span>
  81. <span class="web"><a href="<s:property value="#application['basePath']"/>/main/<%=id %>_<%=totalPage-1 %>/list_video.html" class="red">尾页</a></span>
  82. <span class="web">转到第
  83. <select name="current" onchange="page(this.value)">
  84. <%for (int i = 0; i < totalPage; i++) {%>
  85. <option value="<%=i %>" <%=currentPage == i ? "selected" : "" %>><%=i+1 %></option>
  86. <%} %>
  87. </select>页</span>
  88. </td>
  89. </tr>
  90. </tbody>
  91. </table>
  92. </form>
  93. </center>
  94. <!--分页结束-->
  95. </div>
  96. </div>
  97. </div>
  98. </body>
  99. </html>