-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathframeMngtMenu.php
67 lines (59 loc) · 2.07 KB
/
frameMngtMenu.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
<?php
require("sessionCheck.php");
require("config.php");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Patrik Carlsson">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<title>Root</title>
</head>
<?
print $pageStyle;
?>
<h2><u><? print $projectName . " - Member"; ?></u></h2>
<hr>
<ul>
<?
$Connect = mysqli_connect($DB_SERVER, $user, $password) or die ("Cant connect to MySQL at $DB_SERVER");
mysqli_select_db($DATABASE,$Connect) or die ("Cant connect to $DATABASE database");
$sql_question="SELECT * FROM mainmenu WHERE accesslevel <= $u_access ORDER BY id ASC";
$tabell_query=mysqli_query(($sql_question),$Connect) or die("Invalid SQL query: $sql_question");
while($row = mysqli_fetch_array($tabell_query)) { ?>
<?php if ($row["type"]==0) { ?>
<li><a href="displayPage.php?url=<?=$row["url"]?>" target="view"><?=$row["string"]?></a></li>
<?php } else if ($row["type"]==1) { ?>
<li><a href="<?=$row["url"]?>" target="view"><?=$row["string"]?></a></li>
<?php } else if ($row["type"]==2) { ?>
<li><a href="<?=$row["url"]?>" target="view"><?=$row["string"]?></a></li>
<?php }
}//while
print "</ul>\n";
?>
<h4>Site Maintenance</h4>
<hr>
<ul>
<li><a href="listPages.php" target="view">List Pages</a></li>
<li><a href="uploadscript.php" target="view">Upload File</a></li>
</ul>
<?
if ($_SESSION["accesslevel"]>1) {
?>
<h4>Site Administration</h4><hr>
<ul>
<li><a href="addPage.php" target="view">Add Page</a></li>
<li><a href="listGUIconfig.php" target="view">List GUI config</a></li>
<li><a href="addGUI.php" target="view">Add GUI config</a></li>
<li><a href="listMenu.php" target="view">List Menu</a></li>
<li><a href="addMenu.php" target="view">Add Menu Entry</a></li>
<li><a href="listAccounts.php" target="view">List Accounts</a></li>
<li><a href="addAccount.php" target="view">Add Account</a></li>
</ul>
<?
} // end if accesslevel>1
?>
<li><a href="logout.php" target="_top">Logout</a></li>
<p>Maintained by <a href="mailto:[email protected]">Patrik Carlsson</a>
</body>
</html>