-
Notifications
You must be signed in to change notification settings - Fork 0
/
view.php
executable file
·226 lines (210 loc) · 9.83 KB
/
view.php
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<?php
$requestId = $_GET['requestId'];
require_once('php/connect.php');
$conn = db_connect();
$query = $conn->query("SELECT * FROM signoff_project_requests WHERE requestId = $requestId");
$result = $query->fetch_array(MYSQLI_ASSOC);
$fileQuery = $conn->query("SELECT filepath FROM signoff_files WHERE requestId = $requestId");
$fileQueryResult = $fileQuery->fetch_array(MYSQLI_ASSOC);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="favicon.ico">
<title>Sign-off - View Request</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap theme -->
<link href="css/bootstrap-theme.min.css" rel="stylesheet">
<!-- Bootstrap select theme -->
<link href="css/bootstrap-select.min.css" rel="stylesheet">
<link rel="icon" href="images/grey-favicon.png" type="image/png">
<!-- Custom styles for this template -->
<!--<link href="theme.css" rel="stylesheet">-->
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body role="document">
<style>
body {
padding-top: 10px;
padding-bottom: 10px;
}
</style>
<div class="container" style='max-width: 800px;'>
<div class='row'>
<p style='text-align: center;'><img src='images/PMOLogo.jpg' height=100/></p>
</div>
<div class='row'>
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">Request Information (#<?php echo(urldecode($result["requestId"])); ?>)</h3></div>
<div class="panel-body">
<?php
if ($result["status"] == "Pending") {
echo("<div class='alert alert-info' role='alert'>This request is currently <strong>pending.</strong></div>");
}
if ($result["status"] == "Received") {
echo("<div class='alert alert-success' role='alert'>Sign-off was <strong>received</strong> by <strong>".urldecode($result['reqFullName'])."</strong> on <strong>".date('M j Y g:i A', strtotime($result['submitDate']))."</strong></div>");
}
if ($result["status"] == "Declined") {
echo("<div class='alert alert-danger' role='alert'>Sign-off was <strong>declined</strong> by <strong>".urldecode($result['reqFullName'])."</strong> on <strong>".date('M j Y g:i A', strtotime($result['submitDate']))."</strong></div>");
}
?>
<table style="margin-bottom:14px;">
<tr>
<td style='padding: 3px;'><strong>Project Name:</strong></td>
<td style='padding: 3px;'><?php echo(urldecode($result['projectName'])); ?></td>
</tr>
<tr>
<td style='padding: 3px;'><strong>Project Owner:</strong></td>
<td style='padding: 3px;'><?php echo(urldecode($result['projectOwner'])); ?></td>
</tr>
<tr>
<?php
if ($result['typeOfWork'] == "project" || $result['typeOfWork'] == "req") {
echo("<td style='padding: 3px;'><strong>Project ID:</strong></td>");
echo("<td style='padding: 3px;'>" . urldecode($result['projectId']) . "</td>");
}
if ($result['typeOfWork'] == "ticket") {
echo("<td style='padding: 3px;'><strong>Ticket:</strong></td>");
echo("<td style='padding: 3px;'>TICK:" . urldecode($result['ticketNumber']) . "</td>");
}
?>
</tr>
<tr>
<td style='padding: 3px;'><strong>Sprint:</strong></td>
<td style='padding: 3px;'><?php echo(urldecode($result['sprint'])); ?></td>
</tr>
<tr>
<td style='padding: 3px;'><strong>Requested By:</strong></td>
<td style='padding: 3px;'><?php echo(urldecode($result['authorFullName'])); ?></td>
</tr>
<tr>
<td style='padding: 3px;'><strong>Sent To:</strong></td>
<td style='padding: 3px;'><?php echo(urldecode($result['reqFullName'])); ?></td>
</tr>
<tr>
<td style='padding: 3px;'><strong>Request Date:</strong></td>
<td style='padding: 3px;'><?php echo date('M j Y g:i A', strtotime($result['requestDate'])); ?></td>
</tr>
<?php if ($result["status"] == "Pending") { ?>
<tr>
<td style='padding: 3px;'><strong>Get link:</strong></td>
<td style='padding: 3px;'>
<input id="get-signoff-link" class="form-control input-sm" type="text" value="https://signoff.pugetsound.edu/respond.php?requestId=<?php echo $result['requestId']?>" style="width:450px;" selected="selected">
</td>
<tr>
<?php }?>
</table>
<?php
if ($result['ticketNumber'] != "") {
echo("<a class='btn btn-info' target='_blank' href='https://kbox.pugetsound.edu/adminui/ticket?ID=" . urldecode($result['ticketNumber']) . "'>KBOX TICK:" . urldecode($result['ticketNumber']) ."</a>");
}
if ($result['soundNetLink'] != "") {
echo("<a class='btn btn-info' href='" . urldecode($result['soundNetLink']) . "' target='_blank'>Google Drive Project Folder</a>");
}
if ($result['liquidPlannerLink'] != "") {
echo("<a style='margin: 3px;' class='btn btn-info' href='" . urldecode($result['liquidPlannerLink']) . "' target='_blank'>LiquidPlanner Project</a>");
}
if ($fileQueryResult['filepath'] != ""){
$filePathFound = $fileQueryResult['filepath'];
echo("<a style='margin: 3px;' class='btn btn-primary' target='_blank' href='php/downloadFile.php?filepath=$filePathFound'>File:" . basename($filePathFound) ."</a>");
}
?>
</div>
</div>
</div>
<div class='row' <?php if ($result['typeOfWork'] != 'req') {echo("style='display: none';");} ?>>
<div class="panel panel-default">
<div class="panel-heading"><h3 class='panel-title'>Review Requirements or Documentation</h3></div>
<div class='panel-body'>
<p>Please review these documents or requirements by following this link: <?php echo("<a href='" . urldecode($result['soundNetLink']) . "' target='_blank'>" . urldecode($result['projectName']) . "</a>") ?></p>
</div>
</div>
</div>
<div class='row' <?php if ($result['typeOfWork'] == 'req') {echo("style='display: none';");} ?>>
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">Summary of Work Completed</h3></div>
<div class="panel-body">
<table>
<tr>
<td style='padding: 3px;'><strong>App Designer Projects:</strong></td>
<td style='padding: 3px;'><?php echo(urldecode($result['appDesignerProjs'])); ?></td>
</tr>
<tr>
<td style='padding: 3px;'><strong>PL/SQL Objects:</strong></td>
<td style='padding: 3px;'><?php echo(urldecode($result['plsqlObjects'])); ?></td>
</tr>
<tr>
<td style='padding: 3px;'><strong>Other Objects:</strong></td>
<td style='padding: 3px;'><?php echo(urldecode($result['otherObjects'])); ?></td>
</tr>
<tr>
<td style='padding: 3px;'><strong>Work Summary:</strong></td>
<td style='padding: 3px;'><?php echo(nl2br(urldecode($result['sumWorkCompleted']))); ?></td>
</tr>
</table>
</div>
</div>
</div>
<div class='row' <?php if ($result['typeOfWork'] == 'req') {echo("style='display: none';");} ?>>
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">Testing Information</h3></div>
<div class="panel-body">
<p style="padding: 15px;">
<?php
if ($result['proofTesting'] == "") {
echo("<em>Sign-off is still pending or testing is incomplete.</em>");
} else {
echo(nl2br(urldecode($result['proofTesting'])));
}
?>
</p>
</div>
</div>
</div>
<div class='row'>
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">Additional Comments</h3></div>
<div class="panel-body">
<p style="padding: 15px;">
<?php
if ($result['additionalComments'] == "") {
echo("<em>None provided.</em>");
} else {
echo(nl2br(urldecode($result['additionalComments'])));
}
?>
</p>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function() {
$("#get-signoff-link").select();
$("#get-signoff-link").on('click', function() {
$(this).select();
});
});
</script>
<!--<script src="js/docs.min.js"></script> -->
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<!--<script src="js/ie10-viewport-bug-workaround.js"></script>-->
</body>
</html>