jsp留言板源代码二: 给jsp初学者.

baby杯具的胖纸

baby杯具的胖纸

2016-01-29 12:03

jsp留言板源代码二: 给jsp初学者.,jsp留言板源代码二: 给jsp初学者.
  作 者: 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+"%
'";
lurlt=lurlt+"range="+inquire_item+"&findstr="+inquire_value+"&"
;

} catch (Exception e) {}

try{
//取得参数 留言内容
lw_class1=new String(request.getParameter("gbname").getBytes("ISO885
9_1"));
lw_title=new String(request.getParameter("lw_title").getBytes("ISO88
59_1"));
lw_author=new String(request.getParameter("lw_author").getBytes("ISO
8859_1"));
pagetitle=new String(request.getParameter("pagetitle").getBytes("ISO
8859_1"));
author_http=new String(request.getParameter("author_http").getBytes(
"ISO8859_1"));
author_email=new String(request.getParameter("author_email").getByte
s("ISO8859_1"));
lw_ico=request.getParameter("gifface");
lw_content=new String(re
展开更多 50%)
分享

猜你喜欢

jsp留言板源代码二: 给jsp初学者.

Java JAVA基础
jsp留言板源代码二: 给jsp初学者.

jsp留言板源代码三: 给jsp初学者.

Java JAVA基础
jsp留言板源代码三: 给jsp初学者.

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

jsp留言板源代码四: 给jsp初学者.

Java JAVA基础
jsp留言板源代码四: 给jsp初学者.

jsp留言板源代码一: 给jsp初学者.

Java JAVA基础
jsp留言板源代码一: 给jsp初学者.

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

jsp入门:初学者对Spring框架的认识

Web开发
jsp入门:初学者对Spring框架的认识

初学者的留言簿

PHP
初学者的留言簿

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

一个可以防止刷新的JSP计数器

一个可以防止刷新的JSP计数器

《讨鬼传 极》坏手甲目押流讨伐炎潜与天切演示

《讨鬼传 极》坏手甲目押流讨伐炎潜与天切演示
下拉加载更多内容 ↓