Revision 1808
Added by Dietmar almost 12 years ago
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 |
} |
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