1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-18 05:09:05 +01:00

51 lines
1.1 KiB
PHP
Raw Normal View History

2006-12-02 04:36:16 +00:00
<?php
/*
2009-07-18 10:17:56 +00:00
* e107 website system
*
* Copyright (C) 2008-2014 e107 Inc (e107.org)
2009-07-18 10:17:56 +00:00
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Administration menu
*
2006-12-02 04:36:16 +00:00
*/
2009-07-18 10:17:56 +00:00
2006-12-02 04:36:16 +00:00
if (!defined('e107_INIT')) { exit; }
2012-12-03 04:48:56 -08:00
2009-07-18 10:17:56 +00:00
if (ADMIN == TRUE)
{
2012-12-03 04:48:56 -08:00
e107::lan('core','admin', true); // We're not in admin - load generic admin phrases
$tp = e107::getParser();
$pref = e107::getPref();
$ns = e107::getRender();
$nav = e107::getNav();
2012-12-03 04:48:56 -08:00
2013-02-26 18:57:33 -08:00
$array_functions = $nav->adminLinks();
2006-12-02 04:36:16 +00:00
$amtext = "<div class='text-center' style='text-align:center'>
2006-12-02 04:36:16 +00:00
<select name='activate' onchange='urljump(this.options[selectedIndex].value)' class='tbox'>
<option>".LAN_SELECT."</option>\n";
2009-07-18 10:17:56 +00:00
foreach ($array_functions as $link_value)
{
2012-12-03 04:48:56 -08:00
$amtext .= render_admin_links($link_value['link'], $link_value['title'], $link_value['perms']);
2006-12-02 04:36:16 +00:00
}
$amtext .= "</select>
</div>";
2012-12-03 04:48:56 -08:00
2006-12-02 04:36:16 +00:00
$ns->tablerender(LAN_ADMIN, $amtext, 'admin_menu');
}
2009-07-18 10:17:56 +00:00
function render_admin_links($link, $title, $perms)
{
if (getperms($perms))
{
2006-12-02 04:36:16 +00:00
return "<option value='".$link."'>".$title."</option>";
}
}