forked from Public/pics
Initial commit.
This is to be the new HashRU website based on the Aaronweb.net/Kabuki CMS.
This commit is contained in:
36
templates/AdminBar.php
Normal file
36
templates/AdminBar.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
* AdminBar.php
|
||||
* Defines the AdminBar class.
|
||||
*
|
||||
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
|
||||
*****************************************************************************/
|
||||
|
||||
class AdminBar extends SubTemplate
|
||||
{
|
||||
private $extra_items = [];
|
||||
|
||||
protected function html_content()
|
||||
{
|
||||
echo '
|
||||
<div id="admin_bar">
|
||||
<ul>
|
||||
<li><a href="', BASEURL, '/managetags/">Tags</a></li>
|
||||
<li><a href="', BASEURL, '/manageusers/">Users</a></li>
|
||||
<li><a href="', BASEURL, '/manageerrors/">Errors [', ErrorLog::getCount(), ']</a></li>';
|
||||
|
||||
foreach ($this->extra_items as $item)
|
||||
echo '
|
||||
<li><a href="', $item[0], '">', $item[1], '</a></li>';
|
||||
|
||||
echo '
|
||||
<li><a href="', BASEURL, '/logout/">Log out [', Registry::get('user')->getFullName(), ']</a></li>
|
||||
</ul>
|
||||
</div>';
|
||||
}
|
||||
|
||||
public function appendItem($url, $caption)
|
||||
{
|
||||
$this->extra_items[] = [$url, $caption];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user