📄 search_0005fdeal_0002ejsp_jsp.java
字号:
int RecordCount=rs_search.getRow();
//out.println(String.valueOf(RecordCount));
int maxPage=0;
maxPage=(RecordCount%pagesize==0)?(RecordCount/pagesize):(RecordCount/pagesize+1);
int Page=Integer.parseInt(str);
if(Page<1){
Page=1;
}else{
if(((Page-1)*pagesize+1)>RecordCount){
Page=maxPage;
}
}
rs_search.absolute((Page-1)*pagesize+1);
for(int i=1;i<=pagesize;i++){
String ISBN=rs_search.getString("ISBN");
String BookName=rs_search.getString("BookName");
String publisher=rs_search.getString("publisher");
// end
// HTML // begin [file="/search_deal.jsp";from=(95,5);to=(99,95)]
out.write("\r\n <table width=\"96%\" height=\"21\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tableBorder_B\">\r\n <tr>\r\n <td width=\"6%\" align=\"center\"><img src=\"Images/greendot.gif\" width=\"11\" height=\"13\"></td>\r\n <td width=\"48%\" style=\"padding:5px;\"><a href=\"book_detail.jsp?ISBN=");
// end
// begin [file="/search_deal.jsp";from=(99,98);to=(99,102)]
out.print(ISBN);
// end
// HTML // begin [file="/search_deal.jsp";from=(99,104);to=(99,106)]
out.write("\">");
// end
// begin [file="/search_deal.jsp";from=(99,109);to=(99,117)]
out.print(BookName);
// end
// HTML // begin [file="/search_deal.jsp";from=(99,119);to=(100,65)]
out.write("</a></td>\r\n <td width=\"35%\" style=\"padding:5px;\">");
// end
// begin [file="/search_deal.jsp";from=(100,68);to=(100,77)]
out.print(publisher);
// end
// HTML // begin [file="/search_deal.jsp";from=(100,79);to=(102,7)]
out.write("</td>\r\n <td width=\"11%\" style=\"padding:5px;\">\r\n\t\t\t\t\t\t\t");
// end
// begin [file="/search_deal.jsp";from=(102,9);to=(102,52)]
if(session.getAttribute("UserName")!=null){
// end
// HTML // begin [file="/search_deal.jsp";from=(102,54);to=(103,120)]
out.write("\r\n\t\t\t\t\t\t\t<input name=\"Submit5\" type=\"submit\" class=\"btn_grey\" value=\"购买\" onClick=\"window.location.href='cart_Add.jsp?ISBN=");
// end
// begin [file="/search_deal.jsp";from=(103,123);to=(103,127)]
out.print(ISBN);
// end
// HTML // begin [file="/search_deal.jsp";from=(103,129);to=(104,7)]
out.write("'\">\r\n\t\t\t\t\t\t\t");
// end
// begin [file="/search_deal.jsp";from=(104,9);to=(106,8)]
}else{
out.println("请先登录");
}
// end
// HTML // begin [file="/search_deal.jsp";from=(106,10);to=(110,23)]
out.write("\r\n\t\t\t\t\t\t\t</td>\r\n </tr>\r\n </table>\r\n ");
// end
// begin [file="/search_deal.jsp";from=(110,25);to=(115,0)]
try{
if(!rs_search.next()){break;}
}catch(Exception e){}
}
// end
// HTML // begin [file="/search_deal.jsp";from=(115,2);to=(121,28)]
out.write("\r\n\t\t\t </td>\r\n </tr>\r\n </table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tr>\r\n <td align=\"right\">当前页数:[");
// end
// begin [file="/search_deal.jsp";from=(121,31);to=(121,35)]
out.print(Page);
// end
// HTML // begin [file="/search_deal.jsp";from=(121,37);to=(121,38)]
out.write("/");
// end
// begin [file="/search_deal.jsp";from=(121,41);to=(121,48)]
out.print(maxPage);
// end
// HTML // begin [file="/search_deal.jsp";from=(121,50);to=(122,1)]
out.write("] \r\n\t");
// end
// begin [file="/search_deal.jsp";from=(122,3);to=(122,14)]
if(Page>1){
// end
// HTML // begin [file="/search_deal.jsp";from=(122,16);to=(123,37)]
out.write("\r\n\t<a href=\"search_deal.jsp?Page=1&key=");
// end
// begin [file="/search_deal.jsp";from=(123,40);to=(123,43)]
out.print(key);
// end
// HTML // begin [file="/search_deal.jsp";from=(123,45);to=(123,84)]
out.write("\">第一</a> <a href=\"search_deal.jsp?Page=");
// end
// begin [file="/search_deal.jsp";from=(123,87);to=(123,93)]
out.print(Page-1);
// end
// HTML // begin [file="/search_deal.jsp";from=(123,95);to=(123,100)]
out.write("&key=");
// end
// begin [file="/search_deal.jsp";from=(123,103);to=(123,106)]
out.print(key);
// end
// HTML // begin [file="/search_deal.jsp";from=(123,108);to=(124,1)]
out.write("\">上一页</a>\r\n\t");
// end
// begin [file="/search_deal.jsp";from=(124,3);to=(127,1)]
}
if(Page<maxPage){
// end
// HTML // begin [file="/search_deal.jsp";from=(127,3);to=(128,32)]
out.write("\r\n\t <a href=\"search_deal.jsp?Page=");
// end
// begin [file="/search_deal.jsp";from=(128,35);to=(128,41)]
out.print(Page+1);
// end
// HTML // begin [file="/search_deal.jsp";from=(128,43);to=(128,48)]
out.write("&key=");
// end
// begin [file="/search_deal.jsp";from=(128,51);to=(128,54)]
out.print(key);
// end
// HTML // begin [file="/search_deal.jsp";from=(128,56);to=(128,96)]
out.write("\">下一页</a> <a href=\"search_deal.jsp?Page=");
// end
// begin [file="/search_deal.jsp";from=(128,99);to=(128,106)]
out.print(maxPage);
// end
// HTML // begin [file="/search_deal.jsp";from=(128,108);to=(128,113)]
out.write("&key=");
// end
// begin [file="/search_deal.jsp";from=(128,116);to=(128,119)]
out.print(key);
// end
// HTML // begin [file="/search_deal.jsp";from=(128,121);to=(129,1)]
out.write("\">最后一页 </a>\r\n\t");
// end
// begin [file="/search_deal.jsp";from=(129,3);to=(130,2)]
}
}
// end
// HTML // begin [file="/search_deal.jsp";from=(130,4);to=(143,6)]
out.write("\r\n\t</td>\r\n </tr>\r\n</table>\r\n\t\t\t\t </td>\r\n\t\t\t </tr>\r\n </table>\r\n\t\t\t\t\t </td>\r\n <td width=\"3%\" valign=\"top\"> </td>\r\n </tr>\r\n </table></td>\r\n </tr>\r\n </table>\r\n ");
// end
// begin [file="/search_deal.jsp";from=(143,6);to=(143,41)]
{
String _jspx_qStr = "";
JspRuntimeLibrary.include(request, response, "copyright.jsp" + _jspx_qStr, out, false);
if ("true".equals(request.getAttribute("javax.servlet.forward.seen")))
return;
}
// end
// HTML // begin [file="/search_deal.jsp";from=(143,41);to=(152,0)]
out.write("\r\n </td>\r\n </tr>\r\n</table>\r\n</td>\r\n </tr>\r\n</table>\r\n</body>\r\n</html>\r\n");
// end
} catch (Throwable t) {
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -