作 者: precom (皮蛋) 2000.12.10
guestbook.jsp =========================== <html><head> <META content="text/html; charset=gb2312 " http-equiv=Content-Type>
<title>张家界电话黄页(网上114)</title></head> <style type="text/css"> <!-- BODY { FONT-FAMILY: "宋体","Arial Narrow", "Times New Roman"; FONT-SI ZE: 9pt } .p1 { FONT-FAMILY: "宋体", "Arial Narrow", "Times New Roman"; FONT-SIZ E: 12pt } A:link { COLOR: #00793d; TEXT-DECORATION: none } A:visited { TEXT-DECORATION: none } A:hover { TEXT-DECORATION: underline} TD { FONT-FAMILY: "宋体", "Arial Narrow", "Times New Roman"; FONT-SIZE : 9pt } .p2 { FONT-FAMILY: "宋体", "Arial Narrow", "Times New Roman"; FONT-SIZ E: 9pt; LINE-HEIGHT: 150% } .p3 { FONT-FAMILY: "宋体", "Arial Narrow", "Times New Roman"; FONT-SIZ E: 9pt; LINE-HEIGHT: 120% }
--> </style>
<body>
<%@ page contentType="text/html; charset=GB2312" %> <%@ page language="java" import="java.sql.*" %> <jsp:useBean id="testInq" scope="page" class="ymbean.opDb" /> <% int pages=1; int pagesize=10; int count=0; int totalpages=0;
String countsql="",inqsql="",lwhere="",insertsql="",st="";
String lw_title="",lw_author="",pagetitle="",author_http="",author_e mail="",lw_ico="", lw_content="",lw_class1=""; String author_ip="",lw_time="",lw_class2="",lw_type="",zt_time="",zt _author=""; int answer_num=0,click_num=0; int inquire_item=1; String inquire_itemt="",inquire_value=""; String lurlt="<a href=guestbook.jsp?",llink="";
lwhere=" where lw_type='z' "; //只显示主贴
/* Enumeration e = request.getParameterNames(); while (e.hasMoreElements()) { String name = (String) e.nextElement(); */ try{ //取显示的页页序数 pages = new Integer(request.getParameter("pages")).intValue(); } catch (Exception e) {} try{ //取查询参数 inquire_item=new Integer(request.getParameter("range")).intValu e(); inquire_value=new String(request.getParameter("findstr").getByt es("ISO8859_1")); if(inquire_item==0) inquire_itemt="lw_title"; else if(inquire_item==1) inquire_itemt="lw_content"; else if(inquire_item==2) inquire_itemt="lw_author"; else if(inquire_item==3) inquire_itemt="lw_time"; else if(inquire_item==4) inquire_itemt="lw_title"; lwhere=lwhere+" and "+inquire_itemt+" like '%"+inquire_value+"%
上一篇:jsp留言板源代码一: 给jsp初学者.
下一篇:jsp留言板源代码三: 给jsp初学者.
|