1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 21:57:51 +02:00

Load admin phrases ASAP

This commit is contained in:
marj
2009-07-18 10:17:56 +00:00
parent 037ae9fd1a
commit 037e91cfee
5 changed files with 64 additions and 56 deletions

View File

@@ -1,27 +1,27 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/admin_menu/admin_menu.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:43 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
* e107 website system
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* 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 $
* $Revision: 1.2 $
* $Date: 2009-07-18 10:17:56 $
* $Author: marj_nl_fr $
*/
//@TODO make it 0.8 compatible
if (!defined('e107_INIT')) { exit; }
global $tp;
if (ADMIN == TRUE) {
@include_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_admin.php");
@include_once(e_LANGUAGEDIR."English/admin/lan_admin.php");
if (ADMIN == TRUE)
{
// We're not in admin - load generic admin phrases
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php');
require_once(e_HANDLER."userclass_class.php");
require_once(e_ADMIN."ad_links.php");
@@ -29,10 +29,13 @@ if (ADMIN == TRUE) {
$array_functions[] = array(e_ADMIN."plugin.php", ADLAN_98, "Z");
if ($sql->db_Select("plugin", "*", "plugin_installflag=1")) {
while ($row = $sql->db_Fetch()) {
if ($sql->db_Select("plugin", "*", "plugin_installflag=1"))
{
while ($row = $sql->db_Fetch())
{
include(e_PLUGIN.$row['plugin_path']."/plugin.php");
if ($eplug_conffile) {
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);
@@ -44,7 +47,8 @@ if (ADMIN == TRUE) {
$amtext = "<div style='text-align:center'>
<select name='activate' onchange='urljump(this.options[selectedIndex].value)' class='tbox'>
<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]);
}
@@ -53,9 +57,10 @@ if (ADMIN == TRUE) {
$ns->tablerender(LAN_ADMIN, $amtext, 'admin_menu');
}
function render_admin_links($link, $title, $perms) {
if (getperms($perms)) {
function render_admin_links($link, $title, $perms)
{
if (getperms($perms))
{
return "<option value='".$link."'>".$title."</option>";
}
}
?>