Revision 1808
Added by Luisehahne almost 13 years ago
| class.admin.php | ||
|---|---|---|
| 57 | 57 |
parent::__construct(SecureForm::BACKEND); |
| 58 | 58 |
if( $section_name != '##skip##' ) |
| 59 | 59 |
{
|
| 60 |
global $database, $MESSAGE; |
|
| 60 |
global $database, $MESSAGE, $TEXT;
|
|
| 61 | 61 |
// Specify the current applications name |
| 62 | 62 |
$this->section_name = $section_name; |
| 63 | 63 |
$this->section_permission = $section_permission; |
| ... | ... | |
| 73 | 73 |
} |
| 74 | 74 |
// Now check if they are allowed in this section |
| 75 | 75 |
if($this->get_permission($section_permission) == false) {
|
| 76 |
die($MESSAGE['ADMIN_INSUFFICIENT_PRIVELLIGES']); |
|
| 77 |
} |
|
| 76 |
// die($MESSAGE['ADMIN_INSUFFICIENT_PRIVELLIGES']); |
|
| 77 |
$sErrorMsgFile = $this->correct_theme_source('ErrorMsgFile.htt');
|
|
| 78 |
if(file_exists($sErrorMsgFile)) |
|
| 79 |
{
|
|
| 80 |
$this->print_header(); |
|
| 81 |
$oTpl = new Template(dirname( $sErrorMsgFile )); |
|
| 82 |
// $oTpl->debug = true; |
|
| 83 |
$sBackLink = (isset($_SERVER['QUERY_STRING'])&& ($_SERVER['QUERY_STRING']!='')) ? $_SERVER['HTTP_REFERER'].'?'.$_SERVER['QUERY_STRING'] : $_SERVER['HTTP_REFERER']; |
|
| 84 |
$oTpl->set_file( 'page', 'ErrorMsgFile.htt' ); |
|
| 85 |
$oTpl->set_var( 'THEME_URL', THEME_URL ); |
|
| 86 |
$oTpl->set_var( 'PAGE_ICON', 'negative'); |
|
| 87 |
$oTpl->set_var( 'ERROR_TITLE', $MESSAGE['MEDIA_DIR_ACCESS_DENIED']); |
|
| 88 |
$oTpl->set_var( 'PAGE_TITLE', $MESSAGE['ADMIN_INSUFFICIENT_PRIVELLIGES'] ); |
|
| 89 |
$oTpl->set_var( 'BACK_LINK', $sBackLink ); |
|
| 90 |
$oTpl->set_var( 'TEXT_BACK', $TEXT['BACK'] ); |
|
| 91 |
$output = $oTpl->finish($oTpl->parse('output', 'page'));
|
|
| 92 |
} |
|
| 93 |
throw new ErrorMsgException($output); |
|
| 94 |
} |
|
| 78 | 95 |
} |
| 79 | 96 |
|
| 80 | 97 |
if( ($maintance==true) || $this->get_session('USER_ID')!= 1 )
|
| ... | ... | |
| 278 | 295 |
function print_footer($activateJsAdmin = false) {
|
| 279 | 296 |
global $database,$starttime,$iPhpDeclaredClasses; |
| 280 | 297 |
// include the required file for Javascript admin |
| 281 |
if($activateJsAdmin != false) {
|
|
| 298 |
if($activateJsAdmin == true) {
|
|
| 282 | 299 |
if(file_exists(WB_PATH.'/modules/jsadmin/jsadmin_backend_include.php')){
|
| 283 | 300 |
@include_once(WB_PATH.'/modules/jsadmin/jsadmin_backend_include.php'); |
| 284 | 301 |
} |
Also available in: Unified diff
! add ErrorMsgException in /framework/globalExceptionHandler.php
! ErrorMessage "ADMIN_INSUFFICIENT_PRIVELLIGES" now can be styled
by the /admin/skel/themes/htt/ErrorMsgFile.htt template
! add css selectors to wb_theme