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

📄 showsubject.jsp

📁 JSP+SQL2005 MVC模式 下载后改DB.java类的SQL密码就可用。
💻 JSP
字号:
<%@ page language="java" import="java.util.ArrayList,com.model.javabean.SubSingle,com.model.javabean.Single" contentType="text/html;charset=gb2312"%>
<%
   String curr_type="";
   ArrayList sublist=(ArrayList)session.getAttribute("sublist");
   String strnum=request.getParameter("num");
   System.out.print(strnum);
   if(strnum==null||strnum.equals(""))strnum="-1";
   int num=-1;
   try{
	   num=Integer.parseInt(strnum);
   }catch(Exception e){
	   num=-1;
   }
   ArrayList typelist=(ArrayList)session.getAttribute("typelist");
   System.out.print(typelist);
   for(int i=0;i<typelist.size();i++){
       if(num==((Single)(typelist.get(i))).getNum()){
           curr_type=((Single)(typelist.get(i))).getTitle();
		   break;
	   }
   }
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    

    <style type="text/css">
<!--
.STYLE1 {color: #FFFFFF}
.STYLE3 {color: #FFFFFF; font-weight: bold; }
body {
	background-image: url(images/8.gif);
}
-->
    </style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
  
  <body><br>
    <table width="1076" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="16" height="316">&nbsp;</td>
        <td width="1047" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
          <tr>
            <td width="1047" height="316" valign="top"><table width="792" height="140" border="1" cellpadding="0" cellspacing="0">
              <tr>
                <td colspan="3" bgcolor="#FFFFCC">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ====================贴子列表=======================</td>
              </tr>
              <tr>
                <td colspan="3">当前帖子主题:<%=curr_type%></td>
              </tr>
              <tr>
                <td width="417" bgcolor="#66CCFF" align="center"><strong> <span class="STYLE1">标题</span></strong></td>
                <td width="283" bgcolor="#66CCFF" align="center"><span class="STYLE3"> 发帖人</span></td>
                <td width="327" bgcolor="#66CCFF" align="center"><span class="STYLE3"> 发贴日期</span></td>
              </tr>
                <%
               	  if(sublist==null){
                	  out.println("<tr><td align='center' colspan='3' height='25'>没有帖子显示!</td></tr>");  
                  }
                  else{
                	  for(int i=0;i<(sublist.size());i++){
                		  SubSingle subsingle=(SubSingle)(sublist.get(i));
                		  out.println("<tr>");
                		  out.println("<td width='40%' align='center' height='25' style='cursor:hand' onMouseOver='this.bgColor=\"lightyellow\"' onMouseOut='this.bgColor=\"white\"'><a href='showIndividual.jsp?id="+subsingle.getId()+"&num="+num+"'>"+subsingle.getSubtitle()+"</a></td>");
                		  out.println("<td widht='30%' align='center'>"+subsingle.getIssuer()+"</td>");
                		  out.println("<td width='30%' align='center'>"+subsingle.getTime()+"</td>");
                		  out.println("</tr>");
                	  }
                  }
        %>
              <tr>
                <td align="right" colspan="3" height="20"> <a href="issue.jsp?num=<%=num%>">【发布】</a>  <a href="zhuye.jsp">【返回】</a></td>
              </tr>
            </table></td>
          </tr>
        </table>
        </td>
        <td width="13">&nbsp;</td>
      </tr>
      <tr>
        <td height="17">&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
</body>
</html>

⌨️ 快捷键说明

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