Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1807)
+++ branches/2.8.x/CHANGELOG	(revision 1808)
@@ -13,6 +13,12 @@
 
 
 
+07 Nov-2012 Build 1808 Dietmar Woellbrink (Luisehahne)
+! 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
+! rename maintance.htt to maintenance.htt
 07 Nov-2012 Build 1807 Dietmar Woellbrink (Luisehahne)
 ! fallback remove Timezone abbreviation in time format
 04 Nov-2012 Build 1806 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/admin/skel/themes/htt/maintance.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/maintance.htt	(revision 1807)
+++ branches/2.8.x/wb/admin/skel/themes/htt/maintance.htt	(nonexistent)
@@ -1,56 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-    <title>CMS WebsiteBaker | {PAGE_TITLE}</title>
-    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-    <meta http-equiv="content-language" content="{LANGUAGE}" />
-    <meta name="description" content="{PAGE_TITLE}" />
-    <meta name="keywords" content="{PAGE_TITLE}" />
-    <link href="{THEME_URL}/css/warn.css" rel="stylesheet" type="text/css" />
-</head>
-
-<body>
-
-<div class="main">
-    <table class="header layout">
-        <tr>
-        	<td class="logo">
-        		<a href="http://www.websitebaker2.org/" title=""><img src="{THEME_URL}/images/logo.png" alt="Logo" /></a>
-        	</td>
-        	<td></td>
-        </tr>
-    </table>
-
-    <div class="table">
-        <div class="td">
-            <div class="content">
-                <div class="login_box">
-                        <div class="topdiv">
-                        OFF-LINE - {WB_URL}
-                        </div>
-                        <div class="bottomdiv">
-        					<h3>{PAGE_TITLE}</h3>
-        					<img src="{THEME_URL}/images/{PAGE_ICON}.png" alt="{PAGE_TITLE}" /><br />
-        					<h3>{CHECK_BACK}</h3>
-                        </div>
-                </div>
-            </div>
-        </div>
-    </div>
-    <table class="footer">
-    <tbody>
-        <tr>
-        	<td>
-              <!-- 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. -->
-              <a href="http://www.websitebaker2.org/" title="external">WebsiteBaker</a> is released under the
-              <a href="http://www.gnu.org/licenses/gpl.html" title="WebsiteBaker is released under the GNU General Public License">GNU General Public License</a>
-              <!-- 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. -->
-        	</td>
-        </tr>
-        </tbody>
-    </table>
-</div>
-</body>
-</html>
-<!--- Icons from http://www.iconfinder.com Filter: Allowed for commercial use (No link required) -->
-<!--- Icon Designer David Vignoni - http://www.icon-king.com/ License: http://www.gnu.org/licenses/lgpl.html -->

Property changes on: branches/2.8.x/wb/admin/skel/themes/htt/maintance.htt
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/admin/skel/themes/htt/maintenance.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/maintenance.htt	(revision 1807)
+++ branches/2.8.x/wb/admin/skel/themes/htt/maintenance.htt	(revision 1808)
@@ -15,7 +15,7 @@
     <table class="header layout">
         <tr>
         	<td class="logo">
-        		<a href="http://www.websitebaker2.org/" title=""><img src="../images/logo.png" alt="Logo" /></a>
+        		<a href="http://www.websitebaker2.org/" title=""><img src="{THEME_URL}/images/logo.png" alt="Logo" /></a>
         	</td>
         	<td></td>
         </tr>
@@ -26,12 +26,11 @@
             <div class="content">
                 <div class="login_box">
                         <div class="topdiv">
-                        OFF-LINE
+                        OFF-LINE - {WB_URL}
                         </div>
                         <div class="bottomdiv">
         					<h3>{PAGE_TITLE}</h3>
-        					<h3>{BE_PATIENT}</h3>
-        					<img src="{PAGE_ICON}" alt="{PAGE_TITLE}" /><br />
+        					<img src="{THEME_URL}/images/{PAGE_ICON}.png" alt="{PAGE_TITLE}" /><br />
         					<h3>{CHECK_BACK}</h3>
                         </div>
                 </div>
Index: branches/2.8.x/wb/admin/skel/themes/htt/ErrorMsgFile.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/ErrorMsgFile.htt	(nonexistent)
+++ branches/2.8.x/wb/admin/skel/themes/htt/ErrorMsgFile.htt	(revision 1808)
@@ -0,0 +1,16 @@
+<div class="acess-main">
+    <div class="table rounded shadow">
+        <div class="td">
+            <div class="content">
+                <div class="topdiv">
+                 {ERROR_TITLE}
+                </div>
+                <div class="bottomdiv">
+					<h3>{PAGE_TITLE}</h3>
+					<img src="{THEME_URL}/images/{PAGE_ICON}.png" alt="{PAGE_TITLE}" /><br />
+					<a href="{BACK_LINK}" title="{PAGE_TITLE}">{TEXT_BACK}</a>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>

Property changes on: branches/2.8.x/wb/admin/skel/themes/htt/ErrorMsgFile.htt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1807)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1808)
@@ -51,5 +51,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.3');
-if(!defined('REVISION')) define('REVISION', '1807');
+if(!defined('REVISION')) define('REVISION', '1808');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/framework/class.admin.php
===================================================================
--- branches/2.8.x/wb/framework/class.admin.php	(revision 1807)
+++ branches/2.8.x/wb/framework/class.admin.php	(revision 1808)
@@ -57,7 +57,7 @@
 		parent::__construct(SecureForm::BACKEND);
     	if( $section_name != '##skip##' )
     	{
-    		global $database, $MESSAGE;
+    		global $database, $MESSAGE, $TEXT;
     		// Specify the current applications name
     		$this->section_name = $section_name;
     		$this->section_permission = $section_permission;
@@ -73,8 +73,25 @@
     			}
     			// Now check if they are allowed in this section
     			if($this->get_permission($section_permission) == false) {
-    				die($MESSAGE['ADMIN_INSUFFICIENT_PRIVELLIGES']);
-    			}
+//    				die($MESSAGE['ADMIN_INSUFFICIENT_PRIVELLIGES']);
+                    $sErrorMsgFile = $this->correct_theme_source('ErrorMsgFile.htt');
+            		if(file_exists($sErrorMsgFile))
+            		{
+                        $this->print_header();
+                        $oTpl = new Template(dirname( $sErrorMsgFile ));
+//                        $oTpl->debug = true;
+                        $sBackLink = (isset($_SERVER['QUERY_STRING'])&& ($_SERVER['QUERY_STRING']!='')) ? $_SERVER['HTTP_REFERER'].'?'.$_SERVER['QUERY_STRING'] :  $_SERVER['HTTP_REFERER'];
+            		    $oTpl->set_file( 'page', 'ErrorMsgFile.htt' );
+            	 	    $oTpl->set_var( 'THEME_URL', THEME_URL );
+            			$oTpl->set_var( 'PAGE_ICON', 'negative');
+            			$oTpl->set_var( 'ERROR_TITLE', $MESSAGE['MEDIA_DIR_ACCESS_DENIED']);
+            	 	    $oTpl->set_var( 'PAGE_TITLE', $MESSAGE['ADMIN_INSUFFICIENT_PRIVELLIGES'] );
+            	 	    $oTpl->set_var( 'BACK_LINK', $sBackLink );
+            	 	    $oTpl->set_var( 'TEXT_BACK', $TEXT['BACK'] );
+                		$output = $oTpl->finish($oTpl->parse('output', 'page'));
+        			}
+        			throw new ErrorMsgException($output);
+                }
     		}
 
 			if( ($maintance==true) || $this->get_session('USER_ID')!= 1 )
@@ -278,7 +295,7 @@
 		function print_footer($activateJsAdmin = false) {
 		global $database,$starttime,$iPhpDeclaredClasses;
 		// include the required file for Javascript admin
-		if($activateJsAdmin != false) {
+		if($activateJsAdmin == true) {
 			if(file_exists(WB_PATH.'/modules/jsadmin/jsadmin_backend_include.php')){
 				@include_once(WB_PATH.'/modules/jsadmin/jsadmin_backend_include.php');
 			}
Index: branches/2.8.x/wb/framework/class.wb.php
===================================================================
--- branches/2.8.x/wb/framework/class.wb.php	(revision 1807)
+++ branches/2.8.x/wb/framework/class.wb.php	(revision 1808)
@@ -22,10 +22,9 @@
 }
 /* -------------------------------------------------------- */
 // Include PHPLIB template class
-require_once(WB_PATH."/include/phplib/template.inc");
+if(!class_exists('Template', false)){ include(WB_PATH.'/include/phplib/template.inc'); }
 // Include new wbmailer class (subclass of PHPmailer)
-require_once(WB_PATH."/framework/class.wbmailer.php");
-//require_once(WB_PATH."/framework/SecureForm.php");
+if(!class_exists('wbmailer', false)){ include(WB_PATH.'/framework/class.wbmailer.php'); }
 
 class wb extends SecureForm
 {
@@ -525,11 +524,11 @@
 		}
 		if($show_screen)
 		{
-            $sMaintanceFile = $this->correct_theme_source('maintance.htt');
+            $sMaintanceFile = $this->correct_theme_source('maintenance.htt');
     		if(file_exists($sMaintanceFile))
     		{
                 $tpl = new Template(dirname( $sMaintanceFile ));
-    		    $tpl->set_file( 'page', 'maintance.htt' );
+    		    $tpl->set_file( 'page', 'maintenance.htt' );
     		    $tpl->set_block( 'page', 'main_block', 'main' );
 
     			if(defined('DEFAULT_CHARSET'))
@@ -672,9 +671,9 @@
      *    false: if @param is not a string
      *    string: cleaned string
 	 */
-	public function StripCodeFromText($sValue, $bPhpCode=false){
+	public function StripCodeFromText($sValue, $bPHPCode=false){
         if(!is_string($sValue)) { return false; }
-        $sValue = ( ($bPhpCode==true) ? preg_replace ('/\[\[.*?\]\]\s*?|<\?php\s+.*\?>\s*?/isU', '', $sValue ) : $sValue );
+        $sValue = ( ($bPHPCode==true) ? preg_replace ('/\[\[.*?\]\]\s*?|<\?php\s+.*\?>\s*?/isU', '', $sValue ) : $sValue );
         $sPattern = '/\[\[.*?\]\]\s*?|<!--\s+.*?-->\s*?|<(script|link|style)[^>]*\/>\s*?|<(script|link|style)[^>]*?>.*?<\/\2>\s*?|\s*$/isU';
         return (preg_replace ($sPattern, '', $sValue));
 	}
Index: branches/2.8.x/wb/framework/globalExceptionHandler.php
===================================================================
--- branches/2.8.x/wb/framework/globalExceptionHandler.php	(revision 1807)
+++ branches/2.8.x/wb/framework/globalExceptionHandler.php	(revision 1808)
@@ -6,8 +6,8 @@
  * @copyright       WebsiteBaker.org e.V.
  * @link            http://websitebaker2.org
  * @license         http://www.gnu.org/licenses/gpl.html
- * @version         $Id: class.order.php 1487 2011-08-10 13:20:15Z DarkViper $
- * @filesource		$HeadURL: http://svn.websitebaker2.org/branches/2.8.x/wb/framework/class.order.php $
+ * @version         $Id$
+ * @filesource		$HeadURL$
  *
  * Global exception-handler
  * This module will activate a global exception handler to catch all thrown exceptions
@@ -17,7 +17,7 @@
  * define several default exceptions directly to prevent from extra loading requests
  */
 /**
- * 
+ *
  */
 	class AppException extends Exception{
 		public function __toString() {
@@ -53,6 +53,15 @@
 			return $out;
 		}
 	} // end of class
+/**
+ * define Exception to show error message
+ */
+	class ErrorMsgException extends Exception {
+		public function __toString() {
+            $out  = $this->getMessage();
+			return $out;
+		}
+	} // end of class
 
 /* -- several security exceptions ----------------------------------------------------- */
 	class SecurityException extends RuntimeException { 	}
@@ -88,6 +97,8 @@
 			$sResponse  = $_SERVER['SERVER_PROTOCOL'].' 403 Forbidden';
 			header($sResponse);
 			echo $e;
+		}elseif($e instanceof ErrorMsgException) {
+			echo (string)$e;
 		}elseif($e instanceof RuntimeException) {
 			$out  = 'There was a serious runtime error:'."\n";
 			$out .= $e->getMessage()."\n";

Property changes on: branches/2.8.x/wb/framework/globalExceptionHandler.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1,4 ##
+Id
+Revision
+HeadURL
+Date
\ No newline at end of property
Index: branches/2.8.x/wb/templates/wb_theme/css/screen.css
===================================================================
--- branches/2.8.x/wb/templates/wb_theme/css/screen.css	(revision 1807)
+++ branches/2.8.x/wb/templates/wb_theme/css/screen.css	(revision 1808)
@@ -262,7 +262,6 @@
 div.page-settings-leftcol textarea { resize :vertical; }
 #overDiv { max-width :450px; background-position :center; background-attachment :fixed; text-align :left; line-height :1em; padding :1px; font-size :120%; }
 div.page-settings span.overlib { width :20px; margin-left :-20px; }
-
 /* */
 div.page_group { height :180px; max-height :260px; margin :0; padding :0; overflow :auto; }
 div.page_group div { overflow :hidden; }
@@ -298,3 +297,16 @@
 div.account form.settings_table { width :100%; }
 div.account form.settings_table table td { width :40%; }
 div.account form.settings_table table td.value_input { width :80%; }
+/* expression msg box */
+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; }
+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; }
+div.acess-main .clear { clear :both; }
+div.acess-main .invalid_message { clear :both; color :#990000; font-size :1em; height :auto; padding-top :5px; text-align :center; width :100%; }
+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%; }
+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%; }
+div.acess-main table a:link { display :inline; font-weight :bold; padding-top :0; text-decoration :none; vertical-align :baseline; }
+div.acess-main a:link { display :inline; font-weight :bold; padding-top :0; text-decoration :none; vertical-align :baseline; }
+div.acess-main a:visited { color :#0066cc; }
+div.acess-main a:hover { color :#6699ff; text-decoration :underline; }
+div.acess-main div.content { overflow :hidden; padding :1px; text-align :left; }
+div.acess-main div.bottomdiv h3 { font-weight :bold; color :#ff0000; }
