2006-12-02 04:36:16 +00:00
|
|
|
<?php
|
|
|
|
/*
|
2009-07-18 10:17:56 +00:00
|
|
|
* e107 website system
|
|
|
|
*
|
2009-11-18 01:06:08 +00:00
|
|
|
* Copyright (C) 2008-2009 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
|
|
|
|
*
|
|
|
|
* $Source: /cvs_backup/e107_0.8/e107_plugins/admin_menu/admin_menu.php,v $
|
2010-02-10 18:18:01 +00:00
|
|
|
* $Revision$
|
|
|
|
* $Date$
|
|
|
|
* $Author$
|
2006-12-02 04:36:16 +00:00
|
|
|
*/
|
|
|
|
|
2009-07-18 10:17:56 +00:00
|
|
|
//@TODO make it 0.8 compatible
|
|
|
|
|
2006-12-02 04:36:16 +00:00
|
|
|
if (!defined('e107_INIT')) { exit; }
|
|
|
|
global $tp;
|
2009-07-18 10:17:56 +00:00
|
|
|
if (ADMIN == TRUE)
|
|
|
|
{
|
|
|
|
// We're not in admin - load generic admin phrases
|
|
|
|
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php');
|
2006-12-02 04:36:16 +00:00
|
|
|
|
|
|
|
require_once(e_HANDLER."userclass_class.php");
|
|
|
|
require_once(e_ADMIN."ad_links.php");
|
|
|
|
require_once(e_HANDLER.'admin_handler.php');
|
|
|
|
|
|
|
|
$array_functions[] = array(e_ADMIN."plugin.php", ADLAN_98, "Z");
|
|
|
|
|
2009-07-18 10:17:56 +00:00
|
|
|
if ($sql->db_Select("plugin", "*", "plugin_installflag=1"))
|
|
|
|
{
|
|
|
|
while ($row = $sql->db_Fetch())
|
|
|
|
{
|
2006-12-02 04:36:16 +00:00
|
|
|
include(e_PLUGIN.$row['plugin_path']."/plugin.php");
|
2009-07-18 10:17:56 +00:00
|
|
|
if ($eplug_conffile)
|
|
|
|
{
|
2006-12-02 04:36:16 +00:00
|
|
|
$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);
|
|
|
|
|
|
|
|
$amtext = "<div style='text-align:center'>
|
|
|
|
<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)
|
|
|
|
{
|
2006-12-02 04:36:16 +00:00
|
|
|
$amtext .= render_admin_links($link_value[0], $link_value[1], $link_value[2]);
|
|
|
|
}
|
|
|
|
|
|
|
|
$amtext .= "</select>
|
|
|
|
</div>";
|
|
|
|
$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>";
|
|
|
|
}
|
|
|
|
}
|