Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 748)
+++ trunk/CHANGELOG	(revision 749)
@@ -12,6 +12,7 @@
 
 ------------------------------------- 2.7.0 -------------------------------------
 12-Mar-2008 Christian Sommer
+! 	removed hardcoded /admin folder strings from WB core files where possible
 ! 	added WB home folder fix proposed by the forum member spawnferkel (thanks)
 ! 	defined <strong> and <em> instead of <b> and <i> as default tags
 12-Mar-2008 Thomas Hornik
Index: trunk/wb/upgrade-script.php
===================================================================
--- trunk/wb/upgrade-script.php	(revision 748)
+++ trunk/wb/upgrade-script.php	(revision 749)
@@ -26,6 +26,8 @@
 /** 
 	PHP ROUTINES FOR THE UPGRADE SCRIPT
 **/
+@include_once('config.php');
+
 // this function checks the basic configurations of an existing WB intallation
 function status_msg($message, $class='check', $element='span') {
 	// returns a status message
@@ -34,9 +36,9 @@
 
 function check_baseline_configuration() {
 	// check if config.php file exists and contains values
+	global $database;
 	status_msg('config.php: ');
-	@include_once('config.php');
-	if(defined('WB_PATH')) {
+	if(defined('WB_PATH') && defined('ADMIN_PATH')) {
 		status_msg('OK', 'ok');
 	} else {
 		// output error message and return error status
@@ -51,7 +53,7 @@
 	// check if the WB 2.7 installation files were already uploaded via FTP
 	status_msg(', WB 2.7 core files uploaded: ');
 	@include_once(WB_PATH .'/framework/functions.php');
-	@include_once(WB_PATH .'/admin/interface/version.php');
+	@include_once(ADMIN_PATH .'/interface/version.php');
 	if(defined('VERSION') && VERSION == '2.7'
 		&& function_exists('get_variable_content') 
 		&& file_exists(WB_PATH .'/modules/menu_link/languages/DE.php') 
@@ -58,8 +60,8 @@
 		&& file_exists(WB_PATH .'/modules/output_filter/filter-routines.php') 
 		&& file_exists(WB_PATH .'/modules/captcha_control/languages/DE.php')
 		&& file_exists(WB_PATH .'/modules/jsadmin/jsadmin_backend_include.php')
-		&& file_exists(WB_PATH .'/admin/admintools/tool.php')
-		&& file_exists(WB_PATH .'/admin/interface/er_levels.php')) {
+		&& file_exists(ADMIN_PATH .'/admintools/tool.php')
+		&& file_exists(ADMIN_PATH .'/interface/er_levels.php')) {
 		status_msg('OK','ok');
 	} else {
 		// output a warning and return error status
@@ -117,7 +119,7 @@
 
 #container {
 	width:85%;
-	background: #9ACBF1 url(admin/interface/background.png) repeat-x;
+	background: #9ACBF1 url(<?php echo ADMIN_URL;?>/interface/background.png) repeat-x;
 	border:1px solid #000;
 	color:#000;
 	margin:2em auto;
@@ -155,7 +157,7 @@
 </head>
 <body>
 <div id="container">
-<img src="admin/interface/logo.png" alt="Website Baker Logo" />
+<img src="<?php echo ADMIN_URL;?>/interface/logo.png" alt="Website Baker Logo" />
 
 <h1>Website Baker Upgrade</h1>
 <p>This script is for <strong>upgrading an existing v2.6.7</strong> installation to the latest Website Baker <strong>version 2.7</strong>. The upgrade script checks the configuration of your installed Website Baker system and alters the existing WB database to reflect the changes introduced with WB 2.7.</p>
Index: trunk/wb/framework/class.admin.php
===================================================================
--- trunk/wb/framework/class.admin.php	(revision 748)
+++ trunk/wb/framework/class.admin.php	(revision 749)
@@ -79,8 +79,10 @@
 		$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/') !== false) {
+			&& 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'] : '';
Index: trunk/wb/framework/class.frontend.php
===================================================================
--- trunk/wb/framework/class.frontend.php	(revision 748)
+++ trunk/wb/framework/class.frontend.php	(revision 749)
@@ -402,7 +402,7 @@
 		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("admin/interface/background.png");background-repeat: repeat-x; margin: 20px; text-align: center; }
+		<style type="text/css"><!-- body{ font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px; background-image: url("'.ADMIN_URL.'/interface/background.png");background-repeat: repeat-x; margin: 20px; text-align: center; }
 		h1 { margin: 0; padding: 0; }--></style></head><body>
 		<h1>'.$MESSAGE['GENERIC']['WEBSITE_UNDER_CONSTRUCTION'].'</h1><br />
 		'.$MESSAGE['GENERIC']['PLEASE_CHECK_BACK_SOON'].'</body></html>';
Index: trunk/wb/install/save.php
===================================================================
--- trunk/wb/install/save.php	(revision 748)
+++ trunk/wb/install/save.php	(revision 749)
@@ -431,7 +431,7 @@
 	       . ' )';
 	$database->query($pages);
 
-	require(WB_PATH.'/admin/interface/version.php');
+	require(ADMIN_PATH.'/interface/version.php');
 	
 	// Settings table
 	$settings='CREATE TABLE `'.TABLE_PREFIX.'settings` ( `setting_id` INT NOT NULL auto_increment,'
Index: trunk/wb/modules/jsadmin/jsadmin_backend_include.php
===================================================================
--- trunk/wb/modules/jsadmin/jsadmin_backend_include.php	(revision 748)
+++ trunk/wb/modules/jsadmin/jsadmin_backend_include.php	(revision 749)
@@ -32,6 +32,9 @@
 // Direct access prevention
 defined('WB_PATH') OR die(header('Location: ../index.php'));
 
+// obtain the admin folder (e.g. /admin)
+$admin_folder = str_replace(WB_PATH, '', ADMIN_PATH);
+
 $JSADMIN_PATH = WB_URL.'/modules/jsadmin';
 $YUI_PATH = WB_URL.'/include/yui';
 $script = $_SERVER['SCRIPT_NAME'];
@@ -38,11 +41,11 @@
 if(!$script)
 	$script = $PHP_SELF;
 
-if(strstr($script, "/admin/pages/index.php"))
+if(strstr($script, $admin_folder."/pages/index.php"))
 	$page_type = 'pages';
-elseif(strstr($script, "/admin/pages/sections.php"))
+elseif(strstr($script, $admin_folder."/pages/sections.php"))
 	$page_type = 'sections';
-elseif(strstr($script, "/admin/settings/tool.php")
+elseif(strstr($script, $admin_folder."/settings/tool.php")
 	&& isset($_REQUEST["tool"]) && $_REQUEST["tool"] == 'jsadmin')
 	$page_type = 'config';
 else
