-
Notifications
You must be signed in to change notification settings - Fork 3
/
public_holiday_list.php
executable file
·57 lines (42 loc) · 1.09 KB
/
public_holiday_list.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
<?
require ("settings.php");
$OUTPUT = show_listing ();
require ("template.php");
function show_listing ()
{
db_connect ();
$get_list = "SELECT * FROM public_holidays ORDER BY holiday_date";
$run_list = db_exec($get_list) or errDie("Unable to get public holiday list.");
if(pg_numrows($run_list) < 1){
$listing = "<tr class='".bg_class()."'><td colspan='4'>No Public Holidays Have Been Added.</td></tr>";
}else {
$listing = "";
while ($parr = pg_fetch_array($run_list)){
$listing .= "
<tr class='".bg_class()."'>
<td>$parr[holiday_name]</td>
<td>$parr[holiday_type]</td>
<td>$parr[holiday_date]</td>
<td><a href='public_holiday_rem.php?id=$parr[id]'>Remove</a></td>
</tr>
";
}
}
$display = "
<h2>Public Holiday Listing</h2>
<table ".TMPL_tblDflts.">
<tr><td><br></td></tr>
<tr>
<th>Holiday Name</th>
<th>Holiday Type</th>
<th>Holiday Date</th>
<th>Options</th>
</tr>
$listing
</table><br>"
.mkQuickLinks(
ql("public_holiday_add.php", "Add Public Holiday")
);
return $display;
}
?>