Revision 1808
Added by Luisehahne about 13 years ago
| branches/2.8.x/CHANGELOG | ||
|---|---|---|
| 13 | 13 |
|
| 14 | 14 |
|
| 15 | 15 |
|
| 16 |
07 Nov-2012 Build 1808 Dietmar Woellbrink (Luisehahne) |
|
| 17 |
! add ErrorMsgException in /framework/globalExceptionHandler.php |
|
| 18 |
! ErrorMessage "ADMIN_INSUFFICIENT_PRIVELLIGES" now can be styled |
|
| 19 |
by the /admin/skel/themes/htt/ErrorMsgFile.htt template |
|
| 20 |
! add css selectors to wb_theme |
|
| 21 |
! rename maintance.htt to maintenance.htt |
|
| 16 | 22 |
07 Nov-2012 Build 1807 Dietmar Woellbrink (Luisehahne) |
| 17 | 23 |
! fallback remove Timezone abbreviation in time format |
| 18 | 24 |
04 Nov-2012 Build 1806 Dietmar Woellbrink (Luisehahne) |
| branches/2.8.x/wb/admin/skel/themes/htt/maintance.htt | ||
|---|---|---|
| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
| 2 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
|
| 3 |
<head> |
|
| 4 |
<title>CMS WebsiteBaker | {PAGE_TITLE}</title>
|
|
| 5 |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
|
| 6 |
<meta http-equiv="content-language" content="{LANGUAGE}" />
|
|
| 7 |
<meta name="description" content="{PAGE_TITLE}" />
|
|
| 8 |
<meta name="keywords" content="{PAGE_TITLE}" />
|
|
| 9 |
<link href="{THEME_URL}/css/warn.css" rel="stylesheet" type="text/css" />
|
|
| 10 |
</head> |
|
| 11 |
|
|
| 12 |
<body> |
|
| 13 |
|
|
| 14 |
<div class="main"> |
|
| 15 |
<table class="header layout"> |
|
| 16 |
<tr> |
|
| 17 |
<td class="logo"> |
|
| 18 |
<a href="http://www.websitebaker2.org/" title=""><img src="{THEME_URL}/images/logo.png" alt="Logo" /></a>
|
|
| 19 |
</td> |
|
| 20 |
<td></td> |
|
| 21 |
</tr> |
|
| 22 |
</table> |
|
| 23 |
|
|
| 24 |
<div class="table"> |
|
| 25 |
<div class="td"> |
|
| 26 |
<div class="content"> |
|
| 27 |
<div class="login_box"> |
|
| 28 |
<div class="topdiv"> |
|
| 29 |
OFF-LINE - {WB_URL}
|
|
| 30 |
</div> |
|
| 31 |
<div class="bottomdiv"> |
|
| 32 |
<h3>{PAGE_TITLE}</h3>
|
|
| 33 |
<img src="{THEME_URL}/images/{PAGE_ICON}.png" alt="{PAGE_TITLE}" /><br />
|
|
| 34 |
<h3>{CHECK_BACK}</h3>
|
|
| 35 |
</div> |
|
| 36 |
</div> |
|
| 37 |
</div> |
|
| 38 |
</div> |
|
| 39 |
</div> |
|
| 40 |
<table class="footer"> |
|
| 41 |
<tbody> |
|
| 42 |
<tr> |
|
| 43 |
<td> |
|
| 44 |
<!-- Please note: the below reference to the GNU GPL should not be removed, as it provides a link for users to read about warranty, etc. --> |
|
| 45 |
<a href="http://www.websitebaker2.org/" title="external">WebsiteBaker</a> is released under the |
|
| 46 |
<a href="http://www.gnu.org/licenses/gpl.html" title="WebsiteBaker is released under the GNU General Public License">GNU General Public License</a> |
|
| 47 |
<!-- Please note: the above reference to the GNU GPL should not be removed, as it provides a link for users to read about warranty, etc. --> |
|
| 48 |
</td> |
|
| 49 |
</tr> |
|
| 50 |
</tbody> |
|
| 51 |
</table> |
|
| 52 |
</div> |
|
| 53 |
</body> |
|
| 54 |
</html> |
|
| 55 |
<!--- Icons from http://www.iconfinder.com Filter: Allowed for commercial use (No link required) --> |
|
| 56 |
<!--- Icon Designer David Vignoni - http://www.icon-king.com/ License: http://www.gnu.org/licenses/lgpl.html --> |
|
| 57 | 0 | |
| branches/2.8.x/wb/admin/skel/themes/htt/maintenance.htt | ||
|---|---|---|
| 15 | 15 |
<table class="header layout"> |
| 16 | 16 |
<tr> |
| 17 | 17 |
<td class="logo"> |
| 18 |
<a href="http://www.websitebaker2.org/" title=""><img src="../images/logo.png" alt="Logo" /></a>
|
|
| 18 |
<a href="http://www.websitebaker2.org/" title=""><img src="{THEME_URL}/images/logo.png" alt="Logo" /></a>
|
|
| 19 | 19 |
</td> |
| 20 | 20 |
<td></td> |
| 21 | 21 |
</tr> |
| ... | ... | |
| 26 | 26 |
<div class="content"> |
| 27 | 27 |
<div class="login_box"> |
| 28 | 28 |
<div class="topdiv"> |
| 29 |
OFF-LINE |
|
| 29 |
OFF-LINE - {WB_URL}
|
|
| 30 | 30 |
</div> |
| 31 | 31 |
<div class="bottomdiv"> |
| 32 | 32 |
<h3>{PAGE_TITLE}</h3>
|
| 33 |
<h3>{BE_PATIENT}</h3>
|
|
| 34 |
<img src="{PAGE_ICON}" alt="{PAGE_TITLE}" /><br />
|
|
| 33 |
<img src="{THEME_URL}/images/{PAGE_ICON}.png" alt="{PAGE_TITLE}" /><br />
|
|
| 35 | 34 |
<h3>{CHECK_BACK}</h3>
|
| 36 | 35 |
</div> |
| 37 | 36 |
</div> |
| branches/2.8.x/wb/admin/skel/themes/htt/ErrorMsgFile.htt | ||
|---|---|---|
| 1 |
<div class="acess-main"> |
|
| 2 |
<div class="table rounded shadow"> |
|
| 3 |
<div class="td"> |
|
| 4 |
<div class="content"> |
|
| 5 |
<div class="topdiv"> |
|
| 6 |
{ERROR_TITLE}
|
|
| 7 |
</div> |
|
| 8 |
<div class="bottomdiv"> |
|
| 9 |
<h3>{PAGE_TITLE}</h3>
|
|
| 10 |
<img src="{THEME_URL}/images/{PAGE_ICON}.png" alt="{PAGE_TITLE}" /><br />
|
|
| 11 |
<a href="{BACK_LINK}" title="{PAGE_TITLE}">{TEXT_BACK}</a>
|
|
| 12 |
</div> |
|
| 13 |
</div> |
|
| 14 |
</div> |
|
| 15 |
</div> |
|
| 16 |
</div> |
|
| 0 | 17 | |
| branches/2.8.x/wb/admin/interface/version.php | ||
|---|---|---|
| 51 | 51 |
|
| 52 | 52 |
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled) |
| 53 | 53 |
if(!defined('VERSION')) define('VERSION', '2.8.3');
|
| 54 |
if(!defined('REVISION')) define('REVISION', '1807');
|
|
| 54 |
if(!defined('REVISION')) define('REVISION', '1808');
|
|
| 55 | 55 |
if(!defined('SP')) define('SP', '');
|
| branches/2.8.x/wb/framework/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 |
} |
| branches/2.8.x/wb/framework/class.wb.php | ||
|---|---|---|
| 22 | 22 |
} |
| 23 | 23 |
/* -------------------------------------------------------- */ |
| 24 | 24 |
// Include PHPLIB template class |
| 25 |
require_once(WB_PATH."/include/phplib/template.inc");
|
|
| 25 |
if(!class_exists('Template', false)){ include(WB_PATH.'/include/phplib/template.inc'); }
|
|
| 26 | 26 |
// Include new wbmailer class (subclass of PHPmailer) |
| 27 |
require_once(WB_PATH."/framework/class.wbmailer.php"); |
|
| 28 |
//require_once(WB_PATH."/framework/SecureForm.php"); |
|
| 27 |
if(!class_exists('wbmailer', false)){ include(WB_PATH.'/framework/class.wbmailer.php'); }
|
|
| 29 | 28 |
|
| 30 | 29 |
class wb extends SecureForm |
| 31 | 30 |
{
|
| ... | ... | |
| 525 | 524 |
} |
| 526 | 525 |
if($show_screen) |
| 527 | 526 |
{
|
| 528 |
$sMaintanceFile = $this->correct_theme_source('maintance.htt');
|
|
| 527 |
$sMaintanceFile = $this->correct_theme_source('maintenance.htt');
|
|
| 529 | 528 |
if(file_exists($sMaintanceFile)) |
| 530 | 529 |
{
|
| 531 | 530 |
$tpl = new Template(dirname( $sMaintanceFile )); |
| 532 |
$tpl->set_file( 'page', 'maintance.htt' ); |
|
| 531 |
$tpl->set_file( 'page', 'maintenance.htt' );
|
|
| 533 | 532 |
$tpl->set_block( 'page', 'main_block', 'main' ); |
| 534 | 533 |
|
| 535 | 534 |
if(defined('DEFAULT_CHARSET'))
|
| ... | ... | |
| 672 | 671 |
* false: if @param is not a string |
| 673 | 672 |
* string: cleaned string |
| 674 | 673 |
*/ |
| 675 |
public function StripCodeFromText($sValue, $bPhpCode=false){
|
|
| 674 |
public function StripCodeFromText($sValue, $bPHPCode=false){
|
|
| 676 | 675 |
if(!is_string($sValue)) { return false; }
|
| 677 |
$sValue = ( ($bPhpCode==true) ? preg_replace ('/\[\[.*?\]\]\s*?|<\?php\s+.*\?>\s*?/isU', '', $sValue ) : $sValue );
|
|
| 676 |
$sValue = ( ($bPHPCode==true) ? preg_replace ('/\[\[.*?\]\]\s*?|<\?php\s+.*\?>\s*?/isU', '', $sValue ) : $sValue );
|
|
| 678 | 677 |
$sPattern = '/\[\[.*?\]\]\s*?|<!--\s+.*?-->\s*?|<(script|link|style)[^>]*\/>\s*?|<(script|link|style)[^>]*?>.*?<\/\2>\s*?|\s*$/isU'; |
| 679 | 678 |
return (preg_replace ($sPattern, '', $sValue)); |
| 680 | 679 |
} |
| branches/2.8.x/wb/framework/globalExceptionHandler.php | ||
|---|---|---|
| 6 | 6 |
* @copyright WebsiteBaker.org e.V. |
| 7 | 7 |
* @link http://websitebaker2.org |
| 8 | 8 |
* @license http://www.gnu.org/licenses/gpl.html |
| 9 |
* @version $Id: class.order.php 1487 2011-08-10 13:20:15Z DarkViper $
|
|
| 10 |
* @filesource $HeadURL: http://svn.websitebaker2.org/branches/2.8.x/wb/framework/class.order.php $
|
|
| 9 |
* @version $Id$ |
|
| 10 |
* @filesource $HeadURL$ |
|
| 11 | 11 |
* |
| 12 | 12 |
* Global exception-handler |
| 13 | 13 |
* This module will activate a global exception handler to catch all thrown exceptions |
| ... | ... | |
| 17 | 17 |
* define several default exceptions directly to prevent from extra loading requests |
| 18 | 18 |
*/ |
| 19 | 19 |
/** |
| 20 |
*
|
|
| 20 |
* |
|
| 21 | 21 |
*/ |
| 22 | 22 |
class AppException extends Exception{
|
| 23 | 23 |
public function __toString() {
|
| ... | ... | |
| 53 | 53 |
return $out; |
| 54 | 54 |
} |
| 55 | 55 |
} // end of class |
| 56 |
/** |
|
| 57 |
* define Exception to show error message |
|
| 58 |
*/ |
|
| 59 |
class ErrorMsgException extends Exception {
|
|
| 60 |
public function __toString() {
|
|
| 61 |
$out = $this->getMessage(); |
|
| 62 |
return $out; |
|
| 63 |
} |
|
| 64 |
} // end of class |
|
| 56 | 65 |
|
| 57 | 66 |
/* -- several security exceptions ----------------------------------------------------- */ |
| 58 | 67 |
class SecurityException extends RuntimeException { }
|
| ... | ... | |
| 88 | 97 |
$sResponse = $_SERVER['SERVER_PROTOCOL'].' 403 Forbidden'; |
| 89 | 98 |
header($sResponse); |
| 90 | 99 |
echo $e; |
| 100 |
}elseif($e instanceof ErrorMsgException) {
|
|
| 101 |
echo (string)$e; |
|
| 91 | 102 |
}elseif($e instanceof RuntimeException) {
|
| 92 | 103 |
$out = 'There was a serious runtime error:'."\n"; |
| 93 | 104 |
$out .= $e->getMessage()."\n"; |
| 94 | 105 | |
| branches/2.8.x/wb/templates/wb_theme/css/screen.css | ||
|---|---|---|
| 262 | 262 |
div.page-settings-leftcol textarea { resize :vertical; }
|
| 263 | 263 |
#overDiv { max-width :450px; background-position :center; background-attachment :fixed; text-align :left; line-height :1em; padding :1px; font-size :120%; }
|
| 264 | 264 |
div.page-settings span.overlib { width :20px; margin-left :-20px; }
|
| 265 |
|
|
| 266 | 265 |
/* */ |
| 267 | 266 |
div.page_group { height :180px; max-height :260px; margin :0; padding :0; overflow :auto; }
|
| 268 | 267 |
div.page_group div { overflow :hidden; }
|
| ... | ... | |
| 298 | 297 |
div.account form.settings_table { width :100%; }
|
| 299 | 298 |
div.account form.settings_table table td { width :40%; }
|
| 300 | 299 |
div.account form.settings_table table td.value_input { width :80%; }
|
| 300 |
/* expression msg box */ |
|
| 301 |
div.acess-main div.bottomdiv { background-color :#eff2f6; background-repeat :repeat-x; border-bottom :0px solid #0099ff; border-left :0px solid #0099ff; border-right :0px solid #0099ff; color :#003366; font-weight :bold; padding :10px; text-align :center; }
|
|
| 302 |
div.acess-main div.topdiv { background-color :#eff2f6; background-image :url("../images/menu.png"); background-position :left top; background-repeat :repeat-x; font-size :110%; font-weight :bold; height :34px; padding :5px 10px; color :#dddddd; }
|
|
| 303 |
div.acess-main .clear { clear :both; }
|
|
| 304 |
div.acess-main .invalid_message { clear :both; color :#990000; font-size :1em; height :auto; padding-top :5px; text-align :center; width :100%; }
|
|
| 305 |
div.acess-main { border :0 none #666666; font-size :1em; margin :0 auto 1em; max-width :60em; min-width :50em; overflow :hidden; padding :15px; width :58.6%; }
|
|
| 306 |
div.acess-main .table { background :url("../images/bgtitle.png") repeat-x scroll 0 0 #ffffff; margin :0 auto; overflow :hidden; padding :0px 0px; width :74%; }
|
|
| 307 |
div.acess-main table a:link { display :inline; font-weight :bold; padding-top :0; text-decoration :none; vertical-align :baseline; }
|
|
| 308 |
div.acess-main a:link { display :inline; font-weight :bold; padding-top :0; text-decoration :none; vertical-align :baseline; }
|
|
| 309 |
div.acess-main a:visited { color :#0066cc; }
|
|
| 310 |
div.acess-main a:hover { color :#6699ff; text-decoration :underline; }
|
|
| 311 |
div.acess-main div.content { overflow :hidden; padding :1px; text-align :left; }
|
|
| 312 |
div.acess-main div.bottomdiv h3 { font-weight :bold; color :#ff0000; }
|
|
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