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

📄 showproject.jsp

📁 实现统一的人员日志管理系统管理后台
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.tb.log.util.pages.PageBean"%>
<%@page import="com.tb.log.model.po.Pro"%>
<%@ taglib uri="/WEB-INF/c-rt.tld" prefix="c" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'showpro.jsp' starting page</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<STYLE type=text/css>
<!--
BODY {
	FONT-SIZE: 12px;
	
	FONT-FAMILY: 宋体;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
}
A {
	FONT: 12px 宋体; COLOR: #000000; TEXT-DECORATION: none
}
A:hover {
	COLOR: #428eff
}
TD {
	FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: 宋体
}
TH {
	FONT-WEIGHT: bold; FONT-SIZE: 12px; BACKGROUND-IMAGE: url(images/admin_bg_1.gif); COLOR: white; BACKGROUND-COLOR: #4455aa
}
TD.txlHeaderBackgroundAlternate {
	COLOR: #ffffff; BACKGROUND-COLOR: #799ae1
}

TD.txlRow {
	BACKGROUND-COLOR: #dee5fa
}
TD.txlRowHighlight {
	BACKGROUND-COLOR: #d4def9
}
.tableBorder {
	BORDER-RIGHT: #6595d6 1px solid; BORDER-TOP: #6595d6 1px solid; BORDER-LEFT: #6595d6 1px solid; BORDER-BOTTOM: #6595d6 1px solid; BACKGROUND-COLOR: #BAD6EE}
INPUT {
	FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: Tahoma,Verdana,宋体
}
SELECT {
	FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: Tahoma,Verdana,宋体
}
.div_navi {
	background-image: url(left.files/pic90.gif);
	width: 1025px;
	font-size: 14px;
	font-weight: normal;
	position: absolute;
	height: 30px;
	text-align: left;
	line-height: 30px;
}
TEXTAREA {
	FONT-SIZE: 12px; LINE-HEIGHT: 15px; FONT-FAMILY: Tahoma,Verdana,宋体
}
.STYLE3 {
	font-size: 18px;
}
.div_body {
	font-family: "宋体";
	font-size: 16px;
	font-weight: normal;
	color: #FFFFFF;
	background-color: #FFFFFF;
	position: absolute;
	
	width: 90%;
	left: 31px;
	top: 114px;
	text-align: center;
}
.div_body_table {
	height: 100%;
	width: 100%;
	border: 1px solid #003366;
}
.STYLE4 {font-size: 18;}
.submit_text {
	height: 100%;
	width: 100%;
}
.table {
	font-family: "宋体";
	font-size: 14px;
	text-align: center;
	height:100%;
	width:100%;
	border:1px;
	background:#CCCCCC;
}
.div_find {
	height: 38px;
	width: 90%;
	position: absolute;
	font-size: 16px;
	top: 68px;
	vertical-align: middle;
	left: 31px;
}
.div_find_table {
	height: 100%;
	width: 100%;
}
-->
</STYLE>

<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<script language="JavaScript" src="js/Date.js"></script>
<script type="text/javascript">
function submitByPage(page)
{
	document.getElementById('page').value=page;
	document.getElementById('form1').submit();
}
</script>

</HEAD>

<BODY bottomMargin=0  gcolor="#EEF4FF" gColor=#ddeeff >
<div  class="div_navi">&nbsp;当前位置:项目管理&gt;&gt;查看项目</div>
<div  class="div_find ">

<form method="post" action="pro.do?type=show" name="form1" id="form1">
  <table  bgcolor="#D6DFF7" class="div_find_table" >
    <tr>
      
      <td width="165" ><span class="STYLE5">项目类别
         
          <select name="pro_category">
            <option value="">--选择类别--</option>
            <% 
            	String pro_category = "";
            	pro_category = (String)request.getAttribute("pro_category");
            	List proCateList =  (List)request.getAttribute("CateList"); 
            	for(int i=0;i<proCateList.size();i++){
            	if(proCateList.get(i).equals(pro_category)){
               %>
            <option value="<%=proCateList.get(i) %>" selected="selected"><%=proCateList.get(i) %></option>
            <%}else{ %>
            <option value="<%=proCateList.get(i) %>"><%=proCateList.get(i) %></option>
            <%}} %>
          </select>
          
      </span></td>
	  
	  
      <td width="221">
	  从<select id="sYear" name="syear"></select>
				年<select id="sMonth" name="smonth"></select>
		月<select id="sDay" name="sday"></select>
		<%
			String sdate = (String)request.getAttribute("start_date");
			String start[] = new String[3];
			start[0] = "0";
			start[1] = "0";
			start[2] = "0";
			if(!(sdate == null || sdate.equals("")))
			{	start[0] = sdate.substring(0,4);
				start[1] = sdate.substring(5,7);
				start[2] = sdate.substring(8,10);
			}
			int startdate1 = Integer.parseInt(start[0]);
			int startdate2 = Integer.parseInt(start[1]);
			int startdate3 = Integer.parseInt(start[2]);
		%>
		<script type="text/javascript">
			var selYear = window.document.getElementById("sYear");
			var selMonth = window.document.getElementById("sMonth");
			var selDay = window.document.getElementById("sDay");
			// 新建一个DateSelector类的实例,将三个select对象传进去
						
			new DateSelector(selYear, selMonth ,selDay, <%=startdate1%>,<%=startdate2%>,<%=startdate3%>);
		</script>	
	  </td>
	 
	  
      <td width="232">至
        <select id="eYear" name="eyear">
	      </select>
	                 <select id="eMonth" name="emonth">
	                 </select>
	                 <select id="eDay" name="eday">
	                 </select>
	                 <%
	                 String edate = (String)request.getAttribute("end_date");
			String end[] = new String[3];
			end[0] = "0";
			end[1] = "0";
			end[2] = "0";
			if(!(edate==null||edate.equals("")))
			{
				end[0] = edate.substring(0,4);
				end[1] = edate.substring(5,7);
				end[2] = edate.substring(8,10);
			}
			int enddate1 = Integer.parseInt(end[0]);
			int enddate2 = Integer.parseInt(end[1]);
			int enddate3 = Integer.parseInt(end[2]);
		%>
	                 <script type="text/javascript">
			var selYear = window.document.getElementById("eYear");
			var selMonth = window.document.getElementById("eMonth");
			var selDay = window.document.getElementById("eDay");
			// 新建一个DateSelector类的实例,将三个select对象传进去
										
			new DateSelector(selYear, selMonth ,selDay, <%=enddate1%>,<%=enddate2%>,<%=enddate3%>);
		</script>
	  </td>
      <td width="119"><span class="STYLE5">项目状态
	      <label>
          <select name="pro_state">
            <option value="">所有</option>
            <% String pro_state="";
            pro_state =(String)request.getAttribute("pro_state");
               String[] prostate=new String[4];
               prostate[0]="未启动";
               prostate[1]="进行中";
               prostate[2]="暂停中";
               prostate[3]="已完成";
               for(int i=0;i<4;i++){
               if(prostate[i].equals(pro_state)){
                 %>
            <option value="<%=prostate[i] %>" selected="selected"><%=prostate[i] %></option>
            <%}else{%>
            <option value="<%=prostate[i] %>" ><%=prostate[i] %></option>
            <%} }%>
          </select>
          </label>
      </span></td>
      <td width="134"><span class="STYLE5">项目名
          
        <input name="pro_name" type="text" id="pro_name" size="12" value="${pro_name }">
         
          
      </span></td>
      <td width="40" ><span class="STYLE5">
        <label>
        <input type="hidden" name="page" id="page" value="${pg.currentPage }"> 
        <input  type="submit"  value="查询">
        </label>
      </span></td>
    </tr>
  </table>
  </form>

</div>
<div  class="div_body">

  <table  border="1" cellspacing="0"  class="table">

    <tr>
      <td height="38" colspan="8" align="center" bgcolor="#D6DFF7"  >
	  <p align="center"  class="STYLE3" >项目列表</p></td>
    </tr>
    <tr>
      <td height="38" bgcolor="#799AE1"  ><p >项目名称</p></td>
      <td bgcolor="#799AE1"><p >计划启动时间</p></td>
      <td bgcolor="#799AE1"><p >实际启动时间</p></td>
      <td bgcolor="#799AE1"><p >计划完成时间</p></td>
      <td bgcolor="#799AE1"><p >实际完成时间</p></td>
      <td bgcolor="#799AE1"><p >项目介绍</p></td>
      <td bgcolor="#799AE1"><p >完成状态</p></td>
      <td bgcolor="#799AE1"><p >相关操作</p></td>
    </tr>
    
     <% List proList = (List)request.getAttribute("proList");
    	Pro pro= null;
    	
    	String color[] = {"#FFFFFF","#EDF5FD"};
    	for(int i=0;i<proList.size();i++)
    	{
    	pro = (Pro)proList.get(i);
    	
     %>
	    <tr >
      <td height="30" bgcolor=<%=color[i%2] %> width=100>&nbsp;<%=pro.getPro_name() %></td>
      <td bgcolor=<%=color[i%2] %>>&nbsp;<%=pro.getPlan_start_date() %></td>
      <td bgcolor=<%=color[i%2] %>>&nbsp;<%=pro.getStart_date() %></td>
      <td bgcolor=<%=color[i%2] %>>&nbsp;<%=pro.getPlan_stop_date() %></td>
      <td bgcolor=<%=color[i%2] %>>&nbsp;<%=pro.getStop_date() %></td>
      <td bgcolor=<%=color[i%2] %>>&nbsp;<%=pro.getPro_desc() %></td>
      <td bgcolor=<%=color[i%2] %>>&nbsp;<%=pro.getPro_state() %></td>
      <td bgcolor=<%=color[i%2] %> width="160" >
     <%if("暂停中".equals(pro.getPro_state())||"未启动".equals(pro.getPro_state())){ %>
      <a href="pro.do?type=stateChange&pro_id=<%=pro.getPro_id() %>&prostate=进行中" >启动</a>&nbsp;
      <%}else if ("进行中".equals(pro.getPro_state())){%>
      <a href="pro.do?type=stateChange&pro_id=<%=pro.getPro_id() %>&prostate=暂停中" >停止</a>&nbsp;
      <%} else {%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%} %>
      <a href="pro.do?type=delete&pro_id=<%=pro.getPro_id() %>" onclick='return window.confirm("您真的要删除吗?");'>删除</a>&nbsp;
      
      <%if("已完成".equals(pro.getPro_state())||"未启动".equals(pro.getPro_state())){ %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%} else{%>
      
       <a href="pro.do?type=stateChange&pro_id=<%=pro.getPro_id() %>&prostate=已完成"  onclick='return window.confirm("您真的终止项目吗?");'>完成</a>&nbsp;
     <%} %>
     <a href="pro.do?type=getEdit&pro_id=<%=pro.getPro_id() %>" >查看</a>
		  </td>
      </tr>
      <%} %>
      <tr>

     <%PageBean pg = (PageBean) request.getAttribute("pg");%>
		<td height="38" colspan="8" bgcolor="#D6DFF7">
			<div align="right">
				当前第${pg.currentPage }页/总共${pg.totalPages}页&nbsp;&nbsp;共${pg.totalResults}条记录
				<a href="javascript:void(-1)" onclick="submitByPage(1)">首页</a>&nbsp;&nbsp;
				<%if (pg.hasPreviousPage()) {%>
				<a href="javascript:void(-1)" onclick="submitByPage(${pg.currentPage-1 })">上一页</a>&nbsp;&nbsp;
				<%}if (pg.hasNextPage()){%>
				<a href="javascript:void(-1)" onclick="submitByPage(${pg.currentPage+1 })">下一页</a>
				&nbsp;&nbsp;<%}%>
				<a href="javascript:void(-1)" onclick="submitByPage(${pg.totalPages})">尾页</a>&nbsp;
				到第
				<select name="currentPage" id="currentPage" onchange="return nextPage(this.value)">
				  <c:forEach var="i" begin="0" end="${pg.totalPages}">
				  <c:choose>
					 <c:when test="${pg.currentPage==i}">
					 <option value="${i}" selected>${i}</option></c:when>
					 <c:otherwise>
					 <option value="${i}">${i}</option>
					 </c:otherwise>
				  </c:choose> 
				  </c:forEach>
				</select>
			</div>
		</td>
    </tr>
  </table>
  
</div>
</BODY></HTML>

⌨️ 快捷键说明

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