-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaddprogrambaseline.jsp
More file actions
79 lines (66 loc) · 3.43 KB
/
Copy pathaddprogrambaseline.jsp
File metadata and controls
79 lines (66 loc) · 3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body { color: black; font-family: arial; font-size: 11px}
h1 { color: black; font-family: arial; font-size: 16px}
</style>
</head>
<%-- PPPM.ORG, the OpenSource PPM (Portfolio, Project and Program management) system --%>
<%-- Copyright (C) 2012 Olivier Moulin --%>
<%-- This program is free software: you can redistribute it and/or modify --%>
<%-- it under the terms of the GNU General Public License as published by --%>
<%-- the Free Software Foundation, version 3 of the License. --%>
<%-- This program is distributed in the hope that it will be useful, --%>
<%-- but WITHOUT ANY WARRANTY; without even the implied warranty of --%>
<%-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --%>
<%-- GNU General Public License for more details. --%>
<%-- You should have received a copy of the GNU General Public License --%>
<%-- along with this program. If not, see http://www.gnu.org/licenses/. --%>
<%@ page import = "java.sql.*" %>
<%@ page import = "java.util.*" %>
<%@ page import = "javax.sql.*" %>
<%@ page import = "javax.naming.*" %>
<%@ page import = "javax.servlet.*" %>
<%@ page import = "javax.servlet.http.*" %>
<body>
<%
// session attributes
String Userlogin = (String)session.getAttribute("LOGIN");
if (Userlogin==null) {
out.print("<script language=\"JavaScript\">");
out.print("top.location='index.jsp?TIMEOUT=TRUE';");
out.print("</script>");
} else {
String POOLNAME=(String)session.getAttribute("POOLNAME");
// database connection
Context initCtx = new InitialContext();
DataSource ds = (DataSource) initCtx.lookup("java:comp/env/jdbc/"+POOLNAME);
Connection Conn = ds.getConnection();
// JSP parameters
String act = request.getParameter("TODO");
String ID = request.getParameter("ID");
String PROGRAMID = request.getParameter("PROGRAMID");
out.print("<center><strong><h1>Add baseline</h1></strong></center><hr>");
out.print("<form name=\"formFILTER\" method=\"post\" action=\"programplanning.jsp?TODO=BASELINE&PROGRAMID="+PROGRAMID+"\" target=\"_top\">");
out.print("<table>");
Statement STR01 = Conn.createStatement();
String QR01 = "SELECT * FROM PROGRAM WHERE ID='"+PROGRAMID+"'";
ResultSet R01 = STR01.executeQuery(QR01);
if (R01.next()) {
out.print("<tr><td>Baseline name : </td><td><input name=\"NAME\" type=\"text\" size=\"50\" value=\"BASELINE FOR "+R01.getString("NAME")+"\"></td></tr>");
out.print("<tr><td>Program name: </td><td>"+R01.getString("NAME")+"</td></tr>");
}
STR01.close();
out.print("<tr><td><H1>Are you sure that you want to add the current planning as a baseline??</H1></td><td> </td></tr>");
out.print("<tr><td> </td><td><input type=\"submit\" name=\"Save\" value=\"Add baseline\">");
out.print("<input type=button onClick=\"location.href='programplanning.jsp?TODO=NONE&PROGRAMID="+PROGRAMID+"'\" value='Cancel'></td></tr>");
out.print("</table>");
out.print("</form>");
Conn.close();
}
%>
</body>
</html>