2016-09-01 23:13:23 +02:00
|
|
|
<?php
|
|
|
|
/*****************************************************************************
|
|
|
|
* AdminBar.php
|
|
|
|
* Defines the AdminBar class.
|
|
|
|
*
|
|
|
|
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2023-03-11 13:37:59 +01:00
|
|
|
class AdminBar extends Template
|
2016-09-01 23:13:23 +02:00
|
|
|
{
|
|
|
|
private $extra_items = [];
|
|
|
|
|
2023-03-11 13:37:59 +01:00
|
|
|
public function html_main()
|
2016-09-01 23:13:23 +02:00
|
|
|
{
|
|
|
|
echo '
|
|
|
|
<div id="admin_bar">
|
|
|
|
<ul>
|
2017-11-05 16:47:32 +01:00
|
|
|
<li><a href="', BASEURL, '/managealbums/">Albums</a></li>
|
2020-02-18 12:46:03 +01:00
|
|
|
<li><a href="', BASEURL, '/manageassets/">Assets</a></li>
|
2016-09-01 23:13:23 +02:00
|
|
|
<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];
|
|
|
|
}
|
|
|
|
}
|