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

📄 tasks.jsp

📁 jwp是 JSP WebProject的简写。它是一个基于Web的应用程序。它编写的方式是JSP/Java+Mysql.主要的功能是管理项目、任务、命令、用户、报告、文档。这个程序对学生管理自己的程序
💻 JSP
字号:
<%@ include file="../WEB-INF/include/header.jsp" %>
<%
	if(request.getParameter("del") != null)
	{
		Task t = new Task();
		t.get(request.getParameter("del"));
		t.delete();
	}
%>
<html>
<head>
<title>Tasks</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="../css/css.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td height="25" bgcolor="#666666" class="header">&nbspTasks Overview</td>
  </tr>
  <tr> 
    <td bgcolor="#EFEFEF">&nbsp;</td>
  </tr>
  <tr> 
    <td bgcolor="#EFEFEF"> 
      <table width="98%" border="0" align="center">
        <tr bgcolor="#666666"> 
          <td class="header" colspan="9" height="25">Open Tasks</td>
        </tr>
        <tr bgcolor="#FAFAFA"> 
          <td class="nav" width="200">Description</td>
          <td class="nav" width="70">Duration</td>
          <td class="nav" width="50">Status</td>
          <td class="nav" width="60">Priority</td>
          <td class="nav" width="100">Start</td>
          <td class="nav" width="100">End</td>
          <td class="nav" width="200">Creator</td>
          <td width="15">&nbsp;</td>
          <td width="15">&nbsp;</td>
        </tr>
        <%
		Vector vopen = ses.getUser().getUnfinishedTasks();
		for(int i=0; i<vopen.size(); i++)
		{
			Task t = (Task) vopen.elementAt(i);
			Project p = new Project();
			p.get(t.getProject());
			String image = "n/a";
			if(t.getPrio().equals("low"))
				image = "<img src=\"../images/priolow.png\" alt=\"Low Priority\" border=\"0\">";
			else if(t.getPrio().equals("middle"))
				image = "<img src=\"../images/priomiddle.png\" alt=\"Middle Priority\" border=\"0\">";
			else if(t.getPrio().equals("high"))
				image = "<img src=\"../images/priohigh.png\" alt=\"High Priority\" border=\"0\">";
			
%>
        <tr bgcolor="#FAFAFA" title="Project: <%=p.getName()%>"> 
          <td class="text" width="200"><%=t.getDescription()%></td>
          <td class="text" width="70"><%=t.getDuration()%> Day(s)</td>
          <td class="text" width="50"><%=t.getStatus()%> %</td>
          <td class="text" width="60"><%=image%></td>
          <td class="text" width="100"><%=app.dbDateToNormalDate(t.getStart())%></td>
          <td class="text" width="100"><%=app.dbDateToNormalDate(t.getEnd())%></td>
          <td class="text" width="200"><%=ses.getUser().getName(t.getCreator())%></td>
          <td width="15" class="text"> 
            <div align="center"><a href="task_view.jsp?view=<%=t.getLfdnr()%>"><img src="../images/Edit16.gif" width="16" height="16" alt="view this Task..." border="0"></a></div>
          </td>
          <td width="15" class="text"> 
            <div align="center"><a href="tasks.jsp?del=<%=t.getLfdnr()%>"><img src="../images/Delete16.gif" width="16" height="16" alt="delete this Task..." border="0"></a></div>
          </td>
        </tr>
        <tr bgcolor="#999999"> 
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td width="15" class="text" height="1"></td>
          <td width="15" class="text" height="1"></td>
        </tr>
        <%
		}
%>
      </table>
    </td>
  </tr>
  <tr> 
    <td bgcolor="#EFEFEF">&nbsp;</td>
  </tr>
  <tr> 
    <td bgcolor="#EFEFEF"> 
      <table width="98%" border="0" align="center">
        <tr bgcolor="#666666"> 
          <td class="header" colspan="9" height="25">Finished Tasks</td>
        </tr>
        <tr bgcolor="#FAFAFA"> 
          <td class="nav" width="200">Description</td>
          <td class="nav" width="70">Duration</td>
          <td class="nav" width="50">Status</td>
          <td class="nav" width="60">Priority</td>
          <td class="nav" width="100">Start</td>
          <td class="nav" width="100">End</td>
          <td class="nav" width="200">Creator</td>
          <td width="15">&nbsp;</td>
          <td width="15">&nbsp;</td>
        </tr>
        <%
		Vector vfin = ses.getUser().getFinishedTasks();
		for(int i=0; i<vfin.size(); i++)
		{
			Task t = (Task) vfin.elementAt(i);
			Project p = new Project();
			p.get(t.getProject());
			String image = "n/a";
			if(t.getPrio().equals("low"))
				image = "<img src=\"../images/priolow.png\" alt=\"Low Priority\" border=\"0\">";
			else if(t.getPrio().equals("middle"))
				image = "<img src=\"../images/priomiddle.png\" alt=\"Middle Priority\" border=\"0\">";
			else if(t.getPrio().equals("high"))
				image = "<img src=\"../images/priohigh.png\" alt=\"High Priority\" border=\"0\">";
			
%>
        <tr bgcolor="#FAFAFA" title="Project: <%=p.getName()%>"> 
          <td class="text" width="200"><%=t.getDescription()%></td>
          <td class="text" width="70"><%=t.getDuration()%> Day(s)</td>
          <td class="text" width="50"><%=t.getStatus()%> %</td>
          <td class="text" width="60"><%=image%></td>
          <td class="text" width="100"><%=app.dbDateToNormalDate(t.getStart())%></td>
          <td class="text" width="100"><%=app.dbDateToNormalDate(t.getEnd())%></td>
          <td class="text" width="200"><%=ses.getUser().getName(t.getCreator())%></td>
          <td width="15" class="text"> 
            <div align="center"><a href="task_view.jsp?view=<%=t.getLfdnr()%>"><img src="../images/Edit16.gif" width="16" height="16" alt="view this Task..." border="0"></a></div>
          </td>
          <td width="15" class="text"> 
            <div align="center"><a href="tasks.jsp?del=<%=t.getLfdnr()%>"><img src="../images/Delete16.gif" width="16" height="16" alt="delete this Task..." border="0"></a></div>
          </td>
        </tr>
        <tr bgcolor="#999999"> 
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td width="15" class="text" height="1"></td>
          <td width="15" class="text" height="1"></td>
        </tr>
        <%
		}
%>
      </table>
    </td>
  </tr>
  <tr> 
    <td bgcolor="#EFEFEF">&nbsp;</td>
  </tr>
  <tr> 
    <td bgcolor="#EFEFEF"> 
      <table width="98%" border="0" align="center">
        <tr bgcolor="#666666"> 
          <td class="header" colspan="9" height="25">Delegated Tasks</td>
        </tr>
        <tr bgcolor="#FAFAFA"> 
          <td class="nav" width="200">Description</td>
          <td class="nav" width="70">Duration</td>
          <td class="nav" width="50">Status</td>
          <td class="nav" width="60">Priority</td>
          <td class="nav" width="100">Start</td>
          <td class="nav" width="100">End</td>
          <td class="nav" width="200">Responsible</td>
          <td width="15">&nbsp;</td>
          <td width="15">&nbsp;</td>
        </tr>
        <%
		Vector vdel = ses.getUser().getDelegatedTasks();
		for(int i=0; i<vdel.size(); i++)
		{
			Task t = (Task) vdel.elementAt(i);
			Project p = new Project();
			p.get(t.getProject());
			String image = "n/a";
			if(t.getPrio().equals("low"))
				image = "<img src=\"../images/priolow.png\" alt=\"Low Priority\" border=\"0\">";
			else if(t.getPrio().equals("middle"))
				image = "<img src=\"../images/priomiddle.png\" alt=\"Middle Priority\" border=\"0\">";
			else if(t.getPrio().equals("high"))
				image = "<img src=\"../images/priohigh.png\" alt=\"High Priority\" border=\"0\">";
			
			String schrift = "text";
			if(t.getStatus().equals("100"))
				schrift = "text_finished";
			
%>
        <tr bgcolor="#FAFAFA" title="Project: <%=p.getName()%>"> 
          <td class="<%=schrift%>" width="200"><%=t.getDescription()%></td>
          <td class="<%=schrift%>" width="70"><%=t.getDuration()%> Day(s)</td>
          <td class="<%=schrift%>" width="50"><%=t.getStatus()%> %</td>
          <td class="<%=schrift%>" width="60"><%=image%></td>
          <td class="<%=schrift%>" width="100"><%=app.dbDateToNormalDate(t.getStart())%></td>
          <td class="<%=schrift%>" width="100"><%=app.dbDateToNormalDate(t.getEnd())%></td>
          <td class="<%=schrift%>" width="200"><%=ses.getUser().getName(t.getResponsible())%></td>
          <td width="15" class="text"> 
            <div align="center"><a href="task_view.jsp?view=<%=t.getLfdnr()%>"><img src="../images/Edit16.gif" width="16" height="16" alt="view this Task..." border="0"></a></div>
          </td>
          <td width="15" class="text"> 
            <div align="center"><a href="tasks.jsp?del=<%=t.getLfdnr()%>"><img src="../images/Delete16.gif" width="16" height="16" alt="delete this Task..." border="0"></a></div>
          </td>
        </tr>
        <tr bgcolor="#999999"> 
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td width="15" class="text" height="1"></td>
          <td width="15" class="text" height="1"></td>
        </tr>
        <%
		}
%>
      </table>
    </td>
  </tr>
  <tr> 
    <td bgcolor="#EFEFEF">&nbsp;</td>
  </tr>
  <tr> 
    <td bgcolor="#EFEFEF"> 
      <table width="98%" border="0" align="center">
        <tr bgcolor="#666666"> 
          <td class="header" colspan="9" height="25"> Tasks without Project</td>
        </tr>
        <tr bgcolor="#FAFAFA"> 
          <td class="nav" width="200">Description</td>
          <td class="nav" width="70">Duration</td>
          <td class="nav" width="50">Status</td>
          <td class="nav" width="60">Priority</td>
          <td class="nav" width="100">Start</td>
          <td class="nav" width="100">End</td>
          <td class="nav" width="200">Creator</td>
          <td width="15">&nbsp;</td>
          <td width="15">&nbsp;</td>
        </tr>
        <%
		Vector vtwp = ses.getUser().getTasksWithoutProjects();
		for(int i=0; i<vtwp.size(); i++)
		{
			Task t = (Task) vtwp.elementAt(i);
			Project p = new Project();
			p.get(t.getProject());
			String image = "n/a";
			if(t.getPrio().equals("low"))
				image = "<img src=\"../images/priolow.png\" alt=\"Low Priority\" border=\"0\">";
			else if(t.getPrio().equals("middle"))
				image = "<img src=\"../images/priomiddle.png\" alt=\"Middle Priority\" border=\"0\">";
			else if(t.getPrio().equals("high"))
				image = "<img src=\"../images/priohigh.png\" alt=\"High Priority\" border=\"0\">";
			
%>
        <tr bgcolor="#FAFAFA" title="Project: <%=p.getName()%>"> 
          <td class="text" width="200"><%=t.getDescription()%></td>
          <td class="text" width="70"><%=t.getDuration()%> Day(s)</td>
          <td class="text" width="50"><%=t.getStatus()%> %</td>
          <td class="text" width="60"><%=image%></td>
          <td class="text" width="100"><%=app.dbDateToNormalDate(t.getStart())%></td>
          <td class="text" width="100"><%=app.dbDateToNormalDate(t.getEnd())%></td>
          <td class="text" width="200"><%=ses.getUser().getName(t.getCreator())%></td>
          <td width="15" class="text"> 
            <div align="center"><a href="task_view.jsp?view=<%=t.getLfdnr()%>"><img src="../images/Edit16.gif" width="16" height="16" alt="view this Task..." border="0"></a></div>
          </td>
          <td width="15" class="text"> 
            <div align="center"><a href="tasks.jsp?del=<%=t.getLfdnr()%>"><img src="../images/Delete16.gif" width="16" height="16" alt="delete this Task..." border="0"></a></div>
          </td>
        </tr>
        <tr bgcolor="#999999"> 
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td class="text" height="1"></td>
          <td width="15" class="text" height="1"></td>
          <td width="15" class="text" height="1"></td>
        </tr>
        <%
		}
%>
      </table>
    </td>
  </tr>
  <tr> 
    <td bgcolor="#EFEFEF">&nbsp;</td>
  </tr>
  <tr> 
    <td> 
      <div align="center" class="copyright">WebProject Copyright 2003 - Jan Debertshaeuser</div>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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