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

📄 task_new.jsp

📁 jwp是 JSP WebProject的简写。它是一个基于Web的应用程序。它编写的方式是JSP/Java+Mysql.主要的功能是管理项目、任务、命令、用户、报告、文档。这个程序对学生管理自己的程序
💻 JSP
字号:
<%@ include file="../WEB-INF/include/header.jsp" %>
<%
	if(request.getParameter("GO") != null)
	{
		Task t = new Task();
		t.setDescription(request.getParameter("TF_DESCR"));
		t.setComment(request.getParameter("TF_COMMENT"));
		t.setDuration(request.getParameter("TF_DUR"));
		t.setStatus(request.getParameter("TF_STATUS"));
		t.setPrio(request.getParameter("TF_PRIO"));
		t.setStart(request.getParameter("TF_START"));
		t.setEnd(request.getParameter("TF_END"));
		t.setCreator(usernr);
		t.setResponsible(request.getParameter("TF_RESP"));
		t.setProject(request.getParameter("TF_PROJECT"));
		t.insert();
		response.sendRedirect(response.encodeRedirectURL("tasks.jsp"));
	}
	
	if(request.getParameter("CANCEL") != null)
		response.sendRedirect(response.encodeRedirectURL("tasks.jsp"));
%>
<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">
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
</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 class="header" height="25" bgcolor="#666666">&nbspnew Task</td>
  </tr>
  <tr> 
    <td bgcolor="#EFEFEF">&nbsp;</td>
  </tr>
  <tr> 
    <td bgcolor="#EFEFEF"> 
      <form name="form1" method="post" action="">
        <table width="95%" border="0" align="center">
          <tr> 
            <td width="15%" class="text_bold">Project:</td>
            <td width="35%"> 
              <select name="TF_PROJECT" class="text">
                <option value="0" selected>- choose Project - </option>
                <%
				Vector vprojects = ses.getUser().getAvailableProjects();
				for(int i=0; i<vprojects.size(); i++)
				{
					Project p = (Project) vprojects.elementAt(i);
%>
                <option value="<%=p.getLfdnr()%>"><%=p.getName()%></option>
                <%
				}
%>
              </select>
            </td>
            <td width="15%" class="text_bold">&nbsp;</td>
            <td width="35%">&nbsp;</td>
          </tr>
          <tr> 
            <td width="15%" class="text_bold">Creator:</td>
            <td width="35%" class="text"><%=username%></td>
            <td width="15%" class="text_bold">Responsible:</td>
            <td width="35%"> 
              <select name="TF_RESP" class="text">
                <option value="0">- Projectmanager -</option>
                <%
		Vector v = ses.getUsers();
		for(int i=0; i<v.size(); i++)
		{
			String selected = "";
			User u = (User) v.elementAt(i);
			if(u.getNr().equals(usernr))
				selected = "selected";
%>
                <option value="<%=u.getNr()%>" <%=selected%>><%=u.getFirst()%> 
                <%=u.getLast()%></option>
                <%
		}
%>
              </select>
            </td>
          </tr>
          <tr> 
            <td width="15%" class="text_bold">Description:</td>
            <td width="35%"> 
              <input type="text" name="TF_DESCR" size="30" maxlength="255" class="text">
            </td>
            <td width="15%" class="text_bold">Duration:</td>
            <td width="35%"> 
              <input type="text" name="TF_DUR" size="5" maxlength="3" class="text">
              <span class="text">Day(s) </span></td>
          </tr>
          <tr> 
            <td width="15%" class="text_bold" valign="top">Comment:</td>
            <td colspan="3"> 
              <textarea name="TF_COMMENT" cols="100" class="text" rows="6"></textarea>
            </td>
          </tr>
          <tr> 
            <td width="15%" class="text_bold" valign="middle">Status:</td>
            <td width="35%"> 
              <select name="TF_STATUS" class="text">
                <option value="0" selected>0</option>
                <option value="10" >10</option>
                <option value="20" >20</option>
                <option value="30" >30</option>
                <option value="40" >40</option>
                <option value="50" >50</option>
                <option value="60" >60</option>
                <option value="70" >70</option>
                <option value="80" >80</option>
                <option value="90" >90</option>
                <option value="100">100</option>
              </select>
              <span class="text">% </span></td>
            <td width="15%" class="text_bold">Priority:</td>
            <td width="35%"> 
              <select name="TF_PRIO" class="text">
                <option value="low">low</option>
                <option value="middle" selected>middle</option>
                <option value="high">high</option>
              </select>
            </td>
          </tr>
          <tr> 
            <td width="15%" class="text_bold" valign="middle">Start:</td>
            <td width="35%"> 
              <input type="text" name="TF_START" size="15" maxlength="12" class="text">
              <a href="#"><img src="../images/view_multicolumn.png" width="22" height="22" onClick="MM_openBrWindow('kalender.jsp?formname=form1&amp;fieldname=TF_START','CAL','resizable=yes,width=250,height=250')" border="0"></a> 
            </td>
            <td width="15%" class="text_bold">End:</td>
            <td width="35%"> 
              <input type="text" name="TF_END" size="15" maxlength="12" class="text">
              <a href="#"><img src="../images/view_multicolumn.png" width="22" height="22" onClick="MM_openBrWindow('kalender.jsp?formname=form1&amp;fieldname=TF_END','CAL','resizable=yes,width=250,height=250')" border="0"></a></td>
          </tr>
          <tr> 
            <td width="15%" class="text_bold">&nbsp;</td>
            <td width="35%"> 
              <input type="submit" name="GO" value="Save" class="text">
              <input type="submit" name="CANCEL" value="Cancel" class="text">
            </td>
            <td width="15%" class="text_bold">&nbsp;</td>
            <td width="35%">&nbsp; </td>
          </tr>
        </table>
      </form>
    </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 + -