1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

Test admin scripts are parsing correctly.

This commit is contained in:
Cameron 2021-01-16 13:32:35 -08:00
parent 692b8c8538
commit 04bbad449a
59 changed files with 709 additions and 4374 deletions

View File

@ -2506,8 +2506,8 @@ class e_http_header
function setContent($content,$search=null,$replace=null)
{
if($content == 'buffer')
global $_E107;
if($content == 'buffer' && empty($_E107['cli']))
{
$this->length = ob_get_length();
$this->content = ob_get_clean();

View File

@ -9,8 +9,8 @@
*/
define('e_ADMIN_HOME', true); // used by some admin shortcodes and class2.
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
if(varset($_GET['mode']) == 'customize')
{
@ -75,6 +75,7 @@ if(in_array($pref['adminstyle'], array('infopanel', 'flexpanel')))
require_once(e_ADMIN.'boot.php');
require_once(e_HANDLER.'upload_handler.php');
new admin_start;
require_once(e_ADMIN.'auth.php');
@ -875,4 +876,4 @@ function log_request()
require_once("footer.php");
?>

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,7 @@
*
*/
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
if (!getperms('3'))
{
e107::redirect('admin');

View File

@ -11,7 +11,7 @@
*
*/
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
if (!getperms('4'))
{
@ -991,6 +991,6 @@ e107::getAdminUI()->runPage();
require_once(e_ADMIN.'footer.php');
exit;

View File

@ -10,7 +10,7 @@
*
*/
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
if (!getperms('4'))
{
e107::redirect('admin');
@ -18,7 +18,7 @@ if (!getperms('4'))
}
/*
Output a selection of data from the banlist table as a CSV
Output a selection of data from the banlist table arequire_once(__DIR__.'/../class2.php');s a CSV
Selection data:
$_POST['ban_types'] - array of 0..9
$_POST['ban_separator'] - 1 or 2
@ -42,12 +42,15 @@ $format_array = array(
'banlist_notes' => 1
);
$use_separator = varset($separator_char[intval($_POST['ban_separator'])],$separator_char[1]);
$use_quote = varset($quote_char[intval($_POST['ban_quote'])],$quote_char[2]);
$banSep = (int) varset($_POST['ban_separator']);
$banQuote = (int) varset($_POST['ban_quote']);
$use_separator = varset($separator_char[$banSep],$separator_char[1]);
$use_quote = varset($quote_char[$banQuote],$quote_char[2]);
$type_list = '';
if (is_array($_POST['ban_types']))
if (!empty($_POST['ban_types']))
{
$validBanTypes = banlistManager::getValidReasonList();
$spacer = '';

View File

@ -16,7 +16,12 @@ if (!defined('e107_INIT'))
}
e107::getDebug()->logTime('(Start boot.php)');
header('Content-type: text/html; charset=utf-8', TRUE);
if(!e107::isCli())
{
header('Content-type: text/html; charset=utf-8', TRUE);
}
define('ADMINFEED', 'https://e107.org/adminfeed');

View File

@ -10,7 +10,7 @@
*
*/
require_once("../class2.php");
require_once(__DIR__."/../class2.php");
if (!getperms("C"))
{

View File

@ -1,44 +0,0 @@
<?php
/*
* 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)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/check_inspector.php,v $
* $Revision$
* $Date$
* $Author$
*/
/*
This file 'authorises' the standalone file inspector mode. If it is missing, or in its default state, File Inspector can only
be run in the 'normal' mode, which is protected by normal E107 security.
To run File Inspector in standalone mode (for checking a totally dead system), edit this file in the four places listed.
Then browse to the URL: yoursite/e107_admin/fileinspector.php?alone
=================================================================================================================
BE SURE TO REVERSE THE EDITS, OR DELETE THIS FILE, ONCE YOU HAVE IDENTIFIED THE PROBLEM WITH YOUR SYSTEM
=================================================================================================================
*/
// 1. Comment out the next line
exit;
// 2. Uncomment the next line
// define('e107_INIT', TRUE);
// 3. Comment out the next line
define('e107_FILECHECK',TRUE);
// 4. Uncomment the next line
// define('e107_STANDALONE',TRUE);
?>

View File

@ -8,7 +8,7 @@
*
*/
require_once("../class2.php");
require_once(__DIR__.'/../class2.php');
if (!getperms("B"))
{
e107::redirect('admin');
@ -346,5 +346,5 @@ require_once(e_ADMIN."auth.php");
e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");
exit;

View File

@ -10,7 +10,7 @@
* Admin-related functions for custom page and menu creation
*/
//define('e_MINIMAL',true);
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
if (!getperms("5|J")) { e107::redirect('admin'); exit; }

View File

@ -10,7 +10,7 @@
*
*/
require_once("../class2.php");
require_once(__DIR__."/../class2.php");
$css = "body { text-align: left; font-size:13px; line-height:1.5em; font-weight:normal; font-family:Arial, Helvetica, sans-serif; }
p { margin:0px 5px 10px 5px; }
@ -60,5 +60,3 @@ require_once(e_ADMIN."auth.php");
$ns->tablerender("",$text);
require_once(e_ADMIN."footer.php");
exit;

View File

@ -10,7 +10,7 @@
*
*/
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
if (!getperms('U'))
{
e107::redirect('admin');
@ -423,6 +423,8 @@ class cron_admin_ui extends e_admin_ui
function cronExecute($cron_id)
{
$sql = e107::getDb();
$class_func = '';
if($sql->select("cron","cron_name,cron_function","cron_id = ".intval($cron_id)))
{
$row = $sql->fetch();
@ -750,562 +752,5 @@ $frm = e107::getForm();
// $cron = new cron();
require_once(e_ADMIN.'footer.php');
exit;
/*
class cron
{
protected $coreCrons = array();
protected $cronAction;
protected $e_cron = array();
public function __construct()
{
$pref = e107::getPref();
$mes = e107::getMessage();
$this->cronAction = e_QUERY;
// The 'available' flag only gives the option to configure the cron if the underlying feature is enabled
$this->coreCrons['_system'] = array(
0 => array('name' => 'Test Email', 'function' => 'sendEmail', 'description' => 'Send a test email to '.$pref['siteadminemail'].'<br />Recommended to test the scheduling system.'),
1 => array('name' => 'Mail Queue', 'function' => 'procEmailQueue', 'description' => 'Process mail queue'),
2 => array('name' => 'Mail Bounce Check', 'function' => 'procEmailBounce', 'description' => 'Check for bounced emails', 'available' => vartrue($pref['mail_bounce_auto'])),
// 1 => array('name'=>'User Purge', 'function' => 'userPurge', 'description'=>'Purge Unactivated Users'),
// 2 => array('name'=>'User UnActivated', 'function' => 'userUnactivated', 'description'=>'Resend activation email to unactivated users.'),
// 3 => array('name'=>'News Sticky', 'function' => 'newsPurge', 'description'=>'Remove Sticky News Items')
);
if (!vartrue($pref['e_cron_pwd']))
{
$pwd = $this->setCronPwd();
}
if (isset($_POST['submit']))
{
$this->cronSave();
}
$this->lastRefresh();
$this->cronLoad();
if (isset($_POST['save_prefs']))
{
$this->cronSavePrefs();
}
if (isset($_POST['execute']))
{
$class_func = key($_POST['execute']);
$this->cronExecute($class_func);
}
// Set Core Cron Options.
// These core functions need to be put into e_BASE/cron.php ie. news_purge()
if ($this->cronAction == "" || $this->cronAction == "main")
{
$this->cronRenderPage();
}
if ($this->cronAction == "pref")
{
$this->cronRenderPrefs();
}
}
function lastRefresh()
{
$pref = e107::getPref();
e107::getCache()->CachePageMD5 = '_';
$lastload = e107::getCache()->retrieve('cronLastLoad', FALSE, TRUE, TRUE);
$mes = e107::getMessage();
$ago = (time() - $lastload);
$active = ($ago < 901) ? TRUE : FALSE;
$status = ($active) ? LAN_ENABLED : LAN_DISABLED; // "Enabled" : "Offline";
$mins = floor($ago / 60);
$secs = $ago % 60;
$lastRun = ($mins) ? $mins." minutes and ".$secs." seconds ago." : $secs." seconds ago.";
$lastRefresh = ($ago < 10000) ? $lastRun : 'Never';
$mes->add("Status: <b>".$status."</b>", E_MESSAGE_INFO);
// print_a($pref['e_cron_pref']);
if ($pref['e_cron_pref']) // grab cron
{
foreach ($pref['e_cron_pref'] as $func => $cron)
{
if ($cron['active'] == 1)
{
$list[$func] = $cron;
}
}
}
$mes->add("Active Crons: <b>".count($list)."</b>", E_MESSAGE_INFO);
$mes->add("Last cron refresh: ".$lastRefresh, E_MESSAGE_INFO);
//FIXME: for Windows, the is_executable() function only checks the file
// extensions of exe, com, bat and cmd.
$actualPerms = fileperms(e_BASE."cron.php");
if (!is_executable(realpath(e_BASE."cron.php")))
{
$mes->add("Please CHMOD /cron.php to 755 ", E_MESSAGE_WARNING);
}
//elseif (!$active) - always show instructions
{
$setpwd_message = "Use the following Cron Command: <b style='color:black'>".$_SERVER['DOCUMENT_ROOT'].e_HTTP."cron.php ".$pref['e_cron_pwd']."</b><br />
Using your server control panel (eg. cPanel,Plesk etc.) please create a crontab to run this command on your server every minute.";
$mes->add($setpwd_message, E_MESSAGE_INFO);
}
}
function cronName($classname, $method)
{
$tp = e107::getParser();
foreach ($this->e_cron as $class => $val)
{
if ($class == $classname)
{
foreach ($val as $func)
{
if ($func['function'] == $method)
{
return $tp->toHTML($func['name']);
}
}
}
}
}
function cronExecute($class_func)
{
//TO/ DO L/ANs
list($class_name, $method_name) = explode("__", $class_func);
$mes = e107::getMessage();
$taskName = $class_name;
if ($class_name == '_system')
{
require_once(e_HANDLER.'cron_class.php');
}
else
{
require_once(e_PLUGIN.$class_name.'/e_cron.php');
}
$class_name .= '_cron';
$status = $this->cronExecuteMethod($class_name, $method_name) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add("Running <b>".$this->cronName($taskName, $method_name)."</b>", $status);
}
function cronSavePref()
{
// Store the USERID with the password.
// This way only the one password is needed, and the user login can be looked up in e_base/cron.php
}
function cronSave()
{
global $pref;
$mes = e107::getMessage();
$activeCount = 0;
foreach ($_POST['cron'] as $key => $val)
{
if (!$val['active'])
{
$val['active'] = 0;
}
else
{
$activeCount++;
}
$t['minute'] = implode(",", $_POST['tab'][$key]['minute']);
$t['hour'] = implode(",", $_POST['tab'][$key]['hour']);
$t['day'] = implode(",", $_POST['tab'][$key]['day']);
$t['month'] = implode(",", $_POST['tab'][$key]['month']);
$t['weekday'] = implode(",", $_POST['tab'][$key]['weekday']);
$val['tab'] = implode(" ", $t);
$tabs .= $val['tab']."<br />";
list($class, $func) = explode("__", $key);
$val['function'] = $func;
$val['class'] = $class;
$val['path'] = $class;
$cron[$key] = $val;
}
$pref['e_cron_pref'] = $cron;
if (!vartrue($pref['e_cron_pwd']) || varset($_POST['generate_pwd']))
{
$pwd = $this->setCronPwd();
$setpwd_message = "Use the following Cron Command:<br /><b style='color:black'>".$_SERVER['DOCUMENT_ROOT'].e_HTTP."cron.php ".$pwd."</b><br />
This cron command is unique and will not be displayed again. Please copy and paste it into your webserver cron area to be run every minute (or 15 minutes) of every day.";
$mes->add($setpwd_message, E_MESSAGE_WARNING);
}
// print_a($pref['e_cron_pref']);
if (save_prefs())
{
$mes->add(LAN_SETSAVED, E_MESSAGE_SUCCESS);
$mes->add($activeCount." Cron(s) Active", E_MESSAGE_SUCCESS);
}
else
{
$mes->add("There was a problem saving your settings.", E_MESSAGE_ERROR);
}
}
function setCronPwd()
{
//global $pref;
$userMethods = e107::getUserSession();
$newpwd = $userMethods->generateRandomString('*^*#.**^*');
$newpwd = sha1($newpwd.time());
//$pref['e_cron_pwd'] = $newpwd;
e107::getConfig()->set('e_cron_pwd', $newpwd)->save(false);
return true;
}
// --------------------------------------------------------------------------
function cronRenderPrefs()
{
//global $frm,$ns;
$frm = e107::getForm();
$text = "<div style='text-align:center'>
<form method='post' action='"
.e_SELF."' id='linkform'>
<table class='table adminlist'>
<tr>
<td style='width:30%'>Cron Password</td>
<td style='width:70%'>
"
.$frm->password('cron_password', '', 100)."
</td>
</tr>
<tr style='vertical-align:top'>
<td colspan='2' class='center buttons-bar'>";
$text .= $frm->admin_button('save_prefs', LAN_SAVE, 'update');
$text .= "</td>
</tr>
</table>
</form>
</div>";
e107::getRender()->tablerender(LAN_PREFS, $text);
}
function cronLoad() //TODO Make a generic function to work with e_cron, e_sitelink, e_url etc.
{
$pref = e107::getPref();
$core_cron = $this->coreCrons; // May need to check 'available' flag here
$new_cron = e107::getAddonConfig('e_cron');
$this->e_cron = array_merge($core_cron, $new_cron);
return;
}
// ----------- Grab All e_cron parameters -----------------------------------
function cronRenderPage()
{
$pref = e107::getPref();
$cronpref = $pref['e_cron_pref'];
$ns = e107::getRender();
$frm = e107::getForm();
$mes = e107::getMessage();
$e_cron = $this->e_cron;
// ---------------------- List All Functions -----------------------------
$text = "<div style='text-align:center'>
<form method='post' action='"
.e_SELF."' id='cronform'>
<table class='table adminlist'>
<colgroup>
<col />
<col />
<col />
<col />
<col />
<col />
<col />
<col />
</colgroup>
<thead>
<tr>
<th>"
.LAN_CRON_1XXX."</th>
<th>"
.LAN_CRON_2."</th>
<th>"
.LAN_CRON_3."</th>
<th>"
.LAN_CRON_4."</th>
<th>"
.LAN_CRON_5XXXX."</th>
<th>"
.LAN_CRON_6."</th>
<th>"
.LAN_CRON_7."</th>
<th>"
.LAN_CRON_8."</th>
<th>Run Now</th>
</tr>
</thead>
<tbody>";
foreach ($e_cron as $plug => $cfg)
{
foreach ($cfg as $class => $cron)
{
if (!isset($cron['available']) || $cron['available']) // Only display cron functions which are available
{
$c = $plug.'__'.$cron['function']; // class and function.
$sep = array();
list($sep['minute'], $sep['hour'], $sep['day'], $sep['month'], $sep['weekday']) = explode(" ", $cronpref[$c]['tab']);
foreach ($sep as $key => $value)
{
if ($value == "")
{
$sep[$key] = "*";
}
}
$minute = explode(",", $sep['minute']);
$hour = explode(",", $sep['hour']);
$day = explode(",", $sep['day']);
$month = explode(",", $sep['month']);
$weekday = explode(",", $sep['weekday']);
$min_options = array(
"*" => LAN_CRON_11,
"0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58" => LAN_CRON_12,
"0,5,10,15,20,25,30,35,40,45,50,55" => LAN_CRON_13,
"0,10,20,30,40,50" => LAN_CRON_14,
"0,15,30,45" => LAN_CRON_10,
"0,30" => LAN_CRON_15
);
$hour_options = array(
"*" => LAN_CRON_16,
"0,2,4,6,8,10,12,14,16,18,20,22" => LAN_CRON_17,
"0,3,6,9,12,15,18,21" => LAN_CRON_18,
"0,6,12,18" => LAN_CRON_19
);
$text .= "<tr>
<td>"
.$cron['name']."</td>
<td>"
.$cron['description']."</td>
<td>
<input type='hidden' name='cron[$c][path]' value='".$cron['path']."' />
<select class='tbox' style='height:70px' multiple='multiple' name='tab[$c][minute][]'>\n";
foreach ($min_options as $key => $val)
{
if ($sep['minute'] == $key)
{
$sel = "selected='selected'";
$minute = array();
}
else
{
$sel = "";
}
$text .= "<option value='$key' $sel>".$val."</option>\n";
}
for ($i = 0; $i <= 59; $i++)
{
$sel = (in_array(strval($i), $minute)) ? "selected='selected'" : "";
$text .= "<option value='$i' $sel>".$i."</option>\n";
}
$text .= "</select>
</td>
<td>
<select class='tbox' style='height:70px' multiple='multiple' name='tab[$c][hour][]'>
\n";
foreach ($hour_options as $key => $val)
{
if ($sep['hour'] == $key)
{
$sel = "selected='selected'";
$hour = array();
}
else
{
$sel = "";
}
$text .= "<option value='$key' $sel>".$val."</option>\n";
}
for ($i = 0; $i <= 23; $i++)
{
$sel = (in_array(strval($i), $hour)) ? "selected='selected'" : "";
$diz = mktime($i, 00, 00, 1, 1, 2000);
$text .= "<option value='$i' $sel>".$i." - ".date("g A", $diz)."</option>\n";
}
$text .= "</select>
</td>
<td>
<select class='tbox' style='height:70px' multiple='multiple' name='tab[$c][day][]'>\n";
$sel_day = ($day[0] == "*") ? "selected='selected'" : "";
$text .= "<option value='*' {$sel_day}>".LAN_CRON_20."</option>\n"; // Every Day
for ($i = 1; $i <= 31; $i++)
{
$sel = (in_array($i, $day)) ? "selected='selected'" : "";
$text .= "<option value='$i' $sel>".$i."</option>\n";
}
$text .= "</select>
</td>
<td>
<select class='tbox' style='height:70px' multiple='multiple' name='tab[$c][month][]'>\n";
$sel_month = ($month[0] == "*") ? "selected='selected'" : "";
$text .= "<option value='*' $sel_month>".LAN_CRON_21."</option>\n"; // Every Month
for ($i = 1; $i <= 12; $i++)
{
$sel = (in_array($i, $month)) ? "selected='selected'" : "";
$diz = mktime(00, 00, 00, $i, 1, 2000);
$text .= "<option value='$i' $sel>".strftime("%B", $diz)."</option>\n";
}
$text .= "</select>
</td>
<td>
<select class='tbox' style='height:70px' multiple='multiple' name='tab[$c][weekday][]'>\n";
$sel_weekday = ($weekday[0] == "*") ? "selected='selected'" : "";
$text .= "<option value='*' $sel_weekday>".LAN_CRON_22."</option>\n"; // Every Week Day.
$days = array(LAN_SUN, LAN_MON, LAN_TUE, LAN_WED, LAN_THU, LAN_FRI, LAN_SAT);
for ($i = 0; $i <= 6; $i++)
{
$sel = (in_array(strval($i), $weekday)) ? "selected='selected'" : "";
$text .= "<option value='$i' $sel>".$days[$i]."</option>\n";
}
$text .= "</select>
</td>
<td class='center'>";
$checked = ($cronpref[$c]['active'] == 1) ? "checked='checked'" : "";
$text .= "<input type='checkbox' name='cron[$c][active]' value='1' $checked />
</td>
<td class='center'>".$frm->admin_button('execute['.$c.']', 'Run Now')."</td>
</tr>";
}
}
}
$text .= "
<tr >
<td colspan='9' class='center'>
<div class='center buttons-bar'>";
// $text .= "<input class='btn' type='submit' name='submit' value='".LAN_SAVE."' />";
$text .= $frm->admin_button('submit', LAN_SAVE, $action = 'update');
$text .= $frm->checkbox_switch('generate_pwd', 1, '', 'Generate new cron command');
$text .= "</div></td>
</tr>
</tbody>
</table>
</form>
</div>";
$ns->tablerender(PAGE_NAME, $mes->render().$text);
}
function cronOptions()
{
$e107 = e107::getInstance();
$var['main']['text'] = PAGE_NAME;
$var['main']['link'] = e_SELF;
// $var['pref']['text'] = LAN_PREFS;
// $var['pref']['link'] = e_SELF."?pref";
// $var['pref']['perm'] = "N";
$action = ($this->cronAction) ? $this->cronAction : 'main';
e107::getNav()->admin(PAGE_NAME, $action, $var);
}
function cronExecuteMethod($class_name, $method_name, $return = 'boolean')
{
$mes = e107::getMessage();
if (class_exists($class_name))
{
$obj = new $class_name;
if (method_exists($obj, $method_name))
{
$mes->add("Executing config function <b>".$class_name." : ".$method_name."()</b>", E_MESSAGE_DEBUG);
if ($return == 'boolean')
{
call_user_func(array($obj, $method_name));
return TRUE;
}
else
{
return call_user_func(array($obj, $method_name));
}
}
else
{
$mes->add("Config function <b>".$method_name."()</b> NOT found.", E_MESSAGE_DEBUG);
}
}
return FALSE;
}
}
function cron_adminmenu()
{
global $cron;
$cron->cronOptions();
}
*/

View File

@ -10,7 +10,7 @@
*
*/
require_once ("../class2.php");
require_once (__DIR__."/../class2.php");
$theme = e107::getPref('sitetheme');
define("EXPORT_PATH","{e_THEME}".$theme."/install/");

View File

@ -10,251 +10,154 @@
*
*
*/
require_once("../class2.php");
if (!ADMIN) {
require_once(__DIR__ . '/../class2.php');
if(!ADMIN)
{
e107::redirect();
exit;
}
e107::coreLan('docs', true);
define('DOC_PATH', e_DOCS.e_LANGUAGE.'/');
define('DOC_PATH_ALT', e_DOCS.'English/');
define('DOC_PATH', e_DOCS . e_LANGUAGE . '/');
define('DOC_PATH_ALT', e_DOCS . 'English/');
e107::css('inline', 'div.qitem { margin-top:20px }
div.aitem { padding:10px 15px; }
');
class docs_admin extends e_admin_dispatcher
class docs_admin extends e_admin_dispatcher
{
protected $modes = array(
'main' => array(
'controller' => 'docs_ui',
'path' => null,
'ui' => 'docs_form_ui',
'uipath' => null
),
);
protected $adminMenu = array();
protected $adminMenuAliases = array();
protected $menuTitle = LAN_DOCS;
protected static $helpList = array();
public static function getDocs()
{
protected $modes = array(
'main' => array(
'controller' => 'docs_ui',
'path' => null,
'ui' => 'docs_form_ui',
'uipath' => null
),
);
protected $adminMenu = array();
protected $adminMenuAliases = array();
protected $menuTitle = LAN_DOCS;
protected static $helpList = array();
public static function getDocs()
{
return self::$helpList;
}
function init()
{
$fl = e107::getFile();
$helplist_all = $fl->get_files(DOC_PATH_ALT);
if(!is_dir(DOC_PATH) || DOC_PATH == DOC_PATH_ALT)
{
$helplist = $helplist_all;
}
else
{
$helplist = $fl->get_files(DOC_PATH);
}
sort($helplist);
self::$helpList = $helplist;
foreach($helplist as $key=>$helpdata)
{
$id = 'doc-'.$key;
$k = 'main/'.$id;
$this->adminMenu[$k] = array('caption'=> str_replace("_", " ", $helpdata['fname']), 'perm' => false, 'uri'=>"#".$id );
}
}
return self::$helpList;
}
class docs_ui extends e_admin_ui
function init()
{
public function Doc0Page()
$fl = e107::getFile();
$helplist_all = $fl->get_files(DOC_PATH_ALT);
if(!is_dir(DOC_PATH) || DOC_PATH == DOC_PATH_ALT)
{
$helplist = docs_admin::getDocs();
$helplist = $helplist_all;
}
else
{
$helplist = $fl->get_files(DOC_PATH);
}
$text = '';
sort($helplist);
$iconQ = e107::getParser()->toGlyph('fa-question-circle');
$iconA = " ";
self::$helpList = $helplist;
foreach($helplist as $key=>$helpdata)
foreach($helplist as $key => $helpdata)
{
$id = 'doc-' . $key;
$k = 'main/' . $id;
$this->adminMenu[$k] = array('caption' => str_replace("_", " ", $helpdata['fname']), 'perm' => false, 'uri' => "#" . $id);
}
}
}
class docs_ui extends e_admin_ui
{
public function Doc0Page()
{
$helplist = docs_admin::getDocs();
$text = '';
$iconQ = e107::getParser()->toGlyph('fa-question-circle');
$iconA = " ";
foreach($helplist as $key => $helpdata)
{
$filename = DOC_PATH . $helpdata['fname'];
$filename_alt = DOC_PATH_ALT . vartrue($helpdata['fname']);
if(is_readable($filename))
{
$tmp = file_get_contents($filename);
}
else
{
$tmp = file_get_contents($filename_alt);
}
$filename = DOC_PATH.$helpdata['fname'];
$filename_alt = DOC_PATH_ALT.vartrue($helpdata['fname']);
$tmp = preg_replace('/Q\>(.*?)A>/si', "###QSTART###<div class='qitem'>" . $iconQ . "\\1</div>###QEND###", $tmp);
$tmp = preg_replace('/###QEND###(.*?)###QSTART###/si', "<div class='aitem'>" . $iconA . "\\1</div>", $tmp);
$tmp = str_replace(array('###QSTART###', '###QEND###'), array('', "<div class='aitem'>" . $iconA), $tmp) . "</div>";
if(is_readable($filename))
{
$tmp = file_get_contents($filename);
}
else
{
$tmp = file_get_contents($filename_alt);
}
$id = 'doc-' . $key;
$tmp = preg_replace('/Q\>(.*?)A>/si', "###QSTART###<div class='qitem'>".$iconQ."\\1</div>###QEND###", $tmp);
$tmp = preg_replace('/###QEND###(.*?)###QSTART###/si', "<div class='aitem'>".$iconA."\\1</div>", $tmp);
$tmp = str_replace(array('###QSTART###', '###QEND###'), array('', "<div class='aitem'>".$iconA), $tmp)."</div>";
$display = ($key === 0) ? "" : "style='display:none'";
$id = 'doc-'.$key;
$display = ($key === 0) ? "" : "style='display:none'";
$text .= "
$text .= "
<div class='docs-item' id='{$id}' {$display}>
<h4>".LAN_DOCS.SEP.str_replace("_", " ", $helpdata['fname'])."</h4>
<h4>" . LAN_DOCS . SEP . str_replace("_", " ", $helpdata['fname']) . "</h4>
{$tmp}
</div>";
// <div class='gotop'><a href='#docs-list' class='scroll-to'>".LAN_DOCS_GOTOP."</a></div>
}
return $text;
// <div class='gotop'><a href='#docs-list' class='scroll-to'>".LAN_DOCS_GOTOP."</a></div>
}
}
class docs_form_ui extends e_admin_form_ui
{
return $text;
}
new docs_admin();
require_once(e_ADMIN."auth.php");
$data = e107::getAdminUI()->runPage('raw');
echo $data[1]; // just to remove the title.
require_once(e_ADMIN."footer.php");
exit;
}
/*
$e_sub_cat = 'docs';
require_once("auth.php");
require_once (e_HANDLER.'file_class.php');
$fl = new e_file();
$helplist_all = $fl->get_files(DOC_PATH_ALT);
if(!is_dir(DOC_PATH) || DOC_PATH == DOC_PATH_ALT)
class docs_form_ui extends e_admin_form_ui
{
$helplist = $helplist_all;
}
else
{
$helplist = $fl->get_files(DOC_PATH);
}
//Titles in Admin Area are requested by the community
define('e_PAGETITLE', LAN_DOCS);
if (e_QUERY) {
$i = intval(e_QUERY) - 1;
$filename = DOC_PATH.$helplist[$i]['fname'];
$filename_alt = DOC_PATH_ALT.$helplist[$i]['fname'];
if(is_readable($filename))
$text = file_get_contents($filename);
else
$text = file_get_contents($filename_alt);
$text = $tp->toHTML($text, TRUE);
$text = preg_replace('/Q\>(.*?)A>/si', "<img src='".e_IMAGE_ABS."generic/question.png' class='icon' alt='Q' /><strong>\\1</strong>A>", $text);
$text = str_replace("A>", "<img src='".e_IMAGE_ABS."generic/answer.png' class='icon' alt='A' />", $text);
$ns->tablerender(LAN_DOCS.' - '.str_replace("_", " ", $helplist[$i]['fname']), $text);
unset($text);
require_once("footer.php");
exit;
}
//NEW 0.8
// Show All
$text = '';
$text_h = '';
foreach ($helplist as $key => $helpdata)
{
$filename = DOC_PATH.$helpdata['fname'];
$filename_alt = DOC_PATH_ALT.vartrue($$helpdata['fname']);
if(is_readable($filename))
$tmp = file_get_contents($filename);
else
$tmp = file_get_contents($filename_alt);
//$tmp = $tp->toHTML(trim($tmp), TRUE);
$tmp = preg_replace('/Q\>(.*?)A>/si', "###QSTART###<div class='qitem'><img src='".e_IMAGE_ABS."generic/question.png' class='icon S16 middle' alt='".LAN_DOCS_QUESTION."' />\\1</div>###QEND###", $tmp);
$tmp = preg_replace('/###QEND###(.*?)###QSTART###/si', "<div class='aitem'><img src='".e_IMAGE_ABS."generic/answer.png' class='icon S16 middle' alt='".LAN_DOCS_ANSWER."' />\\1</div>", $tmp);
$tmp = str_replace(array('###QSTART###', '###QEND###'), array('', "<div class='aitem'><img src='".e_IMAGE_ABS."generic/answer.png' class='icon S16 middle' alt='".LAN_DOCS_ANSWER."' />"), $tmp)."</div>";
$id = 'doc-'.$key;
$text_h .= "
<div class='qitem'>".E_16_DOCS." <a href='#{$id}' class='scroll-to'>".str_replace("_", " ", $helpdata['fname'])."</a></div>
";
$text .= "
<div class='docs-item' id='{$id}'>
<h4>".str_replace("_", " ", $helpdata['fname'])."</h4>
{$tmp}
<div class='gotop'><a href='#docs-list' class='scroll-to'>".LAN_DOCS_GOTOP."</a></div>
</div>";
}
new docs_admin();
require_once(e_ADMIN . "auth.php");
$data = e107::getAdminUI()->runPage('raw');
$text_h = "<div id='docs-list'><h4>".LAN_DOCS_SECTIONS."</h4>".$text_h."</div>";
$text = $text_h.$text;
echo $data[1]; // just to remove the title.
//Allow scroll navigation for bottom sections
$text .= "
<div id='docs-bottom-nav'><!-- --></div>
";
$ns->tablerender(LAN_DOCS, $text, 'docs');
require_once("footer.php");
*/
?>
require_once(e_ADMIN . "footer.php");

View File

@ -16,7 +16,7 @@
*/
define("e_MINIMAL",true);
define('e_ADMIN_UPDATE', true); // used in class2.php
require_once ("../class2.php");
require_once (__DIR__."/../class2.php");
// include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);

View File

@ -11,7 +11,7 @@
*
*/
require_once("../class2.php");
require_once(__DIR__.'/../class2.php');
if (!getperms("F"))
{
e107::redirect('admin');
@ -700,23 +700,3 @@ class emotec
require_once("footer.php");
/**
* Handle page DOM within the page header
*
* @return string JS source
*/
function headerjs()
{
/* require_once(e_HANDLER.'js_helper.php');
$ret = "
<script type='text/javascript'>
//add required core lan - delete confirm message
</script>
<script type='text/javascript' src='".e_JS."core/admin.js'></script>
";
return $ret;*/
}
?>

View File

@ -10,7 +10,7 @@
*
*/
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
if (!getperms('K'))
{
e107::redirect('admin');
@ -847,7 +847,7 @@ class eurl_admin_form_ui extends e_admin_form_ui
$id = 'eurl-'.str_replace('_', '-', $obj->module).'-'.$index;
$checked = varset($obj->current[$module]) == $location ? ' checked="checked"' : '';
$checked = (isset($obj->current[$module]) && $obj->current[$module] == $location) ? ' checked="checked"' : '';
$path = eDispatcher::getConfigPath($module, $location, false);
if(!is_readable($path))
@ -881,7 +881,7 @@ class eurl_admin_form_ui extends e_admin_form_ui
$exampleUrl .= " &nbsp; &Dagger;"; //XXX Add footer - denotes more CPU required. ?
}
*/
$selected = varset($obj->current[$module]) == $location ? "selected='selected'" : '';
$selected = (isset($obj->current[$module]) && ($obj->current[$module] == $location)) ? "selected='selected'" : '';
$opt .= "<option value='{$location}' {$selected} >".$diz.": ".varset($exampleUrl[0])."</option>";
$info .= "<tr><td>".$label."

View File

@ -19,7 +19,7 @@ if(!empty($_GET['action']) && $_GET['action'] === 'progress' && !empty($_GET['sc
}
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
@ -253,7 +253,7 @@ require_once(e_ADMIN."auth.php");
e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");
exit;
@ -464,7 +464,7 @@ class file_inspector {
<td style='width: 35%'>
".LAN_SHOW." ".FC_LAN_5.":
</td>
<td colspan='2' style='width: 65%'>".$frm->select('core',$coreOpts,$_POST['core'])." </td>
<td colspan='2' style='width: 65%'>".$frm->select('core',$coreOpts,varset($_POST['core']))." </td>
</tr>";
@ -473,7 +473,7 @@ class file_inspector {
<td style='width: 35%'>
".FC_LAN_14.":
</td>
<td colspan='2' style='width: 65%'>".$frm->select('type', $dispOpt, $_POST['type'])." </td>
<td colspan='2' style='width: 65%'>".$frm->select('type', $dispOpt, varset($_POST['type']))." </td>
</td>
</tr>";
@ -483,8 +483,8 @@ class file_inspector {
".LAN_SHOW." ".FC_LAN_13.":
</td>
<td colspan='2' style='width: 65%'>
<input type='radio' name='missing' value='1'".(($_POST['missing'] == '1' || !isset($_POST['missing'])) ? " checked='checked'" : "")." /> ".LAN_YES."&nbsp;&nbsp;
<input type='radio' name='missing' value='0'".($_POST['missing'] == '0' ? " checked='checked'" : "")." /> ".LAN_NO."&nbsp;&nbsp;
<input type='radio' name='missing' value='1'".((varset($_POST['missing']) == '1' || !isset($_POST['missing'])) ? " checked='checked'" : "")." /> ".LAN_YES."&nbsp;&nbsp;
<input type='radio' name='missing' value='0'".(varset($_POST['missing']) == '0' ? " checked='checked'" : "")." /> ".LAN_NO."&nbsp;&nbsp;
</td>
</tr>";
@ -493,8 +493,8 @@ class file_inspector {
".LAN_SHOW." ".FC_LAN_7.":
</td>
<td colspan='2' style='width: 65%'>
<input type='radio' name='noncore' value='1'".(($_POST['noncore'] == '1' || !isset($_POST['noncore'])) ? " checked='checked'" : "")." /> ".LAN_YES."&nbsp;&nbsp;
<input type='radio' name='noncore' value='0'".($_POST['noncore'] == '0' ? " checked='checked'" : "")." /> ".LAN_NO."&nbsp;&nbsp;
<input type='radio' name='noncore' value='1'".((varset($_POST['noncore']) == '1' || !isset($_POST['noncore'])) ? " checked='checked'" : "")." /> ".LAN_YES."&nbsp;&nbsp;
<input type='radio' name='noncore' value='0'".(varset($_POST['noncore']) == '0' ? " checked='checked'" : "")." /> ".LAN_NO."&nbsp;&nbsp;
</td>
</tr>";
@ -503,8 +503,8 @@ class file_inspector {
".LAN_SHOW." ".FC_LAN_21.":
</td>
<td colspan='2' style='width: 65%'>
<input type='radio' name='oldcore' value='1'".(($_POST['oldcore'] == '1' || !isset($_POST['oldcore'])) ? " checked='checked'" : "")." /> ".LAN_YES."&nbsp;&nbsp;
<input type='radio' name='oldcore' value='0'".($_POST['oldcore'] == '0' ? " checked='checked'" : "")." /> ".LAN_NO."&nbsp;&nbsp;
<input type='radio' name='oldcore' value='1'".((varset($_POST['oldcore']) == '1' || !isset($_POST['oldcore'])) ? " checked='checked'" : "")." /> ".LAN_YES."&nbsp;&nbsp;
<input type='radio' name='oldcore' value='0'".(varset($_POST['oldcore']) == '0' ? " checked='checked'" : "")." /> ".LAN_NO."&nbsp;&nbsp;
</td>
</tr>";

View File

@ -1,8 +1,7 @@
<?php
exit; // this script unused.
// Unused - to overwrite old file.
?>

View File

@ -10,8 +10,5 @@
*
*/
exit;
// -- No Longer used - see banlist.php

View File

@ -22,7 +22,7 @@ $In_e107_Footer = TRUE; // For registered shutdown function
global $error_handler,$db_time,$ADMIN_FOOTER;
// Legacy fix - call header if not already done, mainly fixing left side menus to work proper
if(!deftrue('e_ADMIN_UI') /*&& !deftrue('ADMIN_AREA')*/)
if(!deftrue('e_ADMIN_UI') )
{
// close the old buffer
$content = ob_get_contents();
@ -31,6 +31,7 @@ if(!deftrue('e_ADMIN_UI') /*&& !deftrue('ADMIN_AREA')*/)
ob_start();
require_once(e_ADMIN.'header.php');
echo $content;
}
//
@ -394,14 +395,17 @@ if($tmp1)
// New - see class2.php
$ehd = new e_http_header;
if($tmp)
{
$ehd->setContent('buffer',$tmp['search'],$tmp['replace']);
}
else
{
$ehd->setContent('buffer');
}
unset($tmp1, $tmp1);
$ehd->send();
$page = $ehd->getOutput();
@ -414,7 +418,10 @@ unset($In_e107_Footer);
// Clean session shutdown
e107::getSession()->shutdown();
// Shutdown
$e107->destruct();
$e107_Clean_Exit = TRUE; // For registered shutdown function -- let it know all is well!
if(!e107::isCli())
{
e107::getSession()->shutdown();
// Shutdown
$e107->destruct();
$e107_Clean_Exit = TRUE; // For registered shutdown function -- let it know all is well!
}

View File

@ -14,7 +14,7 @@ if(!empty($_POST) && !isset($_POST['e-token']))
{
$_POST['e-token'] = '';
}
require_once ('../class2.php');
require_once (__DIR__.'/../class2.php');
if(!getperms('G'))
{
@ -151,7 +151,7 @@ if (!empty($_POST))
{
// avoid endless loop.
if($_POST['frontpage'] == 'other' && (trim($_POST['frontpage_other']) == 'index.php' || trim($_POST['frontpage_other']) == '{e_BASE}index.php'))
if(varset($_POST['frontpage']) == 'other' && (trim($_POST['frontpage_other']) == 'index.php' || trim($_POST['frontpage_other']) == '{e_BASE}index.php'))
{
$_POST['frontpage'] = 'wmessage';
$_POST['frontpage_other'] = '';
@ -383,7 +383,7 @@ class frontpage
$show_legend = $show_button ? " class='e-hideme'" : '';
$text = "
<form method='post' action='".e_SELF."'>
<input type='hidden' name='e-token' value='".e_TOKEN."' />
<input type='hidden' name='e-token' value='".defset('e_TOKEN')."' />
<fieldset id='frontpage-settings'>
<legend{$show_legend}>".FRTLAN_13."</legend>
@ -406,29 +406,33 @@ class frontpage
</thead>
<tbody>";
foreach($fp_settings as $order => $current_value)
if(!empty($fp_settings))
{
$title = e107::getUserClass()->getName($current_value['class']);
$text .= "
<tr>
<td class='left'>".$order."</td>
<td>".$title."</td>
<td>".$this->lookup_path($current_value['page'])."</td>
<td>".$this->lookup_path($current_value['force'])."</td>
<td class='center options last'>
<div class='btn-group'>";
// ".$frm->admin_button('fp_inc',$order,'up',ADMIN_UP_ICON)."
// ".$frm->admin_button('fp_dec',$order,'down',ADMIN_DOWN_ICON)."
foreach($fp_settings as $order => $current_value)
{
$title = e107::getUserClass()->getName($current_value['class']);
$text .= "
<tr>
<td class='left'>".$order."</td>
<td>".$title."</td>
<td>".$this->lookup_path($current_value['page'])."</td>
<td>".$this->lookup_path($current_value['force'])."</td>
<td class='center options last'>
<div class='btn-group'>";
$text .= "
<a class='btn btn-default' title='".LAN_EDIT."' href='".e_SELF."?id=".$order."' >".ADMIN_EDIT_ICON."</a>
".$frm->admin_button('fp_delete_rule['.$order.']',$order,'',ADMIN_DELETE_ICON)."
</div>
</td>
</tr>";
// ".$frm->admin_button('fp_inc',$order,'up',ADMIN_UP_ICON)."
// ".$frm->admin_button('fp_dec',$order,'down',ADMIN_DOWN_ICON)."
$text .= "
<a class='btn btn-default' title='".LAN_EDIT."' href='".e_SELF."?id=".$order."' >".ADMIN_EDIT_ICON."</a>
".$frm->admin_button('fp_delete_rule['.$order.']',$order,'',ADMIN_DELETE_ICON)."
</div>
</td>
</tr>";
}
}
$text .= "
</tbody>

View File

@ -28,16 +28,17 @@ if(!defined('USER_AREA'))
e107::getDebug()->logTime('(Header Top)');
if(!deftrue('e_MENUMANAGER_ACTIVE'))
{
if (defined('THEME') && file_exists(THEME.'admin_template.php')) // Admin template
{
require_once (THEME.'admin_template.php');
}
else
{
require_once (e_CORE.'templates/admin_template.php');
}
@ -450,9 +451,16 @@ echo "\n<!-- *PRELOAD* -->\n";
// I: Calculate JS onload() functions for the BODY tag [user mode only]
//
// XXX DEPRECATED $body_onload and related functionality
if (defined('THEME_ONLOAD')) $js_body_onload[] = THEME_ONLOAD;
$body_onload='';
if (count($js_body_onload)) $body_onload = " onload=\"".implode(" ",$js_body_onload)."\"";
if(defined('THEME_ONLOAD'))
{
$js_body_onload[] = THEME_ONLOAD;
}
$body_onload = '';
if(!empty($js_body_onload))
{
$body_onload = " onload=\"" . implode(" ", $js_body_onload) . "\"";
}
if(deftrue('e_MENUMANAGER_ACTIVE'))

View File

@ -18,7 +18,7 @@ if(!empty($_GET['action']) && $_GET['action'] === 'dialog')
if (!defined('e107_INIT'))
{
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
}
if (!getperms('A') && ($_GET['action'] !== 'dialog') && ($_GET['action'] !== 'youtube'))

View File

@ -12,7 +12,7 @@
*/
if (!defined('e107_INIT'))
{
require_once("../class2.php");
require_once(__DIR__.'/../class2.php');
}
e107::coreLan('lancheck', true);

View File

@ -9,7 +9,7 @@
* Administration Area - Languages
*/
require_once ("../class2.php");
require_once (__DIR__."/../class2.php");
if (!getperms('L'))
{
e107::redirect('admin');
@ -636,7 +636,7 @@ if(!empty($_GET['iframe']))
$text .= "
<input type='checkbox' class='checkbox e-expandit' data-return='true' data-target='language-datacopy-{$table_name}' id='language-action-{$table_name}' name='{$table_name}' value='1'{$selected} />
<input type='checkbox' class='checkbox e-expandit' data-return='true' data-target='language-datacopy-{$table_name}' id='language-action-{$table_name}' name='{$table_name}' value='1' {$selected} />
</div>
<div id='language-datacopy-{$table_name}' class='offset1 e-hideme e-pointer'>".
@ -859,366 +859,10 @@ if(!empty($_GET['iframe']))
e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");
exit;
/*
require_once ("auth.php");
$frm = e107::getForm();
$mes = e107::getMessage();
e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_lancheck.php");
require_once(e_ADMIN."lancheck.php");
require_once(e_HANDLER."language_class.php");
// $ln = new language;
$ln = $lng;
$lck = e107::getSingleton('lancheck', e_ADMIN."lancheck.php");
$tabs = table_list(); // array("news","content","links");
$lanlist = e107::getLanguage()->installed();// Bugfix - don't use e_LANLIST as it's cached (SESSION)
$message = '';
if (e_QUERY)
{
$tmp = explode('.', e_QUERY);
$action = varset($tmp[0]);
$sub_action = varset($tmp[1]);
$id = varset($tmp[2]);
unset($tmp);
}
elseif(!getperms('0'))
{
$action = 'tools';
}
if (isset($_POST['submit_prefs']) && isset($_POST['mainsitelanguage']) && getperms('0'))
{
unset($temp);
$changes = array();
$temp['multilanguage'] = $_POST['multilanguage'];
$temp['multilanguage_subdomain'] = $_POST['multilanguage_subdomain'];
$temp['multilanguage_domain'] = $_POST['multilanguage_domain'];
$temp['sitelanguage'] = $_POST['mainsitelanguage'];
$temp['adminlanguage'] = $_POST['mainadminlanguage'];
$temp['noLanguageSubs'] = $_POST['noLanguageSubs'];
e107::getConfig()->setPref($temp)->save(true);
e107::getSession()->clear('e_language');
}
// ----------------- delete tables ---------------------------------------------
if (isset($_POST['del_existing']) && $_POST['lang_choices'] && getperms('0'))
{
$lang = strtolower($_POST['lang_choices']);
foreach ($tabs as $del_table)
{
if ($sql->isTable($del_table, $lang))
{
// echo $del_table." exists<br />";
$qry = "DROP TABLE ".$mySQLprefix."lan_".$lang."_".$del_table;
if (mysql_query($qry))
{
$msg = $tp->lanVars(LANG_LAN_100, $_POST['lang_choices'].' '.$del_table);
$message .= $msg.'[!br!]';
$mes->addSuccess($msg);
}
else
{
$msg = $tp->lanVars(LANG_LAN_101, $_POST['lang_choices'].' '.$del_table);
$message .= $msg.'[!br!]';
$mes->addWarning($msg);
}
}
}
e107::getLog()->add('LANG_02', $message.'[!br!]', E_LOG_INFORMATIVE, '');
$sql->db_ResetTableList();
}
// ----------create tables -----------------------------------------------------
if (isset($_POST['create_tables']) && $_POST['language'])
{
$table_to_copy = array();
$lang_to_create = array();
foreach ($tabs as $value)
{
$lang = strtolower($_POST['language']);
if (isset($_POST[$value]))
{
$copdata = ($_POST['copydata_'.$value]) ? 1 : 0;
if ($sql->db_CopyTable($value, "lan_".$lang."_".$value, $_POST['drop'], $copdata))
{
$msg = $tp->lanVars(LANG_LAN_103, $_POST['language'].' '.$value);
$message .= $msg . '[!br!]'; // Used in admin log.
$mes->addSuccess($msg);
}
else
{
if (!$_POST['drop'])
{
$msg = $tp->lanVars(LANG_LAN_00, $_POST['language'].' '.$value);
$message .= $msg . '[!br!]';
$mes->addWarning($msg);
}
else
{
$msg = $tp->lanVars(LANG_LAN_01, $_POST['language'].' '.$value);
$message .= $msg . '[!br!]';
$mes->addWarning($msg);
}
}
}
elseif ($sql->isTable($value,$_POST['language']))
{
if ($_POST['remove'])
{
// Remove table.
if (mysql_query("DROP TABLE ".$mySQLprefix."lan_".$lang."_".$value))
{
$message .= $_POST['language'].' '.$value.' '.LAN_DELETED.'[!br!]'; // can be removed?
$mes->addSuccess($_POST['language'].' '.$value.' '.LAN_DELETED);
}
else
{
$msg = $tp->lanVars(LANG_LAN_02, $_POST['language'].' '.$value);
$message .= $msg . '[!br!]';
$mes->addWarning($msg);
}
}
else
{
// leave table. LANG_LAN_104
$msg = $tp->lanVars(LANG_LAN_104, $_POST['language'].' '.$value);
$message .= $msg . '[!br!]';
$mes->addInfo($msg);
}
}
}
e107::getLog()->add('LANG_03', $message, E_LOG_INFORMATIVE, '');
$sql->db_ResetTableList();
}
if(isset($message) && $message)
{
$ns->tablerender(LAN_OK, $message);
}
$debug = "<br />f=".$_GET['f'];
$debug .= "<br />mode=".$_GET['mode'];
$debug .= "<br />lan=".$_GET['lan'];
// $ns->tablerender("Debug",$debug);
$rendered = $lck->init(); // Lancheck functions.
new lanDeveloper;
require_once (e_ADMIN."footer.php");
// ---------------------------------------------------------------------------
function multilang_prefs()
{
if(!getperms('0'))
{
return;
}
global $lanlist;
$pref = e107::getPref();
$mes = e107::getMessage();
$frm = e107::getForm();
//XXX Remove later.
// Enable only for developers - SetEnv E_ENVIRONMENT develop
// if(!isset($_SERVER['E_DEV_LANGUAGE']) || $_SERVER['E_DEV_LANGUAGE'] !== 'true')
// {
// $lanlist = array('English');
// $mes->addInfo("Alpha version currently supports only the English language. After most features are stable and English terms are optimized - translation will be possible.");
// }
$text = "
<form method='post' action='".e_SELF."' id='linkform'>
<fieldset id='core-language-settings'>
<legend class='e-hideme'>".LANG_LAN_13."</legend>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
<col class='col-control' />
</colgroup>
<tbody>
<tr>
<td>".LANG_LAN_14.": </td>
<td>";
$sellan = preg_replace("/lan_*.php/i", "", $pref['sitelanguage']);
$text .= $frm->select('mainsitelanguage',$lanlist,$sellan,"useValues=1");
$text .= "
</td>
</tr>";
// if(isset($_SERVER['E_DEV_LANGUAGE']) && $_SERVER['E_DEV_LANGUAGE'] === 'true')
{
$text .= "
<tr>
<td>".LANG_LAN_50.": </td>
<td>";
$sellan = preg_replace("/lan_*.php/i", "", $pref['adminlanguage']);
$text .= $frm->select('mainadminlanguage',$lanlist,$sellan,array("useValues"=>1,"default" => LANG_LAN_14));
$text .= "
</td>
</tr>";
}
$text .= "
<tr>
<td>".LANG_LAN_12.": </td>
<td>
<div class='auto-toggle-area autocheck'>";
$checked = ($pref['multilanguage'] == 1) ? " checked='checked'" : "";
$text .= "
<input class='checkbox' type='checkbox' name='multilanguage' value='1'{$checked} />
</div>
</td>
</tr>
<tr>
<td>".LANG_LAN_26.":</td>
<td>
<div class='auto-toggle-area autocheck'>\n";
$checked = ($pref['noLanguageSubs'] == 1) ? " checked='checked'" : "";
$text .= "
<input class='checkbox' type='checkbox' name='noLanguageSubs' value='1'{$checked} />
<div class='smalltext field-help'>".LANG_LAN_27."</div>
</div>
</td>
</tr>
<tr>
<td>
".LANG_LAN_18."
<small>".LANG_LAN_19."</small>
</td>
<td>
<textarea name='multilanguage_subdomain' rows='5' cols='15' placeholder='mydomain.com'>{$pref['multilanguage_subdomain']}</textarea>
<div class='smalltext field-help'>".LANG_LAN_20."</div>
</td>
</tr>";
$opt = "";
$langs = explode(",",e_LANLIST);
foreach($langs as $val)
{
if($val != $pref['sitelanguage'])
{
$opt .= "<tr><td class='middle' style='width:5%'>".$val."</td><td class='left inline-text'><input type='text' name='multilanguage_domain[".$val."]' value=\"".$pref['multilanguage_domain'][$val]."\" /></td></tr>";
}
}
if($opt)
{
//TODO class2.php check.
$text .= "
<tr>
<td>
".LANG_LAN_106."
<div class='label-note'>".LANG_LAN_107."</div>
</td>
<td><table style='margin-left:0px;width:400px'>".$opt."</table></td>
</tr>";
}
$text .= "
</tbody>
</table>
<div class='buttons-bar center'>".
$frm->admin_button('submit_prefs','no-value','update',LAN_SAVE)."
</div>
</fieldset>
</form>\n";
e107::getRender()->tablerender(ADLAN_132.SEP.LAN_PREFS, $mes->render().$text); // "Language Preferences";
}
*/
class lanDeveloper
{

View File

@ -10,7 +10,7 @@
*
*/
require_once("../class2.php");
require_once(__DIR__.'/../class2.php');
if (!getperms("I"))
{
@ -944,7 +944,7 @@ echo "<h2>Preview (To-Do)</h2>";
echo $tp->parseTemplate("{SITELINKS_ALT}");
*/
require_once(e_ADMIN."footer.php");
exit;

View File

@ -65,7 +65,7 @@ use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\POP3;
use PHPMailer\PHPMailer\Exception;
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
@ -702,7 +702,7 @@ class mailout_main_ui extends e_admin_ui
return;
}
$id = intval($_POST['email_id']);
$id = (int) varset($_POST['email_id']);
if(vartrue($_POST['email_send']))
{
@ -2727,38 +2727,40 @@ function mailout_adminmenu()
*/
function headerjs()
if(!function_exists('headerjs'))
{
$text = "
<script type='text/javascript'>
function bouncedisp(type)
function headerjs()
{
if(type == 'auto')
$text = "
<script type='text/javascript'>
function bouncedisp(type)
{
document.getElementById('mail_bounce_auto').style.display = '';
if(type == 'auto')
{
document.getElementById('mail_bounce_auto').style.display = '';
document.getElementById('mail_bounce_mail').style.display = 'none';
return;
}
if(type =='mail')
{
document.getElementById('mail_bounce_auto').style.display = 'none';
document.getElementById('mail_bounce_mail').style.display = '';
return;
}
document.getElementById('mail_bounce_auto').style.display = 'none';
document.getElementById('mail_bounce_mail').style.display = 'none';
return;
}
</script>";
if(type =='mail')
{
document.getElementById('mail_bounce_auto').style.display = 'none';
document.getElementById('mail_bounce_mail').style.display = '';
return;
}
$mailAdmin = e107::getRegistry('_mailout_admin');
// $text .= $mailAdmin->_cal->load_files();
document.getElementById('mail_bounce_auto').style.display = 'none';
document.getElementById('mail_bounce_mail').style.display = 'none';
return $text;
}
</script>";
$mailAdmin = e107::getRegistry('_mailout_admin');
// $text .= $mailAdmin->_cal->load_files();
return $text;
}
?>

View File

@ -36,14 +36,17 @@ if(isset($_GET['configure']))
}
else
{
define('e_ADMIN_AREA', true);
define("USER_AREA", false);
define('ADMIN_AREA', true);
if(!defined('e_ADMIN_AREA'))
{
define('e_ADMIN_AREA', true);
define("USER_AREA", false);
define('ADMIN_AREA', true);
}
define('e_MENUMANAGER_ACTIVE', false);
}
require_once("../class2.php");
require_once(__DIR__.'/../class2.php');
if(e_MENUMANAGER_ACTIVE === false )
@ -639,7 +642,8 @@ if($_SERVER['E_DEV_MENU'] == 'true')
//{
if(!function_exists('e_help'))
{
function e_help()
{
if(deftrue("e_DEBUG_MENUMANAGER"))
@ -651,6 +655,7 @@ if($_SERVER['E_DEV_MENU'] == 'true')
return e_menu_layout::menuSelector();
}
}
//}

View File

@ -10,7 +10,7 @@
// FILE IS DEPRECATED - UP FOR REMOVAL IN THE FUTURE
require_once("../class2.php");
require_once(__DIR__.'/../class2.php');
e107::coreLan('message', true);

View File

@ -14,7 +14,7 @@ if(!empty($_POST) && !isset($_POST['e-token']))
{
$_POST['e-token'] = '';
}
require_once("../class2.php");
require_once(__DIR__.'/../class2.php');
if (!getperms("T"))
{
@ -133,7 +133,7 @@ $text = "
<div class='buttons-bar center'>".
$frm->admin_button('metasubmit','no-value','update', LAN_UPDATE)."
</div>
<input type='hidden' name='e-token' value='".e_TOKEN."' />
<input type='hidden' name='e-token' value='".defset('e_TOKEN')."' />
</fieldset>
</form>
";

View File

@ -8,7 +8,7 @@
* Exists only for BC.
*/
require_once("../class2.php");
require_once(__DIR__.'/../class2.php');
if (!getperms("B"))
{
@ -19,11 +19,11 @@ if (!getperms("B"))
$tmp = explode(".", e_QUERY);
$table = $tmp[0];
$id = intval($tmp[1]);
$editid = intval($tmp[2]);
$id = (int) varset($tmp[1]);
$editid = (int) varset($tmp[2]);
$url = e_ADMIN_ABS."comment.php?searchquery=".$id."&filter_options=comment_type__".e107::getComment()->getCommentType($table);
e107::getRedirect()->go($url);
exit;

View File

@ -10,7 +10,7 @@
*
*/
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
if (!getperms('H|N|H0|H1|H2|H3|H4|H5'))
{
@ -1623,4 +1623,4 @@ if(!e_AJAX_REQUEST)
require_once("footer.php");
}
exit;

View File

@ -8,7 +8,7 @@
*
*/
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
if (!getperms('O'))
{
@ -119,7 +119,7 @@ class plugin_notify_admin_ui extends e_admin_ui
$recalibrate = FALSE;
// load every e_notify.php file.
if($pref['e_notify_list'])
if(!empty($pref['e_notify_list']))
{
foreach($pref['e_notify_list'] as $val) // List of available e_notify.php files.
{
@ -464,579 +464,29 @@ e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");
function headerjs()
// todo use e107::js('inline')
if(!function_exists('headerjs'))
{
$js = "
<script type='text/javascript'>
function mail_field(val,id)
function headerjs()
{
if(val == 'email')
$js = "
<script type='text/javascript'>
function mail_field(val,id)
{
document.getElementById(id).style.display ='';
}
else
{
document.getElementById(id).style.display ='none';
}
}
</script>";
return $js;
}
exit;
$e_sub_cat = 'notify';
require_once('auth.php');
require_once(e_HANDLER.'userclass_class.php');
$frm = e107::getForm();
$nc = new notify_config;
$uc = new user_class;
$mes = e107::getMessage();
if(!empty($_GET['iframe']))
{
define('e_IFRAME', true);
}
if (isset($_POST['update']))
{
if(!$nc -> update())
{
$mes->addError(LAN_UPDATED_FAILED);
}
//$emessage->add($message, $style);
// $ns -> tablerender($message,"<div style='text-align:center'>".$message."</div>");
}
$nc -> config();
class notify_config
{
var $notify_prefs;
var $changeList = array();
var $pluginConfig = array();
function __construct()
{
$pref = e107::getPref();
$this->notify_prefs = e107::getConfig('notify')->getPref();
$this->prefCleanup();
$this->test();
$recalibrate = FALSE;
// load every e_notify.php file.
if($pref['e_notify_list'])
{
foreach($pref['e_notify_list'] as $val) // List of available e_notify.php files.
if(val == 'email')
{
// if (!isset($this->notify_prefs['plugins'][$val]))
{
$this -> notify_prefs['plugins'][$val] = TRUE;
if (is_readable(e_PLUGIN.$val."/e_notify.php"))
{
require_once(e_PLUGIN.$val.'/e_notify.php');
if(class_exists($val."_notify")) // new v2.x
{
$legacy = 0; // Newe.
$config_events = array();
$data = e107::callMethod($val."_notify", 'config');
$config_category = str_replace("_menu","",ucfirst($val))." ".LAN_NOTIFY_01;
foreach($data as $v)
{
$func = $v['function'];
$config_events[$func] = $v['name'];
}
}
else
{
$legacy = 1; // Legacy Mode.
}
// foreach ($config_events as $event_id => $event_text)
// {
// $this -> notify_prefs['event'][$event_id] = array('class' => '255', 'email' => '', 'plugin'=> $val);
// }
$this->pluginConfig[$val] = array('category' => $config_category, 'events' => $config_events, 'legacy'=> $legacy);
$recalibrate = true;
}
}
document.getElementById(id).style.display ='';
}
}
// print_a($this->pluginConfig);
//if ($recalibrate)
//{
// $s_prefs = $tp -> toDB($this -> notify_prefs);
// $s_prefs = $eArrayStorage -> WriteArray($s_prefs);
// $sql -> db_Update("core", "e107_value='".$s_prefs."' WHERE e107_name='notify_prefs'");
//}
}
function prefCleanup()
{
$oldPrefs = e107::getEvent()->oldCoreList();
$curData = $this->notify_prefs['event'];
foreach($curData as $k=>$v)
{
if(isset($oldPrefs[$k]))
else
{
$newKey = $oldPrefs[$k];
$this->notify_prefs['event'][$newKey] = $v;
unset($this->notify_prefs['event'][$k]);
}
}
}
function test()
{
if(!empty($_POST['test']))
{
$id = key( $_POST['test']);
$exampleData = array('id'=>'Test for '.$id, 'data'=>'example data' );
e107::getMessage()->addSuccess('Triggering: '.$id);
e107::getEvent()->trigger($id, $exampleData);
}
}
function config()
{
//global $ns, $rs, $frm, $emessage;
$ns = e107::getRender();
$frm = e107::getForm();
$mes = e107::getMessage();
$events = e107::getEvent()->coreList();
$tab = array();
foreach($events as $k=>$cat)
{
$text = " <table class='table adminform'>
<colgroup>
<col class='col-label' />
<col class='col-control' />
</colgroup>";
foreach($cat as $c=>$ev)
{
$text .= $this -> render_event($c, $ev);
}
$text .= "</table>";
$caption = str_replace("_menu","",ucfirst($k))." ".LAN_NOTIFY_01;
$tab[] = array('caption'=>$caption, 'text' => $text);
}
if(!empty($this->notify_prefs['plugins']))
{
foreach ($this->notify_prefs['plugins'] as $plugin_id => $plugin_settings)
{
if(is_readable(e_PLUGIN.$plugin_id.'/e_notify.php'))
{
$config_category = $this->pluginConfig[$plugin_id]['category'];
$legacy = $this->pluginConfig[$plugin_id]['legacy'];
$text = "<table class='table adminform'>
<colgroup>
<col class='col-label' />
<col class='col-control' />
</colgroup>";
;
foreach ($this->pluginConfig[$plugin_id]['events'] as $event_id => $event_text)
{
$text .= $this->render_event($event_id, $event_text, $plugin_id, $legacy);
}
$text .= "</table>\n";
$tab[] = array('caption'=> $config_category, 'text'=> $text);
}
document.getElementById(id).style.display ='none';
}
}
$text2 = $frm->open('scanform', 'post', e_REQUEST_URL); // <form action='".e_SELF."?results' method='post' id='scanform'>
$text2 .= $frm->tabs($tab);
$text2 .= "<div class='buttons-bar center'>". $frm->admin_button('update', LAN_UPDATE,'update') . "</div>";
$text2 .= $frm->close();
</script>";
$ns -> tablerender(NT_LAN_1, $mes->render() . $text2);
return;
// <div>".NT_LAN_2.":</div>
/*
$text = "
<form action='".e_SELF."?results' method='post' id='scanform'>
<ul class='nav nav-tabs'>
<li class='active'><a href='#core' data-toggle='tab'>Users</a></li>
<li><a href='#news' data-toggle='tab'>News</a></li>
<li><a href='#mail' data-toggle='tab'>Mail</a></li>
<li><a href='#files' data-toggle='tab'>Files</a></li>";
if(!empty($this->notify_prefs['plugins']))
{
foreach ($this -> notify_prefs['plugins'] as $id => $var)
{
$text .= "<li><a href='#notify-".$id."' data-toggle='tab'>".ucfirst($id)."</a></li>";
}
}
$text .= "
</ul>
<div class='tab-content'>
<div class='tab-pane active' id='core'>
<fieldset id='core-notify-config'>
<legend>".NU_LAN_1."</legend>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
<col class='col-control' />
</colgroup>
";
$text .= $this -> render_event('usersup', NU_LAN_2);
$text .= $this -> render_event('userveri', NU_LAN_3);
$text .= $this -> render_event('login', NU_LAN_4);
$text .= $this -> render_event('logout', NU_LAN_5);
$text .= $this -> render_event('user_xup_', NU_LAN_5);
$text .= "</table></fieldset>
<fieldset id='core-notify-2'>
<legend>".NS_LAN_1."</legend>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
<col class='col-control' />
</colgroup>";
$text .= $this -> render_event('flood', NS_LAN_2);
$text .= "</table></fieldset>
</div>
<div class='tab-pane' id='news'>
<fieldset id='core-notify-3'>
<legend>".NN_LAN_1."</legend>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
<col class='col-control' />
</colgroup>";
$text .= $this -> render_event('subnews', NN_LAN_2);
$text .= $this -> render_event('newspost', NN_LAN_3);
$text .= $this -> render_event('newsupd', NN_LAN_4);
$text .= $this -> render_event('newsdel', NN_LAN_5);
$text .= "</table></fieldset>
</div>
<div class='tab-pane' id='mail'>
<fieldset id='core-notify-4'>
<legend>".NM_LAN_1."</legend>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
<col class='col-control' />
</colgroup>";
$text .= $this -> render_event('maildone', NM_LAN_2);
$text .= "</table></fieldset>
</div>
<div class='tab-pane' id='files'>
<fieldset id='core-notify-5'>
<legend>".NF_LAN_1."</legend>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
<col class='col-control' />
</colgroup>";
$text .= $this -> render_event('fileupload', NF_LAN_2);
$text .= "</table>
</fieldset>
</div>";
if(!empty($this->notify_prefs['plugins']))
{
foreach ($this->notify_prefs['plugins'] as $plugin_id => $plugin_settings)
{
if(is_readable(e_PLUGIN.$plugin_id.'/e_notify.php'))
{
$config_category = $this->pluginConfig[$plugin_id]['category'];
$legacy = $this->pluginConfig[$plugin_id]['legacy'];
// require(e_PLUGIN.$plugin_id.'/e_notify.php');
$text .= "<div class='tab-pane' id='notify-".$plugin_id."'>
<fieldset id='core-notify-".str_replace(" ","_",$config_category)."'>
<legend>".$config_category."</legend>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
<col class='col-control' />
</colgroup>";
;
foreach ($this->pluginConfig[$plugin_id]['events'] as $event_id => $event_text)
{
$text .= $this->render_event($event_id, $event_text, $plugin_id, $legacy);
}
$text .= "</table>
</div>";
}
}
}
$text .= "
<div class='buttons-bar center'>";
$text .= $frm->admin_button('update', LAN_UPDATE,'update');
$text .= "
</div>
</fieldset>
</form>
";
$ns -> tablerender(NT_LAN_1, $mes->render() . $text);
*/
}
function render_event($id, $description, $include='', $legacy = 0)
{
$tp = e107::getParser();
$frm = e107::getForm();
$uc = e107::getUserClass();
$uc->fixed_classes['email'] = NM_LAN_3;
$uc->text_class_link['email'] = 'email';
if(defined($description))
{
$description = constant($description);
}
$highlight = varset($_GET['type']) == $id ? " class='text-warning'" : '';
$text = "
<tr>
<td title='".$id."'><span{$highlight}>".$description.":</span></td>";
if(e_DEBUG)
{
$text .= "<td>".$id."</td>";
}
$text .= "
<td class='form-inline nowrap'>
".$uc->uc_dropdown('event['.$id.'][class]', varset($this->notify_prefs['event'][$id]['class'], e_UC_NOBODY), "nobody,main,admin,member,classes,email","onchange=\"mail_field(this.value,'event_".$id."');\" ");
if($this -> notify_prefs['event'][$id]['class'] == 'email')
{
$disp='display:visible';
$value = $tp -> toForm($this -> notify_prefs['event'][$id]['email']);
}
else
{
$disp = "display:none";
$value= "";
}
$text .= "<input type='text' style='width:200px;$disp' class='tbox' id='event_".$id."' name='event[".$id."][email]' value=\"".$value."\" />\n";
$text .= $frm->hidden("event[".$id."][include]", $include);
$text .= $frm->hidden("event[".$id."][legacy]", $legacy); // function or method
if(isset($this->notify_prefs['event'][$id]['class']) && $this->notify_prefs['event'][$id]['class'] != e_UC_NOBODY)
{
$text .= $frm->button('test['.$id.']', $id, 'confirm', LAN_TEST);
}
$text .= "</td>";
$text .= "
</tr>";
return $text;
}
function update()
{
$this->changeList = array();
$active = false;
foreach ($_POST['event'] as $key => $value)
{
if ($this -> update_event($key))
{
$active = true;
}
}
// print_a($this->notify_prefs);
/*
$s_prefs = $tp -> toDB($this -> notify_prefs);
$s_prefs = $eArrayStorage -> WriteArray($s_prefs);
if($sql -> db_Update("core", "e107_value='".$s_prefs."' WHERE e107_name='notify_prefs'")!==FALSE)
*/
e107::getConfig()->set('notify',$active)->save(true,true,false);
e107::getConfig('notify')->updatePref($this->notify_prefs);
if (e107::getConfig('notify')->save(FALSE))
{
// e107::getAdminLog()->logArrayAll('NOTIFY_01',$this->changeList);
return true;
}
else
{
return false;
}
}
function update_event($id)
{
$changed = FALSE;
if ($this -> notify_prefs['event'][$id]['class'] != $_POST['event'][$id]['class'])
{
$this -> notify_prefs['event'][$id]['class'] = $_POST['event'][$id]['class'];
$changed = TRUE;
}
if ($this -> notify_prefs['event'][$id]['email'] != $_POST['event'][$id]['email'])
{
$this -> notify_prefs['event'][$id]['email'] = $_POST['event'][$id]['email'];
$changed = TRUE;
}
$this -> notify_prefs['event'][$id]['include'] = $_POST['event'][$id]['include'];
$this -> notify_prefs['event'][$id]['legacy'] = $_POST['event'][$id]['legacy'];
unset($this -> notify_prefs['event'][$id]['plugin']);
unset($this -> notify_prefs['event'][$id]['type']);
if ($changed)
{
$this->changeList[$id] = $this->notify_prefs['event'][$id]['class'].', '.$this->notify_prefs['event'][$id]['email'];
}
if ($this -> notify_prefs['event'][$id]['class'] != 255)
{
return TRUE;
}
else
{
return FALSE;
}
return $js;
}
}
require_once(e_ADMIN.'footer.php');/*
function headerjs()
{
$js = "
<script type='text/javascript'>
function mail_field(val,id)
{
if(val == 'email')
{
document.getElementById(id).style.display ='';
}
else
{
document.getElementById(id).style.display ='none';
}
}
</script>";
return $js;
}*/
?>

View File

@ -8,7 +8,7 @@
*
*/
require_once("../class2.php");
require_once(__DIR__.'/../class2.php');
if(!getperms("0"))
{

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@ if(!empty($_POST) && !isset($_POST['e-token']))
{
$_POST['e-token'] = '';
}
require_once ("../class2.php");
require_once (__DIR__."/../class2.php");
if(isset($_POST['newver']))
{
@ -319,7 +319,7 @@ $pref['membersonly_exceptions'] = implode("\n",$pref['membersonly_exceptions']);
$text = "
<div id='core-prefs'>
<form class='admin-menu' method='post' action='".e_SELF."' autocomplete='off'>
<input type='hidden' name='e-token' value='".e_TOKEN."' />
<input type='hidden' name='e-token' value='".defset('e_TOKEN')."' />
<fieldset id='core-prefs-main'>
<legend>".PRFLAN_1."</legend>
<table class='table adminform'>
@ -1445,21 +1445,21 @@ $text .= "
<td><label for='user-tracking-cookie'>".PRFLAN_48."</label></td>
<td >
<div class='form-inline'>
".$frm->radio('user_tracking', array('cookie' => PRFLAN_49, 'session' => PRFLAN_50), $pref['user_tracking'])."
".$frm->radio('user_tracking', array('cookie' => PRFLAN_49, 'session' => PRFLAN_50), varset($pref['user_tracking']))."
</div></td>
</tr>
<tr>
<td><label for='cookie-name'>".PRFLAN_55."</label></td>
<td >".$frm->text('cookie_name', $pref['cookie_name'], 20)."
<td >".$frm->text('cookie_name', varset($pref['cookie_name']), 20)."
<div class='field-help'>".PRFLAN_263.".</div></td></tr>
<tr>
<td><label for='session-lifetime'>".PRFLAN_272."</label></td>
<td>
".$frm->number('session_lifetime', $pref['session_lifetime'],6)."
".$frm->number('session_lifetime', varset($pref['session_lifetime']), 6)."
<div class='smalltext field-help'>".PRFLAN_273."</div>
</td>
</tr>
@ -1474,7 +1474,7 @@ $text .= "
<tr>
<td><label for='session-save-method'>".PRFLAN_282."</label></td>
<td class='form-inline'>
".$frm->select('session_save_method', [ 'db'=>'Database', 'files'=>'Files'], $pref['session_save_method'])."
".$frm->select('session_save_method', [ 'db'=>'Database', 'files'=>'Files'], varset($pref['session_save_method']))."
<!-- <div class='smalltext field-help'>".PRFLAN_273."</div>-->
<!-- <span class='label label-warning'>Experimental</span>-->
</td>
@ -2023,7 +2023,7 @@ $text .= "
";
$auth_dropdown = '';
if($authlist)
if(!empty($authlist))
{
$auth_dropdown = "\n".$frm->select_open('auth_method')."\n";
foreach($authlist as $a)

View File

@ -10,7 +10,7 @@
*
*/
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
if (!getperms('X'))
{
e107::redirect('admin');
@ -30,7 +30,10 @@ $e_userclass = new user_class();
$query = explode('.', e_QUERY);
$search_prefs = $sysprefs -> getArray('search_prefs');
$search_prefs = e107::getConfig('search')->getPref();

View File

@ -15,7 +15,7 @@
*
*/
require_once("../class2.php");
require_once(__DIR__.'/../class2.php');
if (!getperms("1|TMP"))
{

View File

@ -9,7 +9,7 @@
* Administration - Site Maintenance
*
*/
require_once ('../class2.php');
require_once (__DIR__.'/../class2.php');
if(!getperms('9'))
{
@ -106,16 +106,17 @@ $text .= "
";
//Ajax Support
if(!e_AJAX_REQUEST)
if(e_AJAX_REQUEST)
{
echo "<div id='ajax-container'>\n";
$ns->tablerender(UGFLAN_4, $mes->render().$text, 'core-ugflag');
echo "\n</div>";
require_once (e_ADMIN."footer.php");
exit();
exit;
}
echo "<div id='ajax-container'>\n";
$ns->tablerender(UGFLAN_4, $mes->render().$text, 'core-ugflag');
echo "\n</div>";
require_once (e_ADMIN."footer.php");
/**
* Handle page DOM within the page header

View File

@ -19,7 +19,7 @@
// [debug=8] shows the operations on major table update
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
require_once(e_HANDLER.'db_table_admin_class.php');
e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_e107_update.php');
// Modified update routine - combines checking and update code into one block per function

View File

@ -11,7 +11,7 @@
*
*/
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
// include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::lan('core','updateadmin',true);
@ -110,7 +110,7 @@ else
</tbody>
</table>
<div class='buttons-bar center'>
<input type='hidden' name='ac' value='".md5(ADMINPWCHANGE)."' />".
<input type='hidden' name='ac' value='".md5(defset('ADMINPWCHANGE'))."' />".
$frm->admin_button('update_settings','no-value','update',UDALAN_7)."
</div>

View File

@ -10,7 +10,7 @@
*
*/
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
if (!getperms('V'))
{
e107::redirect('admin');
@ -476,35 +476,3 @@ require_once(e_ADMIN."auth.php");
e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");
exit;

View File

@ -10,7 +10,7 @@
*
*/
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
if (!getperms('4'))
{
@ -505,15 +505,8 @@ e107::coreLan('userclass2', true);
new uclass_admin();
new uclass_admin();
require_once(e_ADMIN."auth.php");
e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");
require_once(e_ADMIN."auth.php");
e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");
exit;
?>

View File

@ -17,7 +17,7 @@ if(!empty($_POST) && !isset($_POST['e-token']))
if (!defined('e107_INIT'))
{
require_once("../class2.php");
require_once(__DIR__.'/../class2.php');
}
if (!getperms('4|U0|U1|U2|U3'))

View File

@ -8,7 +8,7 @@
*
*/
require_once('../class2.php');
require_once(__DIR__.'/../class2.php');
if (!getperms('4'))
{
@ -1164,21 +1164,13 @@ e107::js('footer-inline', js());
new user_extended_adminArea();
require_once(e_ADMIN."auth.php");
e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");
new user_extended_adminArea();
require_once(e_ADMIN."auth.php");
e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");
exit;

View File

@ -8,7 +8,7 @@
*
*/
require_once("../class2.php");
require_once(__DIR__.'/../class2.php');
if (!getperms("M"))
{
e107::redirect('admin');
@ -155,16 +155,7 @@ class generic_form_ui extends e_admin_form_ui
new wmessage_admin();
require_once(e_ADMIN."auth.php");
e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");
exit;

View File

@ -2048,15 +2048,15 @@ Inverse 10 <span class="badge badge-inverse">10</span>
$upStatus = (e107::getSession()->get('core-update-status') === true) ? "<span title=\"".ADLAN_120."\" class=\"text-info\"><i class=\"fa fa-database\"></i></span>" : '<!-- -->';
return $template['start']. '<li><a id="e-admin-core-update" tabindex="0" href="'.e_ADMIN_ABS.'e107_update.php" class="e-popover text-primary" role="button" data-container="body" data-toggle="popover" data-placement="right" data-trigger="bottom" data-content="'.$tp->toAttribute(ADLAN_120).'">'.$upStatus.'</a></li>' .$template['end'];
return varset($template['start']). '<li><a id="e-admin-core-update" tabindex="0" href="'.e_ADMIN_ABS.'e107_update.php" class="e-popover text-primary" role="button" data-container="body" data-toggle="popover" data-placement="right" data-trigger="bottom" data-content="'.$tp->toAttribute(ADLAN_120).'">'.$upStatus.'</a></li>' .varset($template['end']);
}
if($parm == self::ADMIN_NAV_HOME || $parm == self::ADMIN_NAV_LOGOUT || $parm == self::ADMIN_NAV_LANGUAGE || $parm == 'pm')
{
$template = $$tmpl;
$template = (array) $$tmpl;
$template['start'] = $template['start_other'];
$template['start'] = varset($template['start_other']);
$menu_vars = $this->getOtherNav($parm);
return e107::getNav()->admin('', '', $menu_vars, $template, FALSE, FALSE);

View File

@ -260,7 +260,7 @@ function nextprev_shortcode($parm = null)
// caption, e.g. 'Page 1 of 20' box
if($e_vars->caption)
{
$ret .= $tp->simpleParse($tmpl[$tprefix.'nav_caption'], $e_vars);
$ret .= $tp->simpleParse(varset($tmpl[$tprefix.'nav_caption']), $e_vars);
}
$ret_array = array();

View File

@ -2,53 +2,330 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Admin template - _blank theme
*
*
* $Source: /cvs_backup/e107_0.8/e107_themes/templates/admin_template.php,v $
* $Source: /cvs_backup/e107_0.8/e107_themes/_blank/admin_template.php,v $
* $Revision$
* $Date$
* $Author$
*
*/
if (!defined('e107_INIT')) { exit(); }
//e107::lan('theme', 'admin',true);
$E_ADMIN_NAVIGATION['start'] = '<ul class="nav nav-admin navbar-nav navbar-left">';
$E_ADMIN_NAVIGATION['start_other'] = '<ul class="nav nav-admin navbar-nav navbar-right">';
$E_ADMIN_NAVIGATION['button'] = '
<li class="dropdown">
<a class="dropdown-toggle navbar-admin-button" role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}" title="{LINK_TEXT}">
{LINK_IMAGE}
</a>
{SUB_MENU}
</li>
';
$E_ADMIN_NAVIGATION['button_active'] = '
<li class="dropdown active">
<a class="dropdown-toggle navbar-admin-button" role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}" title="{LINK_TEXT}">
{LINK_IMAGE}
</a>
{SUB_MENU}
</li>
';
// Leave Admin Area.
$E_ADMIN_NAVIGATION['button_enav_home'] = '
<li class="dropdown">
<a class="dropdown-toggle" style="display:inline-block; margin-right:0;" title="'.ADLAN_53.'" href="'.e_HTTP.'" >
{LINK_IMAGE} {LINK_TEXT}
</a><a style="display:inline-block;border-left:0;margin-left:0;padding-left:4px;" class="dropdown-toggle" title="'.ADLAN_53.'" role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}" >
<b class="caret"></b>
</a>
{SUB_MENU}
</li>
';
// Change Language
$E_ADMIN_NAVIGATION['button_enav_language'] = '
<li class="dropdown">
<a class="dropdown-toggle" title="'.LAN_CHANGE_LANGUAGE.'" role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}" >
{LINK_IMAGE} {LINK_TEXT}
<b class="caret"></b>
</a>
{SUB_MENU}
</li>
';
$str = str_replace('.', '', ADMINPERMS);
if ($str == '0')
{
$label = ADLAN_48.': '.ADMINNAME.' ('.ADLAN_49.') ';
}
else
{
$label = ADLAN_48.': '.ADMINNAME.' ';
}
// Logout / Settings / Personalize
$E_ADMIN_NAVIGATION['button_enav_logout'] = '
<li class="dropdown">
<a class="dropdown-toggle admin-icon-avatar " title="'.$label.'" role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}" >
{LINK_IMAGE} {LINK_TEXT}
<b class="caret"></b>
</a>
{SUB_MENU}
</li>
';
// Private Messaging - //TODO Discuss and make this work..
$E_ADMIN_NAVIGATION['button_pm'] = '
<li class="dropdown">
<a class="dropdown-toggle" title="Messages" role="button" data-toggle="dropdown" href="#" >
<i class="icon-envelope active"></i> 3
<b class="caret"></b>
</a>
<div id="dropdown" class="dropdown-menu pull-right e-noclick" style="padding:10px;width:300px;">
<ul class="nav-list">
<li class="dropdown-header nav-header">Unread Messages</li>
<li><a href="#">Incoming Message Number 1</a></li>
<li><a href="#">Incoming Message Number 2</a></li>
<li><a href="#">Incoming Message Number 3</a></li>
<li class="divider"></li>
</ul>
<textarea class="e-tip input-block-level" title="Example Only"></textarea>
<button class="dropdown-toggle btn btn-primary" >Send</button>
</div>
</li>
';
$E_ADMIN_NAVIGATION['button_other'] = '
<li>
<a role="button" href="{LINK_URL}" >
{LINK_TEXT}
</a>
</li>
';
$E_ADMIN_NAVIGATION['start_sub'] = '
<ul class="dropdown-menu {LINK_SUB_OVERSIZED}" role="menu" >
';
$E_ADMIN_NAVIGATION['start_other_sub'] = '
<ul class="dropdown-menu pull-right" role="menu" >
';
$E_ADMIN_NAVIGATION['button_sub'] = '
<li role="menuitem" class="{LINK_CLASS}">
<a href="{LINK_URL}">{LINK_IMAGE}{LINK_TEXT}</a>
</li>
';
$E_ADMIN_NAVIGATION['button_active_sub'] = '
<li role="menuitem" class="active">
<a href="{LINK_URL}">{LINK_IMAGE}{LINK_TEXT}</a>
</li>
';
$E_ADMIN_NAVIGATION['end_sub'] = '</ul>';
$E_ADMIN_NAVIGATION['end'] = '</ul>';
/*
<div class="admin-navigation">
<div id="nav">{ADMIN_NAVIGATION}</div>
<div class="clear"><!-- --></div>
</div>
*/
if (!defined('e107_INIT')) { exit; }
// $inverse = (e107::getPref('admincss') == "admin_light.css") ? "navbar-inverse" : "";
$ADMIN_HEADER = "<div style='text-align:center'>
{ADMIN_LOGO}
<br />
{ADMIN_LOGGED}
{ADMIN_SEL_LAN}
$ADMIN_MODAL = '
<div id="uiModal" class="modal fade">
<div id="admin-ui-modal" class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title modal-caption">&nbsp;</h4>
</div>
<div class="modal-body">
<p>'.LAN_LOADING.'</p>
</div>
<div class="modal-footer">
<button type="button" id="e-modal-submit" class="btn btn-success" style="display:none;" data-loading-icon="fa-spinner"><!-- placeholder --></button>
<button type="button" class="btn btn-primary" data-dismiss="modal">'.LAN_CLOSE.'</button>
</div>
</div>
</div>
</div>
<table style='width:100%' cellspacing='10' cellpadding='10'>
<tr>
<td style='width:17%; vertical-align: top;'>
{ADMIN_NAV}
{ADMIN_LANG}
{ADMIN_PWORD}
{ADMIN_STATUS=request}
{ADMIN_LATEST=request}
{ADMIN_LOG=request}
{ADMIN_HELP}
{ADMIN_MSG}
{ADMIN_PLUGINS}
</td>
<td style='width:62%; vertical-align: top;'>
";
$ADMIN_FOOTER = "</td>
<td style='width:17%; vertical-align:top'>
{ADMIN_MENU}
{ADMIN_PRESET}
{ADMIN_UPDATE}
{ADMIN_SITEINFO}
{ADMIN_DOCS}
</td>
</tr>
</table>
{ADMIN_CREDITS}
";
';
$ADMIN_HEADER = $ADMIN_MODAL . '
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand navbar-brand" href="'.e_ADMIN_ABS.'admin.php" title="'.LAN_RETURN_TO_FRONT_PANEL.'">
<img class="admin-logo" src="'.e_THEME_ABS.'bootstrap3/images/e107_adminlogo.png" alt="e107"/>
</a>
</div>
<div class="navbar-collapse collapse">
{ADMIN_NAVIGATION=no-main}
{ADMIN_NAVIGATION=enav_popover}
<div>
{ADMIN_NAVIGATION=enav_logout}
{ADMIN_NAVIGATION=enav_language}
{ADMIN_NAVIGATION=enav_home}
{ADMIN_MULTISITE}
{ADMIN_PM}
{ADMIN_DEBUG}
{ADMIN_UPDATE}
</div>
</div>
</div>
</div>
<div class="admin-container container-fluid">
<div class="row is-table-row">
';
$adminstyle = e107::getConfig()->get('adminstyle', 'infopanel');
if(defset('e_PAGE') == 'admin.php' && $adminstyle == 'flexpanel' && varset($_GET['mode']) != 'customize')
{
$ADMIN_HEADER .= '
<div class="col-sm-12">
<div class="admin-main-content is-table-row">
';
}
else
{
$ADMIN_HEADER .= '
<div class="col-md-3 col-lg-2 admin-left-panel hidden-print">
{SETSTYLE=warning}
{ADMIN_ADDON_UPDATES}
{SETSTYLE=site_info}
{ADMIN_PWORD}
{SETSTYLE=admin_menu}
{ADMIN_MENU}
{ADMIN_MENUMANAGER}
{SETSTYLE=site_info}
{ADMINUI_HELP}
{ADMIN_HELP}
{ADMIN_SITEINFO=creditsonly}
{SETSTYLE=lists}
{ADMIN_LATEST=infopanel}
{ADMIN_STATUS=infopanel}
{SETSTYLE=admin_menu}
{ADMIN_LOG=request}
{ADMIN_MSG=request}
{ADMIN_PLUGINS}
<!--<div class="admin-copyright"><small>Copyright &copy; 2008-2017 e107.org</small></div>-->
{SETSTYLE=default}
</div>
<div class="col-md-9 col-lg-10 admin-right-panel">
<div class="sidebar-toggle">
<a href="#" title="Toggle Sidebar" data-toggle-sidebar="true">&nbsp;</a>
</div>
<div class="admin-main-content">
';
}
// TODO - LANs
$ADMIN_FOOTER = '
</div>
</div>
</div><!--/.row-->
</div><!--/.fluid-container-->
';
/* NEW ADMIN MENU TEMPLATE
* see function e107::getNav()->admin() in e107_admin/header.php
*/
$E_ADMIN_MENU['start'] = '
<div class="nav-panel-body">
<ul id="admin-ui-nav-menu" class="plugin-navigation nav nav-pills nav-stacked">
';
$E_ADMIN_MENU['button'] = '
<li>
<a class="link{LINK_CLASS}" {LINK_DATA} href="{LINK_URL}" {ID}{ONCLICK}>&nbsp;{LINK_TEXT}{LINK_BADGE}</a>
{SUB_MENU}
</li>
';
$E_ADMIN_MENU['button_active'] = '
<li class="active">
<a class="link-active{LINK_CLASS}" {LINK_DATA} href="{LINK_URL}" {ID}{ONCLICK}>&nbsp;{LINK_TEXT}{LINK_BADGE}</a>
{SUB_MENU}
</li>
';
$E_ADMIN_MENU['start_sub'] = '
<ul class="plugin-navigation-sub{SUB_CLASS}" {SUB_ID}>
';
$E_ADMIN_MENU['button_sub'] = '
<li>
<a class="link" href="{LINK_URL}">&nbsp;{LINK_TEXT}{LINK_BADGE}</a>
{SUB_MENU}
</li>
';
$E_ADMIN_MENU['button_active_sub'] = '
<li>
<a class="link-active" href="{LINK_URL}">&nbsp;{LINK_TEXT}{LINK_BADGE}</a>
{SUB_MENU}
</li>
';
$E_ADMIN_MENU['end_sub'] = '
</ul>
';
$E_ADMIN_MENU['end'] = '
</ul>
</div>
';
$E_ADMIN_MENU['divider'] = '<li role="separator" class="divider"></li>';

View File

@ -355,7 +355,7 @@ class mailoutAdminClass extends e107MailManager
global $user_pref;
$this->mode = $mode;
$curTable = $this->tasks[$this->mode]['defaultTable'];
$curTable = varset($this->tasks[$this->mode]['defaultTable']);
if ($curTable)
{
if (isset($user_pref['admin_mailout_columns'][$mode]) && is_array($user_pref['admin_mailout_columns'][$mode]))
@ -380,7 +380,7 @@ class mailoutAdminClass extends e107MailManager
// Possibly the sort field needs changing
if (!isset($this->fields[$curTable][$this->sortField]))
{
$this->sortField = $this->tasks[$mode]['defaultSort'];
$this->sortField = varset($this->tasks[$mode]['defaultSort']);
}
// Now hide any fields that need to be for this mode
@ -563,7 +563,7 @@ class mailoutAdminClass extends e107MailManager
$pref = e107::getPref();
$pref['mailout_enabled'] = str_replace('core', 'user', $pref['mailout_enabled']); // BC fix.
$pref['mailout_enabled'] = str_replace('core', 'user', varset($pref['mailout_enabled'])); // BC fix.
$ret = 0;
$toLoad = explode(',', $options);
@ -1308,7 +1308,7 @@ class mailoutAdminClass extends e107MailManager
if ($mailData === false)
{
$mes->addInfo(LAN_MAILOUT_79);
$ns->tablerender(ADLAN_136 . SEP . LAN_MAILOUT_171, $mes->render() . $text);
$ns->tablerender(ADLAN_136 . SEP . LAN_MAILOUT_171, $mes->render() );
exit;
}
@ -1323,7 +1323,7 @@ class mailoutAdminClass extends e107MailManager
<tbody>";
$text .= $this->showMailDetail($mailData, 'template');
$text .= '<tr><td>' . LAN_MAILOUT_172 . '</td><td>' . $this->statusToText($mailData['mail_content_status']) . "<input type='hidden' name='mailIDConf' value='{$mailID}' /></td></tr>";
$text .= '<tr><td>' . LAN_MAILOUT_172 . '</td><td>' . $this->statusToText($mailData['mail_content_status']) . "<input type='hidden' name='mailIDConf' value='".$mailId."' /></td></tr>";
$text .= "</tbody></table>\n</fieldset>";

View File

@ -248,7 +248,10 @@ class e_menuManager
$FOOTER = array();
foreach($LAYOUT as $key=>$template)
{
list($hd,$ft) = explode("{---}",$template);
$tmp = explode("{---}",$template);
$hd = varset($tmp[0]);
$ft = varset($tmp[1]);
$HEADER[$key] = isset($LAYOUT['_header_']) ? $LAYOUT['_header_'] . $hd : $hd;
$FOOTER[$key] = isset($LAYOUT['_footer_']) ? $ft . $LAYOUT['_footer_'] : $ft ;
}

View File

@ -355,6 +355,11 @@ class redirection
*/
public function go($url='', $replace = TRUE, $http_response_code = NULL, $preventCache = true)
{
if(e107::isCli())
{
return null;
}
$url = str_replace("&amp;", "&", $url); // cleanup when using e_QUERY in $url;
if(empty($url))

View File

@ -1400,7 +1400,7 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
|| e_REQUEST_HTTP === varset($e107_vars[$act]['link'])
)
{
$temp = $tmpl['button_active'.$kpost];
$temp = varset($tmpl['button_active'.$kpost]);
}
else
{
@ -1423,7 +1423,7 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
if(!empty($e107_vars[$act]['template']))
{
$tmplateKey = 'button_'.$e107_vars[$act]['template'].$kpost;
$temp = $tmpl[$tmplateKey];
$temp = varset($tmpl[$tmplateKey]);
// e107::getDebug()->log($tmplateKey);
}

View File

@ -2226,7 +2226,7 @@ class themeHandler
}
$tdClass = !empty($val['writeParms']['post']) ? 'form-inline' : '';
$text .= "<tr><td><b>".$val['title']."</b>:</td><td class='".$tdClass."' colspan='2'>".$frm->renderElement($field, $value[$field], $val)."<div class='field-help'>".varset($val['help'])."</div></td></tr>";
$text .= "<tr><td><b>".$val['title']."</b>:</td><td class='".$tdClass."' colspan='2'>".$frm->renderElement($field, varset($value[$field]), $val)."<div class='field-help'>".varset($val['help'])."</div></td></tr>";
}
}

View File

@ -19,7 +19,7 @@
//define("UCSLAN_7", "No user classes yet.");//LAN_NO_RECORDS_FOUND
//define("UCSLAN_8", "Existing Classes");//NOT USED
//define("UCSLAN_9", "No Icon");//NOT USED
define("UCSLAN_10", "Class not deleted - it is a core class, or is used in the definition of another class, as either parent or edit class");
// define("UCSLAN_10", "Class not deleted - it is a core class, or is used in the definition of another class, as either parent or edit class");
//define("UCSLAN_11", "tick to confirm");//NOT USED
//define("UCSLAN_12", "Class Name");//LAN_NAME
//define("UCSLAN_13", "Class Description");//LAN_DESCRIPTION

View File

@ -56,7 +56,18 @@ class E107Preparer implements Preparer
if(is_dir($dirPath))
{
rmdir($dirPath);
try
{
rmdir($dirPath);
}
catch (Exception $e)
{
echo $e->getMessage()."\n";
/* echo "Contents: \n";
$list = scandir($dirPath);
var_export($list);*/
// do something
}
}
}
}

File diff suppressed because one or more lines are too long