-
Notifications
You must be signed in to change notification settings - Fork 3
/
nav.php
72 lines (66 loc) · 1.95 KB
/
nav.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
<link rel="stylesheet" href="style.css" />
<?php
if ($_SESSION['weed_table'] == "" || preg_match("/controller\.php|index\.php/", $_SERVER['SCRIPT_NAME'])){
$nav = array ("controller.php" => "All Tables",
"upload.php" => "Upload New File",
"manage_files.php" => "Manage Files",
"documentation.php" => "Help"
);
}
elseif (isset($copytwo) && $copytwo == true) {
$nav = array ("controller.php" => "All Tables",
"upload.php" => "Upload New File",
"view.php" => "View/Edit",
"print.php" => "Print View",
"copytwo.php" => "c.2",
"cloud.php" => "Keyword Cloud",
"graph.php" => "Graph",
"settings.php" => "Display Settings",
"csv.php?copytwo=true" => "Download c.2 CSV",
"documentation.php" => "Help"
);
}
else {
$nav = array ("controller.php" => "All Tables",
"upload.php" => "Upload New File",
"view.php" => "View/Edit",
"print.php" => "Print View",
"copytwo.php" => "c.2",
"cloud.php" => "Keyword Cloud",
"graph.php" => "Graph",
"settings.php" => "Display Settings",
"csv.php" => "Download CSV",
"documentation.php" => "Help"
);
}
$navlinks = "";
foreach ($nav as $link => $name) {
if ($link == "upload.php") {
if ($allow_uploads !== true) {
$class = 'class="turned-off"';
}
else { // if upload is turned on
$class = "";
}
}
elseif ($link == "manage_files.php") {
if ($allow_manage !== true) {
$class = 'class="turned-off"';
}
else { // if upload is turned on
$class = "";
}
}
else { $class = ""; }
$navlinks .= "<li $class><a href=\"$link\">$name</a></li>\n";
}
print "<ul id=\"navlinks\">$navlinks</ul>\n";
if (isset($debug) && ($debug == true)) {
print "<p>SESSION: ";
print(htmlentities(print_r ($_SESSION, true)));;
print "</p>";
print "<p>REQUEST: ";
print(htmlentities(print_r ($_REQUEST, true)));;
print "</p>";
}
?>