Repository navigation
Expand file tree
/
Copy pathmenu.php
More file actions
51 lines (44 loc) · 1.56 KB
/
Copy pathmenu.php
File metadata and controls
51 lines (44 loc) · 1.56 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
40
41
42
43
44
45
46
47
48
49
50
51
<?
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;
?>
<?
$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");
?>
<table><tr><td width=180>
<h2><u><? print $projectName; ?></u></h2>
<ul>
<?
$sql_question="SELECT * FROM mainmenu WHERE accesslevel='0'ORDER BY id asc";
//print "SQL: $sql_question <br>\n";
$tabell_query=mysqli_query(($sql_question),$Connect) or die("Invalid SQL query: $sql_question");
while($row = mysqli_fetch_array($tabell_query)) {
if ($row["type"]==0) {
print "<img src='http://www.bth.se/bth/images/eng/arrow_link.gif'><a href='displayPage.php?url=". $row["url"] ."' target=view>" .$row["string"] ."</a><br>";
} else if ($row["type"]==1) {
print "<img src='http://www.bth.se/bth/images/eng/arrow_link.gif'><a href='". $row["url"] ."' target=view>" .$row["string"] ."</a><br>";
} else if ($row["type"]==2) {
print "<img src='http://www.bth.se/bth/images/eng/arrow_link.gif'><a href='". $row["url"] ."' target=view>" .$row["string"] ."</a><br>";
}
}//while
print "</ul>\n";
mysqli_close($Connect);
?>
<ul>
<li><a href="login.php" target="_top">Login</a>[Requires account]</li>
</ul>
<a href='index.html' target=_top>Home</a>
</td></tr>
<tr><td height=600></td></tr>
</table>
</html>