-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactivity_e1_psc.php
More file actions
286 lines (207 loc) · 7.54 KB
/
activity_e1_psc.php
File metadata and controls
286 lines (207 loc) · 7.54 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
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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<?php
session_start();
if (isset($_SESSION['user'])) {
if ((time() - $_SESSION['last_time']) > 1200) {
header("location:logout.php");
}else{
$_SESSION['last_time'] = time();
}
}else{
header("Location:Index.php");
}
?>
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
<title>EDP&RD File Monitoring System</title>
<style type="text/css">
</style>
</head>
<body style="text-align: center;">
<img src="images/arms.jpg">
<p id="republic">THE REPUBLIC OF UGANDA</p>
<h1>EDP&RD FILE MONITORING SYSTEM</h1>
<h2>MINISTRY OF FINANCE, PLANNING AND ECONOMIC DEVELOPMENT</h2>
<h2>ECONOMIC DEVELOPMENT POLICY AND RESEARCH DEPARTMENT (EDP&RD)</h2>
<!--<h3>TAX POLICY DEPARTMENT FILE SYSTEM (TPDFS)</h3>-->
<?php
include ("hor_nav_e1_psc.php");
if ($_SESSION['user'] == true) {
echo "<i>You are logged in as "."<label style='text-decoration: underline;'><b>".$_SESSION['user']."</b></label></i>";
}else{
header("Location:Index.php");
}
?>
<br><br>
<section style=" background: #142634; color: #fff;"><br>
Sending file in progress....
<script type="text/javascript">
//var due_date = document.getElementById("auto_Id").value;
</script>
<?php
$dbConnect = mysqli_connect('localhost', 'root', 'ak_94*jmv', 'edpr');
$searchId = $_GET['searchId'];
$search = htmlspecialchars($searchId, ENT_QUOTES, 'UTF-8');
$search_Query = "SELECT serialno, refno, file_origin, subject FROM e1_psc_edpr WHERE serialno='$search'";
$search_result=mysqli_query($dbConnect, $search_Query);
$row=mysqli_fetch_array($search_result);
?>
<form name="frm" action="" method="post" enctype="">
<!--Sending a file-->
<select name="sender" id="senderid" required="required" style="width: 220px; height: 40px;">
<option name="from">From..</option>
<option>E1/PSC</option>
</select>
<select id="deliver" name="receiver" required="required" class="headings" style="width: 220px; height: 40px;">
<?php
$sql = "SELECT titles FROM edpr_members";
$result = mysqli_query($dbConnect, $sql);
while ($row1 = mysqli_fetch_array($result)):;?>
<option value="<?php echo $row1[0];?>">
<?php echo $row1[0];?>
</option>
<?php endwhile;?>
<?php
//Top bosses
if ($_POST['receiver'] == 'Ag. C/EDP&RD') {
include 'sent_files_e1_comm.php';//done//done
}
if ($_POST['receiver'] == 'Ag. AC/EDP&RD') {
include 'sent_files_e1_ass_comm.php';//done//done
}
if ($_POST['receiver'] == 'SEC/EDP&RD ') {
include 'sent_files_e1_sec_edpr.php';//done//done
}
//Private Sector Competitiveness (PSC) Section
if ($_POST['receiver'] == 'PE/PSC') {
include 'sent_files_e1_pe_psc.php';//done//done
}
if ($_POST['receiver'] == 'SE/PSC') {
include 'sent_files_e1_se_psc.php';//done//done
}
if ($_POST['receiver'] == 'E1/PSC') {
echo "<script type='text/javascript'>
window.alert('Cannot send a file to yourself');</script>
";
}
if ($_POST['receiver'] == 'E2/PSC') {
include 'sent_files_e1_e2_psc.php';//done//done
}
if ($_POST['receiver'] == 'E3/PSC') {
include 'sent_files_e1_e3_psc.php';//done//done
}
if ($_POST['receiver'] == 'RE1/PSC') {
include 'sent_files_e1_re1_psc.php';//done//done
}
if ($_POST['receiver'] == 'RE2/PSC') {
include 'sent_files_e1_re2_psc.php';//done//done
}
if ($_POST['receiver'] == 'RA/PSC') {
include 'sent_files_e1_ra_psc.php';//done//done
}
//Development Policy Analysis (DPA) Section
if ($_POST['receiver'] == 'SE1/DPA') {
include 'sent_files_e1_se1_dpa.php';//done//done
}
if ($_POST['receiver'] == 'SE2/DPA') {
include 'sent_files_e1_se2_dpa.php';//done//done
}
if ($_POST['receiver'] == 'E1/DPA') {
include 'sent_files_e1_e1_dpa.php';//done//done
}
if ($_POST['receiver'] == 'E2/DPA') {
include 'sent_files_e1_e2_dpa.php';//done//done
}
if ($_POST['receiver'] == 'RE/DPA') {
include 'sent_files_e1_re_dpa.php';//done//done
}
if ($_POST['receiver'] == 'RA/DPA') {
include 'sent_files_e1_ra_dpa.php';//done//done
}
//Micro Policy Analysis (MPA) Section
if ($_POST['receiver'] == 'SE/MPA') {
include 'sent_files_e1_se_mpa.php';//done//done
}
if ($_POST['receiver'] == 'E1/MPA') {
include 'sent_files_e1_e1_mpa.php';//done//done
}
if ($_POST['receiver'] == 'E2/MPA') {
include 'sent_files_e1_e2_mpa.php';//done//done
}
if ($_POST['receiver'] == 'E3/MPA') {
include 'sent_files_e1_e3_mpa.php';//done//done
}
if ($_POST['receiver'] == 'GE/MPA') {
include 'sent_files_e1_ge_mpa.php';//done//done
}
if ($_POST['receiver'] == 'RE/MPA') {
include 'sent_files_e1_re_mpa.php';//done//done
}
//Private Sector Development Unit (PSDU)
if ($_POST['receiver'] == 'H/PSDU') {
include 'sent_files_e1_h_psdu.php';//done//done
}
if ($_POST['receiver'] == 'SCA/PSDU') {
include 'sent_files_e1_sca_psdu.php';//done//done
}
if ($_POST['receiver'] == 'MRP/PSDU') {
include 'sent_files_e1_mrp_psdu.php';//done//done
}
if ($_POST['receiver'] == 'MEGD/PSDU') {
include 'sent_files_e1_megd_psdu.php';//done//done
}
if ($_POST['receiver'] == 'M&E/PSDU') {
include 'sent_files_e1_me_psdu.php';//done//done
}
if ($_POST['receiver'] == 'SEC/PSDU') {
include 'sent_files_e1_sec_psdu.php';//done//done
}
?>
</select>
<script type="text/javascript">
function val(){
var s1 = document.getElementById("senderid").value;
var s2 = document.getElementById("deliver").value;
if (s1 == "From..") {
alert("Please select sender");
return false;
}
else if (s2 == "To..") {
alert("Please select receiver");
return false;
}
else if (s2 == "Private Sector Competitiveness (PSC) Section") {
alert("Please select receiver");
return false;
}
else if (s2 == "Development Policy Analysis (DPA) Section") {
alert("Please select receiver");
return false;
}
else if (s2 == "Private Sector Development Unit (PSDU)") {
alert("Please select receiver");
return false;
}
else if (s2 == "Micro Policy Analysis (MPA) Section") {
alert("Please select receiver");
return false;
}
else{
return true;
}
}
</script>
<br><br>
<textarea type="text" cols="40" rows="6" placeholder="Action (Optional)" name="action" style="width: 342px; height: 97px;"></textarea><br><br>
<span style="margin-left: -4px;">Due days:</span><input type="date" id="auto_Id" name="due_days" placeholder="Set due days" style="width: 220px; height: 40px;">
<input type="submit" id="btn" onclick="return val()" name="createbtn" value="Send file" style="width: 185px; height: 45px;"><br>
<br>File details<br>
<!--file details-->
<input type="text" name="fileno" required onkeypress="return false;" placeholder="File No" value="<?php echo $row[0];?>" style="width: 220px; height: 40px;">
<input type="text" name="refno" required onkeypress="return false;" placeholder="Ref No" value="<?php echo $row[1];?>" style="width: 220px; height: 40px;"><br><br>
<input type="text" name="origin" required onkeypress="return false;" placeholder="Origin" value="<?php echo $row[2];?>" style="width: 220px; height: 40px;">
<input type="text" name="subject" required onkeypress="return false;" placeholder="Subject" value="<?php echo $row[3];?>" style="width: 220px; height: 40px;"><br><br>
</form>
</body>
</html>