1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-13 09:01:59 +02:00

Update methods to load LAN files in Admin Area

(fingers crossed there are no typo's...)
This commit is contained in:
Tijn Kuyper 2017-01-17 01:33:03 +01:00
parent 65f840d5b3
commit 347c9f9af0
38 changed files with 59 additions and 229 deletions

View File

@ -10,14 +10,6 @@
*
*/
/**
*
* @package e107
* @subpackage admin
*
* Handle display of the various system logs
*/
/*
* Preferences:
* 'sys_log_perpage' - number of events per page
@ -37,11 +29,8 @@ if(! getperms('S'))
exit();
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
// Main language file should automatically be loaded
// Load language files for log messages
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_log_messages.php'); //... for core functions
e107::coreLan('admin_log', true);
e107::coreLan('log_messages', true);
if(is_array($pref['lan_log_list'])) //... and for any plugins which support it
{

View File

@ -23,7 +23,7 @@ if(isset($_POST['go_back']))
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('administrator', true);
$e_sub_cat = 'admin';
require_once('auth.php');

View File

@ -8,29 +8,10 @@
*
* Ban List Management
*
* $URL$
* $Id$
*
*/
/**
* e107 Banlist administration
*
* @package e107
* @subpackage admin
* @version $Id$;
*/
require_once('../class2.php');
/*
@todo should this be here?
if(count($_POST) && !varset($_POST['e-token']))
{
die('Access denied - bl');
}
*/
if (!getperms('4'))
{
@ -38,11 +19,9 @@ if (!getperms('4'))
exit();
}
require_once(e_HANDLER.'iphandler_class.php'); // This is probably already loaded in class2.php
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('banlist', true);
e107::js('footer-inline', "
@ -53,11 +32,9 @@ e107::js('footer-inline', "
event.preventDefault();
});
");
class banlist_admin extends e_admin_dispatcher
{

View File

@ -8,16 +8,6 @@
*
* Banlist export
*
* $URL$
* $Id$
*/
/**
* e107 Banlist administration
*
* @package e107
* @subpackage admin
* @version $Id$;
*/
require_once('../class2.php');

View File

@ -8,8 +8,6 @@
*
* Admin BootLoader
*
* $URL$
* $Id$
*/
if (!defined('e107_INIT'))
@ -165,16 +163,10 @@ e107::coreLan('footer', true);
}
// Get Icon constants, theme override (theme/templates/admin_icons_template.php) is allowed
include_once(e107::coreTemplatePath('admin_icons'));
if(!defset('e_ADMIN_UI') && !defset('e_PAGETITLE'))
{
$array_functions = e107::getNav()->adminLinks('legacy'); // replacement see e107_handlers/sitelinks.php
@ -478,4 +470,4 @@ if (!function_exists("parse_admin"))
}
}
}
}
}

View File

@ -8,28 +8,17 @@
*
* Cache Administration Area
*
* $URL$
* $Id$
*
*/
/**
* Admin page - cache management
*
* @package e107
* @subpackage admin
* @version $Id$;
* @author e107 Inc
*/
require_once("../class2.php");
if (!getperms("C"))
{
e107::redirect('admin');
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('cache', true);
$e_sub_cat = 'cache';

View File

@ -19,12 +19,11 @@ e107::css('inline',"
.e-wysiwyg { height: 400px }
");
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('cpage', true);
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_page.php');
$e_sub_cat = 'custom';
class page_admin extends e_admin_dispatcher
{

View File

@ -50,7 +50,7 @@ require_once(e_ADMIN."auth.php");
Nuvolo Icons, PHPMailer, TCPDF, PHP UTF8
</p>
<div class="copyright">Copyright <a href="http://e107.org/content/About-Us:The-Team" title="e107 Team">e107 Inc.</a> 2008-2013</div>
<div class="copyright">Copyright <a href="http://e107.org/content/About-Us:The-Team" title="e107 Team">e107 Inc.</a> 2008-2017</div>
</div>
</div>
</div>

View File

@ -17,9 +17,7 @@ if (!getperms('U'))
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('cron', true);
class cron_admin extends e_admin_dispatcher
{
@ -269,7 +267,7 @@ class cron_admin_ui extends e_admin_ui
if(!$sql->insert('cron',$insert))
{
e107::getMessage()->add(LAN_CRON_6, E_MESSAGE_ERROR);
e107::getMessage()->addDebug(LAN_CRON_6);
}
else
{

View File

@ -26,9 +26,7 @@ if(isset($_POST['back']))
exit();
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('db', true);
$e_sub_cat = 'database';

View File

@ -8,10 +8,6 @@
*
* Docs
*
* $Source: /cvs_backup/e107_0.8/e107_admin/docs.php,v $
* $Revision$
* $Date$
* $Author$
*
*/
require_once("../class2.php");
@ -20,7 +16,7 @@ if (!ADMIN) {
exit;
}
e107::lan('core','docs',true);
e107::coreLan('docs', true);
define('DOC_PATH', e_DOCS.e_LANGUAGE.'/');
define('DOC_PATH_ALT', e_DOCS.'English/');

View File

@ -18,7 +18,7 @@ if (!getperms("F"))
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('emoticon', true);
$e_sub_cat = 'emoticon';

View File

@ -8,8 +8,6 @@
*
* URL and front controller Management
*
* $URL$
* $Id$
*/
require_once('../class2.php');

View File

@ -14,11 +14,9 @@ header('Content-Encoding: none'); // turn off gzip.
ob_implicit_flush(true);
ob_end_flush();
require_once('../class2.php');
e107::lan('core','fileinspector', true);
e107::coreLan('fileinspector', true);
if (!getperms('Y'))
{

View File

@ -25,7 +25,7 @@ if(! getperms('G'))
exit();
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('frontpage', true);
$e_sub_cat = 'frontpage';
require_once ('auth.php');

View File

@ -8,8 +8,6 @@
*
* Image Administration Area
*
* $URL$
* $Id$
*
*/
@ -53,7 +51,7 @@ if(isset($_POST['submit_cancel_show']))
exit();
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('image', true);
if($_GET['action'] == 'dialog')
{

View File

@ -6,12 +6,6 @@
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/index.php,v $
* $Revision$
* $Date$
* $Author$
*/
header('Location: admin.php');

View File

@ -22,7 +22,7 @@ if (!getperms("L"))
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_lancheck.php');
e107::coreLan('lancheck', true);
$e_sub_cat = 'language';
// require_once("auth.php");

View File

@ -15,7 +15,7 @@ if (!getperms('L'))
e107::redirect('admin');
exit;
}
//include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('language', true);
$e_sub_cat = 'language';
@ -25,11 +25,6 @@ if(!empty($_GET['iframe']))
define('e_IFRAME', true);
}
class language_admin extends e_admin_dispatcher
{

View File

@ -10,15 +10,8 @@
*
*/
/**
* @package e107
* @subpackage admin
* @version $Id$
*
* Manage site navigation links
*/
require_once("../class2.php");
if (!getperms("I"))
{
e107::redirect('admin');

View File

@ -10,14 +10,6 @@
*
*/
/**
* e107 Mail handling - Admin
*
* @package e107
* @subpackage admin
*/
/*
Features:
1. Additional sources of email addresses for mailouts can be provided via plugins, and can be enabled via the mailout preferences page
@ -74,9 +66,9 @@ if (!getperms('W'))
e107::redirect('admin');
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_users.php');
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_mailout.php');
// e107::lan('core','signup');
e107::coreLan('users', true);
e107::coreLan('mailout', true);
require_once(e_HANDLER.'ren_help.php');

View File

@ -49,10 +49,6 @@ if(e_MENUMANAGER_ACTIVE === false )
body { overflow:hidden }
');
}
else
@ -124,12 +120,9 @@ if(e_MENUMANAGER_ACTIVE === false )
ul.dropdown-menu.e-mm-selector { padding: 10px; margin-top: -2px; margin-right:-2px; }
");
}
if (!getperms("2"))
{
e107::redirect('admin');
@ -137,17 +130,10 @@ if (!getperms("2"))
}
e107::coreLan('menus', true);
e107::coreLan('admin', true);
if(e_MENUMANAGER_ACTIVE === true || vartrue($_GET['enc']))
{

View File

@ -6,17 +6,11 @@
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/message.php,v $
* $Revision$
* $Date$
* $Author$
*/
require_once("../class2.php");
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('message', true);
$e_sub_cat = 'message';
require_once("auth.php");

View File

@ -11,12 +11,14 @@
*
*/
require_once("../class2.php");
if (!getperms("T")) {
if (!getperms("T"))
{
e107::redirect('admin');
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('meta', true);
$e_sub_cat = 'meta';
require_once("auth.php");

View File

@ -9,13 +9,14 @@
*/
require_once("../class2.php");
if (!getperms("B")) {
if (!getperms("B"))
{
e107::redirect('admin');
exit;
}
$tmp = explode(".", e_QUERY);
$table = $tmp[0];
$id = intval($tmp[1]);

View File

@ -27,9 +27,6 @@ e107::css('inline', "
");
class news_admin extends e_admin_dispatcher
{

View File

@ -8,23 +8,15 @@
*
*/
/**
* @package e107
* @subpackage admin
*
* 'Notify' admin page - selects action on various events
*/
require_once('../class2.php');
if (!getperms('O'))
{
e107::redirect('admin');
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('notify', true);
class plugin_notify_admin extends e_admin_dispatcher
{

View File

@ -6,16 +6,11 @@
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/phpinfo.php,v $
* $Revision$
* $Date$
* $Author$
*/
require_once("../class2.php");
if (!getperms("0"))
if(!getperms("0"))
{
e107::redirect('admin');
exit;

View File

@ -11,7 +11,8 @@
*/
require_once("../class2.php");
if (!getperms("Z"))
if(!getperms("Z"))
{
e107::redirect('admin');
exit;

View File

@ -9,6 +9,7 @@
* Administration - Site Preferences
*
*/
require_once ("../class2.php");
if(isset($_POST['newver']))
@ -17,17 +18,17 @@ if(isset($_POST['newver']))
exit();
}
if(! getperms("1"))
if(!getperms("1"))
{
e107::redirect('admin');
exit();
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('prefs', true);
$e_sub_cat = 'prefs';
e107::lan('core','mailout','admin');
//e107::lan('core','mailout','admin');
e107::coreLan('mailout', true);
require_once (e_ADMIN."auth.php");

View File

@ -17,15 +17,13 @@ if (!getperms('X'))
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('search', true);
$e_sub_cat = 'search';
require_once('auth.php');
require_once(e_HANDLER.'userclass_class.php');
require_once(e_HANDLER.'search_class.php');
$frm = e107::getForm();
$mes = e107::getMessage();
$e_userclass = new user_class();

View File

@ -6,22 +6,17 @@
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/theme.php,v $
* $Revision$
* $Date$
* $Author$
*/
require_once("../class2.php");
if (!getperms("1"))
{
e107::redirect('admin');
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('theme', true);
$e_sub_cat = 'theme_manage';

View File

@ -10,6 +10,7 @@
*
*/
require_once ('../class2.php');
if(!getperms('9'))
{
e107::redirect('admin');
@ -18,7 +19,7 @@ if(!getperms('9'))
$e_sub_cat = 'maintain';
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('ugflag', true);
$mes = e107::getMessage();
$frm = e107::getForm();

View File

@ -1,26 +1,14 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| Copyright (C) 2008-2010 e107 Inc (e107.org)
| http://e107.org
|
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $URL$
| $Revision$
| $Id$
| $Author$
+----------------------------------------------------------------------------+
*/
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
/**
* @package e107
* @subpackage admin
* @version $Id$;
*
* Update routines from older e107 versions to current.
*

View File

@ -10,25 +10,15 @@
*
*/
/**
* e107 Userclass handling - Admin
*
* @package e107
* @subpackage admin
* @version $Id$;
*/
require_once('../class2.php');
if (!getperms('4'))
{
e107::redirect('admin');
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('userclass2', true);
class uclass_admin extends e_admin_dispatcher

View File

@ -16,8 +16,7 @@ if (!getperms('4'))
exit;
}
include_lan(e_LANGUAGEDIR . e_LANGUAGE . '/admin/lan_' . e_PAGE);
e107::coreLan('users_extended', true);
if(varset($_GET['mode']) == "ajax")
{

View File

@ -6,12 +6,6 @@
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/ver.php,v $
* $Revision$
* $Date$
* $Author$
*/
if (!defined('e107_INIT')) { exit; }

View File

@ -15,7 +15,7 @@ if (!getperms("M"))
exit;
}
e107::lan('core','wmessage',true);
e107::coreLan('wmessage', true);
class wmessage_admin extends e_admin_dispatcher