Picture_Index.jsp
资源名称:zyp.rar [点击查看]
上传用户:zdly666
上传日期:2022-08-09
资源大小:6511k
文件大小:2k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
JavaScript
- <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
- <%@ include file="conn.jsp"%>
- <%
- String Str_SQL="select * from S_fileInfor where column_id ";
- Str_SQL+="in(select column_id from S_fileColumn ";
- Str_SQL+="where column_name like '%图片%')";
- ResultSet rs2=stmt.executeQuery(Str_SQL);
- rs2.beforeFirst();
- int intPageSize;
- int intRowCount;
- int intPageCount;
- int intPage;
- String strPage;
- int i;
- intPageSize = 15;
- strPage = request.getParameter("page");//request.getParameter() request 是请求,即把需要的参数得到,一般是从上一个页面用户提交的数据中得到
- if(strPage==null){
- intPage = 1;
- }
- else
- {
- intPage = Integer.parseInt(strPage);
- if(intPage<1){ intPage = 1;}
- }
- rs2.last();
- intRowCount = rs2.getRow();
- intPageCount =(intRowCount+intPageSize-1) / intPageSize;
- if(intPage>intPageCount) intPage = intPageCount;
- if(intPageCount>0){
- rs2.absolute((intPage-1) * intPageSize+1); //光标定位到该行
- i = 0;
- %>
- <table width="72%" border="0" align="center">
- <%
- while(i< intPageSize && !rs2.isAfterLast())
- {
- String FileID=rs2.getString("file_id");
- //String ExpertID=rs2.getString("column_expertid");
- String FileDate=rs2.getString("file_date");
- String Column=rs2.getString("column_id");
- String FileTitle=rs2.getString("file_title");
- int Row=rs2.getRow();
- %>
- <tr>
- <td width="2%"> </td>
- <td width="65%"><%
- if(FileTitle!=null&&FileTitle.length()>20)
- {
- FileTitle=FileTitle.substring(0,20)+"...";
- out.print("<li><a href='Picture1.jsp?EditID="+FileID+"&RowID="+Row+"&Column="+Column+"&Type=1'>"+FileTitle+"</a></li>");
- }else{
- out.print("<li><a href='Picture1.jsp?EditID="+FileID+"&RowID="+Row+"&Column="+Column+"&Type=1'>"+FileTitle+"</a></li>");
- }%>
- </td>
- <td width="33%"><%out.print(FileDate);%></td>
- </tr>
- <%
- rs2.next();
- i++;
- }
- }
- rs2.close();
- %>
- </table>
- <%
- if(intRowCount>14)
- { %>
- <div align="center">
- 当前显示第<span class="style7">
- <%=intPage%></span> 页
- 共 <%=intPageCount%> 页
- 导航:<a href="Picture1.jsp?page=1" class="font0">首页</a>
- <%if(intPage>1){%>
- <a href="Picture1.jsp?page=<%=intPage-1%>" class="font0">上一页</a>
- <%}else{%>
- 上一页
- <%
- }%>
- <%if(intPage<intPageCount){%>
- <a href="Picture1.jsp?page=<%=intPage+1%>" class="font0">下一页</a>
- <%}else{%>
- 下一页
- <%
- }%>
- <a href="Picture1.jsp?page=<%=intPageCount%>" class="font0">尾页</a>
- </div>
- <% } %>