Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1781)
+++ branches/2.8.x/CHANGELOG	(revision 1782)
@@ -13,6 +13,8 @@
 
 
 
+11 Oct-2012 Build 1782 Dietmar Woellbrink (Luisehahne)
++ add maintance modus in backend
 10 Oct-2012 Build 1781 Dietmar Woellbrink (Luisehahne)
 ! fixed form modul (Tks to Ruebenwurzel)
 ! Send forgotten Theme CSS in Revision 1780
Index: branches/2.8.x/wb/admin/groups/groups_list.inc.php
===================================================================
--- branches/2.8.x/wb/admin/groups/groups_list.inc.php	(revision 1781)
+++ branches/2.8.x/wb/admin/groups/groups_list.inc.php	(revision 1782)
@@ -25,7 +25,7 @@
  */
 	function show_grouplist($admin)
 	{
-//		global $TEXT, $MESSAGE, $MENU, $HEADING;
+		global $TEXT, $MESSAGE, $MENU, $HEADING;
 		$database = WbDatabase::getInstance();
 		$mLang = ModLanguage::getInstance();
 // Create new template object for the modify/remove section
@@ -140,7 +140,7 @@
 		$tpl->set_var(array(
 				'TEXT_MODIFY'    => ($admin->get_permission('groups_modify') == true) ? $mLang->TEXT_MODIFY : $mLang->TEXT_VIEW,
 				'TEXT_DELETE'    => $mLang->TEXT_DELETE,
-				'CONFIRM_DELETE' => $mLang->MESSAGE_GROUPS_CONFIRM_DELETE
+				'CONFIRM_DELETE' => $MESSAGE['GROUPS_CONFIRM_DELETE']
 				));
 
 	// Parse template object
Index: branches/2.8.x/wb/admin/skel/themes/htt/maintance.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/maintance.htt	(nonexistent)
+++ branches/2.8.x/wb/admin/skel/themes/htt/maintance.htt	(revision 1782)
@@ -0,0 +1,57 @@
+<!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>
+        					<h3>{BE_PATIENT}</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
___________________________________________________________________
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/skel/themes/htt/header.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/header.htt	(revision 1781)
+++ branches/2.8.x/wb/admin/skel/themes/htt/header.htt	(revision 1782)
@@ -43,9 +43,12 @@
 	<td></td>
 	<td class="topnav {LOGIN_DISPLAY_NONE}">
 		<span><a href="{ADMIN_URL}" title="{TITLE_START}"><img src="{THEME_URL}/images/{START_ICON}.png" alt="{TITLE_START}" /></a></span>
-		&nbsp;&nbsp;<a href="{URL_VIEW}" target="_blank" title="{TITLE_VIEW}"><img src="{THEME_URL}/images/view.png" alt="{WB_URL}" /></a>
-		&nbsp; <a href="{URL_HELP}" target="_blank" title="{TITLE_HELP}"><img src="{THEME_URL}/images/help.png" alt="{TITLE_HELP}" /></a>
-		&nbsp; <a href="{LOGIN_LINK}" title="{TITLE_LOGOUT}"><img src="{THEME_URL}/images/{LOGIN_ICON}.png" alt="{TITLE_LOGOUT}" /></a>
+		<a href="{URL_VIEW}" target="_blank" title="{TITLE_VIEW}"><img src="{THEME_URL}/images/view.png" alt="{WB_URL}" /></a>
+		<a href="{URL_HELP}" target="_blank" title="{TITLE_HELP}"><img src="{THEME_URL}/images/help.png" alt="{TITLE_HELP}" /></a>
+    <!-- BEGIN maintenance_block -->
+        <a href="{MAINTAINANCE_URL}" title="{MAINTENANCE_MODE}"><img src="{MAINTENANCE_ICON}" alt="{MAINTENANCE_MODE}" title="{MAINTENANCE_MODE}" /></a>
+    <!-- END maintenance_block -->
+		&nbsp;<a href="{LOGIN_LINK}" title="{TITLE_LOGOUT}"><img src="{THEME_URL}/images/{LOGIN_ICON}.png" alt="{TITLE_LOGOUT}" /></a>
 	</td>
 	<td></td>
 	<td class="version {LOGIN_DISPLAY_NONE}">
Index: branches/2.8.x/wb/admin/pages/settings_save.php
===================================================================
--- branches/2.8.x/wb/admin/pages/settings_save.php	(revision 1781)
+++ branches/2.8.x/wb/admin/pages/settings_save.php	(revision 1782)
@@ -75,9 +75,9 @@
 $template = preg_replace('/[^a-z0-9_-]/i', "", $admin->get_post('template')); // fix secunia 2010-93-3
 $template = (($template == DEFAULT_TEMPLATE ) ? '' : $template);
 $target = preg_replace("/\W/", "", $admin->get_post('target'));
-$aAdminGroups   = (isset($_POST['admin_groups']) ? $_POST['admin_groups'] : array(1));
+$aAdminGroups   = (isset($_POST['admin_groups']) ? $_POST['admin_groups'] : array('1'));
 $aAdminUsers    = (isset($_POST['admin_users']) ? $_POST['admin_users'] : array());
-$aViewingGroups = (isset($_POST['viewing_groups']) ? $_POST['viewing_groups'] : array(1));
+$aViewingGroups = (isset($_POST['viewing_groups']) ? $_POST['viewing_groups'] : array('1'));
 $aViewingUsers  = (isset($_POST['viewing_users']) ? $_POST['viewing_users'] : array());
 $searching = intval($admin->get_post('searching'));
 $language = strtoupper($admin->get_post('language'));
Index: branches/2.8.x/wb/admin/pages/languages/EN.php
===================================================================
--- branches/2.8.x/wb/admin/pages/languages/EN.php	(revision 1781)
+++ branches/2.8.x/wb/admin/pages/languages/EN.php	(revision 1782)
@@ -75,8 +75,8 @@
 $HELP['PAGE_CODE'] .= '<p>If you have put a side into another language, confirm from this list the matching entry of the standard language</p>';
 $HELP['PAGE_CODE'] .= '<p>Example:<br />Created page in sub DE: <b>Impressum</b> choose Default Language EN: <b>Imprint</b></p>';
 
-$HELP['SEO_TITLE']  = '<p>Folder and Filename for this Accessfile <br /> <b>{{filename}}</b></p>';
-$HELP['SEO_TITLE'] .= '<p>In WebsiteBaker version 2.8.4 you have the possibility to create a Seo friendly Accessfile independent of Menutitle..</p>';
+$HELP['SEO_TITLE']  = '<p>Path and file name of the access file of this page. <br /> <b>{{filename}}</b></p>';
+$HELP['SEO_TITLE'] .= '<p>In this field you can define a well readable, expressive name for the access file, regardless of menu title or page title. This is also usable well to create SEO friendly links..</p>';
 $HELP['SEO_TITLE'] .= '<p><b>For Example:</b><br /><br />Input Menu Title: <b>Pressemitteilung</b><br />';
 $HELP['SEO_TITLE'] .= 'Input Filename: <b>Pressemitteilung and Downloads</b><br />';
 $HELP['SEO_TITLE'] .= 'Create Accessfile: <b>pressemitteilungen-and-downloads.php</b></p>';
Index: branches/2.8.x/wb/admin/pages/languages/DE.php
===================================================================
--- branches/2.8.x/wb/admin/pages/languages/DE.php	(revision 1781)
+++ branches/2.8.x/wb/admin/pages/languages/DE.php	(revision 1782)
@@ -73,8 +73,8 @@
 $HELP['PAGE_CODE'] .= '<p>Wenn sie eine Seite in einer anderen Sprache angelegt haben, bestätigen Sie aus dieser Liste den dazugehörigen Eintrag der Standardsprache.</p>';
 $HELP['PAGE_CODE'] .= '<p>Beispiel:<br />Erstellte Seite im Zweig EN: <b>Imprint</b> zuweisen an Standardsprache DE: <b>Impressum</b></p>';
 
-$HELP['SEO_TITLE']  = '<p>Verzeichnis und Dateiname dieser Zugriffsdatei <br /> <b>{{filename}}</b></p>';
-$HELP['SEO_TITLE'] .= '<p>In der WebsiteBaker Version 2.8.4 haben Sie die Möglichkeit, unabhängig vom Menutitel eine Seo freundliche Zugriffsdatei anzulegen.</p>';
+$HELP['SEO_TITLE']  = '<p>Verzeichnis und Dateiname der Zugriffsdatei dieser Seite<br /> <b>{{filename}}</b></p>';
+$HELP['SEO_TITLE'] .= '<p>In diesem Feld können Sie unabhängig von Menü- oder Seitentitel einen gut lesbaren, aussagekräftigen Dateinamen für die Zugriffsdatei festlegen. Dieser ist auch gut zur Erstellung SEO-freundlicher Links verwendbar.</p>';
 $HELP['SEO_TITLE'] .= '<p><b>Beispiel:</b><br /><br />Eingabe Menütitel: <b>Pressemitteilung</b><br />';
 $HELP['SEO_TITLE'] .= 'Eingabe Dateiname: <b>Pressemitteilung und Downloads</b><br />';
 $HELP['SEO_TITLE'] .= 'Erstellt Zugriffsdatei: <b>pressemitteilungen-und-downloads.php</b></p>';
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1781)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1782)
@@ -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', '1781');
+if(!defined('REVISION')) define('REVISION', '1782');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/admin/settings/locking.php
===================================================================
--- branches/2.8.x/wb/admin/settings/locking.php	(nonexistent)
+++ branches/2.8.x/wb/admin/settings/locking.php	(revision 1782)
@@ -0,0 +1,43 @@
+<?php
+/**
+ *
+ * @category        admin
+ * @package         login
+ * @author          Ryan Djurovich (2004-2009)), WebsiteBaker Project
+ * @copyright       2009-2012, WebsiteBaker Org. e.V.
+ * @link			http://www.websitebaker2.org/
+ * @license         http://www.gnu.org/licenses/gpl.html
+ * @platform        WebsiteBaker 2.9
+ * @requirements    PHP 5.2.2 and higher
+ * @version         $Id$
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
+ *
+*/
+if(!defined('WB_PATH'))
+{
+	require('../../config.php');
+	require_once(WB_PATH.'/framework/class.admin.php');
+}
+$admin = new admin('Start', 'settings', false, false);
+
+if($admin->get_user_id() == 1)
+{
+	$val = (((int)(defined('SYSTEM_LOCKED') ? SYSTEM_LOCKED : 0)) + 1) % 2;
+	$sql = 'SELECT COUNT(`setting_id`) FROM `'.TABLE_PREFIX.'settings` WHERE `name` = \'system_locked\'';
+	if($database->get_one($sql))
+	{
+		$sql = 'UPDATE ';
+		$sql_where = 'WHERE `name` = \'system_locked\'';
+	} else {
+		$sql = 'INSERT INTO ';
+		$sql_where = '';
+	}
+	$sql .= '`'.TABLE_PREFIX.'settings` ';
+	$sql .= 'SET `name` = \'system_locked\', ';
+	$sql .= '`value` = \''.$val.'\' '.$sql_where;
+	$database->query($sql);
+}
+// redirect to backend
+header('Location: ' . ADMIN_URL . '/index.php');
+exit();

Property changes on: branches/2.8.x/wb/admin/settings/locking.php
___________________________________________________________________
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/preferences/save.php
===================================================================
--- branches/2.8.x/wb/admin/preferences/save.php	(revision 1781)
+++ branches/2.8.x/wb/admin/preferences/save.php	(revision 1782)
@@ -52,7 +52,7 @@
 	$date_format = (array_key_exists($date_format_key, $DATE_FORMATS) ? $date_format : 'system_default');
 	$date_format = ($date_format == 'system_default' ? '' : $date_format);
 	unset($DATE_FORMATS);
-// time_format must be a key from /interface/time_formats	
+// time_format must be a key from /interface/time_formats
 	$time_format      = $admin->get_post('time_format');
 	$time_format_key  = str_replace(' ', '|', $time_format);
 	$user_time = true;
Index: branches/2.8.x/wb/admin/login/forgot/index.php
===================================================================
--- branches/2.8.x/wb/admin/login/forgot/index.php	(revision 1781)
+++ branches/2.8.x/wb/admin/login/forgot/index.php	(revision 1782)
@@ -3,7 +3,7 @@
  *
  * @category        admin
  * @package         login
- * @author          Ryan Djurovich, WebsiteBaker Project
+ * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
  * @copyright       2009-2012, WebsiteBaker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -21,8 +21,11 @@
 }
 // Include the language file
 require(WB_PATH.'/languages/'.DEFAULT_LANGUAGE.'.php');
+
 // Include the database class file and initiate an object
-require(WB_PATH.'/framework/class.admin.php');
+//if(!class_exists('frontend', false)){ require_once(WB_PATH.'/framework/class.frontend.php'); }
+//$admin = new frontend();
+if(!class_exists('admin', false)){ require_once(WB_PATH.'/framework/class.admin.php'); }
 $admin = new admin('Start', 'start', false, false);
 
 // Get the website title
@@ -50,7 +53,7 @@
 		if($time_diff < 2) {
 
 			// Tell the user that their password cannot be reset more than once per hour
-			$message = $MESSAGE['FORGOT_PASS']['ALREADY_RESET'];
+			$message = $MESSAGE['FORGOT_PASS_ALREADY_RESET'];
 
 		} else {
 
@@ -76,20 +79,20 @@
 			} else {
 				// Setup email to send
 				$mail_to = $email;
-				$mail_subject = $MESSAGE['SIGNUP2']['SUBJECT_LOGIN_INFO'];
+				$mail_subject = $MESSAGE['SIGNUP2_SUBJECT_LOGIN_INFO'];
 
 				// Replace placeholders from language variable with values
 				$search = array('{LOGIN_DISPLAY_NAME}', '{LOGIN_WEBSITE_TITLE}', '{LOGIN_NAME}', '{LOGIN_PASSWORD}');
 				$replace = array($results_array['display_name'], WEBSITE_TITLE, $results_array['username'], $new_pass);
-				$mail_message = str_replace($search, $replace, $MESSAGE['SIGNUP2']['BODY_LOGIN_FORGOT']);
+				$mail_message = str_replace($search, $replace, $MESSAGE['SIGNUP2_BODY_LOGIN_FORGOT']);
 
 				// Try sending the email
 				if($admin->mail(SERVER_EMAIL,$mail_to,$mail_subject,$mail_message)) {
-					$message = $MESSAGE['FORGOT_PASS']['PASSWORD_RESET'];
+					$message = $MESSAGE['FORGOT_PASS_PASSWORD_RESET'];
 					$display_form = false;
 				} else {
 					$database->query("UPDATE ".TABLE_PREFIX."users SET password = '".$old_pass."' WHERE user_id = '".$results_array['user_id']."'");
-					$message = $MESSAGE['FORGOT_PASS']['CANNOT_EMAIL'];
+					$message = $MESSAGE['FORGOT_PASS_CANNOT_EMAIL'];
 				}
 			}
 
@@ -97,7 +100,7 @@
 
 	} else {
 		// Email doesn't exist, so tell the user
-		$message = $MESSAGE['FORGOT_PASS']['EMAIL_NOT_FOUND'];
+		$message = $MESSAGE['FORGOT_PASS_EMAIL_NOT_FOUND'];
 		// and delete the wrong Email
 		$email = '';
 	}
@@ -107,7 +110,7 @@
 }
 
 if(!isset($message)) {
-	$message = $MESSAGE['FORGOT_PASS']['NO_DATA'];
+	$message = $MESSAGE['FORGOT_PASS_NO_DATA'];
 	$message_color = '000000';
 } else {
 	$message_color = 'FF0000';
Index: branches/2.8.x/wb/admin/login/index.php
===================================================================
--- branches/2.8.x/wb/admin/login/index.php	(revision 1781)
+++ branches/2.8.x/wb/admin/login/index.php	(revision 1782)
@@ -15,12 +15,15 @@
  *
  */
 
-	require('../../config.php');
 // Include the configuration file
 if(!defined('WB_URL') && file_exists(realpath('../../config.php'))) {
+    require('../../config.php');
 }
-require_once(WB_PATH."/framework/class.login.php");
 
+//require_once(WB_PATH."/framework/class.login.php");
+if(!class_exists('login', false)){ require_once(WB_PATH.'/framework/class.login.php'); }
+if(!class_exists('frontend', false)){ require_once(WB_PATH.'/framework/class.frontend.php'); }
+
 if(defined('SMART_LOGIN') AND SMART_LOGIN == 'enabled') {
 	// Generate username field name
 	$username_fieldname = 'username_';
@@ -40,7 +43,7 @@
 	$password_fieldname = 'password';
 }
 
-$admin = new admin('Start', '', false, false);
+$admin = new frontend();
 
 $WarnUrl = str_replace(WB_PATH,WB_URL,$admin->correct_theme_source('warning.html'));
 
Index: branches/2.8.x/wb/framework/class.admin.php
===================================================================
--- branches/2.8.x/wb/framework/class.admin.php	(revision 1781)
+++ branches/2.8.x/wb/framework/class.admin.php	(revision 1782)
@@ -1,9 +1,9 @@
 <?php
 /**
  *
- * @category        framewotk
- * @package         backend admin
- * @author          Ryan Djurovich, WebsiteBaker Project
+ * @category        backend
+ * @package         framework
+ * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
  * @copyright       2009-2012, WebsiteBaker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -28,7 +28,7 @@
 
 // Include EditArea wrapper functions
 // require_once(WB_PATH . '/include/editarea/wb_wrapper_edit_area.php');
-//require_once(WB_PATH . '/framework/SecureForm.php');
+// require_once(WB_PATH . '/framework/SecureForm.php');
 
 
 /**
@@ -53,60 +53,67 @@
 	public function __construct($section_name= '##skip##', $section_permission = 'start', $auto_header = true, $auto_auth = true)
 	{
 		parent::__construct(SecureForm::BACKEND);
-	if( $section_name != '##skip##' )
-	{
-		global $database, $MESSAGE;
-		// Specify the current applications name
-		$this->section_name = $section_name;
-		$this->section_permission = $section_permission;
-		// Authenticate the user for this application
-		if($auto_auth == true)
-		{
-			// First check if the user is logged-in
-			if($this->is_authenticated() == false)
+    	if( $section_name != '##skip##' )
+    	{
+    		global $database, $MESSAGE;
+    		// Specify the current applications name
+    		$this->section_name = $section_name;
+    		$this->section_permission = $section_permission;
+    		$maintance = ( defined('SYSTEM_LOCKED') && (SYSTEM_LOCKED==true) ? true : false );
+    		// Authenticate the user for this application
+    		if( ($auto_auth == true) )
+    		{
+    			// First check if the user is logged-in
+    			if($this->is_authenticated() == false)
+    			{
+    				header('Location: '.ADMIN_URL.'/login/index.php');
+    				exit(0);
+    			}
+    			// Now check if they are allowed in this section
+    			if($this->get_permission($section_permission) == false) {
+    				die($MESSAGE['ADMIN_INSUFFICIENT_PRIVELLIGES']);
+    			}
+    		}
+
+			if( ($maintance==true) || $this->get_session('USER_ID')!= 1 )
 			{
-				header('Location: '.ADMIN_URL.'/login/index.php');
-				exit(0);
-			}
+           	//  check for show maintenance screen and terminate if needed
+        		$this->ShowMaintainScreen('locked');
+            }
 
-			// Now check if they are allowed in this section
-			if($this->get_permission($section_permission) == false) {
-				die($MESSAGE['ADMIN_INSUFFICIENT_PRIVELLIGES']);
-			}
-		}
+    		// Check if the backend language is also the selected language. If not, send headers again.
+    		$sql  = 'SELECT `language` FROM `'.TABLE_PREFIX.'users` ';
+    		$sql .= 'WHERE `user_id`='.(int)$this->get_user_id();
+    		$get_user_language = @$database->query($sql);
+    		$user_language = ($get_user_language) ? $get_user_language->fetchRow() : '';
+    		// prevent infinite loop if language file is not XX.php (e.g. DE_du.php)
+    		$user_language = substr($user_language[0],0,2);
+    		// obtain the admin folder (e.g. /admin)
+    		$admin_folder = str_replace(WB_PATH, '', ADMIN_PATH);
 
-		// Check if the backend language is also the selected language. If not, send headers again.
-		$sql  = 'SELECT `language` FROM `'.TABLE_PREFIX.'users` ';
-		$sql .= 'WHERE `user_id`='.(int)$this->get_user_id();
-		$get_user_language = @$database->query($sql);
-		$user_language = ($get_user_language) ? $get_user_language->fetchRow() : '';
-		// prevent infinite loop if language file is not XX.php (e.g. DE_du.php)
-		$user_language = substr($user_language[0],0,2);
-		// obtain the admin folder (e.g. /admin)
-		$admin_folder = str_replace(WB_PATH, '', ADMIN_PATH);
-		if((LANGUAGE != $user_language) && file_exists(WB_PATH .'/languages/' .$user_language .'.php')
-			&& strpos($_SERVER['PHP_SELF'],$admin_folder.'/') !== false) {
-			// check if page_id is set
-			$page_id_url = (isset($_GET['page_id'])) ? '&page_id=' .(int) $_GET['page_id'] : '';
-			$section_id_url = (isset($_GET['section_id'])) ? '&section_id=' .(int) $_GET['section_id'] : '';
-			if(isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') { // check if there is an query-string
-				header('Location: '.$_SERVER['PHP_SELF'] .'?lang='.$user_language .$page_id_url .$section_id_url.'&'.$_SERVER['QUERY_STRING']);
-			} else {
-				header('Location: '.$_SERVER['PHP_SELF'] .'?lang='.$user_language .$page_id_url .$section_id_url);
-			}
-			exit();
-		}
+    		if( (LANGUAGE != $user_language) && file_exists(WB_PATH .'/languages/' .$user_language .'.php')
+    			&& strpos($_SERVER['SCRIPT_NAME'],$admin_folder.'/') !== false) {
+    			// check if page_id is set
+    			$page_id_url = (isset($_GET['page_id'])) ? '&page_id=' .(int) $_GET['page_id'] : '';
+    			$section_id_url = (isset($_GET['section_id'])) ? '&section_id=' .(int) $_GET['section_id'] : '';
+    			 //  check if there is an query-string
+    			if(isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') {
+    				header('Location: '.$_SERVER['SCRIPT_NAME'] .'?lang='.$user_language .$page_id_url .$section_id_url.'&'.$_SERVER['QUERY_STRING']);
+    			} else {
+    				header('Location: '.$_SERVER['SCRIPT_NAME'] .'?lang='.$user_language .$page_id_url .$section_id_url);
+    			}
+    			exit();
+    		}
 
-		// Auto header code
-		if($auto_header == true) {
-			$this->print_header();
-		}
+    		// Auto header code
+    		if($auto_header == true) {
+    			$this->print_header();
+    		}
+    	}
 	}
-	}
 
 	// Print the admin header
 	/**
-	 * admin::print_header()
 	 *
 	 * @param string $body_tags
 	 * @return void
@@ -143,6 +150,8 @@
 			$row = @$result->fetchRow();
 			if($row) $view_url .= PAGES_DIRECTORY .$row['link']. PAGE_EXTENSION;
 		}
+
+        $HelpUrl = ((strtolower(LANGUAGE)!='de') ? '/en/help.php' : '/de/hilfe.php');
 		$sServerAdress = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : '127.0.0.1';
 		$header_template->set_var(	array(
 							'SECTION_FORGOT' => $MENU['FORGOT'],
@@ -166,7 +175,7 @@
 							'START_CLASS' => 'start',
 							'TITLE_START' => $TEXT['READ_MORE'],
 							'TITLE_VIEW' => $TEXT['WEBSITE'],
-							'TITLE_HELP' => $MENU['HELP'],
+							'TITLE_HELP' => 'WebsiteBaker '.$MENU['HELP'],
 							'URL_VIEW' => $view_url,
 							'TITLE_LOGOUT' => $MENU['LOGIN'],
 							'LOGIN_DISPLAY_HIDDEN' => !$this->is_authenticated() ? 'hidden' : '',
@@ -174,17 +183,30 @@
 							'LOGIN_LINK' => $_SERVER['SCRIPT_NAME'],
 							'LOGIN_ICON' => 'login',
 							'START_ICON' => 'blank',
-							'URL_HELP' => 'http://www.websitebaker.org/',
+							'URL_HELP' => 'http://www.websitebaker2.org'.$HelpUrl,
 							'BACKEND_MODULE_CSS' => $this->register_backend_modfiles('css'),	// adds backend.css
 							'BACKEND_MODULE_JS'  => $this->register_backend_modfiles('js')		// adds backend.js
 						)
 					);
+		$header_template->set_block('header_block', 'maintenance_block', 'maintenance');
+		if($this->get_user_id() == 1)
+		{
+			$sys_locked = (((int)(defined('SYSTEM_LOCKED') ? SYSTEM_LOCKED : 0)) == 1);
+			$header_template->set_var('MAINTENANCE_MODE', ($sys_locked ? $TEXT['MAINTENANCE_OFF'] : $TEXT['MAINTENANCE_ON']));
+			$header_template->set_var('MAINTENANCE_ICON', THEME_URL.'/images/'.($sys_locked ? 'lock' : 'unlock').'.png');
+			$header_template->set_var('MAINTAINANCE_URL', ADMIN_URL.'/settings/locking.php');
+			$header_template->parse('maintenance', 'maintenance_block', true);
+		}else
+		{
+			$header_template->set_block('maintenance_block', '');
+		}
 
 		// Create the menu
+        $UrlLang = ((strtolower(LANGUAGE)!='de') ? 'en' : strtolower(LANGUAGE));
 		if(!$this->is_authenticated())
 		{
-		$header_template->set_var('STYLE', 'login');
-		$menu = array(
+    		$header_template->set_var('STYLE', 'login');
+    		$menu = array(
 //						array('http://www.websitebaker.org/', '_blank', 'WebsiteBaker Home', 'help', 0),
 //						array($view_url, '_blank', $TEXT['FRONTEND'], '', 0),
 //						array(ADMIN_URL.'/login/index.php', '', $MENU['LOGIN'], '', 0)
@@ -201,7 +223,8 @@
 						'TITLE_START' => $MENU['START']
 						)
 					);
-			// @array ( $url, $target, $title, $page_permission, $ppermission_required )
+
+			// @array ( $url, $target, $title, $page_permission, $permission_required )
 			$menu = array(
 //					array(ADMIN_URL.'/index.php', '', $MENU['START'], 'start', 1 ),
 					array(ADMIN_URL.'/pages/index.php', '', $MENU['PAGES'], 'pages', 1),
@@ -212,9 +235,10 @@
 					array(ADMIN_URL.'/settings/index.php', '', $MENU['SETTINGS'], 'settings', 1),
 					array(ADMIN_URL.'/admintools/index.php', '', $MENU['ADMINTOOLS'], 'admintools', 1),
 					array(ADMIN_URL.'/access/index.php', '', $MENU['ACCESS'], 'access', 1),
+//					array('http://addons.websitebaker2.org/', '', 'WB-Addons', 'preferences', 1),
+//					array('http://template.websitebaker2.org/', '', 'WB-Template', 'preferences', 1),
 //					array('http://www.websitebaker.org/', '_blank', 'WebsiteBaker Home', '', 0),
 //					array(ADMIN_URL.'/logout/index.php', '', $MENU['LOGOUT'], '', 0)
-
 					);
 		}
 
Index: branches/2.8.x/wb/framework/class.login.php
===================================================================
--- branches/2.8.x/wb/framework/class.login.php	(revision 1781)
+++ branches/2.8.x/wb/framework/class.login.php	(revision 1782)
@@ -3,8 +3,8 @@
  *
  * @category        framework
  * @package         backend login
- * @author          Ryan Djurovich, WebsiteBaker Project
- * @copyright       2009-2012, Website Baker Org. e.V.
+ * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
+ * @copyright       2009-2012, WebsiteBaker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
  * @platform        WebsiteBaker 2.8.x
@@ -24,7 +24,7 @@
 define('LOGIN_CLASS_LOADED', true);
 
 // Load the other required class files if they are not already loaded
-require_once(WB_PATH."/framework/class.admin.php");
+if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
 // Get WB version
 require_once(ADMIN_PATH.'/interface/version.php');
 
@@ -140,7 +140,7 @@
 		$sql  = 'SELECT * FROM `'.$this->users_table.'` ';
 		$sql .= 'WHERE `username`=\''.$loginname.'\' AND `password`=\''.$this->password.'\' AND `active`=1';
 		$results = $database->query($sql);
-		$results_array = $results->fetchRow();
+		$results_array = $results->fetchRow(MYSQL_ASSOC);
 		$num_rows = $results->numRows();
 		if($num_rows == 1) {
 			$user_id = $results_array['user_id'];
@@ -188,6 +188,8 @@
 			$_SESSION['TEMPLATE_PERMISSIONS'] = array();
 			$_SESSION['GROUP_NAME'] = array();
 
+
+
 			$first_group = true;
 			foreach (explode(",", $this->get_session('GROUPS_ID')) as $cur_group_id)
             {
@@ -196,28 +198,33 @@
 				$results_array = $results->fetchRow();
 				$_SESSION['GROUP_NAME'][$cur_group_id] = $results_array['name'];
 				// Set system permissions
-				if($results_array['system_permissions'] != '') {
+				if( $results_array['system_permissions'] != '' ) {
 					$_SESSION['SYSTEM_PERMISSIONS'] = array_merge($_SESSION['SYSTEM_PERMISSIONS'], explode(',', $results_array['system_permissions']));
 				}
 				// Set module permissions
-				if($results_array['module_permissions'] != '') {
+				if( $results_array['module_permissions'] != '' ) {
 					if ($first_group) {
-          	$_SESSION['MODULE_PERMISSIONS'] = explode(',', $results_array['module_permissions']);
-          } else {
-          	$_SESSION['MODULE_PERMISSIONS'] = array_intersect($_SESSION['MODULE_PERMISSIONS'], explode(',', $results_array['module_permissions']));
+                  	$_SESSION['MODULE_PERMISSIONS'] = explode(',', $results_array['module_permissions']);
+                  } else {
+                  	$_SESSION['MODULE_PERMISSIONS'] = array_intersect($_SESSION['MODULE_PERMISSIONS'], explode(',', $results_array['module_permissions']));
 					}
 				}
 				// Set template permissions
 				if($results_array['template_permissions'] != '') {
 					if ($first_group) {
-          	$_SESSION['TEMPLATE_PERMISSIONS'] = explode(',', $results_array['template_permissions']);
-          } else {
-          	$_SESSION['TEMPLATE_PERMISSIONS'] = array_intersect($_SESSION['TEMPLATE_PERMISSIONS'], explode(',', $results_array['template_permissions']));
+                      	$_SESSION['TEMPLATE_PERMISSIONS'] = explode(',', $results_array['template_permissions']);
+                      } else {
+                      	$_SESSION['TEMPLATE_PERMISSIONS'] = array_intersect($_SESSION['TEMPLATE_PERMISSIONS'], explode(',', $results_array['template_permissions']));
 					}
 				}
 				$first_group = false;
 			}
 
+            if( $this->ami_group_member('1')) {
+    			$_SESSION['MODULE_PERMISSIONS'] = array();
+    			$_SESSION['TEMPLATE_PERMISSIONS'] = array();
+            }
+
 			// Update the users table with current ip and timestamp
 			$get_ts = time();
 			$get_ip = $_SERVER['REMOTE_ADDR'];
Index: branches/2.8.x/wb/framework/class.wb.php
===================================================================
--- branches/2.8.x/wb/framework/class.wb.php	(revision 1781)
+++ branches/2.8.x/wb/framework/class.wb.php	(revision 1782)
@@ -3,7 +3,7 @@
  *
  * @category        framework
  * @package         frontend
- * @author          Ryan Djurovich, WebsiteBaker Project
+ * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
  * @copyright       2009-2012, WebsiteBaker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -31,12 +31,72 @@
 {
 
  	public $password_chars = 'a-zA-Z0-9\_\-\!\#\*\+\@\$\&\:';	// General initialization function
+
 	// performed when frontend or backend is loaded.
-
 	public function  __construct($mode = SecureForm::FRONTEND) {
 		parent::__construct($mode);
 	}
 
+
+	/**
+	 *
+	 *
+	 * @param mixed $lang
+	 * @param mixed $level
+	 * @param mixed $parent
+	 * @return
+	 */
+	public function GetLanguagesPages ( $lang, $level, $parent ) {
+		global $database;
+        $page = array();
+        $sql =
+        'SELECT `language`,`visibility`,`viewing_groups`,`viewing_users`,`language`,`position`, '.
+        '`page_id`,`level`,`parent`,`root_parent`,`page_code`,`link` '.
+        'FROM `'.TABLE_PREFIX.'pages` '.
+        'WHERE `level`=\''.$level.'\' '.
+          'AND `language`=\''.$lang['language'].'\' '.
+          'AND `visibility`!=\'none\' '.
+          'AND `visibility`!=\'hidden\' '.
+          'AND `parent`=\''.$parent.'\' '.
+          'AND `root_parent`=`page_id` '.
+        'ORDER BY `position`';
+        if($oPage = $database->query($sql))
+        {
+            $page = $oPage->fetchRow(MYSQL_ASSOC);
+        }
+        return $page;
+	}
+
+	/**
+	 *
+	 *
+	 * @return
+	 */
+	public function GetLanguagesInUsed (  ) {
+		global $database;
+        $retVal = '';
+        $page = array();
+        $sql =
+        'SELECT DISTINCT `language` '.
+        'FROM `'.TABLE_PREFIX.'pages` '.
+        'WHERE `level`= \'0\' '.
+          'AND `visibility`!=\'none\' '.
+          'AND `visibility`!=\'hidden\' '.
+       'ORDER BY `position`';
+
+        if($oRes = $database->query($sql))
+        {
+            while($lang = $oRes->fetchRow(MYSQL_ASSOC))
+            {
+                $page = $this->GetLanguagesPages ( $lang, 0, 0 );
+                if(!$this->page_is_visible($page)) {continue;}
+                $retVal .= $page['language'].',';
+            }
+        }
+        return trim($retVal,',');
+	}
+
+
 /* ****************
  * check if one or more group_ids are in both group_lists
  *
@@ -429,7 +489,97 @@
 		}
 		return $retval;
 	}
+/*
+ * @param string $type: 'locked'(default)  or 'new'
+ * @return void: terminates application
+ * @description: 'locked' >> Show maintenance screen and terminate, if system is locked
+ *               'new' >> Show 'new site under construction'(former print_under_construction)
+ */
+	public function ShowMaintainScreen($type = 'locked')
+	{
+		global $database, $MESSAGE;
+		$CHECK_BACK = $MESSAGE['GENERIC_PLEASE_CHECK_BACK_SOON'];
+		$BE_PATIENT = '';
+		$LANGUAGE   = strtolower((isset($_SESSION['LANGUAGE']) ? $_SESSION['LANGUAGE'] : LANGUAGE ));
 
+		$show_screen = false;
+		if($type == 'locked')
+		{
+			$curr_user = (intval(isset($_SESSION['USER_ID']) ? $_SESSION['USER_ID'] : 0) ) ;
+			if( (defined('SYSTEM_LOCKED') && (int)SYSTEM_LOCKED == 1) && ($curr_user != 1))
+			{
+				header($_SERVER['SERVER_PROTOCOL'].' 503 Service Unavailable');
+	// first kick logged users out of the system
+		// delete all remember keys from table 'user' except user_id=1
+				$sql  = 'UPDATE `'.TABLE_PREFIX.'users` SET `remember_key`=\'\' ';
+				$sql .= 'WHERE `user_id`<>1';
+				$database->query($sql);
+		// delete remember key-cookie if set
+				if (isset($_COOKIE['REMEMBER_KEY'])) {
+					setcookie('REMEMBER_KEY', '', time() - 3600, '/');
+				}
+		// overwrite session array
+				$_SESSION = array();
+		// delete session cookie if set
+				if (ini_get("session.use_cookies")) {
+					$params = session_get_cookie_params();
+					setcookie(session_name(), '', time() - 42000, $params["path"],
+						$params["domain"], $params["secure"], $params["httponly"]
+					);
+				}
+		// delete the session itself
+				session_destroy();
+				$PAGE_TITLE = $MESSAGE['GENERIC_WEBSITE_LOCKED'];
+				$BE_PATIENT = $MESSAGE['GENERIC_BE_PATIENT'];
+				$PAGE_ICON  = 'system';
+				$show_screen = true;
+			}
+		} else {
+			header($_SERVER['SERVER_PROTOCOL'].' 503 Service Unavailable');
+			$PAGE_TITLE = $MESSAGE['GENERIC_WEBSITE_UNDER_CONSTRUCTION'];
+			$PAGE_ICON  = 'negative';
+			$show_screen = true;
+		}
+		if($show_screen)
+		{
+            $sMaintanceFile = $this->correct_theme_source('maintance.htt');
+    		if(file_exists($sMaintanceFile))
+    		{
+                $tpl = new Template(dirname( $sMaintanceFile ));
+    		    $tpl->set_file( 'page', 'maintance.htt' );
+    		    $tpl->set_block( 'page', 'main_block', 'main' );
+
+    			if(defined('DEFAULT_CHARSET'))
+    			{
+    				$charset=DEFAULT_CHARSET;
+    			} else {
+    				$charset='utf-8';
+    			}
+    		    $tpl->set_var( 'PAGE_TITLE', $MESSAGE['GENERIC_WEBSITE_UNDER_CONSTRUCTION'] );
+    	 	    $tpl->set_var( 'CHECK_BACK', $MESSAGE['GENERIC_PLEASE_CHECK_BACK_SOON'] );
+    	 	    $tpl->set_var( 'CHARSET', $charset );
+    	 	    $tpl->set_var( 'WB_URL', WB_URL );
+    	 	    $tpl->set_var( 'BE_PATIENT', $BE_PATIENT );
+    	 	    $tpl->set_var( 'THEME_URL', THEME_URL );
+    			$tpl->set_var( 'PAGE_ICON', $PAGE_ICON);
+    			$tpl->set_var( 'LANGUAGE', strtolower(LANGUAGE));
+    		    $tpl->parse( 'main', 'main_block', false );
+    		    $tpl->pparse( 'output', 'page' );
+                exit();
+    		} else {
+    		 require_once(WB_PATH.'/languages/'.DEFAULT_LANGUAGE.'.php');
+    		echo '<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http:www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+    		<head><title>'.$MESSAGE['GENERIC_WEBSITE_UNDER_CONSTRUCTION'].'</title>
+    		<style type="text/css"><!-- body{ font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px; background-image: url("'.WB_URL.'/templates/'.DEFAULT_THEME.'/images/background.png");background-repeat: repeat-x; background-color: #A8BCCB; text-align: center; }
+    		h1 { margin: 0; padding: 0; font-size: 18px; color: #000; text-transform: uppercase;}--></style></head><body>
+    		<br /><h1>'.$MESSAGE['GENERIC_WEBSITE_UNDER_CONSTRUCTION'].'</h1><br />
+    		'.$MESSAGE['GENERIC_PLEASE_CHECK_BACK_SOON'].'</body></html>';
+    		}
+    		flush();
+            exit();
+		}
+	}
+
 	// Validate send email
 	function mail($fromaddress, $toaddress, $subject, $message, $fromname='', $replyTo='') {
 /*
Index: branches/2.8.x/wb/framework/class.frontend.php
===================================================================
--- branches/2.8.x/wb/framework/class.frontend.php	(revision 1781)
+++ branches/2.8.x/wb/framework/class.frontend.php	(revision 1782)
@@ -1,9 +1,9 @@
 <?php
 /**
  *
- * @category        framework
- * @package         frontend
- * @author          Ryan Djurovich, WebsiteBaker Project
+ * @category        frontend
+ * @package         framework
+ * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
  * @copyright       2009-2012, WebsiteBaker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -13,7 +13,7 @@
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
-*/
+ */
 /* -------------------------------------------------------- */
 // Must include code to stop this file being accessed directly
 if(!defined('WB_PATH')) {
@@ -21,8 +21,9 @@
 	throw new IllegalFileException();
 }
 /* -------------------------------------------------------- */
-require_once(WB_PATH.'/framework/class.wb.php');
+//require_once(WB_PATH.'/framework/class.wb.php');
 //require_once(WB_PATH.'/framework/SecureForm.php');
+if(!class_exists('wb', false)){ require(WB_PATH.'/framework/class.wb.php'); }
 
 class frontend extends wb {
 	// defaults
@@ -47,28 +48,54 @@
 	// ugly database stuff
 	public $extra_where_sql, $sql_where_language;
 
-	public function __construct() {
+// do not chnage if working in frontend account
+    public $FrontendLanguage;
+
+	public function __construct($value=true) {
 		parent::__construct(SecureForm::FRONTEND);
+        $this->FrontendLanguage = isset($value) ? $value : true;
 	}
 
+    public function ChangeFrontendLanguage( $value=true ) {
+        $this->FrontendLanguage=$value;
+    }
+
 	public function page_select() {
-		global $page_id,$no_intro;
-		global $database;
+		global $database, $page_id,$no_intro;
+/*
+		// set by user statusflag and maintance enabled select in options
+		// if maintance flag is set registered user can see normal pages
+		// otherwise show show maintance message
+
+		if($maintance == true)
+		{
+			$this->print_under_construction();
+			return false;
+		}
+*/
+
+/**
+ * Store installed languages in SESSION
+ */
+
+        if( $this->get_session('session_started') ) {
+            $_SESSION['USED_LANGUAGES'] = $this->GetLanguagesInUsed();
+        }
+
+		$maintance = ( defined('SYSTEM_LOCKED') && (SYSTEM_LOCKED==true) ? true : false );
 		// We have no page id and are supposed to show the intro page
-		if((INTRO_PAGE AND !isset($no_intro)) AND (!isset($page_id) OR !is_numeric($page_id))) {
+		if((INTRO_PAGE && ($maintance != true) && !isset($no_intro)) && (!isset($page_id) || !is_numeric($page_id)))
+		{
 			// Since we have no page id check if we should go to intro page or default page
 			// Get intro page content
-			$filename = WB_PATH.PAGES_DIRECTORY.'/intro'.PAGE_EXTENSION;
-			if(file_exists($filename)) {
-				$handle = @fopen($filename, "r");
-				$content = @fread($handle, filesize($filename));
-				@fclose($handle);
-				$this->preprocess($content);
-				header("Location: ".WB_URL.PAGES_DIRECTORY."/intro".PAGE_EXTENSION."");   // send intro.php as header to allow parsing of php statements
-				echo ($content);
-				return false;
+			$sIntroFilename = PAGES_DIRECTORY.'/intro'.PAGE_EXTENSION;
+			if(file_exists(WB_PATH.$sIntroFilename)) {
+                // send intro.php as header to allow parsing of php statements
+				header("Location: ".WB_URL.$sIntroFilename."");
+				exit();
 			}
 		}
+
 		// Check if we should add page language sql code
 		if(PAGE_LANGUAGES) {
 			$this->sql_where_language = ' AND `language`=\''.LANGUAGE.'\'';
@@ -87,39 +114,51 @@
 			$sql .= trim($this->sql_where_language).' ';
 		}
 		$sql .= 'ORDER BY `p`.`position` ASC';
-		$get_default = $database->query($sql);
-		$default_num_rows = $get_default->numRows();
-		if(!isset($page_id) OR !is_numeric($page_id)){
-			// Go to or show default page
-			if($default_num_rows > 0) {
-				$fetch_default = $get_default->fetchRow();
-				$this->default_link = $fetch_default['link'];
-				$this->default_page_id = $fetch_default['page_id'];
-				// Check if we should redirect or include page inline
-				if(HOMEPAGE_REDIRECTION) {
-					// Redirect to page
-//					header("Location: ".$this->page_link($this->default_link));
-//					exit();
-					$this->send_header($this->page_link($this->default_link));
-				} else {
-					// Include page inline
-					$this->page_id = $this->default_page_id;
-				}
-			} else {
-		   		// No pages have been added, so print under construction page
-				$this->print_under_construction();
-				exit();
-			}
+		if($get_default = $database->query($sql)) {
+
+    		$default_num_rows = $get_default->numRows();
+    		if(!isset($page_id) OR !is_numeric($page_id)){
+    			// Go to or show default page
+    			if($default_num_rows > 0) {
+    				$fetch_default = $get_default->fetchRow(MYSQL_ASSOC);
+    				$this->default_link = $fetch_default['link'];
+    				$this->default_page_id = $fetch_default['page_id'];
+    				// Check if we should redirect or include page inline
+    				if(HOMEPAGE_REDIRECTION) {
+    					// Redirect to page
+    //					header("Location: ".$this->page_link($this->default_link));
+    //					exit();
+    					$this->send_header($this->page_link($this->default_link));
+    				} else {
+    					// Include page inline
+    					$this->page_id = $this->default_page_id;
+    				}
+    			} else {
+    		   		// No pages have been added, so print under construction page
+    //				if(trim($this->sql_where_language) == '') {
+    //					$this->ShowMaintainScreen('new');
+    //    				exit();
+    //				}
+    				$this->ShowMaintainScreen('new');
+    //				$this->print_under_construction();
+    				exit();
+    			}
+    		} else {
+    			$this->page_id=$page_id;
+    		}
+    		// Get default page link
+    		if(!isset($fetch_default)) {
+    		  	$fetch_default = $get_default->fetchRow(MYSQL_ASSOC);
+    	 		$this->default_link = $fetch_default['link'];
+    			$this->default_page_id = $fetch_default['page_id'];
+    		}
+    		return true;
+
 		} else {
-			$this->page_id=$page_id;
-		}
-		// Get default page link
-		if(!isset($fetch_default)) {
-		  	$fetch_default = $get_default->fetchRow();
-	 		$this->default_link = $fetch_default['link'];
-			$this->default_page_id = $fetch_default['page_id'];
-		}
-		return true;
+			$this->ShowMaintainScreen('new');
+			exit();
+    	}
+
 	}
 
 	public function get_page_details() {
@@ -134,10 +173,13 @@
 				exit("Page not found");
 			}
 			// Fetch page details
-			$this->page = $get_page->fetchRow();
-			// Check if the page language is also the selected language. If not, send headers again.
-			if ($this->page['language']!=LANGUAGE) {
-				if(isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') { // check if there is an query-string
+			$this->page = $get_page->fetchRow(MYSQL_ASSOC);
+
+		//  Check if the page language is also the selected language. If not, send headers again.
+			if (($this->page['language'] != LANGUAGE) && $this->FrontendLanguage )
+            {
+            //  check if there is an query-string
+				if(isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') {
 					header('Location: '.$this->page_link($this->page['link']).'?'.$_SERVER['QUERY_STRING'].'&lang='.$this->page['language']);
 				} else {
 					header('Location: '.$this->page_link($this->page['link']).'?lang='.$this->page['language']);
@@ -144,6 +186,7 @@
 				}
 				exit();
 			}
+
 			// Begin code to set details as either variables of constants
 			// Page ID
 			if(!defined('PAGE_ID')) {define('PAGE_ID', $this->page['page_id']);}
@@ -233,7 +276,6 @@
 					// User isnt allowed on this page so tell them
 					$this->page_access_denied=true;
 				}
-
 			}
 		}
 		// check if there is at least one active section
@@ -411,15 +453,8 @@
 
 	// Function to show the "Under Construction" page
 	public function print_under_construction() {
-		global $MESSAGE;
-		require_once(WB_PATH.'/languages/'.DEFAULT_LANGUAGE.'.php');
-		echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-		<head><title>'.$MESSAGE['GENERIC']['WEBSITE_UNDER_CONSTRUCTION'].'</title>
-		<style type="text/css"><!-- body{ font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px; background-image: url("'.THEME_URL.'/images/background.png");background-repeat: repeat-x; background-color: #A8BCCB; text-align: center; }
-		h1 { margin: 0; padding: 0; font-size: 18px; color: #000; text-transform: uppercase;
-}--></style></head><body>
-		<br /><h1>'.$MESSAGE['GENERIC']['WEBSITE_UNDER_CONSTRUCTION'].'</h1><br />
-		'.$MESSAGE['GENERIC']['PLEASE_CHECK_BACK_SOON'].'</body></html>';
+		$this->ShowMaintainScreen('new');
+		exit();
 	}
 }
 
Index: branches/2.8.x/wb/index.php
===================================================================
--- branches/2.8.x/wb/index.php	(revision 1781)
+++ branches/2.8.x/wb/index.php	(revision 1782)
@@ -17,7 +17,7 @@
 
 // Include config file
 $config_file = dirname(__FILE__).'/config.php';
-if(file_exists($config_file))
+if(file_exists($config_file) && !defined('WB_URL'))
 {
 	require_once($config_file);
 }
@@ -40,9 +40,14 @@
 	exit;	// make sure that subsequent code will not be executed
 }
 
-require_once(WB_PATH.'/framework/class.frontend.php');
+//require_once(WB_PATH.'/framework/class.frontend.php');
+
+if(!class_exists('frontend', false)){ include(WB_PATH.'/framework/class.frontend.php'); }
+
 // Create new frontend object
-$wb = new frontend();
+if (!isset($wb)) {
+    $wb = new frontend();
+}
 
 // Figure out which page to display
 // Stop processing if intro page was shown
Index: branches/2.8.x/wb/templates/wb_theme/css/login.css
===================================================================
--- branches/2.8.x/wb/templates/wb_theme/css/login.css	(revision 1781)
+++ branches/2.8.x/wb/templates/wb_theme/css/login.css	(revision 1782)
@@ -7,4 +7,4 @@
  .login_box a:hover { text-decoration :underline; color :#3366ff; }
 form.settings_table { overflow :visible; margin :0; padding :0; }
 form.settings_table fieldset { border :1px none #eeeeee; display :block; margin :0; padding :0; }
-legend.settings_table, form.settings_table legend { background :#336699 url(../images/menu.png) repeat-x center; border :medium none; color :#ffffff; font-size :140%; height :25px; margin :0 auto auto -7px!important; padding :10px 0 0 10px; width :100%; text-align :left; }
+legend.settings_table, form.settings_table legend { background :url(../images/menu.png) #336699 repeat-x center; border :medium none; color :#ffffff; font-size :140%; height :25px; margin :0 auto auto -7px!important; padding :8px 0 0 10px; width :100%; text-align :left; }
Index: branches/2.8.x/wb/templates/wb_theme/css/warn.css
===================================================================
--- branches/2.8.x/wb/templates/wb_theme/css/warn.css	(nonexistent)
+++ branches/2.8.x/wb/templates/wb_theme/css/warn.css	(revision 1782)
@@ -0,0 +1,37 @@
+/**
+ * @id  $Date$
+ *
+ */
+html { color :#003366; font-family :Verdana,"Trebuchet MS",Arial,Helvetica,sans-serif; font-size :100.1%; font-weight :normal; overflow-x :auto; overflow-y :scroll; }
+* html div{ height :0.1em; }
+body{ background :#a8bccb; margin :0px auto; padding :0px; text-align :left; }
+h1, h3, h4 { color :#5b9acf; display :block; font-weight :bold; margin :0.5em auto; padding-bottom :5px; }
+h1 { font-size :140%; }
+h3 { font-size :110%; }
+h4 { font-size :100%; }
+hr { color :#003366; margin :0em auto; }
+img { border :none; }
+li p { margin :0.5em 0; }
+ul, li { list-style :none; margin :0; padding :0; }
+div.bottomdiv { background-color :#eff2f6; background-repeat :repeat-x; border-bottom :0px solid #0099ff; border-bottom-right-radius :8px; border-left :0px solid #0099ff; border-right :0px solid #0099ff; color :#003366; font-weight :bold; -moz-border-radius-bottomleft :8px; -moz-border-radius-bottomright :8px; padding :10px; text-align :center; -webkit-border-bottom-left-radius :8px; -webkit-border-bottom-right-radius :8px; }
+div.topdiv { background-color :#eff2f6; background-image :url(../images/menu.png); background-position :left top; background-repeat :repeat-x; border-top-left-radius :8px; border-top-right-radius :8px; font-size :110%; font-weight :normal; height :34px; -moz-border-radius-topleft :8px; -moz-border-radius-topright :8px; padding :5px 10px; -webkit-border-top-left-radius :8px; -webkit-border-top-right-radius :8px; color :#330033; color :#dddddd; }
+.clear { clear :both; }
+.invalid_message { clear :both; color :#990000; font-size :1em; height :auto; padding-top :5px; text-align :center; width :100%; }
+.shadow { box-shadow :5px 5px 10px #000030; -khtml-box-shadow :5px 5px 10px #000030; -moz-box-shadow :5px 5px 10px #000030; -webkit-box-shadow :5px 5px 10px #000030; }
+.smaller { font-size :0.8em; }
+.spacer { line-height :1em; }
+div.main { border :0 none #666666; font-size :1em; margin :0 auto 1em; max-width :90em; min-width :60em; overflow :hidden; padding :10px 15px; width :78.6%; }
+div.main .table { background :url("../images/bgtitle.png") repeat-x scroll 0 0 #ffffff; border-radius :10px 10px 10px 10px; box-shadow :5px 5px 5px rgba(68, 68, 68, 0.6); margin :0 auto; overflow :hidden; padding :0px 0px; width :74%; }
+table.header { margin :0 auto; padding :0px 2px; width :74%; }
+table.layout { table-layout :auto; }
+.td,.content { padding :0; }
+.login_box { border :none; }
+ .login_box a { text-decoration :none; }
+ .login_box a:hover { color :#3366ff; text-decoration :underline; }
+table.footer { margin :1em auto; width :100%; }
+table.footer tbody tr td { font-size :12px; text-align :center; }
+legend.settings_table, .settings_table legend { background :url("../images/menu.png") repeat-x scroll center center #336699; border :medium none; color :#ffffff; font-size :140%; height :25px; margin :0 auto auto -7px !important; padding :10px 0 0 10px; text-align :left; width :100%; }
+table a:link { display :inline; font-weight :bold; padding-top :0; text-decoration :none; vertical-align :baseline; }
+a:link { display :inline; font-weight :bold; padding-top :0; text-decoration :none; vertical-align :baseline; }
+a:visited { color :#0066cc; }
+a:hover { color :#6699ff; text-decoration :underline; }

Property changes on: branches/2.8.x/wb/templates/wb_theme/css/warn.css
___________________________________________________________________
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/templates/wb_theme/templates/header.htt
===================================================================
--- branches/2.8.x/wb/templates/wb_theme/templates/header.htt	(revision 1781)
+++ branches/2.8.x/wb/templates/wb_theme/templates/header.htt	(revision 1782)
@@ -42,11 +42,13 @@
 	<td></td>
 	<td class="topnav {LOGIN_DISPLAY_NONE}">
 		<span><a href="{ADMIN_URL}" title="{TITLE_START}"><img src="{THEME_URL}/images/{START_ICON}.png" alt="{TITLE_START}" /></a></span>
-		&nbsp;&nbsp;<a href="{URL_VIEW}" target="_blank" title="{TITLE_VIEW}"><img src="{THEME_URL}/images/view.png" alt="{WB_URL}" /></a>
-		&nbsp; <a href="{URL_HELP}" target="_blank" title="{TITLE_HELP}"><img src="{THEME_URL}/images/help.png" alt="{TITLE_HELP}" /></a>
-		&nbsp; <a href="{LOGIN_LINK}" title="{TITLE_LOGOUT}"><img src="{THEME_URL}/images/{LOGIN_ICON}.png" alt="{TITLE_LOGOUT}" /></a>
+		<a href="{URL_VIEW}" target="_blank" title="{TITLE_VIEW}"><img src="{THEME_URL}/images/view.png" alt="{WB_URL}" /></a>
+		<a href="{URL_HELP}" target="_blank" title="{TITLE_HELP}"><img src="{THEME_URL}/images/help.png" alt="{TITLE_HELP}" /></a>
+    <!-- BEGIN maintenance_block -->
+        <a href="{MAINTAINANCE_URL}" title="{MAINTENANCE_MODE}"><img src="{MAINTENANCE_ICON}" alt="{MAINTENANCE_MODE}" title="{MAINTENANCE_MODE}" /></a>
+    <!-- END maintenance_block -->
+		&nbsp;<a href="{LOGIN_LINK}" title="{TITLE_LOGOUT}"><img src="{THEME_URL}/images/{LOGIN_ICON}.png" alt="{TITLE_LOGOUT}" /></a>
 	</td>
-	<td></td>
 	<td class="version {LOGIN_DISPLAY_NONE}">
 	Version {VERSION} {SP}<br />
     Revision {REVISION}
Index: branches/2.8.x/wb/templates/wb_theme/templates/warning.html
===================================================================
--- branches/2.8.x/wb/templates/wb_theme/templates/warning.html	(revision 1781)
+++ branches/2.8.x/wb/templates/wb_theme/templates/warning.html	(revision 1782)
@@ -1,40 +1,65 @@
-<!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 | Excessive Invalid Logins</title>
-    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-    <meta http-equiv="content-language" content="en" />
-    <meta name="description" content="Excessive Invalid Logins" />
-    <meta name="keywords" content="" />
-    <link href="../css/warning.css" rel="stylesheet" type="text/css" />
-</head>
-
-<body>
-		<div class="container">
-			<div style="width: 500px; margin: 0em auto; padding: 0;">
-				<div class="topdiv shadow">
-					Invalid Logins
-				</div>
-				<div class="bottomdiv shadow">
-            	<h1>Excessive Invalid Logins</h1>
-            	<h4>You have attempted to login too many times</h4>
-            	<p>Close this Tab and restart your Browser</p>
-			    <div class="center">
-			      <img src="../icons/negative.png" alt="Excessive Invalid Logins" />
-			    </div>
-				<hr />
-				<p class="smaller">
-<!-- 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="WebsiteBaker Home">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. -->
-					</p>
-				</div>
-			</div>
-		</div>
-
-
-</body>
-</html>
+<!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 | Excessive Invalid Logins</title>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <meta http-equiv="content-language" content="en" />
+    <meta name="description" content="Excessive Invalid Logins" />
+    <meta name="keywords" content="" />
+    <link href="../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="../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">
+                        Invalid Logins
+                        </div>
+                        <div class="bottomdiv">
+                        <h1>Excessive Invalid Logins</h1>
+                        <h4>You have attempted to login too many times
+                            <div class="center">
+                            <img src="../icons/warning.png" alt="Excessive Invalid Logins" />
+                            </div>
+                        </h4>
+                        <p>Close this Tab and restart your Browser</p>
+                        </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 Alessandro Rei - http://www.kde-look.org/usermanager/search.php?username=mentalrey License: http://www.gnu.org/copyleft/gpl.html -->
+<!--- Icon Designer Everaldo Coelho - http://www.everaldo.com/ License: http://www.gnu.org/licenses/lgpl.html -->
+<!--- Icon Designer David Vignoni - http://www.icon-king.com/ License: http://www.gnu.org/licenses/lgpl.html -->
+<!--- Icon Designer Pavel InFeRnODeMoN - http://www.kde-look.org/usermanager/search.php?username=InFeRnODeMoN License: http://www.gnu.org/copyleft/gpl.html -->
+<!--- Icon Designer Alexandre Moore - http://sa-ki.deviantart.com/ License: http://www.gnu.org/licenses/lgpl.html -->
+<!--- Icon Designer Alexandre Moore - http://sa-ki.deviantart.com/ License: http://www.gnu.org/copyleft/gpl.html -->
Index: branches/2.8.x/wb/templates/wb_theme/images/positive.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/2.8.x/wb/templates/wb_theme/images/positive.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/2.8.x/wb/templates/wb_theme/images/negative.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/2.8.x/wb/templates/wb_theme/images/negative.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/2.8.x/wb/templates/wb_theme/images/system.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/2.8.x/wb/templates/wb_theme/images/system.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/2.8.x/wb/templates/wb_theme/images/lock.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/2.8.x/wb/templates/wb_theme/images/lock.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/2.8.x/wb/templates/wb_theme/images/unlock.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/2.8.x/wb/templates/wb_theme/images/unlock.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/2.8.x/wb/templates/wb_theme/images/help.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: branches/2.8.x/wb/templates/argos_theme/css/screen.css
===================================================================
--- branches/2.8.x/wb/templates/argos_theme/css/screen.css	(revision 1781)
+++ branches/2.8.x/wb/templates/argos_theme/css/screen.css	(revision 1782)
@@ -3,7 +3,7 @@
 body,td,th,input,textarea { font-family :verdana,arial,helvetica,sans-serif; font-size :12px; color : #666666; }
 body { background :url(../images/background.jpg) #f9f9f9 0 0 repeat-x; margin :0; text-align :center; }
 img { border :0px; }
-#admin_header { text-align :center; width :900px; height :105px; margin :0 auto; padding :10px 0 0 0; }
+#admin_header { text-align :center; width :948px; height :105px; margin :0 auto; padding :10px 0 0 0; }
 #admin_header a#website_title { display :block; text-align :left; font-size :14px; font-weight :bold; color :#ffffff; text-transform :uppercase; text-decoration :none; }
 #topmenu { float :right; text-align :right; color :#ffffff; width :220px; }
 #topmenu a { font-size :11px; color :#ffffff; text-decoration :underline; margin :0 5px; }
@@ -22,11 +22,10 @@
 .menu a span { display :block; background :url(../images/tabr.jpg) #28609b no-repeat right top; padding :6px 9px 6px 6px; }
 .menu a:hover, .menu a:hover span { background-color :#28609b; text-decoration :none; }
 .menu .current a, .menu a:hover { border-bottom :3px solid #d25e59; }
-#content_container { text-align :center; width :900px; clear :both; margin :0 auto; }
-.content { margin :0; padding :20px 0; width :900px; text-align :left; vertical-align :top; }
+#content_container { text-align :center; width : 948px; clear :both; margin :0 auto; }
+.content { margin :0; padding :20px 0; width : 948px; text-align :left; vertical-align :top; }
 hr { margin :15px 0; color :#003366; height :1px; }
 .center { text-align :center; }
-.none { display :none; height :0; }
 form { margin :0; }
 label { cursor :pointer; }
 input:focus, select:focus, textarea:focus { background :#f1f8fd; }
@@ -91,14 +90,7 @@
 .spacer { line-height :1em; margin-right :0.5em; position :relative; }
 /* ************************************************************************** */
 /* DIV-mbox to show selector or simply content only ************************* */
-div.mbox {
-   padding : 5px 10px;
-   margin : 5px auto;
-   background-color :#ffffff;
-   color :#330033;
-   font-size :1em;
-   display :block;
-}
+div.mbox { padding :5px 10px; margin :5px auto; background-color :#ffffff; color :#330033; font-size :1em; display :block; }
  	div.mbox div { }
 		div.mbox div a { font-size :1em; color :#0052a1; }
 		div.mbox div a:hover { color :#0099ff; }
@@ -106,18 +98,8 @@
 		div.mbox div p { margin :0; padding :0 0 0.6em 0; }
 div.mbox:hover { }
 /* extension for mbox to show additional icons on left side ***************** */
-div.mbox-icon {
-   background-repeat :no-repeat;
-   background-image :url(icons/info_50.png);
-   background-position :15px 50%;
-   padding : 10px 5px;
-   min-height :25px;
-}
-	div.mbox-icon div {
-   margin-left :70px;
-   border-left :0px outset;
-   padding-left :5px;
-}
+div.mbox-icon { background-repeat :no-repeat; background-image :url(icons/info_50.png); background-position :15px 50%; padding :10px 5px; min-height :25px; }
+	div.mbox-icon div { margin-left :70px; border-left :0px outset; padding-left :5px; }
 div.mbox-icon16 { background-repeat :no-repeat; background-image :url(icons/info_16.png); background-position :5px 50%; padding :5px; min-height :10px; }
 	div.mbox-icon16 div { margin-left :30px; border-left :4px outset; padding-left :5px; }
 /* coloring of the mbox and other boxes also ******************************** */
@@ -142,7 +124,7 @@
 /* END of mbox - definition ************************************************* */
 /* ************************************************************************** */
 div.mbox input [type="checkbox"] { width :2.5em; }
-div.mbox.dev-info { background :#dddddd; font-size :0.9em; overflow :auto; height :auto; white-space :normal; margin :0 auto 3em; position :relative; }
+div.mbox.dev-info { background :#dddddd; color :#990066; font-size :0.9em; overflow :auto; height :auto; white-space :normal; margin :0 auto 3em; position :relative; }
 div.mbox.dev-info div span { margin-bottom :1px; }
 /* */
 .msg-box { background :#e5ffe6; border :0.2em #009900 solid; color :#336600; margin-bottom :1em; padding :0.63em; text-align : left; }
@@ -313,6 +295,7 @@
 div.page-settings-leftcol label a:hover { color : #006699; text-decoration : underline; }
 div.page-settings-leftcol textarea { resize :vertical; } 
 #overDiv { max-width :450px; background-position :center; background-attachment :fixed; text-align :left; 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; }
Index: branches/2.8.x/wb/templates/argos_theme/templates/header.htt
===================================================================
--- branches/2.8.x/wb/templates/argos_theme/templates/header.htt	(revision 1781)
+++ branches/2.8.x/wb/templates/argos_theme/templates/header.htt	(revision 1782)
@@ -53,7 +53,7 @@
       <!-- BEGIN linkBlock -->
       <li class="{CLASS}"><a href="{LINK}" target="{TARGET}"><span>{TITLE}</span></a></li>
       <!-- END linkBlock -->
-		<li>&nbsp;</li>
+		<li class="hidden">&nbsp;</li>
     </ul>
   </div>
 </div>
Index: branches/2.8.x/wb/modules/form/frontend.css
===================================================================
--- branches/2.8.x/wb/modules/form/frontend.css	(revision 1781)
+++ branches/2.8.x/wb/modules/form/frontend.css	(revision 1782)
@@ -17,4 +17,5 @@
 .frm-warning { background :#ffeeee; border :0.2em #884444 solid; color :#e10000; margin-bottom :1em; padding :0.8em; font-size :1.2em; font-weight :bold; }
 .frm-note { background :#eeffee; border :0.2em #448844 solid; color :#004400; margin-bottom :1em; padding :0.8em; font-size :1.2em; font-weight :bold; }
 .previewPrintTop { text-align :right; font-size :0.9em; }
-.previewPrintTop img { padding-left :16px; }
\ No newline at end of file
+.previewPrintTop img { padding-left :16px; }
+fielset { border :none; }
\ No newline at end of file
