This repository has been archived by the owner on Aug 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
requirements.php
306 lines (299 loc) · 14.6 KB
/
requirements.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
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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<?php
include("session_call.php");
if (isset($_GET['uid']))
{
$uid = trim($_GET['uid']);
}
else
{
header("location: index.php");
//window.history.go(-1);
exit();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="images\icon.ico" rel="shortcut icon" />
<title>ACDSS | Client | Requirements</title>
<meta name="viewport" content="initial-scale = 1.0, maximum-scale = 1.0, user-scalable = no, width = device-width" />
<!--[if lt IE 9]><script type="text/javascript" src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<link type="text/css" rel="stylesheet" href="style.css" media="screen" />
<!--[if lte IE 7]><link type="text/css" rel="stylesheet" href="style.ie7.css" media="screen" /><![endif]-->
<link type="text/css" rel="stylesheet" href="style.responsive.css" media="all" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="script.js"></script>
<script type="text/javascript" src="script.responsive.js"></script>
<meta name="description" content="Description" />
<meta name="keywords" content="Keywords" />
</head>
<body><a name="top"></a>
<div id="art-main">
<?php
include("header.php");
echo '<p align="right"><font color="white" size="2">Current User: '.strtoupper($_SESSION['valid_username']).' </font></p>';
include("nav.php");
?>
<div class="art-sheet clearfix">
<div class="art-layout-wrapper clearfix">
<div class="art-content-layout">
<div class="art-content-layout-row">
<div class="art-layout-cell art-content clearfix">
<article class="art-post art-article">
<form action="upload.php" method="POST" target="_self" enctype="multipart/form-data">
<h2 class="art-postheader">Requirements</h2>
<div class="art-postcontent art-postcontent-0 clearfix">
<?php
include("connection.php");
$uid = $_GET['uid'];
$name = urldecode($_GET['name']);
$assistance = $_GET['assistance'];
$req_query = mysql_query("SELECT *, date_format(date, '%M %d, %Y %r') AS date FROM requirements WHERE uid='$uid' ") or die("Error in querying data.<br />".mysql_error());
if($req_query)
{
if(mysql_num_rows($req_query) > 0)
{
while($rec_query = mysql_fetch_array($req_query))
{
echo '<h4>Showing requirements of '.strtoupper($rec_query['username']).'</h4>';
echo '<table class="art-article" cellpadding="2" cellspacing="2" style="border:0;width:100%;">';
echo '<tbody>';
echo '<tr>';
echo '<td style="border:0;width:25%;">User ID</td>';
echo '<td style="border:0;">:</td>';
echo '<td style="border:0;">'.$rec_query['uid'].'</td>';
echo '</tr>';
echo '<tr>';
echo '<td style="border:0;width:25%;">Date of request</td>';
echo '<td style="border:0;">:</td>';
echo '<td style="border:0;">'.$rec_query['date'].'</td>';
echo '</tr>';
echo '<tr>';
echo '<td style="border:0;">Requested Assistance</td>';
echo '<td style="border:0;">:</td>';
echo '<td style="border:0;">'.$assistance.'</td>';
echo '</tr>';
echo '<tr><td style="border:0;"> </td></tr>';
if($assistance == 'Medical')
{
echo '<tr>';
echo '<td style="border:0;">Barangay Clearance /<br />Indigency Certificate</td>';
echo '<td style="border:0;">:</td>';
if($rec_query['brgy_clearance'] !="")
{
echo '<td style="border:0;"><a href="file.php?uid='.$uid.'&file=brgy_clearance"><img src="images/success.png" height="25" width="25"/></a></td>';
}
else
{
echo '<td style="border:0;"><img src="images/error.png" height="25" width="25"/></td>';
}
echo '</tr>';
echo '<tr><td style="border:0;"> </td></tr>';
echo '<tr>';
echo '<td style="border:0;">Voters ID /<br />COMELEC certificate</td>';
echo '<td style="border:0;">:</td>';
if($rec_query['comelec_voter'] !="")
{
echo '<td style="border:0;"><a href="file.php?uid='.$uid.'&file=comelec_voter"><img src="images/success.png" height="25" width="25"/></a></td>';
}
else
{
echo '<td style="border:0;"><img src="images/error.png" height="25" width="25"/></td>';
}
echo '</tr>';
echo '<tr><td style="border:0;"> </td></tr>';
echo '<tr>';
echo '<td style="border:0;">Clinical Abstract</td>';
echo '<td style="border:0;">:</td>';
if($rec_query['clinical_abstract'] !="")
{
echo '<td style="border:0;"><a href="file.php?uid='.$uid.'&file=clinical_abstract"><img src="images/success.png" height="25" width="25"/></a></td>';
}
else
{
echo '<td style="border:0;"><img src="images/error.png" height="25" width="25"/></td>';
}
echo '</tr>';
echo '<tr><td style="border:0;"> </td></tr>';
echo '<tr>';
echo '<td style="border:0;">Doctors Prescription</td>';
echo '<td style="border:0;">:</td>';
if($rec_query['doctors_prescription'] !="")
{
echo '<td style="border:0;"><a href="file.php?uid='.$uid.'&file=doctors_prescription"><img src="images/success.png" height="25" width="25"/></a></td>';
}
else
{
echo '<td style="border:0;"><img src="images/error.png" height="25" width="25"/></td>';
}
echo '</tr>';
echo '<tr><td style="border:0;"> </td></tr>';
echo '<tr>';
echo '<td style="border:0;">Hospital Bill</td>';
echo '<td style="border:0;">:</td>';
if($rec_query['doctors_prescription'] !="")
{
echo '<td style="border:0;"><a href="file.php?uid='.$uid.'&file=hosp_bill"><img src="images/success.png" height="25" width="25"/></a></td>';
}
else
{
echo '<td style="border:0;"><img src="images/error.png" height="25" width="25"/></td>';
}
echo '</tr>';
echo '<tr><td style="border:0;"> </td></tr>';
echo '<tr>';
echo '<td style="border:0;">Checkup Schedule</td>';
echo '<td style="border:0;">:</td>';
if($rec_query['doctors_prescription'] !="")
{
echo '<td style="border:0;"><a href="file.php?uid='.$uid.'&file=checkup_sched"><img src="images/success.png" height="25" width="25"/></a></td>';
}
else
{
echo '<td style="border:0;"><img src="images/error.png" height="25" width="25"/></td>';
}
echo '</tr>';
echo '<tr><td style="border:0;"> </td></tr>';
}
elseif($assistance == 'Burial')
{
echo '<tr>';
echo '<td style="border:0;">Barangay Clearance /<br />Indigency Certificate</td>';
echo '<td style="border:0;">:</td>';
if($rec_query['brgy_clearance'] !="")
{
echo '<td style="border:0;"><a href="file.php?uid='.$uid.'&file=brgy_clearance"><img src="images/success.png" height="25" width="25"/></a></td>';
}
else
{
echo '<td style="border:0;"><img src="images/error.png" height="25" width="25"/></td>';
}
echo '</tr>';
echo '<tr><td style="border:0;"> </td></tr>';
echo '<tr>';
echo '<td style="border:0;">Voters ID /<br />COMELEC certificate</td>';
echo '<td style="border:0;">:</td>';
if($rec_query['comelec_cert'] !="")
{
echo '<td style="border:0;"><a href="file.php?uid='.$uid.'&file=comelec_cert"><img src="images/success.png" height="25" width="25"/></a></td>';
}
else
{
echo '<td style="border:0;"><img src="images/error.png" height="25" width="25"/></td>';
}
echo '</tr>';
echo '<tr><td style="border:0;"> </td></tr>';
echo '<tr>';
echo '<td style="border:0;">Death Certificate</td>';
echo '<td style="border:0;">:</td>';
if($rec_query['death_cert'] !="")
{
echo '<td style="border:0;"><a href="file.php?uid='.$uid.'&file=death_cert"><img src="images/success.png" height="25" width="25"/></a></td>';
}
else
{
echo '<td style="border:0;"><img src="images/error.png" height="25" width="25"/></td>';
}
echo '</tr>';
echo '<tr><td style="border:0;"> </td></tr>';
echo '<tr>';
echo '<td style="border:0;">Funeral Contract</td>';
echo '<td style="border:0;">:</td>';
if($rec_query['death_cert'] !="")
{
echo '<td style="border:0;"><a href="file.php?uid='.$uid.'&file=funeral_contract"><img src="images/success.png" height="25" width="25"/></a></td>';
}
else
{
echo '<td style="border:0;"><img src="images/error.png" height="25" width="25"/></td>';
}
echo '</tr>';
echo '<tr><td style="border:0;"> </td></tr>';
}
elseif($assistance == 'Financial')
{
echo '<tr>';
echo '<td style="border:0;">Barangay Clearance /<br />Indigency Certificate</td>';
echo '<td style="border:0;">:</td>';
if($rec_query['brgy_clearance'] !="")
{
echo '<td style="border:0;"><a href="file.php?uid='.$uid.'&file=brgy_clearance"><img src="images/success.png" height="25" width="25"/></a></td>';
}
else
{
echo '<td style="border:0;"><img src="images/error.png" height="25" width="25"/></td>';
}
echo '</tr>';
echo '<tr><td style="border:0;"> </td></tr>';
echo '<tr>';
echo '<td style="border:0;">Voters ID /<br />COMELEC certificate</td>';
echo '<td style="border:0;">:</td>';
if($rec_query['brgy_clearance'] !="")
{
echo '<td style="border:0;"><a href="file.php?uid='.$uid.'&file=comelec_cert"><img src="images/success.png" height="25" width="25"/></a></td>';
}
else
{
echo '<td style="border:0;"><img src="images/error.png" height="25" width="25"/></td>';
}
echo '</tr>';
echo '<tr><td style="border:0;"> </td></tr>';
}
echo '<tr>';
echo '<td style="border:0;">Valid ID</td>';
echo '<td style="border:0;">:</td>';
if($rec_query['valid_id'] !="")
{
echo '<td style="border:0;"><a href="file.php?uid='.$uid.'&file=valid_id"><img src="images/success.png" height="25" width="25"/></a></td>';
}
else
{
echo '<td style="border:0;"><img src="images/error.png" height="25" width="25"/></td>';
}
echo '</tr>';
echo '<tr><td style="border:0;"> </td></tr>';
echo '<tr>';
echo '<td style="border:0;">Photo</td>';
echo '<td style="border:0;">:</td>';
if($rec_query['valid_id'] !="")
{
echo '<td style="border:0;"><a href="file.php?uid='.$uid.'&file=pic"><img src="images/success.png" height="25" width="25"/></a></td>';
}
else
{
echo '<td style="border:0;"><img src="images/error.png" height="25" width="25"/></td>';
}
echo '</tr>';
echo '</tbody>';
echo '</table>';
echo '<br />';
echo '<input type="button" name="return" value="Back" onclick="window.history.go(-1);" class="art-button" />';
echo ' ';
if($_SESSION['valid_type'] == 'CSWD')
{
echo '<input type="submit" name="update" value="Update" class="art-button" />';
echo '<input type="hidden" name="name" value="'.$name.'" class="art-button" />';
echo '<input type="hidden" name="uid" value="'.$uid.'" class="art-button" />';
echo '<input type="hidden" name="assistance" value="'.$assistance.'" class="art-button" />';
}
}
}
else
echo 'No records found.';
}
else
echo 'Trouble in fetching data.';
?>
</div>
</form>
</article>
</div>
</div>
</div>
</div>
<hr /><?php include("footer.php"); ?>
</div><br />
</div>
</body>
</html>