mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 22:57:14 +02:00
Fix for admin_menu
This commit is contained in:
@@ -2,58 +2,56 @@
|
|||||||
/*
|
/*
|
||||||
* e107 website system
|
* e107 website system
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||||
* Released under the terms and conditions of the
|
* Released under the terms and conditions of the
|
||||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
*
|
*
|
||||||
* Administration menu
|
* Administration menu
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/admin_menu/admin_menu.php,v $
|
|
||||||
* $Revision$
|
|
||||||
* $Date$
|
|
||||||
* $Author$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//@TODO make it 0.8 compatible
|
//@TODO make it 0.8 compatible
|
||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
global $tp;
|
|
||||||
if (ADMIN == TRUE)
|
if (ADMIN == TRUE)
|
||||||
{
|
{
|
||||||
// We're not in admin - load generic admin phrases
|
// We're not in admin - load generic admin phrases
|
||||||
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php');
|
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php');
|
||||||
|
|
||||||
|
$tp = e107::getParser();
|
||||||
|
$pref = e107::getPref();
|
||||||
|
$ns = e107::getRender();
|
||||||
|
|
||||||
require_once(e_HANDLER."userclass_class.php");
|
// require_once(e_HANDLER."userclass_class.php");
|
||||||
require_once(e_ADMIN."ad_links.php");
|
// require_once(e_ADMIN."ad_links.php");
|
||||||
require_once(e_HANDLER.'admin_handler.php');
|
require_once(e_HANDLER.'admin_handler.php');
|
||||||
|
|
||||||
|
$nav = e107::getNav();
|
||||||
|
|
||||||
|
$admin = $nav->adminLinks('assoc');
|
||||||
|
$plugins = $nav->pluginLinks('assoc');
|
||||||
|
|
||||||
$array_functions[] = array(e_ADMIN."plugin.php", ADLAN_98, "Z");
|
$array_functions = array_merge($admin, $plugins);
|
||||||
|
|
||||||
if ($sql->db_Select("plugin", "*", "plugin_installflag=1"))
|
// print_a($array_functions);
|
||||||
{
|
|
||||||
while ($row = $sql->db_Fetch())
|
|
||||||
{
|
|
||||||
include(e_PLUGIN.$row['plugin_path']."/plugin.php");
|
|
||||||
if ($eplug_conffile)
|
|
||||||
{
|
|
||||||
$array_functions[] = array(e_PLUGIN.$row['plugin_path']."/".$eplug_conffile, $tp->toHtml($eplug_name,"","defs,emotes_off, no_make_clickable"), "P".$row['plugin_id']);
|
|
||||||
}
|
|
||||||
unset($eplug_conffile, $eplug_name, $eplug_caption, $eplug_icon_small);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$array_functions = asortbyindex($array_functions, 1);
|
// asort($array_functions);
|
||||||
|
ksort($array_functions, 'title'); //FIXME Improve ordering.
|
||||||
|
|
||||||
|
//$array_functions = asortbyindex($array_functions, 1);
|
||||||
|
|
||||||
$amtext = "<div style='text-align:center'>
|
$amtext = "<div style='text-align:center'>
|
||||||
<select name='activate' onchange='urljump(this.options[selectedIndex].value)' class='tbox'>
|
<select name='activate' onchange='urljump(this.options[selectedIndex].value)' class='tbox'>
|
||||||
<option>".LAN_SELECT."</option>\n";
|
<option>".LAN_SELECT."</option>\n";
|
||||||
foreach ($array_functions as $link_value)
|
foreach ($array_functions as $link_value)
|
||||||
{
|
{
|
||||||
$amtext .= render_admin_links($link_value[0], $link_value[1], $link_value[2]);
|
$amtext .= render_admin_links($link_value['link'], $link_value['title'], $link_value['perms']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$amtext .= "</select>
|
$amtext .= "</select>
|
||||||
</div>";
|
</div>";
|
||||||
|
|
||||||
$ns->tablerender(LAN_ADMIN, $amtext, 'admin_menu');
|
$ns->tablerender(LAN_ADMIN, $amtext, 'admin_menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user