Skip to content
This repository was archived by the owner on May 18, 2021. It is now read-only.

Commit 1b11bd2

Browse files
author
cammygames
committed
this is not gonna work
1 parent 3348828 commit 1b11bd2

4 files changed

Lines changed: 36 additions & 0 deletions

File tree

Plugins/test/test.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
require_once("config/config.php");
4+
require_once("classes/Login.php");
5+
6+
$login = new Login();
7+
8+
if ($login->isUserLoggedIn() == true) {
9+
if($_SESSION['user_level'] < P_VIEW_HOUSES) $page = "views/Errors/noPerm.php"; else $page = "views/houses.php";
10+
include("views/template.php");
11+
} else {
12+
include("views/login.php");
13+
}

Plugins/test/views/test.php

Whitespace-only changes.

config/config.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
array("KOTH", "2503", "188.165.255.190")
4545
);
4646

47+
$navigation_Items = array(
48+
array("Houses", "houses.php", "fa-fw fa-home","P_VIEW_HOUSES")
49+
);
50+
4751
/**
4852
* Levels
4953
*/

views/template.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ class="img-circle" width="60"></a></p>
126126
}
127127
}
128128
?>
129+
130+
131+
129132
<li class="dropdown">
130133
<a data-toggle="dropdown" class="dropdown-toggle" href="index.php#">
131134
<i class="fa fa-tasks"></i>
@@ -180,6 +183,22 @@ class="img-circle" width="60"></a></p>
180183
</a>
181184
</li>
182185
<?php } ?>
186+
<?php
187+
foreach($navigation_Items as $item)
188+
{
189+
if ($_SESSION['user_level'] >= $item[4])
190+
{
191+
?>
192+
<li>
193+
<a href="<?php echo $item[1];?>">
194+
<i class="fa <?php echo $item[2]; ?>"></i>
195+
<span><?php echo $item[0]; ?></span>
196+
</a>
197+
</li>
198+
<?php
199+
}
200+
}
201+
?>
183202
<li>
184203
<a href="profile.php">
185204
<i class="fa fa-fw fa-user"></i>

0 commit comments

Comments
 (0)