⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 picture_index.jsp

📁 读您的文件包读您的文件包读您的文件包读您的文件包
💻 JSP
字号:
<%@ 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%">&nbsp;</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> 页&nbsp;&nbsp; 
	共 <%=intPageCount%> 页 &nbsp;&nbsp;&nbsp;&nbsp;
	导航:<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>
<% } %>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -