Author: precom (Calm Egg) 2000.12.10
====================================
<html><head>
<META content="text/html; charset=gb2312 " http-equiv=Content-Type>
<title>Zhangjiajie Phone Yellow Pages (Online 114)</title></head>
<style type="text/css">
<!--
BODY { FONT-FAMILY: "An An", "Arial Narrow", "Times New Roman"; FONT-SI
ZE: 9pt }
.p1 { FONT-FAMILY: "An An", "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: "An An", "Arial Narrow", "Times New Roman"; FONT-SIZE
: 9pt }
.p2 { FONT-FAMILY: "Stick", "Arial Narrow", "Times New Roman"; FONT-SIZ
E: 9pt; LINE-HEIGHT: 150% }
.p3 { FONT-FAMILY: "Stick", "Arial Narrow", "Times New Roman"; FONT-SIZ
E: 9pt; LINE-HEIGHT: 120% }
-->
</style>
<body>
<%@ page contentType="text/html; charset=GB2312" %>
<%@ page language="java" import=".*" %>
<jsp:useBean scope="page" class="" />
<%
int pages=1;
int pagesize=10;
int count=0;
int totalpages=0;
String countsql="",inqsql="",updatesql="",lwhere="",insertsql="",st=
"";
String lw_title="",lw_author="",pagetitle="",author_http="",author_e
mail="",lw_ico="0",
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=?";
where=" where "; //Only display the main post
/*
Enumeration e = ();
while (()) {
String name = (String) ();
*/
try{
//Get the page number displayed
pages = new Integer(("pages")).intValue();
} catch (Exception e) {}
try{
//Get query parameters
lw_class1=new String(("lw_class1").getBytes
("ISO8859_1"));
lw_class2=new String(("lw_class2").getBytes
("ISO8859_1"));
zt_time=new String(("zt_time").getBytes("IS
O8859_1"));
zt_author=new String(("zt_author").getBytes
("ISO8859_1"));
lwhere=" where ( lw_class1='"+lw_class1+"' and lw_class2='"+lw_
class2+
"' and (lw_time='"+ zt_time+"' or zt_time='"+zt_time+
"') and (author_email='"+zt_author+"' or zt_author='"+zt
_author+"') ) ";
lurlt=lurlt+"lw_class1="+lw_class1+"&lw_class2="+lw_class2+"&zt
_time="+zt_time+
"&zt_author="+zt_author+"&";
//(lwhere);
} catch (Exception e) { //("error1: "+e+"<hr>");
}
try{
//Get parameters Message content
lw_class1=new String(("lw_class1").getBytes("ISO
8859_1"));
lw_class2=new String(("lw_class2").getBytes("ISO
8859_1"));
lw_title=new String(("lw_title").getBytes("ISO88
59_1"));
lw_author=new String(("lw_author").getBytes("ISO
8859_1"));
pagetitle=new String(("pagetitle").getBytes("ISO
8859_1"));
author_http=new String(("author_http").getBytes(
"ISO8859_1"));
author_email=new String(("author_email").getByte
s("ISO8859_1"));
zt_time=new String(("zt_time").getBytes("ISO8859
_1"));
zt_author=new String(("zt_author").getBytes("ISO
8859_1"));
lw_ico=("gifface");
} catch (Exception e) {}
try{
lw_content=new String(("lw_content").getBytes("I
SO8859_1"));
String requestMethod=();
requestMethod=();
if(("POST")<0)
{ ("Illegal operation!");
return;
}
//Form other data items
author_ip=() ;
lw_time=("yyyyMMddHHmmss");
lw_type=""+"c"; //From post
answer_num=0;
click_num=0;
//================
st="','";
// Ensure that the length of all data items in the message is within the normal range
if(lw_title.length()>50) lw_title=lw_title.substring(0,50);
if(lw_author.length()>20) lw_author=lw_author.substring(0,20);
if(author_http.length()>40) author_http=author_http.substring(0,40);
if(author_email.length()>50) author_email=author_email.substring(0,4
0);
if(zt_author.length()>50) zt_author=zt_author.substring(0,40);
if(lw_content.length()>4000) lw_content=lw_content.substring(0,4000)
insertsql="insert into guestbook values('"+lw_title+st+lw_author+st+
author_http+st+
author_email+st+lw_ico+st+lw_time+"',"+answer_num+","+cli
ck_num+",'"+
author_ip+st+lw_class1+st+lw_class2+st+lw_type+st+zt_time
+st+zt_author+st+
lw_content+"')";
//(insertsql);
//Insert message
try{
st=(insertsql);
if(("executeUpdate ok")<0)
("msg="+st);
else
{
updatesql="update guestbook set answer_num=answer_num + 1 "+l
where;
//Increase the number of responders
try{
st=(updatesql);
if(("executeUpdate ok")<0)
("msg="+st);
}catch (Exception e) { }
}
}catch (Exception e) { ("Message error:"+e);}
} catch (Exception e) {}
%>
<%
//Javascript to verify the legality of the message input item
String ljs=" <SCRIPT language=JavaScript> \n"+
" <!-- \n"+
" function ValidInput() \n"+
" {if(.lw_author.value==\"\") \n"+
" {alert(\"Please fill in your big name.\"); \n"+
" .lw_author.focus(); \n"+
" return false;} \n"+
" if(.lw_title.value==\"\") \n"+
" {alert(\"Please fill in the message subject.\"); \n"+
" .lw_title.focus(); \n"+
" return false;} \n"+
" if (.author_email.value!=\"\") \n"+
" { if ((.author_email.(\"@\")<0)//(document
.sign.author_email.(\":\")!=-1)) \n"+
" {alert(\"The Email you filled in is invalid, please fill in a valid email!"); \n"+
" .author_emaill.focus(); \n"+
" return false; \n"+
" } \n"+
" } \n"+
" return true; \n"+
" } \n"+
" function ValidSearch() \n"+
" { if(==\"\") \n"+
" {alert(\"Cannot search for empty strings!\"); \n"+
" (); \n"+
" return false;} \n"+
" } \n"+
" //--> \n"+
" </SCRIPT> ";
(ljs);
%>
<%
//Show a page of comments posted in the latest time
countsql="select count(lw_title) from guestbook "+lwhere;
inqsql ="select lw_title,lw_author,lw_time,lw_content,author_ip, "+
" author_email from guestbook "+lwhere+" order by lw_time desc
" ;
updatesql="update guestbook set click_num=click_num + 1 "+lwhere;
//Increase the number of viewers
try{
st=(updatesql);
if(("executeUpdate ok")<0)
("msg="+st);
}catch (Exception e) { }
//(inqsql);
if(pages>0)
{
try {
try{
ResultSet rcount=(countsql);
if(())
{
count = (1);
}
();
} catch (Exception el1) { ("count record error
: "+el1+"<br>" );
(countsql);
}
totalpages=(int)(count/pagesize);
if(count>totalpages*pagesize) totalpages++;
st=""+
" <TABLE align=center border=0 cellPadding=0 cellSpacing=
0 width=\"95%\"> "+
" <TBODY> <TR> <TD align=middle bgColor=#97badd width=\"1
00%\"><FONT color=#ff0000>"+
"Total pages" in total, "+count"
. "+" Current page: "+pages+
" </FONT></TD></TR></TBODY></TABLE><BR> ";
(st);
//(" Total pages+" total, "+
count+" bar. "+" Current page: "+pages+"<br>");
st=" <center> "+
" <TABLE border=0 cellPadding=2 cellSpacing=1 width=\"95%\"> "+
" <TBODY> "+
" <TR> "+
" <TD align=middle bgColor=#6699cc width=\"55%\"><FONT "+
" color=#ffffff>Message topic</FONT></TD> "+
" <TD align=middle bgColor=#6699cc width=50><FONT "+
" color=#ffffffff>Response Number</FONT></TD> "+
" <TD align=middle bgColor=#6699cc width=40><FONT "+
" color=#ffffff>Clicks</FONT></TD> "+
" <TD align=middle bgColor=#6699cc width=100><FONT "+
" color=#ffffff>Author name</FONT></TD> "+
" <TD align=middle bgColor=#6699cc width=140><FONT "+
" color=#ffffff>Posted/Response Time</FONT></TD></TR> ";
//(st);
if(count > 0 )
{
ResultSet rs = (inqsql);
ResultSetMetaData metaData = ();
int i;
// Skip pages -1, make cursor point to pages and prepare to display
for(i=1;i<=(pages - 1)*pagesize;i++) ();
//Show pages page start
st= " <CENTER> <TABLE border=0 cellSpacing=1 width=\"95%\"
> <TBODY> ";
(st);
String linestr="";
for(i=1;i<=pagesize;i++)
if(())
{
lw_title=("lw_title");
lw_author=("lw_author");
lw_time=("lw_time");
lw_content=("lw_content");
author_ip=("author_ip");
author_email=("author_email");
st=lw_time.substring(0,4)+"-"+lw_time.substring(4,6)+"-"
+lw_time.substring(6,8)+":"+
lw_time.substring(8,10)+":"+lw_time.substring(10,12)+
":"+lw_time.substring(12,14);
try{lw_content=((lw_co
ntent));} catch (Exception e) {}
linestr =""+
" <TR bgColor=#bed9fc> "+
" <TD align=left width=\"75%\"><FONT "+
" color=#0000cd>Message topic:</FONT><STRONG>"
+lw_title+"</STRONG></TD> "+
" <TD align=left width=\"25%\"><FONT color=
#0000cd>Message time:</FONT>"+st+"</TD></TR> "+
" <TR bgColor=#e7f1fe> "+
" <TD colSpan=2 "+
" width=\"700\" wrap=yes><BR>"+lw_content+"
<BR><br></TD></TR> "+
" <TR bgColor=#bed9fc> "+
" <TD align=right colSpan=2 width=\"100%\">
<FONT "+
" color=#0000cd>Author:</FONT>"+lw_author+"
<FONT "+
" color=#0000cd>Source:</FONT>"+author_ip+"
</TD></TR>";
(linestr);
}
();
//Show the end of pages page
st= " </TBODY></TABLE></CENTER></DIV><BR> "+
" <CENTER><A "+
" href=\"\"><FONT "+
" color=blue face=KaiTi_GB2312 size=4>Return to the message board
Home page</FONT></A></CENTER><BR> "+
" <HR align=center noShade SIZE=1 width=\"95%\"
> ";
(st);
int iFirst=1,iLast=totalpages,iPre,iNext;
if(pages<=1) iPre=1;
else iPre=pages - 1;
if(pages>=totalpages) iNext=totalpages;
else iNext=pages + 1;
int n=(int)(count/pagesize);
if(n*pagesize<count) n++;
if(n>1)
{
//for(i=1;i<=n;i++) ("<a href=?pages=
"+i+">"+i+" </a>");
//("<HR align=center noShade SIZE=1 width=\"95%\
">");
String lt1="Return to homepage",lt2="First page",lt3="Previous page",lt4="Next
Page ",lt5="last page",lt6="";
lt6="<a href=>"+ lt1 + " </
a>"+
lurlt + "pages="+iFirst+"><FONT color=red>"+lt2+"&nbs
p; </a>"+
lurlt + "pages="+iPre+"><FONT color=red>"+lt3+"
</a>" +
lurlt + "pages="+iNext+"><FONT color=red>"+lt4+"
; </a>" +
lurlt + "pages="+iLast+"><FONT color=red>"+lt5+"
; </a>";
st=""+
" <TABLE align=center border=0 cellPadding=0 cellSpacing=
0 width=\"95%\"> "+
" <TBODY> <TR> <TD align=middle bgColor=#97badd width=\"1
00%\"><FONT color=#ff0000>"+
lt6+
" </FONT></TD></TR></TBODY></TABLE><BR> ";
(st);
}
}
} catch (Exception e) { ("error: "+e); }
}
%>
<%
//The end of the message board interface
String lbottom="";
lbottom=lbottom+
" <center> \n"+
" <FORM action= method=post name=sign> \n"+
" <INPUT name=lw_class1 type=hidden value=cnzjj_gt> \n"+
" <INPUT name=lw_class2 type=hidden value="+lw_class2+"> \n"
+
" <INPUT name=pages type=hidden value=1> \n"+
" <INPUT name=zt_time type=hidden value="+zt_time+"> \n"+
" <INPUT name=zt_author type=hidden value="+zt_author+"> \n"
+
" <TABLE bgColor=#d5e8fd border=0 cellSpacing=1 width=\"95%\"> \n"+
" <TBODY> \n"+
" <TR> \n"+
" <TD align=middle bgColor=#e6e6fa colSpan=2 noWrap><STRONG><FONT
color=blue \n"+
" face=KaiTi_GB2312 size=5>Send comments</FONT></STRONG> &nbs
p; [The contents added * must be filled in] </TD></TR> \n"+
" <TR> \n"+
" <TD noWrap width=\"45%\"> \n"+
" <DIV align=left> \n"+
" <TABLE bgColor=#d5e8fd border=0 cellSpacing=1 width=\"100%\">
\n"+
" <TBODY> \n"+
" <TR> \n"+
" <TD noWrap width=\"100%\">*Message topic: <INPUT maxLength=40 n
ame=lw_title \n"+
" size=36></TD></TR> \n"+
" <TR> \n"+
" <TD noWrap width=\"100%\">*Online name: <INPUT maxLength=18 n
ame=lw_author \n"+
" size=36></TD></TR> \n"+
" <TR> \n"+
" <TD noWrap width=\"100%\"> Home page title: <INPUT maxLength
=40 name=pagetitle \n"+
" size=36></TD></TR> \n"+
" <TR> \n"+
" <TD noWrap width=\"100%\"> Home page address: <INPUT maxLength
=255 name=author_http \n"+
" size=36></TD></TR> \n"+
" <TR> \n"+
" <TD noWrap width=\"100%\">*Email: <INPUT maxLength=40 n
ame=author_email \n"+
" size=36></TD></TR></TBODY></TABLE></DIV></TD> \n"+
" <TD noWrap vAlign=top width=\"55%\"> \n"+
" <DIV align=left> \n"+
" <TABLE bgColor=#b6d7fc border=0 cellSpacing=1 width=\"100%\">
\n"+
" <TBODY> \n"+
" <TR> \n"+
" <TD width=\"100%\">Please fill in your message below:</TD></TR> \n"+
" <TR> \n"+
" <TD width=\"100%\"><TEXTAREA cols=50 name=lw_content rows=
7></TEXTAREA></TD></TR></TBODY></TABLE></DIV></TD></TR> \n"+
" <TR> \n"+
" <TD bgColor=#fbf7ea colSpan=2 noWrap>Emoji\n"+
" <INPUT name=gifface type=radio value=1 checked><IMG \n"+
" alt=\" (152 bytes)\" height=15 src=\"\" width=15> <I
NPUT \n"+
" name=gifface type=radio value=2><IMG alt=\" (174 bytes)\"
height=15 \n"+
" src=\"\" width=15> <INPUT name=gifface type=radio value=3
><IMG \n"+
" alt=\" (147 bytes)\" height=15 src=\"\" width=15> <I
NPUT \n"+
" name=gifface type=radio value=4><IMG alt=\" (172 bytes)\"
height=15 \n"+
" src=\"\" width=15> <INPUT name=gifface type=radio value=5
><IMG \n"+
" alt=\" (118 bytes)\" height=15 src=\"\" width=15> <I
NPUT \n"+
" name=gifface type=radio value=6><IMG alt=\" (180 bytes)\"
height=15 \n"+
" src=\"\" width=15> <INPUT name=gifface type=radio value=7
><IMG \n"+
" alt=\" (180 bytes)\" height=15 src=\"\" width=15> <I
NPUT \n"+
" name=gifface type=radio value=8><IMG alt=\" (96 bytes)\"
height=15 \n"+
" src=\"\" width=15> <INPUT name=gifface type=radio value=9
><IMG \n"+
" alt=\" (162 bytes)\" height=15 src=\"\" width=15> <I
NPUT \n"+
" name=gifface type=radio value=10><IMG alt=\" (113 bytes)
\" height=15 \n"+
" src=\"\" width=15> <INPUT name=gifface type=radio value=
11><IMG \n"+
" alt=\" (93 bytes)\" height=15 src=\"\" width=15> <
INPUT \n"+
" name=gifface type=radio value=12> <IMG alt=\" (149 bytes
)\" height=14 \n"+
" src=\"\" width=15> \n"+
" <INPUT \n"+
" name=gifface type=radio value=13> <IMG alt=\" (149 bytes
)\" height=14 \n"+
" src=\"\" width=15> \n"+
" <INPUT \n"+
" name=gifface type=radio value=14> <IMG alt=\" (149 bytes
)\" height=14 \n"+
" src=\"\" width=15> \n"+
" <INPUT \n"+
" name=gifface type=radio value=15> <IMG alt=\" (149 bytes
)\" height=14 \n"+
" src=\"\" width=15> \n"+
" <INPUT \n"+
" name=gifface type=radio value=16> <IMG alt=\" (149 bytes
)\" height=14 \n"+
" src=\"\" width=15> </TD> \n"+
" </TR> \n"+
" <TR> \n"+
" <TD align=middle colSpan=2 noWrap><INPUT name=cmdGO onclick=\"re
turn ValidInput()\" type=submit value=\"Submit\"> \n"+
" <INPUT name=cmdPrev onclick=\"return ValidInput()\" type=submit valu
e=\"Preview\"> \n"+
" <INPUT name=cmd Cancel type=reset value=\"Rewrite\"> <INPUT
T name=cmdBack onclick=javascript:(-1) type=button value=\"Return
Back\"> \n"+
" </TD></TR></TBODY></TABLE></FORM></CENTER></DIV> ";
(lbottom);
%>
</body></html>
Author: precom (Calm Egg) 2000.12.10
====================================
<html><head>
<META content="text/html; charset=gb2312 " http-equiv=Content-Type>
<title>Zhangjiajie Phone Yellow Pages (Online 114)</title></head>
<style type="text/css">
<!--
BODY { FONT-FAMILY: "An An", "Arial Narrow", "Times New Roman"; FONT-SI
ZE: 9pt }
.p1 { FONT-FAMILY: "An An", "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: "An An", "Arial Narrow", "Times New Roman"; FONT-SIZE
: 9pt }
.p2 { FONT-FAMILY: "Stick", "Arial Narrow", "Times New Roman"; FONT-SIZ
E: 9pt; LINE-HEIGHT: 150% }
.p3 { FONT-FAMILY: "Stick", "Arial Narrow", "Times New Roman"; FONT-SIZ
E: 9pt; LINE-HEIGHT: 120% }
-->
</style>
<body>
<%@ page contentType="text/html; charset=GB2312" %>
<%@ page language="java" import=".*" %>
<jsp:useBean scope="page" class="" />
<%
int pages=1;
int pagesize=10;
int count=0;
int totalpages=0;
String countsql="",inqsql="",updatesql="",lwhere="",insertsql="",st=
"";
String lw_title="",lw_author="",pagetitle="",author_http="",author_e
mail="",lw_ico="0",
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=?";
where=" where "; //Only display the main post
/*
Enumeration e = ();
while (()) {
String name = (String) ();
*/
try{
//Get the page number displayed
pages = new Integer(("pages")).intValue();
} catch (Exception e) {}
try{
//Get query parameters
lw_class1=new String(("lw_class1").getBytes
("ISO8859_1"));
lw_class2=new String(("lw_class2").getBytes
("ISO8859_1"));
zt_time=new String(("zt_time").getBytes("IS
O8859_1"));
zt_author=new String(("zt_author").getBytes
("ISO8859_1"));
lwhere=" where ( lw_class1='"+lw_class1+"' and lw_class2='"+lw_
class2+
"' and (lw_time='"+ zt_time+"' or zt_time='"+zt_time+
"') and (author_email='"+zt_author+"' or zt_author='"+zt
_author+"') ) ";
lurlt=lurlt+"lw_class1="+lw_class1+"&lw_class2="+lw_class2+"&zt
_time="+zt_time+
"&zt_author="+zt_author+"&";
//(lwhere);
} catch (Exception e) { //("error1: "+e+"<hr>");
}
try{
//Get parameters Message content
lw_class1=new String(("lw_class1").getBytes("ISO
8859_1"));
lw_class2=new String(("lw_class2").getBytes("ISO
8859_1"));
lw_title=new String(("lw_title").getBytes("ISO88
59_1"));
lw_author=new String(("lw_author").getBytes("ISO
8859_1"));
pagetitle=new String(("pagetitle").getBytes("ISO
8859_1"));
author_http=new String(("author_http").getBytes(
"ISO8859_1"));
author_email=new String(("author_email").getByte
s("ISO8859_1"));
zt_time=new String(("zt_time").getBytes("ISO8859
_1"));
zt_author=new String(("zt_author").getBytes("ISO
8859_1"));
lw_ico=("gifface");
} catch (Exception e) {}
try{
lw_content=new String(("lw_content").getBytes("I
SO8859_1"));
String requestMethod=();
requestMethod=();
if(("POST")<0)
{ ("Illegal operation!");
return;
}
//Form other data items
author_ip=() ;
lw_time=("yyyyMMddHHmmss");
lw_type=""+"c"; //From post
answer_num=0;
click_num=0;
//================
st="','";
// Ensure that the length of all data items in the message is within the normal range
if(lw_title.length()>50) lw_title=lw_title.substring(0,50);
if(lw_author.length()>20) lw_author=lw_author.substring(0,20);
if(author_http.length()>40) author_http=author_http.substring(0,40);
if(author_email.length()>50) author_email=author_email.substring(0,4
0);
if(zt_author.length()>50) zt_author=zt_author.substring(0,40);
if(lw_content.length()>4000) lw_content=lw_content.substring(0,4000)
insertsql="insert into guestbook values('"+lw_title+st+lw_author+st+
author_http+st+
author_email+st+lw_ico+st+lw_time+"',"+answer_num+","+cli
ck_num+",'"+
author_ip+st+lw_class1+st+lw_class2+st+lw_type+st+zt_time
+st+zt_author+st+
lw_content+"')";
//(insertsql);
//Insert message
try{
st=(insertsql);
if(("executeUpdate ok")<0)
("msg="+st);
else
{
updatesql="update guestbook set answer_num=answer_num + 1 "+l
where;
//Increase the number of responders
try{
st=(updatesql);
if(("executeUpdate ok")<0)
("msg="+st);
}catch (Exception e) { }
}
}catch (Exception e) { ("Message error:"+e);}
} catch (Exception e) {}
%>
<%
//Javascript to verify the legality of the message input item
String ljs=" <SCRIPT language=JavaScript> \n"+
" <!-- \n"+
" function ValidInput() \n"+
" {if(.lw_author.value==\"\") \n"+
" {alert(\"Please fill in your big name.\"); \n"+
" .lw_author.focus(); \n"+
" return false;} \n"+
" if(.lw_title.value==\"\") \n"+
" {alert(\"Please fill in the message subject.\"); \n"+
" .lw_title.focus(); \n"+
" return false;} \n"+
" if (.author_email.value!=\"\") \n"+
" { if ((.author_email.(\"@\")<0)//(document
.sign.author_email.(\":\")!=-1)) \n"+
" {alert(\"The Email you filled in is invalid, please fill in a valid email!"); \n"+
" .author_emaill.focus(); \n"+
" return false; \n"+
" } \n"+
" } \n"+
" return true; \n"+
" } \n"+
" function ValidSearch() \n"+
" { if(==\"\") \n"+
" {alert(\"Cannot search for empty strings!\"); \n"+
" (); \n"+
" return false;} \n"+
" } \n"+
" //--> \n"+
" </SCRIPT> ";
(ljs);
%>
<%
//Show a page of comments posted in the latest time
countsql="select count(lw_title) from guestbook "+lwhere;
inqsql ="select lw_title,lw_author,lw_time,lw_content,author_ip, "+
" author_email from guestbook "+lwhere+" order by lw_time desc
" ;
updatesql="update guestbook set click_num=click_num + 1 "+lwhere;
//Increase the number of viewers
try{
st=(updatesql);
if(("executeUpdate ok")<0)
("msg="+st);
}catch (Exception e) { }
//(inqsql);
if(pages>0)
{
try {
try{
ResultSet rcount=(countsql);
if(())
{
count = (1);
}
();
} catch (Exception el1) { ("count record error
: "+el1+"<br>" );
(countsql);
}
totalpages=(int)(count/pagesize);
if(count>totalpages*pagesize) totalpages++;
st=""+
" <TABLE align=center border=0 cellPadding=0 cellSpacing=
0 width=\"95%\"> "+
" <TBODY> <TR> <TD align=middle bgColor=#97badd width=\"1
00%\"><FONT color=#ff0000>"+
"Total pages" in total, "+count"
. "+" Current page: "+pages+
" </FONT></TD></TR></TBODY></TABLE><BR> ";
(st);
//(" Total pages+" total, "+
count+" bar. "+" Current page: "+pages+"<br>");
st=" <center> "+
" <TABLE border=0 cellPadding=2 cellSpacing=1 width=\"95%\"> "+
" <TBODY> "+
" <TR> "+
" <TD align=middle bgColor=#6699cc width=\"55%\"><FONT "+
" color=#ffffff>Message topic</FONT></TD> "+
" <TD align=middle bgColor=#6699cc width=50><FONT "+
" color=#ffffffff>Response Number</FONT></TD> "+
" <TD align=middle bgColor=#6699cc width=40><FONT "+
" color=#ffffff>Clicks</FONT></TD> "+
" <TD align=middle bgColor=#6699cc width=100><FONT "+
" color=#ffffff>Author name</FONT></TD> "+
" <TD align=middle bgColor=#6699cc width=140><FONT "+
" color=#ffffff>Posted/Response Time</FONT></TD></TR> ";
//(st);
if(count > 0 )
{
ResultSet rs = (inqsql);
ResultSetMetaData metaData = ();
int i;
// Skip pages -1, make cursor point to pages and prepare to display
for(i=1;i<=(pages - 1)*pagesize;i++) ();
//Show pages page start
st= " <CENTER> <TABLE border=0 cellSpacing=1 width=\"95%\"
> <TBODY> ";
(st);
String linestr="";
for(i=1;i<=pagesize;i++)
if(())
{
lw_title=("lw_title");
lw_author=("lw_author");
lw_time=("lw_time");
lw_content=("lw_content");
author_ip=("author_ip");
author_email=("author_email");
st=lw_time.substring(0,4)+"-"+lw_time.substring(4,6)+"-"
+lw_time.substring(6,8)+":"+
lw_time.substring(8,10)+":"+lw_time.substring(10,12)+
":"+lw_time.substring(12,14);
try{lw_content=((lw_co
ntent));} catch (Exception e) {}
linestr =""+
" <TR bgColor=#bed9fc> "+
" <TD align=left width=\"75%\"><FONT "+
" color=#0000cd>Message topic:</FONT><STRONG>"
+lw_title+"</STRONG></TD> "+
" <TD align=left width=\"25%\"><FONT color=
#0000cd>Message time:</FONT>"+st+"</TD></TR> "+
" <TR bgColor=#e7f1fe> "+
" <TD colSpan=2 "+
" width=\"700\" wrap=yes><BR>"+lw_content+"
<BR><br></TD></TR> "+
" <TR bgColor=#bed9fc> "+
" <TD align=right colSpan=2 width=\"100%\">
<FONT "+
" color=#0000cd>Author:</FONT>"+lw_author+"
<FONT "+
" color=#0000cd>Source:</FONT>"+author_ip+"
</TD></TR>";
(linestr);
}
();
//Show the end of pages page
st= " </TBODY></TABLE></CENTER></DIV><BR> "+
" <CENTER><A "+
" href=\"\"><FONT "+
" color=blue face=KaiTi_GB2312 size=4>Return to the message board
Home page</FONT></A></CENTER><BR> "+
" <HR align=center noShade SIZE=1 width=\"95%\"
> ";
(st);
int iFirst=1,iLast=totalpages,iPre,iNext;
if(pages<=1) iPre=1;
else iPre=pages - 1;
if(pages>=totalpages) iNext=totalpages;
else iNext=pages + 1;
int n=(int)(count/pagesize);
if(n*pagesize<count) n++;
if(n>1)
{
//for(i=1;i<=n;i++) ("<a href=?pages=
"+i+">"+i+" </a>");
//("<HR align=center noShade SIZE=1 width=\"95%\
">");
String lt1="Return to homepage",lt2="First page",lt3="Previous page",lt4="Next
Page ",lt5="last page",lt6="";
lt6="<a href=>"+ lt1 + " </
a>"+
lurlt + "pages="+iFirst+"><FONT color=red>"+lt2+"&nbs
p; </a>"+
lurlt + "pages="+iPre+"><FONT color=red>"+lt3+"
</a>" +
lurlt + "pages="+iNext+"><FONT color=red>"+lt4+"
; </a>" +
lurlt + "pages="+iLast+"><FONT color=red>"+lt5+"
; </a>";
st=""+
" <TABLE align=center border=0 cellPadding=0 cellSpacing=
0 width=\"95%\"> "+
" <TBODY> <TR> <TD align=middle bgColor=#97badd width=\"1
00%\"><FONT color=#ff0000>"+
lt6+
" </FONT></TD></TR></TBODY></TABLE><BR> ";
(st);
}
}
} catch (Exception e) { ("error: "+e); }
}
%>
<%
//The end of the message board interface
String lbottom="";
lbottom=lbottom+
" <center> \n"+
" <FORM action= method=post name=sign> \n"+
" <INPUT name=lw_class1 type=hidden value=cnzjj_gt> \n"+
" <INPUT name=lw_class2 type=hidden value="+lw_class2+"> \n"
+
" <INPUT name=pages type=hidden value=1> \n"+
" <INPUT name=zt_time type=hidden value="+zt_time+"> \n"+
" <INPUT name=zt_author type=hidden value="+zt_author+"> \n"
+
" <TABLE bgColor=#d5e8fd border=0 cellSpacing=1 width=\"95%\"> \n"+
" <TBODY> \n"+
" <TR> \n"+
" <TD align=middle bgColor=#e6e6fa colSpan=2 noWrap><STRONG><FONT
color=blue \n"+
" face=KaiTi_GB2312 size=5>Send comments</FONT></STRONG> &nbs
p; [The contents added * must be filled in] </TD></TR> \n"+
" <TR> \n"+
" <TD noWrap width=\"45%\"> \n"+
" <DIV align=left> \n"+
" <TABLE bgColor=#d5e8fd border=0 cellSpacing=1 width=\"100%\">
\n"+
" <TBODY> \n"+
" <TR> \n"+
" <TD noWrap width=\"100%\">*Message topic: <INPUT maxLength=40 n
ame=lw_title \n"+
" size=36></TD></TR> \n"+
" <TR> \n"+
" <TD noWrap width=\"100%\">*Online name: <INPUT maxLength=18 n
ame=lw_author \n"+
" size=36></TD></TR> \n"+
" <TR> \n"+
" <TD noWrap width=\"100%\"> Home page title: <INPUT maxLength
=40 name=pagetitle \n"+
" size=36></TD></TR> \n"+
" <TR> \n"+
" <TD noWrap width=\"100%\"> Home page address: <INPUT maxLength
=255 name=author_http \n"+
" size=36></TD></TR> \n"+
" <TR> \n"+
" <TD noWrap width=\"100%\">*Email: <INPUT maxLength=40 n
ame=author_email \n"+
" size=36></TD></TR></TBODY></TABLE></DIV></TD> \n"+
" <TD noWrap vAlign=top width=\"55%\"> \n"+
" <DIV align=left> \n"+
" <TABLE bgColor=#b6d7fc border=0 cellSpacing=1 width=\"100%\">
\n"+
" <TBODY> \n"+
" <TR> \n"+
" <TD width=\"100%\">Please fill in your message below:</TD></TR> \n"+
" <TR> \n"+
" <TD width=\"100%\"><TEXTAREA cols=50 name=lw_content rows=
7></TEXTAREA></TD></TR></TBODY></TABLE></DIV></TD></TR> \n"+
" <TR> \n"+
" <TD bgColor=#fbf7ea colSpan=2 noWrap>Emoji\n"+
" <INPUT name=gifface type=radio value=1 checked><IMG \n"+
" alt=\" (152 bytes)\" height=15 src=\"\" width=15> <I
NPUT \n"+
" name=gifface type=radio value=2><IMG alt=\" (174 bytes)\"
height=15 \n"+
" src=\"\" width=15> <INPUT name=gifface type=radio value=3
><IMG \n"+
" alt=\" (147 bytes)\" height=15 src=\"\" width=15> <I
NPUT \n"+
" name=gifface type=radio value=4><IMG alt=\" (172 bytes)\"
height=15 \n"+
" src=\"\" width=15> <INPUT name=gifface type=radio value=5
><IMG \n"+
" alt=\" (118 bytes)\" height=15 src=\"\" width=15> <I
NPUT \n"+
" name=gifface type=radio value=6><IMG alt=\" (180 bytes)\"
height=15 \n"+
" src=\"\" width=15> <INPUT name=gifface type=radio value=7
><IMG \n"+
" alt=\" (180 bytes)\" height=15 src=\"\" width=15> <I
NPUT \n"+
" name=gifface type=radio value=8><IMG alt=\" (96 bytes)\"
height=15 \n"+
" src=\"\" width=15> <INPUT name=gifface type=radio value=9
><IMG \n"+
" alt=\" (162 bytes)\" height=15 src=\"\" width=15> <I
NPUT \n"+
" name=gifface type=radio value=10><IMG alt=\" (113 bytes)
\" height=15 \n"+
" src=\"\" width=15> <INPUT name=gifface type=radio value=
11><IMG \n"+
" alt=\" (93 bytes)\" height=15 src=\"\" width=15> <
INPUT \n"+
" name=gifface type=radio value=12> <IMG alt=\" (149 bytes
)\" height=14 \n"+
" src=\"\" width=15> \n"+
" <INPUT \n"+
" name=gifface type=radio value=13> <IMG alt=\" (149 bytes
)\" height=14 \n"+
" src=\"\" width=15> \n"+
" <INPUT \n"+
" name=gifface type=radio value=14> <IMG alt=\" (149 bytes
)\" height=14 \n"+
" src=\"\" width=15> \n"+
" <INPUT \n"+
" name=gifface type=radio value=15> <IMG alt=\" (149 bytes
)\" height=14 \n"+
" src=\"\" width=15> \n"+
" <INPUT \n"+
" name=gifface type=radio value=16> <IMG alt=\" (149 bytes
)\" height=14 \n"+
" src=\"\" width=15> </TD> \n"+
" </TR> \n"+
" <TR> \n"+
" <TD align=middle colSpan=2 noWrap><INPUT name=cmdGO onclick=\"re
turn ValidInput()\" type=submit value=\"Submit\"> \n"+
" <INPUT name=cmdPrev onclick=\"return ValidInput()\" type=submit valu
e=\"Preview\"> \n"+
" <INPUT name=cmd Cancel type=reset value=\"Rewrite\"> <INPUT
T name=cmdBack onclick=javascript:(-1) type=button value=\"Return
Back\"> \n"+
" </TD></TR></TBODY></TABLE></FORM></CENTER></DIV> ";
(lbottom);
%>
</body></html>
Author: precom (Calm Egg) 2000.12.10