1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-10 08:34:09 +02:00

Site Prefs, core administration changes - work in progress

This commit is contained in:
secretr
2008-12-18 16:55:46 +00:00
parent 315c9fe811
commit 582bc4df97
11 changed files with 373 additions and 122 deletions

View File

@@ -1,48 +1,59 @@
/*
* e107 website system (c) 2001-2008 Steve Dunstan (e107.org)
* $Id: admin_nav.sc,v 1.6 2008-12-08 21:45:12 e107steved Exp $
* $Id: admin_nav.sc,v 1.7 2008-12-18 16:55:46 secretr Exp $
*/
if (ADMIN)
if (ADMIN)
{
global $ns, $pref, $array_functions, $tp;
if (strstr(e_SELF, "/admin.php"))
$e107_var = array();
if (strstr(e_SELF, "/admin.php"))
{
$active_page = 'x';
}
else
}
else
{
$active_page = time();
}
$e107_var['x']['text']=ADLAN_52;
$e107_var['x']['link']=e_ADMIN.'admin.php';
$e107_var['y']['text']=ADLAN_53;
$e107_var['y']['link']=e_BASE."index.php";
$e107_var['x']['text'] = ADLAN_52;
$e107_var['x']['link'] = e_ADMIN.'admin.php';
$e107_var['y']['text'] = ADLAN_53;
$e107_var['y']['link'] = e_BASE."index.php";
$text .= show_admin_menu("",$active_page,$e107_var);
//$text .= show_admin_menu("",$active_page,$e107_var);
$e107_var['afuncs']['text'] = ADLAN_93;
$e107_var['afuncs']['link'] = '';
unset($e107_var);
foreach ($array_functions as $links_key => $links_value)
/* SUBLINKS */
$tmp = array();
foreach ($array_functions as $links_key => $links_value)
{
$e107_var[$links_key]['text'] = $links_value[1];
$e107_var[$links_key]['link'] = $links_value[0];
$tmp[$links_key]['text'] = $links_value[1];
$tmp[$links_key]['link'] = $links_value[0];
}
$text .= show_admin_menu(ADLAN_93, time(), $e107_var, FALSE, TRUE, TRUE);
unset($e107_var);
// Plugin links menu
$e107_var['afuncs']['sub'] = $tmp;
/* SUBLINKS END */
// Plugin links menu
require_once(e_HANDLER.'xml_class.php');
$xml = new xmlClass; // We're going to have some plugins with plugin.xml files, surely? So create XML object now
$xml->filter = array('@attributes' => FALSE, 'administration' => FALSE); // .. and they're all going to need the same filter
$nav_sql = new db;
if ($nav_sql -> db_Select("plugin", "*", "plugin_installflag=1"))
if ($nav_sql -> db_Select("plugin", "*", "plugin_installflag=1"))
{
//Link Plugin Manager
$e107_var['x']['text'] = "<b>".ADLAN_98."</b>";
$e107_var['x']['link'] = e_ADMIN."plugin.php";
$e107_var['x']['perm'] = "P";
$tmp = array();
$e107_var['plugs']['text'] = ADLAN_95;
$e107_var['plugs']['link'] = '';
while($rowplug = $nav_sql -> db_Fetch())
/* SUBLINKS */
//Link Plugin Manager
$tmp['plugm']['text'] = "<strong>".ADLAN_98."</strong>";
$tmp['plugm']['link'] = e_ADMIN."plugin.php";
$tmp['plugm']['perm'] = "P";
while($rowplug = $nav_sql -> db_Fetch())
{
$plugin_id = $rowplug['plugin_id'];
$plugin_path = $rowplug['plugin_path'];
@@ -59,22 +70,25 @@ if (ADMIN)
}
// Links Plugins
if ($eplug_conffile)
if ($eplug_conffile)
{
$e107_var['x'.$plugin_id]['text'] = $eplug_caption;
$e107_var['x'.$plugin_id]['link'] = e_PLUGIN.$plugin_path."/".$eplug_conffile;
$e107_var['x'.$plugin_id]['perm'] = "P".$plugin_id;
$tmp['plug_'.$plugin_id]['text'] = $eplug_caption;
$tmp['plug_'.$plugin_id]['link'] = e_PLUGIN.$plugin_path."/".$eplug_conffile;
$tmp['plug_'.$plugin_id]['perm'] = "P".$plugin_id;
}
unset($eplug_conffile, $eplug_name, $eplug_caption);
}
$text .= show_admin_menu(ADLAN_95, time(), $e107_var, FALSE, TRUE, TRUE);
unset($e107_var);
$e107_var['plugm']['sub'] = $tmp;
$e107_var['plugm']['sort'] = true;
/* SUBLINKS END */
//$text .= show_admin_menu(ADLAN_95, time(), $e107_var, FALSE, TRUE, TRUE);
unset($tmp);
}
unset($e107_var);
$e107_var['x']['text']=ADLAN_46;
$e107_var['x']['link']=e_ADMIN."admin.php?logout";
$text .= show_admin_menu("",$act,$e107_var);
$e107_var['lout']['text']=ADLAN_46;
$e107_var['lout']['link']=e_ADMIN."admin.php?logout";
$text = e_admin_menu('', '', $e107_var);
return $ns -> tablerender(LAN_head_1, $text, array('id' => 'admin_nav', 'style' => 'button_menu'), TRUE);
}