⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.jsp

📁 苹果(mac)风格-巧悟留言板1.0版
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="conn.jsp"%>
<% 
/*
     巧悟留言板1.0版(JSP)                               
                                                         
     程序设计:Jorwoo                                     
                                                        
     QQ:513768                                         
     E-Mail:jorwoo@eyou.com                             
     网站:http://jorwoo.yeah.net       
*/	
String condition="select * from system";
rs=stmt.executeQuery(condition);
rs.next();
%>
<html>
<head>
<title><%=rs.getString("title")%></title>
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {font-family: "宋体"}
.style2 {font-size: 9px}
.style3 {color: #9999CC; text-decoration: none; font-family: "宋体";}
.style4 {font-size: 9pt}
.style5 {color: #999999}
.style6 {font-family: "宋体"; color: #999999; }
.style7 {color: #FF0000}
.style8 {font-family: Tahoma}
a.rights:link {
	COLOR: #000000;
	TEXT-DECORATION: none;
	
}
a.rights:visited {
	COLOR: #000000;
	TEXT-DECORATION: none;
	
}
a.rights:hover {
	COLOR: #FF0000;  
	TEXT-DECORATION: none;
	
}
.style9 {
	font-size: 9pt;
	color: #FF0000;
	font-weight: bold;
}
-->
</style>
</head>

<body background="img/beijing.gif" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="650" border="0" align="center" cellpadding="0" cellspacing="0" class="tittle0">
  <tr>
    <td width="389" align="center" valign="middle"><img src="img/toplogo1.jpg" width="389" height="150"></td>
    <td width="66" background="img/toplogobg.jpg">&nbsp;</td>
    <td width="195"><img src="img/toplogo2.jpg" width="203" height="150"></td>
  </tr>
</table>
<table width="650" border="0" align="center" cellpadding="0" cellspacing="0" class="tittle1">
  <tr>
    <td height="26" background="img/bg.gif"><table width="100%" height="15" border="0" cellpadding="0" cellspacing="0">
      <tr align="center">
        <td width="41%" class="font0"><span class="font0">版主:</span><font color="#006699"><%=rs.getString("adminname")%></font></td>
        <td width="59%"><a href="add.jsp" class="font0">给我留言</a> <span class="font0">│</span> <a href="login.jsp" class="font0">管理登录</a><font color="#000099"> </font><span class="font0">│</span> <span><a href="system.jsp" class="font0">系统设定</a></span><font color="#000099"> </font><span class="font0">│</span><font color="#000099"> </font><a href="<%=rs.getString("web")%>"><span class="font0">网站首页</span></a></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="40" align="center" valign="middle"><table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="25" align="right"><img src="img/fav_add.gif" width="25" height="25"></td>
          <td valign="bottom"> <p> 
              <marquee  height=20 hspace=5 loop=100 scrollamount=2
      scrolldelay=10 width=100% on="left" DIRECTI 
      align="center">
              <span class="style9"><%=rs.getString("news")%>
              </span>
              </marquee>
          </p></td>
        </tr>
      </table></td>
  </tr>
</table>
  <% 

String condition2="select * from message order by id DESC";
rs=stmt.executeQuery(condition2);
int intPageSize; 
int intRowCount; 
int intPageCount; 
int intPage; 
String strPage;
int i;
intPageSize = 8;
strPage = request.getParameter("page");
if(strPage==null){
intPage = 1;
}
else
{
intPage = Integer.parseInt(strPage);
if(intPage<1){ intPage = 1;}
}
rs.last(); 
intRowCount = rs.getRow(); 
intPageCount =(intRowCount+intPageSize-1) / intPageSize;
if(intPage>intPageCount) intPage = intPageCount;
if(intPageCount>0){
rs.absolute((intPage-1) * intPageSize+1); 
i = 0; 
while(i< intPageSize && !rs.isAfterLast())

{
String name=rs.getString("name");
String content=rs.getString("content");
String qq=rs.getString("qq");
String email=rs.getString("email");
String http=rs.getString("http");
String time=rs.getString("ltime");
String ip=rs.getString("ip");
String sex=rs.getString("sex");
String recontent=rs.getString("recontent");
%>

<table width="650" border="0" cellspacing="0" cellpadding="0" align="center" style="word-break:break-all">

  <tr> 
    <td width="81" height="10"><img src="img/top1.gif" width="81" height="22"></td>
    <td width="575" background="img/top2.gif">&nbsp;</td>
    <td width="1"><img src="img/top3.gif" width="47" height="22"></td>
  </tr>
  <tr> 
    <td colspan="3" align="center" bgcolor="#FFFFFF" class="tittle2"><table width="100%" height="28" border="0" cellpadding="0" cellspacing="0" background="img/bg.gif" class="tittle3">
        <tr> 
          <td width="4%" align="center"><img src="img/topicnew.gif" width="16" height="18"></td>
          <td width="39%"><span class="style2"><span class="style4"><span class="style7"><%=name%><span style="font-family: &quot;??&quot;;" #invalid_attr_id="none"></span></span><span class="style3">留言于</span><font color="#000099"><font color="#FF0000"><%=time%>&nbsp;&nbsp;</font></font></span></span></td>
          <td width="39%"><span class="style4"><font color="#000099">IP:</font><font color="#FF0000"><%=rs.getString("ip")%></font></span></td>
          <td width="3%"><a href="<%=http%>" target="_blank"><img src="img/icon_homepage.gif" alt="<%=name%>的主页" width="16" height="16" border="0"></a></td>
          <td width="3%"><a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=qq%>" target="_blank"><img src="img/icon_editor_oicq.gif" alt="<%=name%>的QQ是:<%=qq%>" width="16" height="16" border="0"></a></td>
          <td width="3%"><a href="mailto:<%=email%>"><img src="img/icon_email.gif" alt="<%=name%>的Email是:<%=email%>" width="16" height="16" border="0"></a></td>
          <td width="3%"><a href="re.jsp?id=<%=rs.getInt("id")%>"><img src="img/icon_reply_topic.gif" width="16" height="16" border="0" alt="回复该留言[只有版主才有的权利]"></a></td>
          <td width="3%"><a href="edit.jsp?id=<%=rs.getInt("id")%>"><img src="img/icon_edit_topic.gif" width="16" height="16" border="0" alt="编辑该留言[只有版主才有的权利]"></a></td>
          <td width="3%"><a href="del.jsp?id=<%=rs.getInt("id")%>"><img src="img/icon_delete_reply.gif" alt="删除该留言[只有版主才有的权利]" width="16" height="16" border="0"></a></td>
        </tr>
        <tr></tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="100" height="92" align="center" valign="top"> <table width="100%" border="0" cellspacing="3" cellpadding="0">
            <tr>
              <td align="center"><img src="img/<%=sex%>.gif"></td>
            </tr>
            <tr>
              <td align="center"><span class="style4"><%=name%></span></td>
            </tr>
          </table></td>
          <td width="423"><span class="style4"><%=content %></span></td>
        </tr>
        <tr align="center"> 
          <td colspan="2" valign="top"><img src="images/bg_4.gif" width="100%" height="1"></td>
        </tr>
        <tr> 
          <td colspan="2" height="20"><font color="#006699">  <img src="img/locktop.gif" width="15" height="15" align="absmiddle"></font><span class="font0"><span class="style1">版主回复:<span class="style6"></span></span><span class="style5"><%=recontent%></span></span></td>
        </tr>
      </table></td>
  </tr>

</table>
<table border="0" width="650" cellspacing="0" cellpadding="0" height="7" align="center">
  <tr> 
    <td width="2%" align="center"><img src="img/end1.gif" width="12" height="14"></td>
    <td width="89%" align="center" background="img/end2.gif"></td>
    <td width="9%" align="center"><img src="img/end3.gif" width="65" height="14"></td>
  </tr>
 
</table>

<p> <% 
rs.next(); 
   i++; 
  } 
  }
rs.close();
stmt.close(); 
conn.close();
%></p>
<p>
 
    

</p>
<table width="650" border="0" align="center" cellpadding="0" cellspacing="1" class="tittle0">
  <tr>
    <td height="28" align="center" background="img/bg.gif" class="font0 style1">当前显示第<span class="style7"> <%=intPage%></span> 页&nbsp;&nbsp; 共 <%=intPageCount%> 页 &nbsp;&nbsp;&nbsp;&nbsp;导航:<a href="index.jsp?page=1" class="font0">首页</a>
      <%if(intPage>1){%>
      <a href="index.jsp?page=<%=intPage-1%>" class="font0">上一页</a>
      <%}else{%>
上一页
<%
	  }%>
 
<%if(intPage<intPageCount){%>
<a href="index.jsp?page=<%=intPage+1%>" class="font0">下一页</a>
<%}else{%>
下一页
<%
	  }%>
<a href="index.jsp?page=<%=intPageCount%>" class="font0">尾页</a> </td>
  </tr>
</table>
<table width="650" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>
    <td align="center"><p class="style4 style8"><a href="http://jorwoo.yeah.net" target="_blank" class="rights">巧悟工作室</a>&nbsp;&nbsp; 版权所有 <br>
程序设计:Jorwoo&nbsp;&nbsp; E-mail: <a href="mailto:jorwoo@eyou.com" class="rights">jorwoo@eyou.com</a><br>
QQ:513768</p>    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -