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

📄 index.jsp

📁 这个是j2eejava web 编程精要十五讲的全部源码。对学习java web编程的人来说是很能得的资料
💻 JSP
字号:

<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="foton.util.*" %>
<%@ page import="foton.index.*" %>
<%@ page import="java.util.*" %>

<script language="javascript">
function openWin(para) {
window.open('../index/press.jsp?ID='+para,'','scrollbars=yes,width=617,height=450')
}

function toOpen() {
window.open('../index/press_urgent_display.jsp','','scrollbars=yes,width=617,height=450')
}

</script>

<html>
<%
urgentDAO udao= new urgentDAO();
pressInfo uinfo = new pressInfo();
uinfo=udao.getUrgent("01");
String caption = uinfo.getCaption();
System.out.println("caption = '"+caption+"'");

if(!caption.equals("")&&!caption.equals(" ")) {
%>
<body onload="javascript:toOpen()">
	<%}
else {
%>
	<body>
	<%}%>


<jsp:include page="../header/header.jsp" flush="true"/>






<TABLE cellSpacing=0 cellPadding=0 width=758 border=0 bgcolor=#ffffff>
  <TBODY>
  <TR>
    <TD vAlign=top width=156 background=../../images/qy_n1_bj.gif><IMG height=44 
      src="../../images/qy_2_1_03.gif" width=95>
<jsp:include page="../header/menu_common.jsp" flush="true"/>

 
	
	<!--<jsp:include page="../user/login.jsp" flush="true"/> -->
	

    </TD>

    <TD width=672>
      <TABLE height=1 cellSpacing=0 cellPadding=0 width=538 border=0 >
        <TBODY>
        <TR>
          
		  <TD vAlign=bottom colSpan=2 height=43> </TD></TR>                                                  
        <TR>
          <TD width=40 height=45 rowSpan=2><IMG height=43 
            src="../../images/qy_1_0.gif" width=40></TD>
          <TD vAlign=top width=498 height=15><IMG height=1 
            src="../../images/qy_1.gif" width=498></TD></TR>
        <TR>
          <TD vAlign=top width=498 height="30"></TD></TR></TBODY></TABLE>

      <TABLE cellSpacing=1 cellPadding=3 width=672 border=0 bgcolor=#ffffff >
        <TBODY>
		 <% Condition condition = new Condition();
  int pageNum = 30;
  int currPage;
 // String url = "../index/press_list.jsp";

   if (request.getParameter("pages")==null) {
     currPage =0;
   }
   else {
        currPage = new Integer(request.getParameter("pages")).intValue();
   }

    condition.setPageNum(pageNum);
    condition.setCurrPage(currPage);


  // ArrayList list = (ArrayList)session.getAttribute("result");
     
	 pressDAO dao = new pressDAO();
	  ArrayList arr = dao.getPressPic(condition);
	  int k= arr.size();
	 System.out.println("arr.size()="+k);

  
 
	   %>
	 
             
			 <tr>
			 <td width=10>&nbsp;</td>
			 <!--
			 <td width=331 height=300>
			 <Table width=331 border=0>

            <% if(k==0) {%>
                  <tr width=331 height=300><td><a href="javascript:openWin('');">
			 <img src="../../images/frms/bj04.jpg" border=0 width=320 height=250></a><br>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
					<%}
             else if(k>=1) {
  
	              Iterator iter = arr.iterator();
                pressInfo pinfo = (pressInfo)iter.next();
				%>
			 <tr width=321 height=300><td><a href="javascript:openWin('<%=pinfo.getID()%>');">
			 <img src="../../upload/<%=pinfo.getPicURL()%>" border=0 width=320 height=250></a><br>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				&nbsp;&nbsp;&nbsp;&nbsp;
				<%=pinfo.getCaption()%></td></tr>
					<%
			 }%>

             
			  
				
				
		       
				

			
				
				

             <tr></tr>
			 <tr></tr>
			 </table>
			 </td>
              -->


			 <td width=362 height=335 valign=top align=center>
			  <Table width=100% border=0 valign=top>
			 <tr >
			 
			 <td align=center valign=middle height=21>
			 <TABLE cellSpacing=0 cellPadding=0 width=100% 
            background=../pic/qy_n2_3_bj.jpg border=0>
              <TBODY>
              <TR>
                <TD width=31><IMG height=21 
                  src="../pic/qy_n2_3_1.gif" width=17></TD>
                <TD width=300 >&nbsp;<B>招聘动态</B></TD>
                <TD align=right width=30><IMG height=21 
                  src="../pic/qy_n2_3_2.gif" 
              width=11></TD></TR></TBODY></TABLE>
			 </td>
			
			 </tr>
			 <tr><td>&nbsp;</td></tr>
             
			 <% 
     ArrayList list = dao.getPress(condition);
     
	 int m= list.size();
	 System.out.println("list.size()="+m);

  Iterator it = list.iterator();
  if(m<=10) {
  while (it!=null && it.hasNext()) {
	  
    pressInfo info = (pressInfo)it.next();
%>
<tr bgcolor=#ffffff>
  

<td> <img src="../pic/qy_3_02.gif"><a href="javascript:openWin('<%=info.getID()%>');"><%=info.getCaption()%>[<%=info.getStoreDate()%>]</a></td>

</tr>
	
<% } 
  }
else { 
	for(int n=1;n<=10;n++) {
       pressInfo info = (pressInfo)it.next();
	   %>
<tr bgcolor=#ffffff>
  

<td> <img src="../pic/qy_3_02.gif"> <a href="javascript:openWin('<%=info.getID()%>');"><%=info.getCaption()%> [<%=info.getStoreDate()%>]</a></td>

</tr>
<%}%>
<tr><td >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr> 
<tr><td align=right><a href="../index/morePress.jsp" target="_blank">更多动态>>></a></td></tr>


<%}%>



			 <tr><td></td></tr>
			 </table>	 
			 </td>

			<td width=300 height=335 valign=top align=center>
			<Table width=100% border=0 valign=top>
            <tr width=100% height=45> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
			<tr width=100%> <td width=31>&nbsp;&nbsp;&nbsp;&nbsp;</td>
			<td width=300 height=250 ><img src="../../images/frms/bj04.jpg" border=0 width=300 height=190></td>
			</tr>
			<tr width=100% height=40> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
			</table>
			</td>
			 
		  </tr>
		  
		  </tbody></TABLE>
		  
		  </td></tr></TBODY></TABLE><!-- #BeginLibraryItem "/Library/zhu_copyright.lbi" -->              

<TABLE cellSpacing=0 cellPadding=0 width=767 background="../../images/d_1_bj.gif"
border=0>
  <TBODY>
  <TR>
    <TD width=124><IMG height=19 src="../../images/d_1.gif" width=124></TD>
    <TD width=643><FONT color=#cccccc>北汽福田汽车股份有限公司 版权所有 &copy;                                                                                                    
  2004</FONT></TD></TR></TBODY></TABLE><!-- #EndLibraryItem -->

  </body></html>

⌨️ 快捷键说明

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