bludit/admin/themes/default/init.php

30 lines
645 B
PHP
Raw Normal View History

2015-05-05 03:00:01 +02:00
<?php
function makeNavbar($type)
{
global $layout;
2015-07-20 05:14:12 +02:00
global $Language;
2015-05-05 03:00:01 +02:00
$navbar['users'] = array(
2015-07-20 05:14:12 +02:00
'users'=>array('text'=>$Language->g('Users')),
'add-user'=>array('text'=>$Language->g('Add a new user'))
2015-05-05 03:00:01 +02:00
);
$navbar['manage'] = array(
2015-07-20 05:14:12 +02:00
'manage-posts'=>array('text'=>$Language->g('Manage posts')),
'manage-pages'=>array('text'=>$Language->g('Manage pages'))
2015-05-05 03:00:01 +02:00
);
echo '<nav class="navbar sublinks"><ul>';
foreach($navbar[$type] as $link=>$nav)
{
if($link==$layout['view'])
echo '<li class="active">';
else
echo '<li>';
echo '<a href="'.HTML_PATH_ADMIN_ROOT.$link.'">'.$nav['text'].'</a></li>';
}
echo '</ul></nav>';
2015-05-31 03:06:55 +02:00
}