Akis tried php
This commit is contained in:
parent
073a56a628
commit
da07b43ac4
11
index.php
11
index.php
@ -18,7 +18,16 @@ $paths_to_check = array();
|
||||
|
||||
$page = basename($_SERVER['QUERY_STRING']);
|
||||
|
||||
$nav = include_ob("$template_dir/navigation.html");
|
||||
if (isset($_SESSION['user_id'])) {
|
||||
if(isset($_SESSION['user_isAdmin'])) {
|
||||
$nav = include_ob("$template_dir/admin_nav.html");
|
||||
}
|
||||
else {
|
||||
$nav = include_ob("$template_dir/user_nav.html");
|
||||
}
|
||||
} esle {
|
||||
$nav = include_ob("$template_dir/navigation.html");
|
||||
}
|
||||
|
||||
|
||||
if($page_dir == "global") {
|
||||
|
15
templates/admin_nav.html
Normal file
15
templates/admin_nav.html
Normal file
@ -0,0 +1,15 @@
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href=""><i class="ri-settings-4-fill"></i></a></li>
|
||||
<div class="links">
|
||||
<li><a href="">Home</a></li>
|
||||
<li><a href=""></a></li>
|
||||
<li><a href="" class="pfp"><template name="gravatar image"></template></a></li>
|
||||
|
||||
You are the coolest person ever (you are admin)
|
||||
|
||||
ako urobím aby admin nav bol iný ako non-admin nav, a ešte aby global bol iný (login, register, atď)?
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
</nav>
|
@ -6,7 +6,7 @@
|
||||
<li><a href=""></a></li>
|
||||
<li><a href="" class="pfp"><template name="gravatar image"></template></a></li>
|
||||
|
||||
ako urobím aby admin nav bol iný ako non-admin nav, a ešte aby global bol iný (login, register, atď)
|
||||
ako urobím aby admin nav bol iný ako non-admin nav, a ešte aby global bol iný (login, register, atď)?
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
15
templates/user_nav.html
Normal file
15
templates/user_nav.html
Normal file
@ -0,0 +1,15 @@
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href=""><i class="ri-settings-4-fill"></i></a></li>
|
||||
<div class="links">
|
||||
<li><a href="">Home</a></li>
|
||||
<li><a href=""></a></li>
|
||||
<li><a href="" class="pfp"><template name="gravatar image"></template></a></li>
|
||||
|
||||
Just USER nav
|
||||
|
||||
ako urobím aby admin nav bol iný ako non-admin nav, a ešte aby global bol iný (login, register, atď)?
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
</nav>
|
Loading…
Reference in New Issue
Block a user