Warning: chmod(): Operation not permitted in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [0] in function chmod in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [1] in function include_once in /var/www/hopeinstoughton_www/wp-settings.php on line 560 [2] in function require_once in /var/www/hopeinstoughton_www/wp-config.php on line 85 [3] in function require_once in /var/www/hopeinstoughton_www/wp-load.php on line 50 [4] in function require_once in /var/www/hopeinstoughton_www/wp-blog-header.php on line 13 [5] in function require in /var/www/hopeinstoughton_www/index.php on line 17
| Server IP : 94.177.8.99 / Your IP : 216.73.217.165 Web Server : Apache/2.4.58 (Ubuntu) System : Linux aries 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/kjvdictionary_store/modules/cms/controller/ |
Upload File : |
<?php
class cms_admin extends Controller {
public function __construct() {
parent::__construct(dirname(__DIR__));
}
public function __Register() {
$this->RegisterView(__CLASS__ .'::email', ['cms_admin_view' => ['render_email']]);
$this->RegisterView(__CLASS__ .'::cms_pages', ['cms_admin_view' => ['admin_cmspages', 'cms_decode']]);
}
/** staff */
public function email($param = '') {
// with no parameters - display list of active email templates - use email settings from index - see config/index.php for example
// load view files
// display modified email templates as bold
// get last-mod date from database
// with parameter - edit email template
$res = $this->DefaultResult(__METHOD__);
if ($param == '') {
$model = $this->LoadModel('cms_model');
$active_templates = $GLOBALS['loader']->EmailTemplates_List();
$res['emails'] = $model->getEmailLinks($active_templates);
$res['template'] = 'admin_email';
return $res;
} // when param specified, modules\cms\main.php will pick up the page
return $res;
}
/** staff */
public function cms_pages($page = '') {
$res = $this->DefaultResult(__METHOD__);
$model = $this->LoadModel('cms_model');
if ($page == 'decode') {
if ($this->isPost) {
$hash = trim($this->post('payload', ''));
$info = $model->decodeEditPage($hash);
header('Content-type: text/plain');
echo $info;
exit;
} else {
$res['popup'] = [
'template' => 'cms_decode',
'title' => 'Provide info about an EditPage hash',
'modal' => TRUE,
'width' => 800,
];
}
} else {
// get list of pages -
$res['template'] = 'admin_cmspages';
$res['datatable'] = $model->datatable_pagelist();
}
// edit to go to the specific page
return $res;
}
}