JSP留言簿系统无版权 第4页
background="images/bg_banner.GIF"> </td>
<td width="98%" background="images/bg_banner.GIF" class="word">≡查看留言≡</td>
</tr>
<tr valign="top">
<td colspan="2">
<%
try{
boolean tj=rs_user.next();
String str=(String)request.getParameter("Page");
if(str==null){
str="0";
}
int pagesize=5;
rs.last();
int RecordCount=rs.getRow();
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.absolute((Page-1)*pagesize+1);
for(int i=1;i<=pagesize;i++){
%>
<table width="100%" height="192" border="0" cellpadding="0" cellspacing="0" class="table_B">
<tr align="center">
<td width="115" rowspan="3" align="center"><%=rs.getString("UserName")%>(<%=rs.getString("status")%>)<p>
<%=rs.getString("sex")%>生
<p>
表情:<%=rs.getString("face")%>
</td>
<td width="2" rowspan="3" align="center" valign="bottom"><hr size="100%" width="1px" color="#07AFBE"></td>
<td width="447" align="left" style="padding-left:
<img src="images/email.GIF" alt="Email:<%=rs.getString("email")%>" width="16" height="16">
<img src="images/home-menu.gif" alt="个人主页:<%=rs.getString("homepage")%>" width="26" height="20">
<img src="images/atusers.gif" alt="OICQ号码:<%=rs.getString("OICQ")%>" width="14" height="16">
<img src="images/datetime.gif" alt="<%=rs.getString("datetime")%>" width="18" height="18"> 留言时间:<%=rs.getString("datetime")%></td>
<td width="195" align="right" style="padding-left:
<% out.println("<a href='reply.jsp?TopicID="+rs.getInt("ID")+"'>回复 </a>");
if(tj){out.println("<a href='Del.jsp?TopicID="+rs.getInt("ID")+"'>删除</a>");}%></td>
<td width="14" align="right" style="padding-left:
</tr>
<tr>
<td height="20" colspan="3" style="padding-left:
</tr>
<tr>
<td height="109" colspan="3" valign="top" style="padding-left:
</tr>
<tr>
<td height="2" colspan="5" align="center" valign="top" class="word"><hr width="98%" color="#07AFBE" size="1"></td>
</tr>
<%
rs_reply=connBean.executeQuery("select * from tb_reply where TopicID="+rs.getInt("ID")+"");
while(rs_reply.next()){
%>
<tr>
<td height="39" align="center" valign="top" class="word"><%=rs_reply.getString("replyuser")%>回复</td>
<td align="center" valign="top"><hr size="20%" width="1px" color="#07AFBE"></td>
<td colspan="3" valign="top" class="word" style="padding-left:
<hr width="98%" color="#07AFBE" size="1"></td>
</tr>
<tr>
<td height="20" colspan="3" style="padding-left:
</tr>
<%}%>
</table> <br>
<%
try{
if(!rs.next())
{break;}
}
catch(Exception e){}
}
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right">当前页数:[<%=Page%>/<%=maxPage%>]
<%if(Page>1){%>
<a href="index.jsp?Page=1">第一页</a> <a href="index.jsp?Page=<%=Page-1%>">上一页</a>
<%
}
if(Page<maxPage){
%>
<a href="index.jsp?Page=<%=Page+1%>">下一页</a> <a href="index.jsp?Page=<%=maxPage%>">最后一页 </a>
<%}
}
catch(Exception e){
out.print("<center>无记录</center>");
}
%>
</td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
reg.jsp
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="CSS/style.css" rel="stylesheet">
<title>蓝天一色留言簿</title>
</head>
<body onLoad="clockon()">
<jsp:include page="top.jsp"/>
<table width="777" height="197" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="53%" height="5" valign="top"></td>
</tr>
<tr>
<td valign="top"><table width="100%" height="171" border="0" cellpadding="0" cellspacing="0" class="table">
<tr>
<td width="2%" height="26" background="images/bg_banner.GIF"> </td>
<td width="98%" background="images/bg_banner.GIF" class="word">≡用户注册≡</td>
</tr>
<tr align="center" valign="top">
<td colspan="2">
<form name="form1" method="post" action="reg_deal.jsp">
<table width="76%" height="295" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%"> </td>
<td width="78%"> </td>
</tr>
<tr>
<td align="center">用户名:</td>
<td><input name="username" type="text" class="table" id="username">
*</td>
</tr>
<tr>
<td align="center">密码:</td>
<td class="word"><input name="PWD1" type="password" class="table" id="PWD1">
*</td>
</tr>
<tr>
<td align="center">确认密码:</td>
<td class="word"><input name="PWD2" type="password" class="table" id="PWD2">
*</td>
</tr>
<tr>
<td align="center">生日:</td>
<td class="word"><input name="birthday" type="text" class="table" id="birthday">
(格式:
</tr>
<tr>
<td align="center">性别:</td>
<td><input name="sex" type="radio" value="男" checked>
男生
<input type="radio" name="sex" value="女">
女生</td>
</tr>
<tr>
<td align="center">OICQ号码:</td>
<td><input name="OICQ" type="text" class="table" id="OICQ"></td>
</tr>
<tr>
<td align="center">电话:</td>
<td><input name="tel" type="text" class="table" id="tel"></td>
</tr>
<tr>
<td align="center">个人主页:</td>
<td><input name="homepage" type="text" class="table" id="homepage" size="50"></td>
</tr>
<tr>
<td align="center">地址:</td>
<td><input name="address" type="text" class="table" id="address" size="50"></td>
</tr>
<tr>
<td align="center">邮政编码:</td>
<td><input name="postcode" type="text" class="table" id="postcode"></td>
</tr>
<tr>
<td align="center">Email:</td>
<td class="word"><input name="Email" type="text" class="table" id="Email" size="50">
*</td>
</tr>
<script language="javaScript">
function mycheck(){
if(form1.username.value==""){
alert("请输入用户名!");form1.username.focus();return; }
if(form1.PWD1.value==""){
alert("请输入密码!");form1.PWD1.focus();return;}
if(form1.PWD2.value==""){
alert("请确认密码!");form1.PWD2.focus();return;}
上一页 [1] [2] [3] [4] [5] [6] [7] [8] 下一页