index.jsp

来自「这是一个上传下载的原代码」· JSP 代码 · 共 533 行 · 第 1/2 页

JSP
533
字号
<%@page language="java" import="java.util.*,com.project.util.DateTimeUtil,com.model.entity.*" pageEncoding="UTF-8"%>
<%@page import="com.project.util.DateTimeUtil,com.project.util.StringUtil" %>
<%
	
	List list1 = new ArrayList();
	List list2 = new ArrayList();
	List list3 = new ArrayList();
	List list4 = new ArrayList();
	List list5 = new ArrayList();
	List list6 = new ArrayList();
	List list7 = new ArrayList();
	List list8 = new ArrayList();
	List list9 = new ArrayList();
	List list10 = new ArrayList();
	List list11 = new ArrayList();
	
	String content = "";
	String gunDongTitle = "";
	String userName = "";
	String userPass = "";
	String userRole = "";W
	String userId = "";
	String cityId = "";
	
	UserInfo user = new UserInfo();	
	
	if(session.getAttribute("userInfo") != null){
		Map map = new HashMap();
		map = (Map)request.getAttribute("indexNews");
		list1 = (List)map.get("政策动态");
		list2 = (List)map.get("运行动态");
		list3 = (List)map.get("综合分析");
		list4 = (List)map.get("行业分析");
		list5 = (List)map.get("网摘信息");
		list6 = (List)map.get("工作动态");
		list7 = (List)map.get("经济运行月报");
		list8 = (List)map.get("经济运行简报");
		list9 = (List)map.get("地方动态");
		list10 = (List)map.get("通知公告");
		list11 = (List)map.get("信息服务");
		gunDongTitle  = (String)map.get("滚动条");
		request.setAttribute("serviceInfo",list11);
		NewsInfo news = null;
		if(list10.size() > 0){
			news = (NewsInfo)list10.get(0);
			content = (news.getContent() != null)?news.getContent().getSubString(1,(int)news.getContent().length()):"没有内容";
		}
		
		user = (UserInfo)session.getAttribute("userInfo");
		userRole = user.getRoleIdRevert();
		userName = user.getUserName();
		userPass = user.getPassword();
		userId = user.getUserId();
		cityId = user.getCityId();
	}else{				
		response.sendRedirect(request.getContextPath() + "/login.jsp");
	}
%>
<html>
<script language="JavaScript" src="<%=request.getContextPath() %>/jsp/js/Calender.js"></script>
<script type="text/javascript">
	var userName = '<%=userName%>';
	var userRole = '<%=userRole%>';
	var userPass = '<%=userPass%>';
	var cityId = '<%=cityId%>';
	var userId = '<%=userId%>';
	function revert(){
		document.revertForm.submit();
	}
</script>
<form action="<%=StringUtil.NEWERMAPATH %>/page/index.jsp?revert=revert&userName=<%=userName %>&userPass=<%=userPass %>&userRole=<%=userRole %>&userId=<%=userId %>&cityId=<%=cityId %>" name="revertForm" method="post">
</form>
<head>
<title>经济运行调度信息网</title>
<style type="text/css">
td img {display: block;}body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-image: url(jsp/images/bei.gif);
}
.bai25 {
	font-family: "宋体";
	font-size: 12px;
	line-height: 25px;
	font-weight: bold;
	color: #FFFFFF;
}
a:link {
	color: #000099;
	text-decoration: none;
}
a:visited {
	color: #666699;
	text-decoration: none;
}
a:hover {
	color: #003399;
	text-decoration: none;
}
a:active {
	color: #FF0000;
	text-decoration: none;
}
.STYLE1 {color: #FF0000}
</style>
<!--Fireworks 8 Dreamweaver 8 target.  Created Wed Sep 05 13:51:49 GMT+0800 2007-->
<link href="<%=request.getContextPath() %>/jsp/css/css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
</style></head>
<body>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <jsp:include flush="true" page="include/top.jsp" />
  </tr>
  <tr>
    <td colspan="2" valign="top"><table width="780" align="center" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="188" height="904" valign="top"><table width="188" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="188" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="27" background="<%=request.getContextPath() %>/jsp/images/lanbiao.jpg" class="hei25"><div align="center">公告板</div></td>
                </tr>
                <tr>
                  <td height="504" valign="top" background="<%=request.getContextPath() %>/jsp/images/lanbiao1.jpg"><table width="160" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                        <td class="song30"><div align="center">最新公告内容:</div></td>
                      </tr>
                      <tr>
                        <td height="2" bgcolor="red"></td>
                      </tr>
                      <tr valign="top">
                        <td height="360"  valign="top" class="nei25"><marquee style="color:#414141;font-size:12px;line-height:25px; width:160px; height:340px" direction="up":" scrollamount="1" scrolldelay="10" onmouseover="this.scrollDelay=500" onmouseout="this.scrollDelay=1" width="210">
                           
                          <%=content %>
                          </marquee>
                        </td>
                      </tr>
                      <tr>
                        <td height="2" bgcolor="red"></td>
                      </tr>
                      <tr valign="top">
                        <td height="120" class="nei25">
                        <p>
                        <%
                        	for(int i=0;i < list10.size();i++){
                        		NewsInfo newsInfo = (NewsInfo)list10.get(i);
                         %>
                         <a href="<%=request.getContextPath() %>/newsContent.do?newsId=<%=newsInfo.getNewsId() %>" target="_blank"><%=StringUtil.getSubTitle(newsInfo.getTitle(),6) %></a>&nbsp;&nbsp;(<%=DateTimeUtil.getChangeDate(newsInfo.getCreateDate()) %>)<br/>
                          <%
                          	}
                           %>
                                    <a href="<%=request.getContextPath() %>/affiche.do">更多</a>&gt;&gt; </p></td>
                      </tr>
                  </table></td>
                </tr>
                <tr>
                  <td height="2"><img src="<%=request.getContextPath() %>/jsp/images/lanbiao2.jpg" width="188" height="2" /></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td height="8"></td>
          </tr>
          <tr>
            <td valign="top">
            <jsp:include flush="true" page="include/navigation.jsp" />
            </td>
          </tr>
          <tr>
            <td height="8"></td>
          </tr>
          <tr>
            <td valign="top">
            <jsp:include flush="true" page="include/service.jsp" />
            </td>
          </tr>
          <tr>
            <td height="5" valign="top"></td>
          </tr>
          <tr>
            <td height="5" valign="top">
            <jsp:include flush="true" page="include/stat.jsp" />
            </td>
          </tr>
        </table></td>
        <td width="4"></td>
        <td width="395" valign="top"><table width="395" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="464" valign="top"><table width="395" border="0" cellspacing="0" cellpadding="0">
                <tr>
                      <td height="22" bgcolor="#e7e7e7" class="nei20"><marquee direction="left" behavior="scroll">
                                    <span class="STYLE1"><font color="red"><%=gunDongTitle %></font></span>
                      </marquee></td>
                </tr>
                <tr>
                  <td height="14" background="<%=request.getContextPath() %>/jsp/images/center.jpg" class="bai25"><div align="center"><table width="215" border="0" align="right" cellpadding="0" cellspacing="0">
                        <tr>
                          <td width="185" class="bai25"><div align="left">综合信息</div></td>
                          <td width="55" class="more"><div align="left"><a href="<%=request.getContextPath() %>/colligateInfo.do">MORE</a></div></td>
                        </tr>
                      </table></div></td>
                </tr>
                <tr>
                  <td valign="top" background="<%=request.getContextPath() %>/jsp/images/center1.jpg"><table width="395" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td><table width="395" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="50" rowspan="2" align="center" valign="middle"><img src="<%=request.getContextPath() %>/jsp/images/d.jpg" width="6" height="10" /></td>
                              <td colspan="2" class="hei25">政策动态</td>
                            </tr>
                            <tr>
                              <td width="293" height="2
						" background="<%=request.getContextPath() %>/jsp/images/x.jpg"></td>
                              <td width="52"></td>
                            </tr>
                            <%
                      			for(int i=0;i < list1.size();i++){
                      				NewsInfo newsInfo = (NewsInfo)list1.get(i);
                     		 %>
                     	 	<tr>
                        		<td align="center" valign="middle" class="nei20"><img src="<%=request.getContextPath() %>/jsp/images/hd.jpg" width="5" height="5" /></td>
                        		<td colspan="2" class="nei20"><a href="<%=request.getContextPath() %>/newsContent.do?newsId=<%=newsInfo.getNewsId() %>" target="_blank"><%=StringUtil.getSubTitle(newsInfo.getTitle(),18) %></a>&nbsp;&nbsp;(<%=DateTimeUtil.getChangeDate(newsInfo.getCreateDate()) %>)
                        		<%if(newsInfo.getNewsDate()!=null&&DateTimeUtil.getChangDate(newsInfo.getNewsDate())>=DateTimeUtil.getNowTime()){ %><font color="red"><B>new!</B></font><%}%></td>
                      	 	</tr>
                      		 <%
								}                      
                      		 %>
                        </table></td>
                      </tr>
                      <tr>
                        <td><table width="395" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="50" rowspan="2" align="center" valign="middle"><img src="<%=request.getContextPath() %>/jsp/images/d.jpg" width="6" height="10" /></td>
                              <td colspan="2" class="hei25">运行动态</td>
                            </tr>
                            <tr>
                              <td width="293" height="2
						" background="<%=request.getContextPath() %>/jsp/images/x.jpg"></td>
                              <td width="52"></td>
                            </tr>
                            <%
                      			for(int i=0;i < list2.size();i++){
                      				NewsInfo newsInfo = (NewsInfo)list2.get(i);
                     		 %>
                     	 	<tr>
                        		<td align="center" valign="middle" class="nei20"><img src="<%=request.getContextPath() %>/jsp/images/hd.jpg" width="5" height="5" /></td>
                        		<td colspan="2" class="nei20"><a href="<%=request.getContextPath() %>/newsContent.do?newsId=<%=newsInfo.getNewsId() %>" target="_blank"><%=StringUtil.getSubTitle(newsInfo.getTitle(),18) %></a>&nbsp;&nbsp;(<%=DateTimeUtil.getChangeDate(newsInfo.getCreateDate()) %>)
                        		<%if(newsInfo.getNewsDate()!=null&&DateTimeUtil.getChangDate(newsInfo.getNewsDate())>=DateTimeUtil.getNowTime()){ %><font color="red"><B>new!</B></font><%}%></td>
                      	 	</tr>
                      		 <%
								}                      
                      		 %>
                        </table></td>
                      </tr>
                      <tr>
                        <td><table width="395" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="50" rowspan="2" align="center" valign="middle"><img src="<%=request.getContextPath() %>/jsp/images/d.jpg" width="6" height="10" /></td>
                              <td colspan="2" class="hei25">综合分析</td>
                            </tr>
                            <tr>
                              <td width="293" height="2
						" background="<%=request.getContextPath() %>/jsp/images/x.jpg"></td>
                              <td width="52"></td>

⌨️ 快捷键说明

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