-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcalendar_file_selector.php
More file actions
39 lines (37 loc) · 1.31 KB
/
calendar_file_selector.php
File metadata and controls
39 lines (37 loc) · 1.31 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
<?php
if ($INSTRUCTOR && !empty($other)) {
echo "<table class='table table-striped table-bordered'>";
echo "<thead>";
echo "";
echo "<tr><th rowspan=2>Type</th><th rowspan=2>Category</th><th rowspan=2>File</th><th colspan=5>Security</th><th rowspan=2>View / Edit<br>HTML</th></tr>";
echo "<tr><th>Visible</th><th>Month</th><th>Day</th><th>Year</th><th>Dynamic</th></tr>";
echo "</thead>";
echo "<tbody>";
foreach ($other as $fn => $value) {
$link = "calendar.php?key=".$value['key'];
if (isset($_REQUEST['type'])) {
$link .= '&type=' . $_REQUEST['type'];
}
if (isset($_REQUEST['event'])) {
$link .= '&event=' . $_REQUEST['event'];
}
echo "<tr><td>".$value['type']."</td>";
echo "<td>".$value['category']."</td>";
echo "<td><a href='$link'>$fn</a></td>";
echo "<td>".$value['visible']."</td>";
echo "<td>".$value['month']."</td>";
echo "<td>".$value['day']."</td>";
echo "<td>".$value['year']."</td>";
echo "<td>".$value['dynamic']."</td>";
$link .='&edit=1';
$ext = pathinfo($fn, PATHINFO_EXTENSION);
if ($ext == 'htm' || $ext == 'html') {
echo "<td><a href='$link'>view</a></td>";
} else {
echo "<td></td>";
}
echo "</tr>";
}
echo "</table>";
}
?>