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

📄 main.jsp~31~

📁 一、数据库登录名:blog 密码:blog 二、首页应该运行log.jsp页面。其用户名:aa 密码:aaaa
💻 JSP~31~
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<html>
<head>
<title>
main
</title>
</head>
<jsp:useBean id="operation" scope="session" class="OperationDB.operation">
</jsp:useBean>
<jsp:useBean id="p" scope="session" class="Tool.MyPagination">
</jsp:useBean>
<%Integer typeid=null;
 if(request.getParameter("id")!=null){
   typeid=Integer.valueOf(request.getParameter("id"));
 }
 String str=(String)request.getParameter("Page");
 int Page=1;
 List l=null;
 if(str==null){
   l=operation.findarticle(typeid);
   int pagesize=3;
   l=p.getInitPage(l,Page,pagesize);
 }
 else{
   Page=p.getPage(str);
 l=p.getAppointPage(Page);
 }
%>
<body bgcolor="#ffffff">
<table width="390" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>

  <%
  ArrayList list=operation.slectArticleType();
  for(int i=0;i<list.size();i++){
  ActionForm.articleTypeActionForm ata=(ActionForm.articleTypeActionForm)list.get(i);

%><td align="center">
<a href="main.jsp?id=<%=ata.getId()%>">[<%=ata.getTypeName()%>]</a></td>
<%}%>
        </tr>
</table>
<br />
<%
 ArrayList list2=operation.findarticle(typeid);
 for(int t=0;t<list2.size();t++){
  ActionForm.articleActionForm aaf=(ActionForm.articleActionForm)list2.get(t);
 String content=aaf.getContent();
 if(content.length()>100){
 content=content.substring(0,100)+"....";
 }
%>

 <table width="2" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="myimage/dh3.jpg" width="390" height="2" alt=""></td>
  </tr>
</table>
        <table width="380" border="0" align="center">
        <tr>
        <td width="377" height="22"><strong><%=aaf.getTitle()%></strong></td>
        </tr>
        <tr>

 <td valign="top"><span class="STYLE1"><%=content%></span></td>

        </tr>
        <tr>
        <td height="17" class="head-02"><a href="head_articleForm.jsp?id=<%=aaf.getId()%>" target="main"><font size="4" color="#33FFCC">阅读全文&gt;&gt;</font></a></td>
        </tr>
        <tr>
        <td height="17" align="right"><span class="STYLE2"><%=aaf.getPhTime()%>|&nbsp;阅读(<%=aaf.getNumber()%>)&nbsp;|&nbsp;回复(<%=operation.findRestore(Integer.valueOf(aaf.getId())).size()%>)</span></td>
        </tr>
        </table>

       <%}%>

        <%=p.printCtrl(Page)%>
</body>
</html>

⌨️ 快捷键说明

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