Index: typo3/sysext/install/mod/class.tx_install.php
===================================================================
--- typo3/sysext/install/mod/class.tx_install.php	(revision 7289)
+++ typo3/sysext/install/mod/class.tx_install.php	(working copy)
@@ -128,7 +128,6 @@
  * 4823:     function stepHeader()
  * 4865:     function note123()
  * 4879:     function endNotes()
- * 4898:     function convertByteSize($bytes)
  * 4912:     function securityRisk()
  * 4930:     function alterPasswordForm()
  * 4946:     function messageBasicFinished()
@@ -156,6 +155,7 @@
 require_once(t3lib_extMgm::extPath('install').'updates/class.tx_coreupdates_installnewsysexts.php');
 require_once(t3lib_extMgm::extPath('install') . 'mod/class.tx_install_session.php');
 require_once(t3lib_extMgm::extPath('install') . 'updates/class.tx_coreupdates_statictemplates.php');
+require_once(PATH_tslib . 'class.tslib_content.php');
 
 /**
  * Install Tool module
@@ -166,14 +166,21 @@
  * @subpackage tx_install
  */
 class tx_install extends t3lib_install {
+	var $contentObject;
+	var $templateFilePath = 'typo3/sysext/install/Resources/Private/Templates/';
+	var $template;
+	var $javascript;
+	var $stylesheets;
+	var $markers = array();
+	var $messages = array();
+	var $errorMessages = array();
+	var $mailMessage = '';
 	var $getGD_start_string='<h2 align="center"><a name="module_gd">gd</a></h2>';	// Used to identify the GD section in the output from phpinfo()
 	var $getGD_end_string = '</table>';	// Used to identify the end of the GD section (found with getGD_start_string) in the output from phpinfo()
 	var $getTTF_string = 'with TTF library';	// Used to identify whether TTF-lib is included with GD
 	var $getTTF_string_alt = 'with freetype';       // Used to identify whether TTF-lib is included with GD
 	var $action = '';		// The url that calls this script
 	var $scriptSelf = 'index.php';		// The url that calls this script
-	var $fontTag2='<div class="bodytext">';
-	var $fontTag1='<div class="smalltext">';
 	var $updateIdentity = 'TYPO3 Install Tool';
 	var $headerStyle ='';
 	var $contentBeforeTable='';
@@ -187,11 +194,11 @@
 	var $dumpImCommands=1;			// If set, the image Magick commands are always outputted in the image processing checker
 	var $mode = '';	// If set to "123" then only most vital information is displayed.
 	var $step = 0;	// If set to 1,2,3 or GO it signifies various functions.
+	var $totalSteps = 4; // Can be changed by hook to define the total steps in 123 mode
 
 	// internal
 	var $passwordOK=0;			// This is set, if the password check was ok. The function init() will exit if this is not set
 	var $silent=1;				// If set, the check routines don't add to the message-array
-	var $messageFunc_nl2br=1;
 	var $sections=array();		// Used to gather the message information.
 	var $fatalError=0;			// This is set if some error occured that will definitely prevent TYpo3 from running.
 	var $sendNoCacheHeaders=1;
@@ -240,14 +247,15 @@
 	/**
 	 * Constructor
 	 *
-	 * @return	[type]		...
+	 * @return void
 	 */
-	function tx_install()	{
+	function tx_install() {
 		parent::t3lib_install();
+		$this->contentObject = t3lib_div::makeInstance('tslib_cObj');
 
 		if (!$GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword'])	die("Install Tool deactivated.<br />You must enable it by setting a password in typo3conf/localconf.php. If you insert the line below, the password will be 'joh316':<br /><br />\$TYPO3_CONF_VARS['BE']['installToolPassword'] = 'bacb98acf97e0b6112b1d1b650b84971';");
 
-		if ($this->sendNoCacheHeaders)	{
+		if ($this->sendNoCacheHeaders) {
 			header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
 			header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
 			header('Expires: 0');
@@ -282,11 +290,19 @@
 			}
 		}
 
-		if ($this->step == 3) {
+		if ($this->step == 4) {
 			$this->INSTALL['type'] = 'database';
 		}
 
-		if ($this->mode=='123')	{
+			// Hook to raise the counter for the total steps in the 1-2-3 installer
+		if (is_array ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install/mod/class.tx_install.php']['additionalSteps'])) {
+			foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install/mod/class.tx_install.php']['additionalSteps'] as $classData) {
+				$hookObject = t3lib_div::getUserObj($classData);
+				$this->totalSteps += (integer) $hookObject->execute();
+			}
+		}
+
+		if ($this->mode=='123') {
 			$tempItems = $this->menuitems;
 			$this->menuitems = array(
 				'config' => $tempItems['config'],
@@ -331,7 +347,7 @@
 ';
 		}
 
-		if ($this->session->isAuthorized() || $this->checkPassword())	{
+		if ($this->session->isAuthorized() || $this->checkPassword()) {
 			$this->passwordOK=1;
 			$this->session->refreshSession();
 
@@ -341,7 +357,7 @@
 				@touch($enableInstallToolFile);
 			}
 
-			if($this->redirect_url)	{
+			if($this->redirect_url) {
 				t3lib_utility_Http::redirect($this->redirect_url);
 			}
 		} else {
@@ -360,12 +376,12 @@
 	function checkPassword() {
 		$p = t3lib_div::_GP('password');
 
-		if ($p && md5($p)==$GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword'])	{
+		if ($p && md5($p)==$GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword']) {
 			$this->session->setAuthorized();
 
 				// Sending warning email
 			$wEmail = $GLOBALS['TYPO3_CONF_VARS']['BE']['warning_email_addr'];
-			if ($wEmail)	{
+			if ($wEmail) {
 				$subject="Install Tool Login at '".$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']."'";
 				$email_body="There has been a Install Tool login at TYPO3 site '".$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']."' (".t3lib_div::getIndpEnv('HTTP_HOST').") from remote address '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndpEnv('REMOTE_HOST').')';
 				mail($wEmail,
@@ -377,9 +393,9 @@
 			return true;
 		} else {
 				// Bad password, send warning:
-			if ($p)	{
+			if ($p) {
 				$wEmail = $GLOBALS['TYPO3_CONF_VARS']['BE']['warning_email_addr'];
-				if ($wEmail)	{
+				if ($wEmail) {
 					$subject="Install Tool Login ATTEMPT at '".$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']."'";
 					$email_body="There has been an Install Tool login attempt at TYPO3 site '".$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']."' (".t3lib_div::getIndpEnv('HTTP_HOST').").
 The MD5 hash of the last 5 characters of the password tried was '".substr(md5($p), -5)."'
@@ -396,62 +412,142 @@
 	}
 
 	/**
-	 * [Describe function...]
+	 * Create the HTML for the login form
 	 *
-	 * @return	[type]		...
+	 * Reads and fills the template.
+	 * Substitutes subparts when wrong password has been given
+	 * or the session has expired
+	 *
+	 * @return void
 	 */
-	function loginForm()	{
-		$p = t3lib_div::_GP('password');
+	function loginForm() {
+		$password = t3lib_div::_GP('password');
 		$redirect_url = $this->redirect_url ? $this->redirect_url : $this->action;
-
-		$this->messageFunc_nl2br=0;
-		$this->silent=0;
-
-		$content = '<form action="index.php" method="post" name="passwordForm">
-			<input type="password" name="password"><br />
-			<input type="hidden" name="redirect_url" value="'.htmlspecialchars($redirect_url).'">
-			<input type="submit" value="Log in"><br />
-			<br />
-
-			'.$this->fw('The Install Tool Password is <i>not</i> the admin password of TYPO3.<br />
-				If you don\'t know the current password, you can set a new one by setting the value of $TYPO3_CONF_VARS[\'BE\'][\'installToolPassword\'] in typo3conf/localconf.php to the md5() hash value of the password you desire.'.
-				($p ? '<br /><br />The password you just tried has this md5-value: <br /><br />'.md5($p) : '')
-				).'
-			</form>
-			<script type="text/javascript">
-			<!--
-				document.passwordForm.password.focus();
-			//-->
-			</script>';
-
+			// Add prototype to javascript array for output
+		$this->javascript[] = '<script type="text/javascript" src="' .
+			t3lib_div::getIndpEnv('TYPO3_SITE_URL') .
+			TYPO3_mainDir .
+			'contrib/prototype/prototype.js"></script>
+		';
+			// Get the template file
+		$templateFile = @file_get_contents(
+			PATH_site . $this->templateFilePath . 'LoginForm.html'
+		);
+			// Get the template part from the file
+		$template = $this->contentObject->getSubpart(
+			$templateFile, '###TEMPLATE###'
+		);
+			// Password has been given, but this form is rendered again.
+			// This means the given password was wrong
+		if (!empty($password)) {
+				// Get the subpart for the wrong password
+			$wrongPasswordSubPart = $this->contentObject->getSubpart(
+				$template, '###WRONGPASSWORD###'
+			);
+				// Define the markers content
+			$wrongPasswordMarkers = array(
+				'passwordMessage' => 'The password you just tried has this md5-value:',
+				'password' => md5($password)
+			);
+				// Fill the markers in the subpart
+			$wrongPasswordSubPart = $this->contentObject->substituteMarkerArray(
+				$wrongPasswordSubPart,
+				$wrongPasswordMarkers,
+				'###|###',
+				1,
+				1
+			);
+		}
+			// Session has expired
 		if (!$this->session->isAuthorized() && $this->session->isExpired()) {
-			$this->message('Password', 'Your install tool session has expired', '', 3);
+				// Get the subpart for the expired session message
+			$sessionExpiredSubPart = $this->contentObject->getSubpart(
+				$template, '###SESSIONEXPIRED###'
+			);
+				// Define the markers content
+			$sessionExpiredMarkers = array(
+				'message' => 'Your install tool session has expired'
+			);
+				// Fill the markers in the subpart
+			$sessionExpiredSubPart = $this->contentObject->substituteMarkerArray(
+				$sessionExpiredSubPart,
+				$sessionExpiredMarkers,
+				'###|###',
+				1,
+				1
+			);
 		}
-		$this->message('Password', 'Enter the Install Tool Password', $content, 0);
-		$this->output($this->outputWrapper($this->printAll()));
+			// Substitute the subpart for the expired session in the template
+		$template = $this->contentObject->substituteSubpart(
+			$template,
+			'###SESSIONEXPIRED###',
+			$sessionExpiredSubPart
+		);
+			// Substitute the subpart for the wrong password in the template
+		$template = $this->contentObject->substituteSubpart(
+			$template,
+			'###WRONGPASSWORD###',
+			$wrongPasswordSubPart
+		);
+			// Define the markers content
+		$markers = array(
+			'siteName' => 'Site: ' .
+				$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],
+			'headTitle' => 'Login to TYPO3 ' . TYPO3_version . ' Install tool',
+			'redirectUrl' => htmlspecialchars($redirect_url),
+			'enterPassword' => 'Password',
+			'login' => 'Login',
+			'message' => '
+				<p class="typo3-message message-information">
+					The Install Tool Password is <em>not</em> the admin password
+					of TYPO3.
+					<br />
+					If you don\'t know the current password, you can set a new
+					one by setting the value of
+					$TYPO3_CONF_VARS[\'BE\'][\'installToolPassword\'] in
+					typo3conf/localconf.php to the md5() hash value of the
+					password you desire.
+				</p>
+			'
+		);
+			// Fill the markers in the template
+		$content = $this->contentObject->substituteMarkerArray(
+			$template,
+			$markers,
+			'###|###',
+			1,
+			1
+		);
+			// Send content to the page wrapper function
+		$this->output($this->outputWrapper($content));
 	}
 
 	/**
-	 * Calling function that checks system, IM, GD, dirs, database and lets you alter localconf.php
+	 * Calling function that checks system, IM, GD, dirs, database
+	 * and lets you alter localconf.php
+	 *
 	 * This method is called from init.php to start the install Tool.
 	 *
-	 * @return	void
+	 * @return void
 	 */
-	function init()	{
-		if (!defined('PATH_typo3'))	exit;		// Must be called after inclusion of init.php (or from init.php)
+	function init() {
+		// Must be called after inclusion of init.php (or from init.php)
+		if (!defined('PATH_typo3'))	exit;
 		if (!$this->passwordOK)	exit;
 
 			// Setting stuff...
 		$this->check_mail();
 		$this->setupGeneral();
 		$this->generateConfigForm();
-		if (count($this->messages))	t3lib_div::debug($this->messages);
+		if (count($this->messages)) {
+			t3lib_div::debug($this->messages);
+		}
 
-		if ($this->step)	{
+		if ($this->step) {
 			$this->output($this->outputWrapper($this->stepOutput()));
 		} else {
 				// Menu...
-			switch($this->INSTALL['type'])	{
+			switch($this->INSTALL['type']) {
 				case 'images':
 					$this->checkIM=1;
 					$this->checkTheConfig();
@@ -471,58 +567,162 @@
 				case 'config':
 					$this->silent=0;
 					$this->checkIM=1;
-					$this->message('About configuration','How to configure TYPO3',$this->generallyAboutConfiguration());
+					$this->message(
+						'About configuration',
+						'How to configure TYPO3',
+						$this->generallyAboutConfiguration()
+					);
+					$this->message(
+						'System Information',
+						'Your system has the following configuration',
+						'
+							<dl id="systemInformation">
+								<dt>OS detected:</dt>
+								<dd>' . (TYPO3_OS == 'WIN' ? 'WIN' : 'UNIX') .'</dd>
+								<dt>UNIX/CGI detected:</dt>
+								<dd>' . (PHP_SAPI == 'cgi' ? 'YES' : 'NO') . '</dd>
+								<dt>PATH_thisScript:</dt>
+								<dd>' . PATH_thisScript . '</dd>
+							</dl>
+						'
+					);
 					$this->checkTheConfig();
 
 					$ext = 'Write config to localconf.php';
-					if ($this->fatalError)	{
-						if ($this->config_array['no_database'] || !$this->config_array['mysqlConnect'])	{
+					if ($this->fatalError) {
+						if (
+							$this->config_array['no_database'] ||
+							!$this->config_array['mysqlConnect']
+						) {
 							$this->message($ext, 'Database not configured yet!', '
-								You need to specify database username, password and host as one of the first things.
-								Next you\'ll have to select a database to use with TYPO3.
-								Use the form below:
-							',2);
+								<p>
+									You need to specify database username,
+									password and host as one of the first things.
+									<br />
+									Next you\'ll have to select a database to
+									use with TYPO3.
+								</p>
+								<p>
+									Use the form below.
+								</p>
+							', 2);
 						} else {
 							$this->message($ext, 'Fatal error encountered!', '
-								Somewhere above a fatal configuration problem is encountered. Please make sure that you\'ve fixed this error before you submit the configuration. TYPO3 will not run if this problem is not fixed!
-								You should also check all warnings that may appear.
-							',2);
+								<p>
+									Somewhere above a fatal configuration
+									problem is encountered.
+									Please make sure that you\'ve fixed this
+									error before you submit the configuration.
+									TYPO3 will not run if this problem is not
+									fixed!
+									<br />
+									You should also check all warnings that may
+									appear.
+								</p>
+							', 2);
 						}
 					} elseif ($this->mode=='123') {
-						if (!$this->fatalError)	{
+						if (!$this->fatalError) {
 							$this->message($ext, 'Basic configuration completed', '
-								You have no fatal errors in your basic configuration. You may have warnings though. Please pay attention to them! However you may continue and install the database.
-
-								<strong><span style="color:#f00;">Step 2:</span></strong> <a href="'.$this->scriptSelf.'?TYPO3_INSTALL[type]=database'.($this->mode?'&mode='.rawurlencode($this->mode):'').'">Click here to install the database.</a>
-							',-1,1);
+								<p>
+									You have no fatal errors in your basic
+									configuration.
+									You may have warnings though. Please pay
+									attention to them!
+									However you may continue and install the
+									database.
+								</p>
+								<p>
+									<strong>
+										<span style="color:#f00;">Step 2: </span>
+									</strong>
+									<a href="' . $this->scriptSelf .
+									'?TYPO3_INSTALL[type]=database' .
+									($this->mode ? '&mode=' . rawurlencode($this->mode) : '') .
+									'">Click here to install the database.</a>
+								</p>
+							', -1, 1);
 						}
 					}
-					$this->message($ext, 'Very Important: Changing Image Processing settings', "
-						When you change the settings for Image Processing you <i>must</i> take into account that <u>old images</u> may still be in typo3temp/ folder and prevent new files from being generated! This is especially important to know, if you're trying to set up image processing for the very first time.
-						The problem is solved by <a href=\"".htmlspecialchars($this->setScriptName('typo3temp'))."\">clearing the typo3temp/ folder</a>. Also make sure to clear the cache_pages table.
-						",1,1);
-					$this->message($ext, 'Very Important: Changing Encryption Key setting', "
-						When you change the setting for the Encryption Key you <i>must</i> take into account that a change to this value might invalidate temporary information, URLs etc.
-						The problem is solved by <a href=\"".htmlspecialchars($this->setScriptName('typo3temp'))."\">clearing the typo3temp/ folder</a>. Also make sure to clear the cache_pages table.
-						",1,1);
-					$this->message($ext, 'Update localconf.php', "
-						This form updates the localconf.php file with the suggested values you see below. The values are based on the analysis above.
-						You can change the values in case you have alternatives to the suggested defaults.
-						By this final step you will configure TYPO3 for immediate use provided that you have no fatal errors left above."
-						.$this->setupGeneral('get_form'),0,1);
+					$this->message($ext, 'Very Important: Changing Image Processing settings', '
+						<p>
+							When you change the settings for Image Processing
+							you <em>must</em> take into account
+							that <em>old images</em> may still be in typo3temp/
+							folder and prevent new files from being generated!
+							<br />
+							This is especially important to know, if you\'re
+							trying to set up image processing for the very first
+							time.
+							<br />
+							The problem is solved by <a href="' .
+							htmlspecialchars($this->setScriptName('typo3temp')) .
+							'">clearing the typo3temp/ folder</a>.
+							Also make sure to clear the cache_pages table.
+						</p>
+					', 1, 1);
+					$this->message($ext, 'Very Important: Changing Encryption Key setting', '
+						<p>
+							When you change the setting for the Encryption Key
+							you <em>must</em> take into account that a change to
+							this value might invalidate temporary information,
+							URLs etc.
+							<br />
+							The problem is solved by <a href="' .
+							htmlspecialchars($this->setScriptName('typo3temp')) .
+							'">clearing the typo3temp/ folder</a>.
+							Also make sure to clear the cache_pages table.
+						</p>
+					', 1, 1);
+					$this->message($ext, 'Update localconf.php', '
+						<p>
+							This form updates the localconf.php file with the
+							suggested values you see below. The values are based
+							on the analysis above.
+							<br />
+							You can change the values in case you have
+							alternatives to the suggested defaults.
+							<br />
+							By this final step you will configure TYPO3 for
+							immediate use provided that you have no fatal errors
+							left above.
+						</p>' . $this->setupGeneral('get_form') . '
+					', 0, 1);
 
 					$this->output($this->outputWrapper($this->printAll()));
 
 				break;
 				case 'extConfig':
 					$this->silent=0;
-
 					$this->generateConfigForm('get_form');
-
-					$content = $this->printAll();
-					$content = '<form action="'.$this->action.'" method="post">'.$content.'<input type="submit" value="Write to localconf.php"><br /><br />
-					'.$this->fw('<strong>NOTICE: </strong>By clicking this button, localconf.php is updated with new values for the parameters listed above!<br />').'
-					</form>';
+						// Get the template file
+					$templateFile = @file_get_contents(
+						PATH_site . $this->templateFilePath . 'InitExtConfig.html'
+					);
+						// Get the template part from the file
+					$template = $this->contentObject->getSubpart(
+						$templateFile, '###TEMPLATE###'
+					);
+						// Define the markers content
+					$markers = array(
+						'action' => $this->action,
+						'content' => $this->printAll(),
+						'write' => 'Write to localconf.php',
+						'notice' => 'NOTICE:',
+						'explanation' => '
+							By clicking this button, localconf.php is updated
+							with new values for the parameters listed above!
+						'
+					);
+						// Fill the markers in the template
+					$content = $this->contentObject->substituteMarkerArray(
+						$template,
+						$markers,
+						'###|###',
+						1,
+						1
+					);
+						// Send content to the page wrapper function
 					$this->output($this->outputWrapper($content));
 				break;
 				case 'typo3temp':
@@ -548,60 +748,152 @@
 					$this->silent=0;
 					$this->message('About', 'Warning - very important!', $this->securityRisk().$this->alterPasswordForm(),2);
 
-					$this->message('About', 'Using this script', "
-					Installing TYPO3 has always been a hot topic on the mailing list and forums. Therefore we've developed this tool which will help you through configuration and testing.
-					There are three primary steps for you to take:
+					$this->message('About', 'Using this script', '
+						<p>
+							Installing TYPO3 has always been a hot topic on the
+							mailing list and forums. Therefore we\'ve developed
+							this tool which will help you through configuration
+							and testing.
+							<br />
+							There are three primary steps for you to take:
+						</p>
+						<p>
+							<strong>1: Basic Configuration</strong>
+							<br />
+							In this step your PHP-configuration is checked. If
+							there are any settings that will prevent TYPO3 from
+							running correctly you\'ll get warnings and errors
+							with a description of the problem.
+							<br />
+							You\'ll have to enter a database username, password
+							and hostname. Then you can choose to create a new
+							database or select an existing one.
+							<br />
+							Finally the image processing settings are entered
+							and verified and you can choose to let the script
+							update the configuration file,
+							typo3conf/localconf.php with the suggested settings.
+						</p>
+						<p>
+							<strong>2: Database Analyser</strong>
+							<br />
+							In this step you can either install a new database
+							or update the database from any previous TYPO3
+							version.
+							<br />
+							You can also get an overview of extra/missing
+							fields/tables in the database compared to a raw
+							sql-file.
+							<br />
+							The database is also verified against your
+							\'tables.php\' configuration ($TCA) and you can
+							even see suggestions to entries in $TCA or new
+							fields in the database.
+						</p>
+						<p>
+							<strong>3: Update Wizard</strong>
+							<br />
+							Here you will find update methods taking care of
+							changes to the TYPO3 core which are not backwards
+							compatible.
+							<br />
+							It is recommended to run this wizard after every
+							update to make sure everything will still work
+							flawlessly.
+						</p>
+						<p>
+							<strong>4: Image Processing</strong>
+							<br />
+							This step is a visual guide to verify your
+							configuration of the image processing software.
+							<br />
+							You\'ll be presented to a list of images that should
+							all match in pairs. If some irregularity appears,
+							you\'ll get a warning. Thus you\'re able to track an
+							error before you\'ll discover it on your website.
+						</p>
+						<p>
+							<strong>5: All Configuration</strong>
+							<br />
+							This gives you access to any of the configuration
+							options in the TYPO3_CONF_VARS array. Every option
+							is also presented with a comment explaining what it
+							does.
+						</p>
+						<p>
+							<strong>6: typo3temp/</strong>
+							<br />
+							Here you can manage the files in typo3temp/ folder
+							in a simple manner. typo3temp/ contains temporary
+							files, which may still be used by the website, but
+							some may not. By searching for files with old
+							access-dates, you can possibly manage to delete
+							unused files rather than files still used. However
+							if you delete a temporary file still in use, it\'s
+							just regenerated as long as you make sure to clear
+							the cache tables afterwards.
+						</p>
+					');
 
-					<strong>1: Basic Configuration</strong>
-					In this step your PHP-configuration is checked. If there are any settings that will prevent TYPO3 from running correctly you'll get warnings and errors with a description of the problem.
-					You'll have to enter a database username, password and hostname. Then you can choose to create a new database or select an existing one.
-					Finally the image processing settings are entered and verified and you can choose to let the script update the configuration file, typo3conf/localconf.php with the suggested settings.
+					$this->message('About', 'Why is this script stand-alone?', '
+						<p>
+							You would think that this script should rather be a
+							module in the backend and access-controlled to only
+							admin-users from the database. But that\'s not how
+							it works.
+							<br />
+							The reason is, that this script must not be
+							depending on the success of the configuration of
+							TYPO3 and whether or not there is a working database
+							behind. Therefore the script is invoked from the
+							backend init.php file, which allows access if the
+							constant \'TYPO3_enterInstallScript\' has been
+							defined and is not false. That is and should be the
+							case <em>only</em> when calling the script
+							\'typo3/install/index.php\' - this script!
+						</p>
+					');
 
-					<strong>2: Database Analyser</strong>
-					In this step you can either install a new database or update the database from any previous TYPO3 version.
-					You can also get an overview of extra/missing fields/tables in the database compared to a raw sql-file.
-					The database is also verified agains your 'tables.php' configuration (\$TCA) and you can even see suggestions to entries in \$TCA or new fields in the database.
 
-					<strong>3: Update Wizard</strong>
-					Here you will find update methods taking care of changes to the TYPO3 core which are not backwards compatible.
-					It is recommended to run this wizard after every update to make sure everything will still work flawlessly.
-
-					<strong>4: Image Processing</strong>
-					This step is a visual guide to verify your configuration of the image processing software.
-					You'll be presented to a list of images that should all match in pairs. If some irregularity appears, you'll get a warning. Thus you're able to track an error before you'll discover it on your website.
-
-					<strong>5: All Configuration</strong>
-					This gives you access to any of the configuration options in the TYPO3_CONF_VARS array. Every option is also presented with a comment explaining what it does.
-
-					<strong>6: typo3temp/</strong>
-					Here you can manage the files in typo3temp/ folder in a simple manner. typo3temp/ contains temporary files, which may still be used by the website, but some may not. By searching for files with old access-dates, you can possibly manage to delete unused files rather than files still used. However if you delete a temporary file still in use, it's just regenerated as long as you make sure to clear the cache tables afterwards.
-					");
-
-					$this->message('About', 'Why is this script stand-alone?', "
-					You would think that this script should rather be a module in the backend and access-controlled to only admin-users from the database. But that's not how it works.
-					The reason is, that this script must not be depending on the success of the configuration of TYPO3 and whether or not there is a working database behind. Therefore the script is invoked from the backend init.php file, which allows access if the constant 'TYPO3_enterInstallScript' has been defined and is not false. That is and should be the case <i>only</i> when calling the script 'typo3/install/index.php' - this script!
-					");
-
-
 					$headCode='Header legend';
 					$this->message($headCode, 'Notice!', '
-					Indicates that something is important to be aware of.
-					This does <em>not</em> indicate an error.
-					',1);
+						<p>
+							Indicates that something is important to be aware
+							of.
+							<br />
+							This does <em>not</em> indicate an error.
+						</p>
+					', 1);
 					$this->message($headCode, 'Just information', '
-					This is a simple message with some information about something.
+						<p>
+							This is a simple message with some information about
+							something.
+						</p>
 					');
 					$this->message($headCode, 'Check was successful', '
-					Indicates that something was checked and returned an expected result.
-					',-1);
+						<p>
+							Indicates that something was checked and returned an
+							expected result.
+						</p>
+					', -1);
 					$this->message($headCode, 'Warning!', '
-					Indicates that something may very well cause trouble and you should definitely look into it before proceeding.
-					This indicates a <em>potential</em> error.
-					',2);
+						<p>
+							Indicates that something may very well cause trouble
+							and you should definitely look into it before
+							proceeding.
+							<br />
+							This indicates a <em>potential</em> error.
+						</p>
+					', 2);
 					$this->message($headCode, 'Error!', '
-					Indicates that something is definitely wrong and that TYPO3 will most likely not perform as expected if this problem is not solved.
-					This indicates an actual error.
-					',3);
+						<p>
+							Indicates that something is definitely wrong and
+							that TYPO3 will most likely not perform as expected
+							if this problem is not solved.
+							<br />
+							This indicates an actual error.
+						</p>
+					', 3);
 
 					$this->output($this->outputWrapper($this->printAll()));
 				break;
@@ -612,283 +904,383 @@
 	/**
 	 * Controls the step 1-2-3-go process
 	 *
-	 * @return	string	the content to output to the screen
+	 * @return string The content to output to the screen
 	 */
-	function stepOutput()	{
+	function stepOutput() {
+			// Get the template file
+		$templateFile = @file_get_contents(
+			PATH_site . $this->templateFilePath . 'StepOutput.html'
+		);
+			// Get the template part from the file
+		$template = $this->contentObject->getSubpart(
+			$templateFile, '###TEMPLATE###'
+		);
+			// Define the markers content
+		$markers = array(
+			'stepHeader' => $this->stepHeader(),
+			'notice' => 'Skip this wizard (for powerusers only)',
+			'skip123' => $this->scriptSelf
+		);
+
 		$this->checkTheConfig();
-		$error_missingConnect='<br />
-			'.$this->fontTag2.'<img src="'.$this->backPath.'gfx/icon_fatalerror.gif" width="18" height="16" class="absmiddle">
-			There is no connection to the database!<br />
-			(Username: <i>' . TYPO3_db_username . '</i>, Host: <i>' . TYPO3_db_host . '</i>, Using Password: YES) . <br />
-			<br />
-			<strong>Go to Step 1</strong> and enter a proper username/password!</span>
-			<br />
-			<br />
+		$error_missingConnect = '
+			<p class="typo3-message message-error">
+				<strong>
+					There is no connection to the database!
+				</strong>
+				<br />
+				(Username: <em>' . TYPO3_db_username . '</em>,
+				Host: <em>' . TYPO3_db_host . '</em>,
+				Using Password: YES)
+				<br />
+				Go to Step 1 and enter a proper username/password!
+			</p>
 		';
-		$error_missingDB='<br />
-			'.$this->fontTag2.'<img src="'.$this->backPath.'gfx/icon_fatalerror.gif" width="18" height="16" class="absmiddle">
-			There is no access to the database (<i>'.TYPO3_db.'</i>)!<br />
-			<br />
-			<strong>Go to Step 2</strong> and select an accessible database!</span>
-			<br />
-			<br />
+		$error_missingDB = '
+			<p class="typo3-message message-error">
+				<strong>
+					There is no access to the database (<em>' . TYPO3_db . '</em>)!
+				</strong>
+				<br />
+				Go to Step 2 and select an accessible database!
+			</p>
 		';
 
-			// only get the number of tables if it is not the first step in the 123-installer
+			// only get the number of tables if it is not the first two steps in the 123-installer
 			// (= no DB connection yet)
-		$whichTables = ($this->step != 1 ? $this->getListOfTables() : array());
-		$dbInfo='
-					<table border="0" cellpadding="1" cellspacing="0">
-					   	<tr>
-					   		<td valign="top" nowrap="nowrap" colspan="2" align="center">'.$this->fontTag2.'<strong><img src="'.$this->backPath.'gfx/icon_note.gif" hspace="5" width="18" height="16" class="absmiddle">Database summary:</strong></span></td>
-						</tr>
-					   	<tr>
-					   		<td valign="top" nowrap="nowrap">'.$this->fontTag1.'Username:</span></td>
-					   		<td valign="top" nowrap="nowrap"><strong>'.$this->fontTag1.''.TYPO3_db_username.'</span></strong></td>
-						</tr>
-					   	<tr>
-					   		<td valign="top" nowrap="nowrap">'.$this->fontTag1.'Host:</span></td>
-					   		<td valign="top" nowrap="nowrap"><strong>'.$this->fontTag1.''.TYPO3_db_host.'</span></strong></td>
-						</tr>
-					   	<tr>
-					   		<td valign="top" nowrap="nowrap">'.$this->fontTag1.'Database:</span></td>
-					   		<td valign="top" nowrap="nowrap"><strong>'.$this->fontTag1.''.TYPO3_db.'</span></strong></td>
-						</tr>
-					   	<tr>
-					   		<td valign="top" nowrap="nowrap">'.$this->fontTag1.'# of tables:</span></td>
-					   		<td valign="top" nowrap="nowrap"><strong>'.$this->fontTag1.''.(count($whichTables)?'<span style="color:#f00;">'.count($whichTables).'</span>':count($whichTables)).'</span></strong></td>
-						</tr>
-					</table>
+		$whichTables = ($this->step != 1 && $this->step != 2 ? $this->getListOfTables() : array());
+
+		$error_emptyDB = '
+			<p class="typo3-message message-error">
+				<strong>
+					The database is still empty. There are no tables!
+				</strong>
+				<br />
+				Go to Step 3 and import a database!
+			</p>
 		';
-		$error_emptyDB='<br />
-			'.$this->fontTag2.'<img src="'.$this->backPath.'gfx/icon_fatalerror.gif" width="18" height="16" class="absmiddle">
-			The database is still empty. There are no tables!<br />
-			<br />
-			<strong>Go to Step 3</strong> and import a database!</span>
-			<br />
-			<br />
-		';
 
-		switch(strtolower($this->step))	{
-			case 1:
-				$msg='
-					<br />
-					<br />
-					<table border="0">
-					   <form action="'.$this->action.'" method="post">
-					   	<tr>
-					   		<td valign="top" nowrap="nowrap"><strong>
-								  '.$this->fontTag2.'Username:</span></strong>
-					   		</td>
-					   		<td>	&nbsp;
-					   		</td>
-					   		<td valign="top">
-								  '.$this->fontTag2.'
-								  <input type="text" name="TYPO3_INSTALL[localconf.php][typo_db_username]" value="'.TYPO3_db_username.'"></span><br />
-					   		</td>
-					   	</tr>
-					   	<tr>
-					   		<td valign="top" nowrap="nowrap"><strong>
-								  '.$this->fontTag2.'Password:</span></strong>
-					   		</td>
-					   		<td>	&nbsp;
-					   		</td>
-					   		<td valign="top">
-								  '.$this->fontTag2.'
-								  <input type="password" name="TYPO3_INSTALL[localconf.php][typo_db_password]" value="'.TYPO3_db_password.'"></span><br />
-					   		</td>
-					   	</tr>
-					   	<tr>
-					   		<td valign="top" nowrap="nowrap"><strong>
-								  '.$this->fontTag2.'Host:</span></strong>
-					   		</td>
-					   		<td>	&nbsp;
-					   		</td>
-					   		<td valign="top">
-								  '.$this->fontTag2.'
-								  <input type="text" name="TYPO3_INSTALL[localconf.php][typo_db_host]" value="'.(TYPO3_db_host?TYPO3_db_host:'localhost').'"></span><br />
-					   		</td>
-					   	</tr>
-					   	<tr>
-					   		<td valign="top" nowrap="nowrap"><strong>
-								  '.$this->fontTag1.'</span></strong>
-					   		</td>
-					   		<td>	&nbsp;
-					   		</td>
-					   		<td valign="top">
-								  '.$this->fontTag1.'<br />
-							   <input type="hidden" name="step" value="2">
-							   <input type="hidden" name="TYPO3_INSTALL[localconf.php][encryptionKey]" value="' . $this->createEncryptionKey() . '">
-								 <input type="hidden" name="TYPO3_INSTALL[localconf.php][compat_version]" value="'.TYPO3_branch.'">
-								  <input type="submit" value="Continue"><br /><br /><strong>NOTICE: </strong>By clicking this button, typo3conf/localconf.php is updated with new values for the parameters listed above!</span><br />
-					   		</td>
-					   	</tr>
-					   </form>
-					</table>
-					<br />
-					<br />';
-			break;
-			case 2:
-				if ($result = $GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password))	{
-					$dbArr = $this->getDatabaseList();
-					$options = '<option value="">[ SELECT DATABASE ]</option>';
-					$dbIncluded = 0;
-					foreach ($dbArr as $dbname) {
-						$options.='<option value="'.htmlspecialchars($dbname).'"'.($dbname==TYPO3_db?' selected="selected"':'').'>'.htmlspecialchars($dbname).'</option>';
-						if ($dbname==TYPO3_db)	$dbIncluded=1;
-					}
-					if (!$dbIncluded && TYPO3_db)	{
-						$options.='<option value="'.htmlspecialchars(TYPO3_db).'" selected="selected">'.htmlspecialchars(TYPO3_db).' (NO ACCESS!)</option>';
-					}
-					$select='<select name="TYPO3_INSTALL[localconf.php][typo_db]">'.$options.'</select>';
-					$msg='
-<br />
-<br />
-					<table border="0">
-					   <form action="'.$this->action.'" method="post">
-					   	<tr>
-					   		<td valign="top" nowrap="nowrap"><strong>
-								  '.$this->fontTag2.'
-							   You have two options:<br />
-							   <br /><br />
+			// Hook to override and add steps to the 1-2-3 installer
+		if (is_array ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install/mod/class.tx_install.php']['stepOutput'])) {
+			foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install/mod/class.tx_install.php']['stepOutput'] as $classData) {
+				$hookObject = t3lib_div::getUserObj($classData);
+				$hookObject->execute($markers, $this->step, $this);
+			}
+		}
+			// Use the default steps when there is no override
+		if (!$markers['header'] && !$markers['step']) {
+			switch(strtolower($this->step)) {
+				case 1:
+						// Get the subpart for the first step
+					$step1SubPart = $this->contentObject->getSubpart(
+						$templateFile, '###STEP1###'
+					);
+						// Add header marker for main template
+					$markers['header'] = 'Welcome to the TYPO3 installation process';
+						// Define the markers content for the subpart
+					$step1SubPartMarkers = array(
+						'llIntroduction' => '
+							<p>
+								TYPO3 is an enterprise content management system
+								that is very powerfull and yet easy to install.
+							</p>
+							<p>
+								Choose your database, import some data and
+								you\'re done!
+							</p>
+						',
+						'step' => $this->step + 1,
+						'action' => htmlspecialchars($this->action),
+						'continue' => 'Continue'
+					);
+						// Add step marker for main template
+					$markers['step'] = $this->contentObject->substituteMarkerArray(
+						$step1SubPart,
+						$step1SubPartMarkers,
+						'###|###',
+						1,
+						1
+					);
+				break;
+				case 2:
+						// Get the subpart for the second step
+					$step2SubPart = $this->contentObject->getSubpart(
+						$templateFile, '###STEP2###'
+					);
+						// Add header marker for main template
+					$markers['header'] = 'Connect to your database host';
+						// Define the markers content for the subpart
+					$step2SubPartMarkers = array(
+						'step' => $this->step + 1,
+						'action' => htmlspecialchars($this->action),
+						'encryptionKey' => $this->createEncryptionKey(),
+						'branch' => TYPO3_branch,
+						'labelUsername' => 'Username',
+						'username' => TYPO3_db_username,
+						'labelPassword' => 'Password',
+						'password' => TYPO3_db_password,
+						'labelHost' => 'Host',
+						'host' => TYPO3_db_host ? TYPO3_db_host : 'localhost',
+						'continue' => 'Continue'
+					);
+						// Add step marker for main template
+					$markers['step'] = $this->contentObject->substituteMarkerArray(
+						$step2SubPart,
+						$step2SubPartMarkers,
+						'###|###',
+						1,
+						1
+					);
+				break;
+				case 3:
+						// Add header marker for main template
+					$markers['header'] = 'Select database';
+						// There should be a database host connection at this point
+					if ($result = $GLOBALS['TYPO3_DB']->sql_pconnect(
+						TYPO3_db_host, TYPO3_db_username, TYPO3_db_password
+					)) {
+							// Get the subpart for the third step
+						$step3SubPart = $this->contentObject->getSubpart(
+							$templateFile, '###STEP3###'
+						);
+							// Get the subpart for the database options
+						$step3DatabaseOptionsSubPart = $this->contentObject->getSubpart(
+							$step3SubPart, '###DATABASEOPTIONS###'
+						);
 
-							   1: Select an existing <u>EMPTY</u> database:</span></strong>
-					   		</td>
-						</tr>
-						<tr>
-					   		<td valign="top">
-								  '.$this->fontTag1.'Any existing tables which are used by TYPO3 will be overwritten in Step 3. So make sure this database is empty:<br />'.$select.'</span><br />
-					   		</td>
-					   	</tr>
-					   	<tr>
-					   		<td valign="top" nowrap="nowrap"><br />
-							<br />
-<strong>
-								  '.$this->fontTag2.'2: Create new database (recommended):</span></strong>
-					   		</td>
-						</tr>
-						<tr>
-					   		<td valign="top">
-								  '.$this->fontTag1.'Enter the desired name of the database here:<br /><input type="text" name="TYPO3_INSTALL[localconf.php][NEW_DATABASE_NAME]" value=""></span><br />
-					   		</td>
-					   	</tr>
-					   	<tr>
-					   		<td valign="top">   		   <br />
-
-								  '.$this->fontTag1.'<br />
-							   <input type="hidden" name="step" value="3">
-								  <input type="submit" value="Continue"><br /><br /><strong>NOTICE: </strong>By clicking this button, typo3conf/localconf.php is updated with new values for the parameters listed above!</span><br />
-					   		</td>
-					   	</tr>
-					   </form>
-					</table>
-<br />
-<br />
-				';
-				} else {
-					$msg=$error_missingConnect;
-				}
-			break;
-			case 3:
-				if ($result = $GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password))	{
-					if ($GLOBALS['TYPO3_DB']->sql_select_db(TYPO3_db))	{
-						$sFiles = t3lib_div::getFilesInDir(PATH_typo3conf,'sql',1,1);
-
-							// Check if default database scheme "database.sql" already exists, otherwise create it
-						if (!strstr(implode(',',$sFiles).',', '/database.sql,'))	{
-							array_unshift($sFiles,'Create default database tables');
+						$dbArr = $this->getDatabaseList();
+						$dbIncluded = 0;
+						foreach ($dbArr as $dbname) {
+								// Define the markers content for database options
+							$step3DatabaseOptionMarkers = array(
+								'databaseValue' => htmlspecialchars($dbname),
+								'databaseSelected' => $dbname == TYPO3_db ? 'selected="selected"' : '',
+								'databaseName' => htmlspecialchars($dbname)
+							);
+								// Add the option HTML to an array
+							$step3DatabaseOptions[] = $this->contentObject->substituteMarkerArray(
+								$step3DatabaseOptionsSubPart,
+								$step3DatabaseOptionMarkers,
+								'###|###',
+								1,
+								1
+							);
+							if ($dbname==TYPO3_db)	$dbIncluded=1;
 						}
-
-						$opt='';
-						foreach ($sFiles as $f)	{
-							if ($f=='Create default database tables')	$key='CURRENT_TABLES+STATIC';
-							else $key=htmlspecialchars($f);
-
-							$opt.='<option value="import|'.$key.'">'.htmlspecialchars(basename($f)).'</option>';
+						if (!$dbIncluded && TYPO3_db) {
+								// // Define the markers content when no access
+							$step3DatabaseOptionMarkers = array(
+								'databaseValue' => htmlspecialchars(TYPO3_db),
+								'databaseSelected' => 'selected="selected"',
+								'databaseName' => htmlspecialchars(TYPO3_db) . ' (NO ACCESS!)'
+							);
+								// Add the option HTML to an array
+							$step3DatabaseOptions[] = $this->contentObject->substituteMarkerArray(
+								$step3DatabaseOptionsSubPart,
+								$step3DatabaseOptionMarkers,
+								'###|###',
+								1,
+								1
+							);
 						}
+							// Substitute the subpart for the database options
+						$content = $this->contentObject->substituteSubpart(
+							$step3SubPart,
+							'###DATABASEOPTIONS###',
+							implode(chr(10), $step3DatabaseOptions)
+						);
+							// Define the markers content
+						$step3SubPartMarkers = array(
+							'step' => $this->step + 1,
+							'llOptions' => 'You have two options in this step.',
+							'action' => htmlspecialchars($this->action),
+							'llOption1' => '1: Create new database (recommended):',
+							'llRemark1' => 'Enter your desired name for the database.',
+							'llOption2' => '2: Select an EMPTY existing database:',
+							'llRemark2' => 'All tables used by TYPO3 will be overwritten in step 3.',
+							'continue' => 'Continue'
+						);
+							// Add step marker for main template
+						$markers['step'] = $this->contentObject->substituteMarkerArray(
+							$content,
+							$step3SubPartMarkers,
+							'###|###',
+							1,
+							1
+						);
+					} else {
+							// Add step marker for main template when no connection
+						$markers['step'] = $error_missingConnect;
+					}
+				break;
+				case 4:
+						// Add header marker for main template
+					$markers['header'] = 'Import the database sql-file';
+						// There should be a database host connection at this point
+					if ($result = $GLOBALS['TYPO3_DB']->sql_pconnect(
+						TYPO3_db_host, TYPO3_db_username, TYPO3_db_password
+					)) {
+							// The selected database should be accessible
+						if ($GLOBALS['TYPO3_DB']->sql_select_db(TYPO3_db)) {
+								// Get the subpart for the fourth step
+							$step4SubPart = $this->contentObject->getSubpart(
+								$templateFile, '###STEP4###'
+							);
+								// Get the subpart for the database type options
+							$step4DatabaseTypeOptionsSubPart = $this->contentObject->getSubpart(
+								$step4SubPart, '###DATABASETYPEOPTIONS###'
+							);
 
+							$sFiles = t3lib_div::getFilesInDir(PATH_typo3conf,'sql',1,1);
 
-						$content='
-							'.$this->fontTag2.'Please select a database dump:</span><br />
-							<input type="hidden" name="TYPO3_INSTALL[database_import_all]" value=1>
-							<input type="hidden" name="step" value="">
-							<input type="hidden" name="goto_step" value="go">
-							<select name="TYPO3_INSTALL[database_type]">'.$opt.'</select><br />';
+								// Check if default database scheme "database.sql" already exists, otherwise create it
+							if (!strstr(implode(',',$sFiles).',', '/database.sql,')) {
+								array_unshift($sFiles,'Create default database tables');
+							}
 
-						$content = $this->getUpdateDbFormWrap('import', $content, 'Import database');
-
-						$msg='
-						<br />
-						'.$dbInfo.'<br />
-						<br />
-						'.$content.'
-
-						';
-
+							$opt='';
+							foreach ($sFiles as $f) {
+								if ($f=='Create default database tables')	$key='CURRENT_TABLES+STATIC';
+								else $key=htmlspecialchars($f);
+									// Define the markers content for database type subpart
+								$step4DatabaseTypeOptionMarkers = array(
+									'databaseTypeValue' => 'import|' . $key,
+									'databaseName' => htmlspecialchars(basename($f))
+								);
+									// Add the option HTML to an array
+								$step4DatabaseTypeOptions[] = $this->contentObject->substituteMarkerArray(
+									$step4DatabaseTypeOptionsSubPart,
+									$step4DatabaseTypeOptionMarkers,
+									'###|###',
+									1,
+									1
+								);
+							}
+								// Substitute the subpart for the database type options
+							$content = $this->contentObject->substituteSubpart(
+								$step4SubPart,
+								'###DATABASETYPEOPTIONS###',
+								implode(chr(10), $step4DatabaseTypeOptions)
+							);
+								// Define the markers content
+							$step4SubPartMarkers = array(
+								'llSummary' => 'Database summary:',
+								'llUsername' => 'Username:',
+								'username' => TYPO3_db_username,
+								'llHost' => 'Host:',
+								'host' => TYPO3_db_host,
+								'llDatabase' => 'Database:',
+								'database' => TYPO3_db,
+								'llNumberTables' => 'Number of tables:',
+								'numberTables' => count($whichTables),
+								'action' => htmlspecialchars($this->action),
+								'llDatabaseType' => 'Please select a database dump:',
+								'label' => 'Import database'
+							);
+								// Add step marker for main template
+							$markers['step'] = $this->contentObject->substituteMarkerArray(
+								$content,
+								$step4SubPartMarkers,
+								'###|###',
+								1,
+								1
+							);
+						} else {
+								// Add step marker for main template when no database
+							$markers['step'] = $error_missingDB;
+						}
 					} else {
-						$msg=$error_missingDB;
+							// Add step marker for main template when no connection
+						$markers['step'] = $error_missingConnect;
 					}
-				} else {
-					$msg=$error_missingConnect;
-				}
-			break;
-			case 'go':
-				if ($result = $GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password))	{
-					if ($GLOBALS['TYPO3_DB']->sql_select_db(TYPO3_db))	{
-						if (count($whichTables))	{
-							$msg='
-							<br />
-							'.$this->fontTag2.'
-							'.nl2br($this->messageBasicFinished()).'
-							<br />
-							<hr />
-							<div align="center"><strong><img src="'.$this->backPath.'gfx/icon_warning.gif" hspace="5" width="18" height="16" class="absmiddle">IMPORTANT</strong></div><br />
-							<span class="smalltext">'.nl2br($this->securityRisk()).'
-							<br />
-							<strong>Enter <a href="'.$this->scriptSelf.'">"Normal" mode for the Install Tool</a> to change this!</strong><br />
-
-							</span>
-							</span><br />
-							';
+				break;
+				case 'go':
+						// Add header marker for main template
+					$markers['header'] = 'You\'re done!';
+						// There should be a database host connection at this point
+					if ($result = $GLOBALS['TYPO3_DB']->sql_pconnect(
+						TYPO3_db_host, TYPO3_db_username, TYPO3_db_password
+					)) {
+							// The selected database should be accessible
+						if ($GLOBALS['TYPO3_DB']->sql_select_db(TYPO3_db)) {
+								// The database should contain tables
+							if (count($whichTables)) {
+									// Get the subpart for the go step
+								$stepGoSubPart = $this->contentObject->getSubpart(
+									$templateFile, '###STEPGO###'
+								);
+									// Define the markers content
+								$stepGoSubPartMarkers = array(
+									'messageBasicFinished' => $this->messageBasicFinished(),
+									'llImportant' => 'Important',
+									'securityRisk' => $this->securityRisk(),
+									'llSwitchMode' => 'Enter
+										<a href="' . $this->scriptSelf . '">
+											"Normal"
+										</a>
+										mode for the Install Tool to change this!
+									'
+								);
+									// Add step marker for main template
+								$markers['step'] = $this->contentObject->substituteMarkerArray(
+									$stepGoSubPart,
+									$stepGoSubPartMarkers,
+									'###|###',
+									1,
+									1
+								);
+							} else {
+									// Add step marker for main template when empty database
+								$markers['step'] = $error_emptyDB;
+							}
 						} else {
-							$msg=$error_emptyDB;
+								// Add step marker for main template when no database
+							$markers['step'] = $error_missingDB;
 						}
 					} else {
-						$msg=$error_missingDB;
+							// Add step marker for main template when no connection
+						$markers['step'] = $error_missingConnect;
 					}
-				} else {
-					$msg=$error_missingConnect;
-				}
-			break;
+				break;
+			}
 		}
-		return $msg;
+			// Fill the markers in the template
+		$content = $this->contentObject->substituteMarkerArray(
+			$template,
+			$markers,
+			'###|###',
+			1,
+			1
+		);
+
+		return $content;
 	}
 
 	/**
 	 * Calling the functions that checks the system
 	 *
-	 * @return	[type]		...
+	 * @return void
 	 */
-	function checkTheConfig()	{
+	function checkTheConfig() {
 			// Order important:
 		$this->checkDirs();
 		$this->checkConfiguration();
 		$this->checkExtensions();
 
-		if (TYPO3_OS=='WIN')	{
+		if (TYPO3_OS=='WIN') {
 			$paths=array($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw'], $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path'], 'c:\\php\\imagemagick\\', 'c:\\php\\GraphicsMagick\\', 'c:\\apache\\ImageMagick\\', 'c:\\apache\\GraphicsMagick\\');
 		} else {
 			$paths=array($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw'], $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path'], '/usr/local/bin/','/usr/bin/','/usr/X11R6/bin/');
 		}
 
 		asort($paths);
-		if (ini_get('safe_mode'))	{
+		if (ini_get('safe_mode')) {
 			$paths=array(ini_get('safe_mode_exec_dir'),'/usr/local/php/bin/');
 		}
-		if ($this->INSTALL['checkIM']['lzw'])	{
+		if ($this->INSTALL['checkIM']['lzw']) {
 			$this->checkIMlzw=1;
 		}
-		if ($this->INSTALL['checkIM']['path'])	{
+		if ($this->INSTALL['checkIM']['path']) {
 			$paths[]=trim($this->INSTALL['checkIM']['path']);
 		}
 		if ($this->checkIM)	$this->checkImageMagick($paths);
@@ -898,118 +1290,226 @@
 	/**
 	 * Editing files in typo3conf directory (or elsewhere if enabled)
 	 *
-	 * @return	[type]		...
+	 * @return void
 	 */
-	function typo3conf_edit()	{
-		$EDIT_path = PATH_typo3conf;	// default:
-		if ($this->allowFileEditOutsite_typo3conf_dir && $this->INSTALL['FILE']['EDIT_path'])	{
-			if (t3lib_div::validPathStr($this->INSTALL['FILE']['EDIT_path']) && substr($this->INSTALL['FILE']['EDIT_path'],-1)=='/')	{
+	function typo3conf_edit() {
+			// default:
+		$EDIT_path = PATH_typo3conf;
+		if ($this->allowFileEditOutsite_typo3conf_dir && $this->INSTALL['FILE']['EDIT_path']) {
+			if (t3lib_div::validPathStr($this->INSTALL['FILE']['EDIT_path']) && substr($this->INSTALL['FILE']['EDIT_path'],-1)=='/') {
 				$tmp_path = PATH_site.$this->INSTALL['FILE']['EDIT_path'];
-				if (is_dir($tmp_path))	{
+				if (is_dir($tmp_path)) {
 					$EDIT_path=$tmp_path;
-				} else {debug("'".$tmp_path."' was not dir");}
+				} else {
+					$this->errorMessages[] = '
+						\'' . $tmp_path . '\' was not directory
+					';
+				}
 			} else {
-				debug('BAD DIR_NAME (must be like t3lib/ or media/script/)');
+				$this->errorMessages[] = '
+					Bad directory name (must be like t3lib/ or media/script/)
+				';
 			}
 		}
 
 		$headCode = 'Edit files in '.basename($EDIT_path).'/';
-		$this->contentBeforeTable='';
+		$messages = '';
 
-		if ($this->INSTALL['SAVE_FILE'])	{
+		if ($this->INSTALL['SAVE_FILE']) {
 			$save_to_file = $this->INSTALL['FILE']['name'];
-			if (@is_file($save_to_file))	{
+			if (@is_file($save_to_file)) {
 				$save_to_file_md5 = md5($save_to_file);
-				if (isset($this->INSTALL['FILE'][$save_to_file_md5]) && t3lib_div::isFirstPartOfStr($save_to_file,$EDIT_path.'') && substr($save_to_file,-1)!='~' && !strstr($save_to_file,'_bak'))	{
+				if (isset($this->INSTALL['FILE'][$save_to_file_md5]) && t3lib_div::isFirstPartOfStr($save_to_file,$EDIT_path.'') && substr($save_to_file,-1)!='~' && !strstr($save_to_file,'_bak')) {
 					$this->INSTALL['typo3conf_files'] = $save_to_file;
 					$save_fileContent = $this->INSTALL['FILE'][$save_to_file_md5];
 
-					if ($this->INSTALL['FILE']['win_to_unix_br'])	{
+					if ($this->INSTALL['FILE']['win_to_unix_br']) {
 						$save_fileContent = str_replace(chr(13).chr(10),chr(10),$save_fileContent);
 					}
 
 					$backupFile = $this->getBackupFilename($save_to_file);
-					if ($this->INSTALL['FILE']['backup'])	{
-						if (@is_file($backupFile))	{ unlink($backupFile); }
+					if ($this->INSTALL['FILE']['backup']) {
+						if (@is_file($backupFile)) { unlink($backupFile); }
 						rename($save_to_file,$backupFile);
-						$this->contentBeforeTable.='Backup written to <strong>'.$backupFile.'</strong><br />';
+						$messages .= '
+							Backup written to <strong>' . $backupFile . '</strong>
+							<br />
+						';
 					}
 
 					t3lib_div::writeFile($save_to_file,$save_fileContent);
-					$this->contentBeforeTable.='
-						File saved: <strong>'.$save_to_file.'</strong><br />
-						MD5-sum: '.$this->INSTALL['FILE']['prevMD5'].' (prev)<br />
-						MD5-sum: '.md5($save_fileContent).' (new)<br />
+					$messages .= '
+						File saved: <strong>' . $save_to_file . '</strong>
+						<br />
+						MD5-sum: ' . $this->INSTALL['FILE']['prevMD5'] . ' (prev)
+						<br />
+						MD5-sum: ' . md5($save_fileContent) . ' (new)
+						<br />
 					';
 				}
 			}
 		}
 
 			// Filelist:
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'Typo3ConfEdit.html');
+			// Get the template part from the file
+		$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+			// Get the subpart for the files
+		$filesSubpart = $this->contentObject->getSubpart($template, '###FILES###');
+		$files = array();
+
 		$typo3conf_files = t3lib_div::getFilesInDir($EDIT_path,'',1,1);
-		reset($typo3conf_files);
-		$lines=array();
 		$fileFound = 0;
-		while(list($k,$file)=each($typo3conf_files))	{
+
+
+		foreach ($typo3conf_files as $k => $file) {
 				// Delete temp_CACHED files if option is set
-			if ( $this->INSTALL['delTempCached'] && preg_match('|/temp_CACHED_[a-z0-9_]+\.php|', $file))	{
+			if ( $this->INSTALL['delTempCached'] && preg_match('|/temp_CACHED_[a-z0-9_]+\.php|', $file)) {
 				unlink($file);
 				continue;
 			}
-			if ($this->INSTALL['typo3conf_files'] && !strcmp($this->INSTALL['typo3conf_files'],$file))	{
-				$wrap=array('<strong><span style="color:navy;">','</span></strong>');
+			if ($this->INSTALL['typo3conf_files'] && !strcmp($this->INSTALL['typo3conf_files'],$file)) {
 				$fileFound = 1;
-			} else {$wrap=array();}
-			$lines[]='<tr><td nowrap="nowrap"><a href="'.$this->action.'&TYPO3_INSTALL[typo3conf_files]='.rawurlencode($file).($this->allowFileEditOutsite_typo3conf_dir?'&TYPO3_INSTALL[FILE][EDIT_path]='.rawurlencode($this->INSTALL['FILE']['EDIT_path']):"").'">'.$this->fw($wrap[0].basename($file).$wrap[1].'&nbsp;&nbsp;&nbsp;').'</a></td><td>'.$this->fw(t3lib_div::formatSize(filesize($file))).'</td></tr>';
+			}
+				// Define the markers content for the files subpart
+			$filesMarkers = array(
+				'editUrl' => $this->action . '&amp;TYPO3_INSTALL[typo3conf_files]=' . rawurlencode($file) . ($this->allowFileEditOutsite_typo3conf_dir ? '&amp;TYPO3_INSTALL[FILE][EDIT_path]=' . rawurlencode($this->INSTALL['FILE']['EDIT_path']) : '') . '#confEditFileList',
+				'fileName' => basename($file),
+				'fileSize' => t3lib_div::formatSize(filesize($file)),
+				'class' => $this->INSTALL['typo3conf_files'] && !strcmp($this->INSTALL['typo3conf_files'], $file) ? 'class="act"' : ''
+			);
+				// Fill the markers in the subpart
+			$files[] = $this->contentObject->substituteMarkerArray(
+				$filesSubpart,
+				$filesMarkers,
+				'###|###',
+				1,
+				1
+			);
 		}
-		$fileList='<table border="0" cellpadding="0" cellspacing="0">'.implode('',$lines).'</table>';
-		$fileList.='<br />('.$EDIT_path.')';
 
-		if ($this->allowFileEditOutsite_typo3conf_dir)	{
-			$fileList.='<br /><form action="'.$this->action.'" method="post">
-			'.PATH_site.'<input type="text" name="TYPO3_INSTALL[FILE][EDIT_path]" value="'.$this->INSTALL['FILE']['EDIT_path'].'"><input type="submit" name="" value="Set">
-			</form>';
-		}
+		if ($fileFound && @is_file($this->INSTALL['typo3conf_files'])) {
 
-			// create link for deleting temp_CACHED files
-		$fileList .= '<br /><br /><a href="'.$this->action.'&TYPO3_INSTALL[delTempCached]=1">Delete temp_CACHED* files</a>';
-
-		if ($fileFound && @is_file($this->INSTALL['typo3conf_files']))	{
-
 			$backupFile = $this->getBackupFilename($this->INSTALL['typo3conf_files']);
 			$fileContent = t3lib_div::getUrl($this->INSTALL['typo3conf_files']);
-			$this->contentBeforeTable.= '<div class="editFile"><form action="'.$this->action.'" method="post">'.(substr($this->INSTALL['typo3conf_files'],-1)!='~' && !strstr($this->INSTALL['typo3conf_files'],'_bak') ? '
-				<input type="submit" name="TYPO3_INSTALL[SAVE_FILE]" value="Save file">&nbsp;' : '').'
-				<input type="submit" name="_close" value="Close">
-				<br />File: '.$this->INSTALL['typo3conf_files'].'
-				<br />MD5-sum: '.md5($fileContent).'
-				<br />
+				// Get the subpart to edit the files
+			$fileEditTemplate = $this->contentObject->getSubpart($template, '###FILEEDIT###');
+			$allowFileEditOutsideTypo3ConfDirSubPart = '';
 
-				<input type="hidden" name="TYPO3_INSTALL[FILE][name]" value="'.$this->INSTALL['typo3conf_files'].'">
-				'.($this->allowFileEditOutsite_typo3conf_dir?'<input type="hidden" name="TYPO3_INSTALL[FILE][EDIT_path]" value="'.$this->INSTALL['FILE']['EDIT_path'].'">':'').'
-				<input type="hidden" name="TYPO3_INSTALL[FILE][prevMD5]" value="'.md5($fileContent).'">
-				<textarea rows="30" name="TYPO3_INSTALL[FILE]['.md5($this->INSTALL['typo3conf_files']).']" wrap="off"'.$this->formWidthText(48,'width:98%;height:80%','off').' class="fixed-font enable-tab">'.t3lib_div::formatForTextarea($fileContent).'</textarea><br />
-				<input type="checkbox" name="TYPO3_INSTALL[FILE][win_to_unix_br]" id="win_to_unix_br" value="1"'.(TYPO3_OS=='WIN'?'':' checked="checked"').'> <label for="win_to_unix_br">Convert Windows linebreaks (13-10) to Unix (10)</label><br />
-				<input type="checkbox" name="TYPO3_INSTALL[FILE][backup]" id="backup" value="1"'.(@is_file($backupFile) ? ' checked="checked"' : '').'> <label for="backup">Make backup copy (rename to '.basename($backupFile).')</label><br />
-				'.
-			'</form></div>';
+			if (substr($this->INSTALL['typo3conf_files'], -1) != '~' && !strstr($this->INSTALL['typo3conf_files'], '_bak')) {
+					// Get the subpart to show the save button
+				$showSaveButtonSubPart = $this->contentObject->getSubpart($fileEditTemplate, '###SHOWSAVEBUTTON###');
+			}
+
+			if ($this->allowFileEditOutsite_typo3conf_dir) {
+					// Get the subpart to show if files are allowed outside the directory typo3conf
+				$allowFileEditOutsideTypo3ConfDirSubPart = $this->contentObject->getSubpart($fileEditTemplate, '###ALLOWFILEEDITOUTSIDETYPO3CONFDIR###');
+			}
+				// Substitute the subpart for the save button
+			$fileEditContent = $this->contentObject->substituteSubpart(
+				$fileEditTemplate,
+				'###SHOWSAVEBUTTON###',
+				$showSaveButtonSubPart
+			);
+				// Substitute the subpart to show if files are allowed outside the directory typo3conf
+			$fileEditContent = $this->contentObject->substituteSubpart(
+				$fileEditContent,
+				'###ALLOWFILEEDITOUTSIDETYPO3CONFDIR###',
+				$allowFileEditOutsideTypo3ConfDirSubPart
+			);
+				// Define the markers content for subpart to edit the files
+			$fileEditMarkers = array(
+				'messages' => !empty($messages) ? '<p class="typo3-message message-warning">' . $messages . '</p>' : '',
+				'action' => $this->action . '#fileEditHeader',
+				'saveFile' => 'Save file',
+				'close' => 'Close',
+				'llEditing' => 'Editing file:',
+				'file' => $this->INSTALL['typo3conf_files'],
+				'md5Sum' => 'MD5-sum: ' . md5($fileContent),
+				'fileName' => $this->INSTALL['typo3conf_files'],
+				'fileEditPath' => $this->INSTALL['FILE']['EDIT_path'],
+				'filePreviousMd5' => md5($fileContent),
+				'fileMd5' => md5($this->INSTALL['typo3conf_files']),
+				'fileContent' => t3lib_div::formatForTextarea($fileContent),
+				'winToUnixBrChecked' => TYPO3_OS == 'WIN' ? '' : 'checked="checked"',
+				'winToUnixBr' => 'Convert Windows linebreaks (13-10) to Unix (10)',
+				'backupChecked' => @is_file($backupFile) ? 'checked="checked"' : '',
+				'backup' => 'Make backup copy (rename to ' . basename($backupFile) . ')'
+			);
+				// Fill the markers in the subpart to edit the files
+			$fileEditContent = $this->contentObject->substituteMarkerArray(
+				$fileEditContent,
+				$fileEditMarkers,
+				'###|###',
+				1,
+				1
+			);
 		}
 
-		if ($this->contentBeforeTable)	{
-			$this->contentBeforeTable = $this->fw($this->contentBeforeTable);
+		if ($this->allowFileEditOutsite_typo3conf_dir) {
+				// Get the subpart to show if files are allowed outside the directory typo3conf
+			$allowFileEditOutsideTypo3ConfDirSubPart = $this->contentObject->getSubpart($template, '###ALLOWFILEEDITOUTSIDETYPO3CONFDIR###');
+				// Define the markers content
+			$allowFileEditOutsideTypo3ConfDirMarkers = array(
+				'action' => $this->action,
+				'pathSite' => PATH_site,
+				'editPath' => $this->INSTALL['FILE']['EDIT_path'],
+				'set' => 'Set'
+			);
+				// Fill the markers in the subpart
+			$allowFileEditOutsideTypo3ConfDirSubPart = $this->contentObject->substituteMarkerArray(
+				$allowFileEditOutsideTypo3ConfDirSubPart,
+				$allowFileEditOutsideTypo3ConfDirMarkers,
+				'###|###',
+				1,
+				1
+			);
 		}
-
-		$this->message($headCode,'Files in folder',$fileList);
-
+			// Substitute the subpart to edit the file
+		$fileListContent = $this->contentObject->substituteSubpart(
+			$template,
+			'###FILEEDIT###',
+			$fileEditContent
+		);
+			// Substitute the subpart when files can be edited outside typo3conf directory
+		$fileListContent = $this->contentObject->substituteSubpart(
+			$fileListContent,
+			'###ALLOWFILEEDITOUTSIDETYPO3CONFDIR###',
+			$allowFileEditOutsideTypo3ConfDirSubPart
+		);
+			// Substitute the subpart for the files
+		$fileListContent = $this->contentObject->substituteSubpart(
+			$fileListContent,
+			'###FILES###',
+			implode(chr(10), $files)
+		);
+			// Define the markers content
+		$fileListMarkers = array(
+			'editPath' => '(' . $EDIT_path . ')',
+			'deleteTempCachedUrl' => $this->action . '&amp;TYPO3_INSTALL[delTempCached]=1',
+			'deleteTempCached' => 'Delete temp_CACHED* files'
+		);
+			// Fill the markers
+		$fileListContent = $this->contentObject->substituteMarkerArray(
+			$fileListContent,
+			$fileListMarkers,
+			'###|###',
+			1,
+			1
+		);
+			// Add the content to the message array
+		$this->message($headCode, 'Files in folder', $fileListContent);
+			// Output the page
 		$this->output($this->outputWrapper($this->printAll()));
 	}
 
 	/**
 	 * Outputs system information
 	 *
-	 * @return	[type]		...
+	 * @return void
 	 */
-	function phpinformation()	{
+	function phpinformation() {
 		$headCode = 'PHP information';
 
 		$sVar = t3lib_div::getIndpEnv('_ARRAY');
@@ -1030,49 +1530,72 @@
 		$sVar['OTHER: memory_limit']=ini_get('memory_limit');
 
 		$gE_keys = explode(',','SERVER_PORT,SERVER_SOFTWARE,GATEWAY_INTERFACE,SCRIPT_NAME,PATH_TRANSLATED');
-		while(list(,$k)=each($gE_keys))	{
+		foreach ($gE_keys as $k) {
 			$sVar['SERVER: '.$k]=$_SERVER[$k];
 		}
 
 		$gE_keys = explode(',','image_processing,gdlib,gdlib_png,gdlib_2,im,im_path,im_path_lzw,im_version_5,im_negate_mask,im_imvMaskState,im_combine_filename');
-		while(list(,$k)=each($gE_keys))	{
+
+		foreach ($gE_keys as $k) {
 			$sVar['T3CV_GFX: '.$k]=$GLOBALS['TYPO3_CONF_VARS']['GFX'][$k];
 		}
 
-		$debugInfo=array();
-		$debugInfo[]='### DEBUG SYSTEM INFORMATION - START ###';
-		reset($sVar);
-		while(list($kkk,$vvv)=each($sVar))	{
+		$debugInfo = array(
+				'### DEBUG SYSTEM INFORMATION - START ###'
+			);
+		foreach ($sVar as $kkk => $vvv) {
 			$debugInfo[]=str_pad(substr($kkk,0,20),20).': '.$vvv;
 		}
 		$debugInfo[]='### DEBUG SYSTEM INFORMATION - END ###';
-
-		$buf=$this->messageFunc_nl2br;
-		$this->messageFunc_nl2br=0;
-		$this->message($headCode,'DEBUG information','Please copy/paste the information from this text field into an email or bug-report as "Debug System Information" whenever you wish to get support or report problems. This information helps others to check if your system has some obvious misconfiguration and you\'ll get your help faster!<br />
-		<form action=""><textarea rows="10" '.$this->formWidthText(80,'width:100%; height:500px;','off').' wrap="off" class="fixed-font">'.t3lib_div::formatForTextarea(implode(chr(10),$debugInfo)).'</textarea></form>');
-		$this->messageFunc_nl2br=$buf;
-
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'PhpInformation.html');
+			// Get the template part from the file
+		$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+			// Define the markers content
+		$markers = array(
+			'explanation' => 'Please copy/paste the information from this text field into an email or bug-report as "Debug System Information" whenever you wish to get support or report problems. This information helps others to check if your system has some obvious misconfiguration and you\'ll get your help faster!',
+			'debugInfo' => t3lib_div::formatForTextarea(implode(chr(10), $debugInfo))
+		);
+			// Fill the markers
+		$content = $this->contentObject->substituteMarkerArray(
+			$template,
+			$markers,
+			'###|###',
+			1,
+			1
+		);
+			// Add the content to the message array
+		$this->message($headCode, 'DEBUG information', $content);
+			// Start with various server information
 		$getEnvArray = array();
 		$gE_keys = explode(',','QUERY_STRING,HTTP_ACCEPT,HTTP_ACCEPT_ENCODING,HTTP_ACCEPT_LANGUAGE,HTTP_CONNECTION,HTTP_COOKIE,HTTP_HOST,HTTP_USER_AGENT,REMOTE_ADDR,REMOTE_HOST,REMOTE_PORT,SERVER_ADDR,SERVER_ADMIN,SERVER_NAME,SERVER_PORT,SERVER_SIGNATURE,SERVER_SOFTWARE,GATEWAY_INTERFACE,SERVER_PROTOCOL,REQUEST_METHOD,SCRIPT_NAME,PATH_TRANSLATED,HTTP_REFERER,PATH_INFO');
-		while(list(,$k)=each($gE_keys))	{
+		foreach ($gE_keys as $k) {
 			$getEnvArray[$k] = getenv($k);
 		}
-		$this->message($headCode,'t3lib_div::getIndpEnv()',t3lib_div::view_array(t3lib_div::getIndpEnv('_ARRAY')));
-		$this->message($headCode,'getenv()',t3lib_div::view_array($getEnvArray));
-		$this->message($headCode,'_ENV',t3lib_div::view_array($_ENV));
-		$this->message($headCode,'_SERVER',t3lib_div::view_array($_SERVER));
-		$this->message($headCode,'_COOKIE',t3lib_div::view_array($_COOKIE));
-		$this->message($headCode,'_GET',t3lib_div::view_array($_GET));
-
+		$this->message($headCode, 't3lib_div::getIndpEnv()', $this->viewArray(t3lib_div::getIndpEnv('_ARRAY')));
+		$this->message($headCode, 'getenv()', $this->viewArray($getEnvArray));
+		$this->message($headCode, '_ENV', $this->viewArray($_ENV));
+		$this->message($headCode, '_SERVER', $this->viewArray($_SERVER));
+		$this->message($headCode, '_COOKIE', $this->viewArray($_COOKIE));
+		$this->message($headCode, '_GET', $this->viewArray($_GET));
+			// Start with the phpinfo() part
 		ob_start();
 		phpinfo();
 		$contents = explode('<body>',ob_get_contents());
 		ob_end_clean();
 		$contents = explode('</body>',$contents[1]);
-
-		$this->message($headCode,'phpinfo()','<div class="phpinfo">' . $contents[0] . '</div>');
-
+			// Do code cleaning: phpinfo() is not XHTML1.1 compliant
+		$phpinfo = str_replace('<font', '<span', $contents[0]);
+		$phpinfo = str_replace('</font', '</span', $phpinfo);
+		$phpinfo = str_replace('<img border="0"', '<img', $phpinfo);
+		$phpinfo = str_replace('<a name=', '<a id=', $phpinfo);
+			// Add phpinfo() to the message array
+		$this->message($headCode, 'phpinfo()', '
+			<div class="phpinfo">
+				' . $phpinfo . '
+			</div>
+		');
+			// Output the page
 		$this->output($this->outputWrapper($this->printAll()));
 	}
 
@@ -1097,22 +1620,36 @@
 	/**
 	 * Provides a tool for deleting temporary files located in typo3temp/
 	 *
-	 * @return	string		HTML output
+	 * @return void
 	 */
-	function typo3TempManager()	{
+	function typo3TempManager() {
 		$headCode = 'typo3temp/ directory';
-		$this->message($headCode,'What is it?','
-		TYPO3 uses this directory for temporary files, mainly processed and cached images.
-		The filenames are very cryptic; They are unique representations of the file properties made by md5-hashing a serialized array with information.
-		Anyway this directory may contain many thousand files and a lot of them may be of no use anymore.
-
-		With this test you can delete the files in this folder. When you do that, you should also clear the cache database tables afterwards.
+		$this->message($headCode, 'What is it?', '
+			<p>
+				TYPO3 uses this directory for temporary files, mainly processed
+				and cached images.
+				<br />
+				The filenames are very cryptic; They are unique representations
+				of the file properties made by md5-hashing a serialized array
+				with information.
+				<br />
+				Anyway this directory may contain many thousand files and a lot
+				of them may be of no use anymore.
+			</p>
+			<p>
+				With this test you can delete the files in this folder. When you
+				do that, you should also clear the cache database tables
+				afterwards.
+			</p>
 		');
 
-		if (!$this->config_array['dir_typo3temp'])	{
-			$this->message('typo3temp/ directory','typo3temp/ not writable!',"
-				You must make typo3temp/ write enabled before you can proceed with this test.
-			",2);
+		if (!$this->config_array['dir_typo3temp']) {
+			$this->message('typo3temp/ directory', 'typo3temp/ not writable!', '
+				<p>
+					You must make typo3temp/ write enabled before you can
+					proceed with this test.
+				</p>
+			', 2);
 			$this->output($this->outputWrapper($this->printAll()));
 			return;
 		}
@@ -1127,14 +1664,14 @@
 		if (strlen($subdir) && !preg_match('/^[[:alnum:]_]+\/$/',$subdir))	die('subdir "'.$subdir.'" was not allowed!');
 		$action = $this->INSTALL['typo3temp_action'];
 		$d = @dir($this->typo3temp_path.$subdir);
-		if (is_object($d))	{
+		if (is_object($d)) {
 			while($entry=$d->read()) {
 				$theFile = $this->typo3temp_path.$subdir.$entry;
-				if (@is_file($theFile))	{
+				if (@is_file($theFile)) {
 					$ok = 0;
 					$fileCounter++;
-					if ($tt)	{
-						if (t3lib_div::testInt($tt))	{
+					if ($tt) {
+						if (t3lib_div::testInt($tt)) {
 							if (filesize($theFile) > $tt*1024)	$ok=1;
 						} else {
 							if (fileatime($theFile) < $GLOBALS['EXEC_TIME'] - (intval($tmap[$tt]) * 60 * 60 * 24)) {
@@ -1144,10 +1681,11 @@
 					} else {
 						$ok = 1;
 					}
-					if ($ok)	{
+					if ($ok) {
 						$hashPart=substr(basename($theFile),-14,10);
-						if (!preg_match('/[^a-f0-9]/',$hashPart) || substr($theFile,-6)==='.cache' || substr($theFile,-4)==='.tbl' || substr(basename($theFile),0,8)==='install_')	{		// This is a kind of check that the file being deleted has a 10 char hash in it
-							if ($action && $deleteCounter<$action)	{
+							// This is a kind of check that the file being deleted has a 10 char hash in it
+						if (!preg_match('/[^a-f0-9]/',$hashPart) || substr($theFile,-6)==='.cache' || substr($theFile,-4)==='.tbl' || substr(basename($theFile),0,8)==='install_') {
+							if ($action && $deleteCounter<$action) {
 								$deleteCounter++;
 								unlink($theFile);
 							} else {
@@ -1163,10 +1701,10 @@
 			// Find sub-dirs:
 		$subdirRegistry = array(''=>'');
 		$d = @dir($this->typo3temp_path);
-		if (is_object($d))	{
+		if (is_object($d)) {
 			while($entry=$d->read()) {
 				$theFile = $entry;
-				if (@is_dir($this->typo3temp_path.$theFile) && $theFile!='..' && $theFile!='.')	{
+				if (@is_dir($this->typo3temp_path.$theFile) && $theFile!='..' && $theFile!='.') {
 					$subdirRegistry[$theFile.'/'] = $theFile.'/ (Files: '.count(t3lib_div::getFilesInDir($this->typo3temp_path.$theFile)).')';
 				}
 			}
@@ -1188,49 +1726,122 @@
 			'500' => 'Delete 500',
 			'1000' => 'Delete 1000'
 		);
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'Typo3TempManager.html');
+			// Get the template part from the file
+		$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+			// Get the subpart for 'Delete files by condition' dropdown
+		$deleteOptionsSubpart = $this->contentObject->getSubpart($template, '###DELETEOPTIONS###');
+		$deleteOptions = array();
 
-		$content='<select name="TYPO3_INSTALL[typo3temp_delete]">'.$this->getSelectorOptions($deleteType,$tt).'</select>
-		<br />
-Number of files at a time:
-		<select name="TYPO3_INSTALL[typo3temp_action]">'.$this->getSelectorOptions($actionType).'</select>
+		foreach ($deleteType as $deleteKey => $deleteValue) {
+				// Define the markers content
+			$deleteMarkers = array(
+				'value' => htmlspecialchars($deleteKey),
+				'selected' => !strcmp($deleteKey, $tt) ? 'selected="selected"' : '',
+				'data' => htmlspecialchars($deleteValue)
+			);
+				// Fill the markers in the subpart
+			$deleteOptions[] = $this->contentObject->substituteMarkerArray(
+				$deleteOptionsSubpart,
+				$deleteMarkers,
+				'###|###',
+				1,
+				1
+			);
+		}
+			// Substitute the subpart for 'Delete files by condition' dropdown
+		$content = $this->contentObject->substituteSubpart(
+			$template,
+			'###DELETEOPTIONS###',
+			implode(chr(10), $deleteOptions)
+		);
+			// Get the subpart for 'Number of files at a time' dropdown
+		$actionOptionsSubpart = $this->contentObject->getSubpart($template, '###ACTIONOPTIONS###');
+		$actionOptions = array();
 
-From sub-directory:
-		<select name="TYPO3_INSTALL[typo3temp_subdir]">'.$this->getSelectorOptions($subdirRegistry, $this->INSTALL['typo3temp_subdir']).'</select>
-		';
+		foreach ($actionType as $actionKey => $actionValue) {
+				// Define the markers content
+			$actionMarkers = array(
+				'value' => htmlspecialchars($actionKey),
+				'data' => htmlspecialchars($actionValue)
+			);
+				// Fill the markers in the subpart
+			$actionOptions[] = $this->contentObject->substituteMarkerArray(
+				$actionOptionsSubpart,
+				$actionMarkers,
+				'###|###',
+				1,
+				1
+			);
+		}
+			// Substitute the subpart for 'Number of files at a time' dropdown
+		$content = $this->contentObject->substituteSubpart(
+			$content,
+			'###ACTIONOPTIONS###',
+			implode(chr(10), $actionOptions)
+		);
+			// Get the subpart for 'From sub-directory' dropdown
+		$subDirectoryOptionsSubpart = $this->contentObject->getSubpart($template, '###SUBDIRECTORYOPTIONS###');
+		$subDirectoryOptions = array();
 
-		$form = '<form action="'.$this->action.'" method="post">'.$content.'
-
-		<input type="submit" value="Execute">
-		</form>
-		This tool will delete files only if the last 10 characters before the extension (3 chars+\'.\') are hexadecimal valid ciphers, which are lowercase a-f and 0-9.';
-
-		$this->message($headCode,'Statistics','
-		Number of temporary files: <strong>'.($fileCounter-$deleteCounter)."</strong>
-		Number matching '".htmlspecialchars($deleteType[$tt])."': <strong>".$criteriaMatch.'</strong>
-		Number deleted: <strong>'.$deleteCounter.'</strong>
-		<br />
-		'.$form,1);
-
+		foreach ($subdirRegistry as $subDirectoryKey => $subDirectoryValue) {
+				// Define the markers content
+			$subDirectoryMarkers = array(
+				'value' => htmlspecialchars($subDirectoryKey),
+				'selected' => !strcmp($subDirectoryKey, $this->INSTALL['typo3temp_subdir']) ? 'selected="selected"' : '',
+				'data' => htmlspecialchars($subDirectoryValue)
+			);
+				// Fill the markers in the subpart
+			$subDirectoryOptions[] = $this->contentObject->substituteMarkerArray(
+				$subDirectoryOptionsSubpart,
+				$subDirectoryMarkers,
+				'###|###',
+				1,
+				1
+			);
+		}
+			// Substitute the subpart for 'From sub-directory' dropdown
+		$content = $this->contentObject->substituteSubpart(
+			$content,
+			'###SUBDIRECTORYOPTIONS###',
+			implode(chr(10), $subDirectoryOptions)
+		);
+			// Define the markers content
+		$markers = array(
+			'numberTemporary' => 'Number of temporary files:',
+			'numberMatching' => 'Number matching:',
+			'numberDeleted' => 'Number deleted:',
+			'temporary' => ($fileCounter - $deleteCounter),
+			'matching' => $criteriaMatch,
+			'deleteType' => '<span>' . htmlspecialchars($deleteType[$tt]) . '</span>',
+			'deleted' => $deleteCounter,
+			'deleteCondition' => 'Delete files by condition',
+			'numberFiles' => 'Number of files at a time:',
+			'fromSubdirectory' => 'From sub-directory:',
+			'execute' => 'Execute',
+			'explanation' => '
+				<p>
+					This tool will delete files only if the last 10 characters
+					before the extension (3 chars+\'.\') are hexadecimal valid
+					ciphers, which are lowercase a-f and 0-9.
+				</p>
+			'
+		);
+			// Fill the markers
+		$content = $this->contentObject->substituteMarkerArray(
+			$content,
+			$markers,
+			'###|###',
+			1,
+			1
+		);
+			// Add the content to the message array
+		$this->message($headCode, 'Statistics', $content, 1);
+			// Output the page
 		$this->output($this->outputWrapper($this->printAll()));
 	}
 
-	/**
-	 * [Describe function...]
-	 *
-	 * @param	[type]		$deleteType: ...
-	 * @param	[type]		$tt: ...
-	 * @return	[type]		...
-	 */
-	function getSelectorOptions($deleteType,$tt='')	{
-		$out='';
-		if (is_array($deleteType))	{
-			reset($deleteType);
-			while(list($v,$l)=each($deleteType))	{
-				$out.='<option value="'.htmlspecialchars($v).'"'.(!strcmp($v,$tt)?' selected="selected"':'').'>'.htmlspecialchars($l).'</option>';
-			}
-		}
-		return $out;
-	}
 
 
 
@@ -1239,7 +1850,6 @@
 
 
 
-
 	/*******************************
 	 *
 	 * cleanup manager
@@ -1249,19 +1859,30 @@
 	/**
 	 * Provides a tool cleaning up various tables in the database
 	 *
-	 * @return	string		HTML output
-	 * @author	Robert Lemke <rl@robertlemke.de>
-	 * @todo	Add more functionality ...
+	 * @return void
+	 * @author Robert Lemke <rl@robertlemke.de>
+	 * @todo Add more functionality ...
 	 */
-	function cleanupManager()	{
+	function cleanupManager() {
 		$headCode = 'Clean up database';
-		$this->message($headCode,'What is it?','
-		This function will become a general clean up manager for various tables used by TYPO3. By now you can only empty the cache which is used for storing image sizes of all pictures used in TYPO3.
-
-		<strong>Clear cached image sizes</strong>
-		Clears the cache used for memorizing sizes of all images used in your website. This information is cached in order to gain performance and will be stored each time a new image is being displayed in the frontend.
-
-		You should <em>Clear All Cache</em> in the backend after clearing this cache.
+		$this->message($headCode, 'What is it?', '
+			<p>
+				This function will become a general clean up manager for various
+				tables used by TYPO3. By now you can only empty the cache which
+				is used for storing image sizes of all pictures used in TYPO3.
+			</p>
+			<p>
+				<strong>Clear cached image sizes</strong>
+				<br />
+				Clears the cache used for memorizing sizes of all images used in
+				your website. This information is cached in order to gain
+				performance and will be stored each time a new image is being
+				displayed in the frontend.
+			</p>
+			<p>
+				You should <em>Clear All Cache</em> in the backend after
+				clearing this cache.
+			</p>
 		');
 
 		$tables = $this->getListOfTables();
@@ -1280,18 +1901,63 @@
 			$cleanupType['cache_imagesizes'] = 'Clear cached image sizes only';
 			$cachedImageSizesCounter = intval($GLOBALS['TYPO3_DB']->exec_SELECTcountRows('*', 'cache_imagesizes'));
 		} else {
-			$this->message($headCode,'Table cache_imagesizes does not exist!',"
-				The table cache_imagesizes was not found. Please check your database settings in Basic Configuration and compare your table definition with the Database Analyzer.
-			",2);
+			$this->message($headCode, 'Table cache_imagesizes does not exist!', '
+				<p>
+					The table cache_imagesizes was not found. Please check your
+					database settings in Basic Configuration and compare your
+					table definition with the Database Analyzer.
+				</p>
+			', 2);
 			$cachedImageSizesCounter = 'unknown';
 		}
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'CleanUpManager.html');
+			// Get the template part from the file
+		$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+			// Get the subpart for the 'Clean up' dropdown
+		$cleanUpOptionsSubpart = $this->contentObject->getSubpart($template, '###CLEANUPOPTIONS###');
+		$cleanUpOptions = array();
 
-		$content = '<select name="TYPO3_INSTALL[cleanup_type]">'.$this->getSelectorOptions($cleanupType).'</select> ';
-		$form = '<form action="'.$this->action.'" method="post">'.$content.'<input type="submit" value="Execute"></form>';
-		$this->message($headCode,'Statistics','
-			Number cached image sizes: <strong>'.$cachedImageSizesCounter.'</strong><br />
-		'.$form,1);
-
+		foreach ($cleanupType as $cleanUpKey => $cleanUpValue) {
+				// Define the markers content
+			$cleanUpMarkers = array(
+				'value' => htmlspecialchars($cleanUpKey),
+				'data' => htmlspecialchars($cleanUpValue)
+			);
+				// Fill the markers in the subpart
+			$cleanUpOptions[] = $this->contentObject->substituteMarkerArray(
+				$cleanUpOptionsSubpart,
+				$cleanUpMarkers,
+				'###|###',
+				1,
+				1
+			);
+		}
+			// Substitute the subpart for the 'Clean up' dropdown
+		$content = $this->contentObject->substituteSubpart(
+			$template,
+			'###CLEANUPOPTIONS###',
+			implode(chr(10), $cleanUpOptions)
+		);
+			// Define the markers content
+		$markers = array(
+			'numberCached' => 'Number cached image sizes:',
+			'number' => $cachedImageSizesCounter,
+			'action' => $this->action,
+			'cleanUp' => 'Clean up',
+			'execute' => 'Execute'
+		);
+			// Fill the markers
+		$content = $this->contentObject->substituteMarkerArray(
+			$content,
+			$markers,
+			'###|###',
+			1,
+			1
+		);
+			// Add the content to the message array
+		$this->message($headCode, 'Statistics', $content, 1);
+			// Output the page
 		$this->output($this->outputWrapper($this->printAll()));
 	}
 
@@ -1316,69 +1982,160 @@
 	/**
 	 * Creating the form for editing the TYPO3_CONF_VARS options.
 	 *
-	 * @param	[type]		$type: ...
-	 * @return	[type]		...
+	 * @param string $type If get_form, display form, otherwise checks and store in localconf.php
+	 * @return void
 	 */
-	function generateConfigForm($type='')	{
+	function generateConfigForm($type='') {
 		$default_config_content = t3lib_div::getUrl(PATH_t3lib.'config_default.php');
 		$commentArr = $this->getDefaultConfigArrayComments($default_config_content);
 
-		switch($type)	{
+		switch($type) {
 			case 'get_form':
-				reset($GLOBALS['TYPO3_CONF_VARS']);
-				$this->messageFunc_nl2br=0;
-				while(list($k,$va)=each($GLOBALS['TYPO3_CONF_VARS']))	{
+					// Get the template file
+				$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'GenerateConfigForm.html');
+					// Get the template part from the file
+				$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+
+				foreach ($GLOBALS['TYPO3_CONF_VARS'] as $k => $va) {
 					$ext='['.$k.']';
 					$this->message($ext, '$TYPO3_CONF_VARS[\''.$k.'\']',$commentArr[0][$k],1);
 
-					while(list($vk,$value)=each($va))	{
+					foreach ($va as $vk => $value) {
+						$textAreaSubpart = '';
+						$booleanSubpart = '';
+						$textLineSubpart = '';
+
 						$description = trim($commentArr[1][$k][$vk]);
 						$isTextarea = preg_match('/^string \(textarea\)/i',$description) ? TRUE : FALSE;
 						$doNotRender = preg_match('/^string \(exclude\)/i', $description) ? TRUE : FALSE;
 
 						if (!is_array($value) && !$doNotRender && ($this->checkForBadString($value) || $isTextarea)) {
 							$k2 = '['.$vk.']';
-							$msg = htmlspecialchars($description).'<br /><br /><em>'.$ext.$k2.' = '.htmlspecialchars(t3lib_div::fixed_lgd_cs($value,60)).'</em><br />';
 
-							if ($isTextarea)	{
-								$form = '<textarea name="TYPO3_INSTALL[extConfig]['.$k.']['.$vk.']" cols="60" rows="5" wrap="off">'.htmlspecialchars($value).'</textarea>';
+							if ($isTextarea) {
+									// Get the subpart for a textarea
+								$textAreaSubpart = $this->contentObject->getSubpart($template, '###TEXTAREA###');
+									// Define the markers content
+								$textAreaMarkers = array(
+									'id' => $k . '-' . $vk,
+									'name' => 'TYPO3_INSTALL[extConfig]['.$k.']['.$vk.']',
+									'value' => $value
+								);
+									// Fill the markers in the subpart
+								$textAreaSubpart = $this->contentObject->substituteMarkerArray(
+									$textAreaSubpart,
+									$textAreaMarkers,
+									'###|###',
+									1,
+									0
+								);
 							} elseif (preg_match('/^boolean/i',$description)) {
-								$form = '<input type="hidden" name="TYPO3_INSTALL[extConfig]['.$k.']['.$vk.']" value="0">';
-								$form.= '<input type="checkbox" name="TYPO3_INSTALL[extConfig]['.$k.']['.$vk.']"'.($value?' checked="checked"':'').' value="'.($value&&strcmp($value,'0')?htmlspecialchars($value):1).'">';
+									// Get the subpart for a checkbox
+								$booleanSubpart = $this->contentObject->getSubpart($template, '###BOOLEAN###');
+									// Define the markers content
+								$booleanMarkers = array(
+									'id' => $k . '-' . $vk,
+									'name' => 'TYPO3_INSTALL[extConfig]['.$k.']['.$vk.']',
+									'value' => $value && strcmp($value, '0') ? $value : 1,
+									'checked' => $value ? 'checked="checked"' : ''
+								);
+									// Fill the markers in the subpart
+								$booleanSubpart = $this->contentObject->substituteMarkerArray(
+									$booleanSubpart,
+									$booleanMarkers,
+									'###|###',
+									1,
+									0
+								);
 							} else {
-								$form = '<input type="text" size="80" name="TYPO3_INSTALL[extConfig][' . $k . '][' . $vk . ']" value="' . htmlspecialchars($value) . '">';
+									// Get the subpart for an input text field
+								$textLineSubpart = $this->contentObject->getSubpart($template, '###TEXTLINE###');
+									// Define the markers content
+								$textLineMarkers = array(
+									'id' => $k . '-' . $vk,
+									'name' => 'TYPO3_INSTALL[extConfig]['.$k.']['.$vk.']',
+									'value' => $value
+								);
+									// Fill the markers in the subpart
+								$textLineSubpart = $this->contentObject->substituteMarkerArray(
+									$textLineSubpart,
+									$textLineMarkers,
+									'###|###',
+									1,
+									0
+								);
 							}
-							$this->message($ext, $k2,$msg.$form);
+								// Substitute the subpart for a textarea
+							$content = $this->contentObject->substituteSubpart(
+								$template,
+								'###TEXTAREA###',
+								$textAreaSubpart
+							);
+								// Substitute the subpart for a checkbox
+							$content = $this->contentObject->substituteSubpart(
+								$content,
+								'###BOOLEAN###',
+								$booleanSubpart
+							);
+								// Substitute the subpart for an input text field
+							$content = $this->contentObject->substituteSubpart(
+								$content,
+								'###TEXTLINE###',
+								$textLineSubpart
+							);
+								// Define the markers content
+							$markers = array(
+								'description' => htmlspecialchars($description),
+								'key' => '[' . $k . '][' . $vk . ']',
+								'label' => htmlspecialchars(t3lib_div::fixed_lgd_cs($value, 40))
+							);
+								// Fill the markers
+							$content = $this->contentObject->substituteMarkerArray(
+								$content,
+								$markers,
+								'###|###',
+								1,
+								1
+							);
+								// Add the content to the message array
+							$this->message($ext, $k2, $content);
 						}
 					}
 				}
 			break;
 			default:
-				if (is_array($this->INSTALL['extConfig']))		{
-					reset($this->INSTALL['extConfig']);
+				if (is_array($this->INSTALL['extConfig'])) {
 					$lines = $this->writeToLocalconf_control();
-					while(list($k,$va)=each($this->INSTALL['extConfig']))	{
-						if (is_array($GLOBALS['TYPO3_CONF_VARS'][$k]))	{
-							while(list($vk,$value)=each($va))	{
-								if (isset($GLOBALS['TYPO3_CONF_VARS'][$k][$vk]))	{
+					foreach ($this->INSTALL['extConfig'] as $k => $va) {
+						if (is_array($GLOBALS['TYPO3_CONF_VARS'][$k])) {
+							foreach ($va as $vk => $value) {
+								if (isset($GLOBALS['TYPO3_CONF_VARS'][$k][$vk])) {
 									$doit=1;
-									if ($k=='BE' && $vk=='installToolPassword')	{
-										if ($value)	{
-											if (isset($_POST['installToolPassword_check']) && (!t3lib_div::_GP('installToolPassword_check') || strcmp(t3lib_div::_GP('installToolPassword_check'),$value)))	{
+									if ($k=='BE' && $vk=='installToolPassword') {
+										if ($value) {
+											if (isset($_POST['installToolPassword_check']) && (!t3lib_div::_GP('installToolPassword_check') || strcmp(t3lib_div::_GP('installToolPassword_check'),$value))) {
 												$doit=0;
-												t3lib_div::debug('ERROR: The two passwords did not match! The password was not changed.');
+												$this->errorMessages[] = '
+													The two passwords did not
+													match! The password was not
+													changed.
+												';
 											}
 											if (t3lib_div::_GP('installToolPassword_md5'))	$value =md5($value);
 										} else $doit=0;
 									}
 
 									$description = trim($commentArr[1][$k][$vk]);
-									if (preg_match('/^string \(textarea\)/i', $description))	{
-										$value = str_replace(chr(13),'',$value);	// Force Unix linebreaks in textareas
-										$value = str_replace(chr(10),"'.chr(10).'",$value);	// Preserve linebreaks
+									if (preg_match('/^string \(textarea\)/i', $description)) {
+											// Force Unix linebreaks in textareas
+										$value = str_replace(chr(13),'',$value);
+											// Preserve linebreaks
+										$value = str_replace(chr(10),"'.chr(10).'",$value);
 									}
 									if (preg_match('/^boolean/i', $description)) {
-											// When submitting settings in the Install Tool, values that default to "false" or "true" in config_default.php will be sent as "0" resp. "1". Therefore, reset the values to their boolean equivalent.
+											// When submitting settings in the Install Tool, values that default to "false" or "true"
+											// in config_default.php will be sent as "0" resp. "1". Therefore, reset the values
+											// to their boolean equivalent.
 										if ($GLOBALS['TYPO3_CONF_VARS'][$k][$vk] === false && $value === '0') {
 											$value = false;
 										} elseif ($GLOBALS['TYPO3_CONF_VARS'][$k][$vk] === true && $value === '1') {
@@ -1398,27 +2155,27 @@
 	}
 
 	/**
-	 * [Describe function...]
+	 * Make an array of the comments in the t3lib/config_default.php file
 	 *
-	 * @param	[type]		$string: ...
-	 * @param	[type]		$mainArray: ...
-	 * @param	[type]		$commentArray: ...
-	 * @return	[type]		...
+	 * @param string $string The contents of the config_default.php file
+	 * @param array $mainArray
+	 * @param array $commentArray
+	 * @return array
 	 */
-	function getDefaultConfigArrayComments($string,$mainArray=array(),$commentArray=array())	{
+	function getDefaultConfigArrayComments($string,$mainArray=array(),$commentArray=array()) {
 		$lines = explode(chr(10),$string);
 		$in=0;
 		$mainKey='';
-		while(list(,$lc)=each($lines))	{
+		foreach ($lines as $lc) {
 			$lc = trim($lc);
 			if ($in) {
-				if (!strcmp($lc,');'))	{
+				if (!strcmp($lc,');')) {
 					$in=0;
 				} else {
-					if (preg_match('/["\']([[:alnum:]_-]*)["\'][[:space:]]*=>(.*)/i',$lc,$reg))	{
+					if (preg_match('/["\']([[:alnum:]_-]*)["\'][[:space:]]*=>(.*)/i',$lc,$reg)) {
 						preg_match('/,[\t\s]*\/\/(.*)/i',$reg[2],$creg);
 						$theComment = trim($creg[1]);
-						if (substr(strtolower(trim($reg[2])),0,5)=='array' && !strcmp($reg[1],strtoupper($reg[1])))	{
+						if (substr(strtolower(trim($reg[2])),0,5)=='array' && !strcmp($reg[1],strtoupper($reg[1]))) {
 							$mainKey=trim($reg[1]);
 							$mainArray[$mainKey]=$theComment;
 						} elseif ($mainKey) {
@@ -1455,9 +2212,9 @@
 	/**
 	 * Checking php.ini configuration and set appropriate messages and flags.
 	 *
-	 * @return	[type]		...
+	 * @return void
 	 */
-	function checkConfiguration()	{
+	function checkConfiguration() {
 		$ext='php.ini configuration checked';
 		$this->message($ext);
 
@@ -1467,74 +2224,137 @@
 
 			// Includepath
 		$incPaths = t3lib_div::trimExplode(TYPO3_OS=='WIN'?';':':', ini_get('include_path'));
-		if (!in_array('.',$incPaths))	{
-			$this->message($ext, 'Current directory (./) is not in include path!',"
-				<i>include_path=".ini_get('include_path')."</i>
-				Normally the current path, '.', is included in the include_path of PHP. Although TYPO3 does not rely on this, it is an unusual setting that may introduce problems for some extensions.
-			",1);
+		if (!in_array('.',$incPaths)) {
+			$this->message($ext, 'Current directory (./) is not in include path!', '
+				<p>
+					<em>include_path=' . ini_get('include_path') . '</em>
+					<br />
+					Normally the current path, \'.\', is included in the
+					include_path of PHP. Although TYPO3 does not rely on this,
+					it is an unusual setting that may introduce problems for
+					some extensions.
+				</p>
+			', 1);
 		} else $this->message($ext, 'Current directory in include path',"",-1);
 
 			// *****************
 			// File uploads
 			// *****************
-		if (!ini_get('file_uploads'))	{
-			$this->message($ext, 'File uploads not allowed',"
-				<i>file_uploads=".ini_get('file_uploads')."</i>
-				TYPO3 uses the ability to upload files from the browser in various cases.
-				As long as this flag is disabled, you'll not be able to upload files.
-				But it doesn't end here, because not only are files not accepted by the server - ALL content in the forms are discarded and therefore nothing at all will be editable if you don't set this flag!
-				However if you cannot enable fileupload for some reason alternatively you change the default form encoding value with \$TYPO3_CONF_VARS[SYS][form_enctype].
-			",3);
+		if (!ini_get('file_uploads')) {
+			$this->message($ext, 'File uploads not allowed', '
+				<p>
+					<em>file_uploads=' . ini_get('file_uploads') . '</em>
+					<br />
+					TYPO3 uses the ability to upload files from the browser in
+					various cases.
+					<br />
+					As long as this flag is disabled, you\'ll not be able to
+					upload files.
+					<br />
+					But it doesn\'t end here, because not only are files not
+					accepted by the server - ALL content in the forms are
+					discarded and therefore nothing at all will be editable
+					if you don\'t set this flag!
+					<br />
+					However if you cannot enable fileupload for some reason
+					alternatively you change the default form encoding value
+					with \$TYPO3_CONF_VARS[SYS][form_enctype].
+				</p>
+			', 3);
 		} else $this->message($ext, 'File uploads allowed',"",-1);
 
-		$upload_max_filesize = $this->convertByteSize(ini_get('upload_max_filesize'));
-		$post_max_size = $this->convertByteSize(ini_get('post_max_size'));
-		if ($upload_max_filesize<1024*1024*10)	{
-			$this->message($ext, 'Maximum upload filesize too small?',"
-				<i>upload_max_filesize=".ini_get('upload_max_filesize')."</i>
-				By default TYPO3 supports uploading, copying and moving files of sizes up to 10MB (You can alter the TYPO3 defaults by the config option TYPO3_CONF_VARS[BE][maxFileSize]).
-				Your current value is below this, so at this point, PHP sets the limits for uploaded filesizes and not TYPO3.
-				<strong>Notice:</strong> The limits for filesizes attached to database records are set in the tables.php configuration files (\$TCA) for each group/file field. You may override these values in localconf.php or by page TSconfig settings.
-			",1);
+		$upload_max_filesize = t3lib_div::getBytesFromSizeMeasurement(ini_get('upload_max_filesize'));
+		$post_max_size = t3lib_div::getBytesFromSizeMeasurement(ini_get('post_max_size'));
+		if ($upload_max_filesize<1024*1024*10) {
+			$this->message($ext, 'Maximum upload filesize too small?', '
+				<p>
+					<em>upload_max_filesize=' . ini_get('upload_max_filesize') . '</em>
+					<br />
+					By default TYPO3 supports uploading, copying and moving
+					files of sizes up to 10MB (You can alter the TYPO3 defaults
+					by the config option TYPO3_CONF_VARS[BE][maxFileSize]).
+					<br />
+					Your current value is below this, so at this point, PHP sets
+					the limits for uploaded filesizes and not TYPO3.
+					<br />
+					<strong>Notice:</strong> The limits for filesizes attached
+					to database records are set in the tables.php configuration
+					files (\$TCA) for each group/file field. You may override
+					these values in localconf.php or by page TSconfig settings.
+				</p>
+			', 1);
 		}
-		if ($upload_max_filesize > $post_max_size)	{
-			$this->message($ext, 'Maximum size for POST requests is smaller than max. upload filesize','
-				<i>upload_max_filesize='.ini_get('upload_max_filesize').', post_max_size='.ini_get('post_max_size').'</i>
-				You have defined a maximum size for file uploads which exceeds the allowed size for POST requests. Therefore the file uploads can not be larger than '.ini_get('post_max_size').'
-			',1);
+		if ($upload_max_filesize > $post_max_size) {
+			$this->message($ext, 'Maximum size for POST requests is smaller than max. upload filesize', '
+				<p>
+					<em>upload_max_filesize=' . ini_get('upload_max_filesize') . '
+					, post_max_size=' . ini_get('post_max_size') . '</em>
+					<br />
+					You have defined a maximum size for file uploads which
+					exceeds the allowed size for POST requests. Therefore the
+					file uploads can not be larger than ' . ini_get('post_max_size') . '
+				</p>
+			', 1);
 		}
 
 			// *****************
 			// Memory and functions
 			// *****************
-		$memory_limit_value = $this->convertByteSize(ini_get('memory_limit'));
+		$memory_limit_value = t3lib_div::getBytesFromSizeMeasurement(ini_get('memory_limit'));
 
 		if ($memory_limit_value && $memory_limit_value < t3lib_div::getBytesFromSizeMeasurement(TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT)) {
-			$this->message($ext, 'Memory limit below ' . TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT,'
-				<i>memory_limit=' . ini_get('memory_limit') . '</i>
-				Your system is configured to enforce a memory limit of PHP scripts lower than ' . TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT . '. The Extension Manager needs to include more PHP-classes than will fit into this memory space. There is nothing else to do than raise the limit. To be safe, ask the system administrator of the webserver to raise the limit to over ' . TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT . '.
-			',3);
+			$this->message($ext, 'Memory limit below ' . TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT, '
+				<p>
+					<em>memory_limit=' . ini_get('memory_limit') . '</em>
+					<br />
+					Your system is configured to enforce a memory limit of PHP
+					scripts lower than ' . TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT . '.
+					The Extension Manager needs to include more PHP-classes than
+					will fit into this memory space. There is nothing else to do
+					than raise the limit. To be safe, ask the system
+					administrator of the webserver to raise the limit to over
+					' . TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT . '.
+				</p>
+			', 3);
 		} elseif(!$memory_limit_value) {
-			$this->message($ext, 'Memory limit',"<i>No memory limit in effect.</i>",-1);
-		} else $this->message($ext, 'Memory limit',"<i>memory_limit=".ini_get('memory_limit')."</i>",-1);
-		if (ini_get('max_execution_time')<30)	{
-			$this->message($ext, 'Maximum execution time below 30 seconds',"
-				<i>max_execution_time=".ini_get('max_execution_time')."</i>
-				May impose problems if too low.
-			",1);
+			$this->message($ext, 'Memory limit', '
+				<p>
+					<em>No memory limit in effect.</em>
+				</p>
+			', -1);
 		} else {
-			$this->message($ext, 'Maximum execution time',"<i>max_execution_time=".ini_get('max_execution_time')."</i>",-1);
+			$this->message($ext, 'Memory limit: ' . ini_get('memory_limit'), '', -1);
 		}
-		if (ini_get('disable_functions'))	{
-			$this->message($ext, 'Functions disabled!',"
-				<i>disable_functions=".ini_get('disable_functions')."</i>
-				The above list of functions are disabled. If TYPO3 use any of these there might be trouble.
-				TYPO3 is designed to use the default set of PHP4.3.0+ functions plus the functions of GDLib.
-				Possibly these functions are disabled due to security risks and most likely the list would include a function like <i>exec()</i> which is use by TYPO3 to access ImageMagick.
-			",2);
+		if (ini_get('max_execution_time')<30) {
+			$this->message($ext, 'Maximum execution time below 30 seconds', '
+				<p>
+					<em>max_execution_time=' . ini_get('max_execution_time') . '</em>
+					<br />
+					May impose problems if too low.
+				</p>
+			', 1);
 		} else {
-			$this->message($ext, 'Functions disabled: none',"",-1);
+			$this->message($ext, 'Maximum execution time: ' . ini_get('max_execution_time') . ' seconds', '', -1);
 		}
+		if (ini_get('disable_functions')) {
+			$this->message($ext, 'Functions disabled!', '
+				<p>
+					<em>disable_functions=' . ini_get('disable_functions') . '</em>
+					<br />
+					The above list of functions are disabled. If TYPO3 use any
+					of these there might be trouble.
+					<br />
+					TYPO3 is designed to use the default set of PHP4.3.0+
+					functions plus the functions of GDLib.
+					<br />
+					Possibly these functions are disabled due to security risks
+					and most likely the list would include a function like
+					<em>exec()</em> which is use by TYPO3 to access ImageMagick.
+				</p>
+			', 2);
+		} else {
+			$this->message($ext, 'Functions disabled: none', '', -1);
+		}
 		// Mail tests
 		if (TYPO3_OS == 'WIN') {
 			$smtp = ini_get('SMTP');
@@ -1547,116 +2367,220 @@
 				$smtp_addr = $smtp;
 			}
 			if (!$smtp || $bad_smtp || !t3lib_div::testInt(ini_get('smtp_port'))) {
-				$this->message($ext, 'Mail configuration is not set correctly','
-					Mail configuration is not set
-					PHP mail() function requires SMTP and smtp_port to have correct values on Windows.',
-					2);
+				$this->message($ext, 'Mail configuration is not set correctly', '
+					<p>
+						Mail configuration is not set
+						<br />
+						PHP mail() function requires SMTP and smtp_port to have
+						correct values on Windows.
+					</p>
+				', 2);
 			} else {
 				if (($smtp_addr == '127.0.0.1' || $smtp_addr == '::1') && ($_SERVER['SERVER_ADDR'] == '127.0.0.1' || $_SERVER['SERVER_ADDR'] == '::1')) {
-					$this->message($ext, 'Mail is configured (potential problem exists!)',
-						'<i>SMTP=' . $smtp . '</i> - <b>Note:</b> this server! Are you sure it runs SMTP server?
-						<i>smtp_port=' . ini_get('smtp_port') . '</i>
-						'.$this->check_mail('get_form'), 1);
+					$this->message($ext, 'Mail is configured (potential problem exists!)', '
+						<p>
+							<em>SMTP=' . $smtp . '</em> - <strong>Note:</strong>
+							this server! Are you sure it runs SMTP server?
+							<br />
+							<em>smtp_port=' . ini_get('smtp_port') . '</em>
+						</p>' . $this->check_mail('get_form') . '
+					', 1);
 				} else {
-					$this->message($ext, 'Mail is configured',
-						'<i>SMTP=' . $smtp . '</i>
-						<i>smtp_port=' . ini_get('smtp_port') . '</i>
-						'.$this->check_mail('get_form'), -1);
+					$this->message($ext, 'Mail is configured', '
+						<p>
+							<em>SMTP=' . $smtp . '</em>
+							<br />
+							<em>smtp_port=' . ini_get('smtp_port') . '</em>
+						</p>' . $this->check_mail('get_form') .'
+					', -1);
 				}
 			}
 		} elseif (!ini_get('sendmail_path')) {
-			$this->message($ext, 'Sendmail path not defined!','
-					This may be critical to TYPO3\'s use of the mail() function. Please be sure that the mail() function in your php-installation works!
-					' . $this->check_mail('get_form'),1);
+			$this->message($ext, 'Sendmail path not defined!', '
+				<p>
+					This may be critical to TYPO3\'s use of the mail() function.
+					Please be sure that the mail() function in your
+					php-installation works!
+				</p>' . $this->check_mail('get_form') . '
+			', 1);
 		} else {
 			list($prg) = explode(' ', ini_get('sendmail_path'));
 			if (!@is_executable($prg)) {
-				$this->message($ext, 'Sendmail program not found or not executable?','
-					<i>sendmail_path=' . ini_get('sendmail_path') . '</i>
-					This may be critical to TYPO3\'s use of the mail() function. Please be sure that the mail() function in your php-installation works!
-				'.$this->check_mail('get_form'), 1);
+				$this->message($ext, 'Sendmail program not found or not executable?', '
+					<p>
+						<em>sendmail_path=' . ini_get('sendmail_path') . '</em>
+						<br />
+						This may be critical to TYPO3\'s use of the mail()
+						function. Please be sure that the mail() function in
+						your php-installation works!
+					</p>' . $this->check_mail('get_form') .'
+				', 1);
 			} else {
-				$this->message($ext, 'Sendmail OK','
-					<i>sendmail_path=' . ini_get('sendmail_path') . '</i>
-				'.$this->check_mail('get_form'),-1);
+				$this->message($ext, 'Sendmail OK', '
+					<p>
+						<em>sendmail_path=' . ini_get('sendmail_path') . '</em>
+					</p>' . $this->check_mail('get_form') . '
+				', -1);
 			}
 		}
 
 			// *****************
 			// Safe mode related
 			// *****************
-		if (ini_get('safe_mode'))	{
-			$this->message($ext, 'Safe mode turned on',"
-				<i>safe_mode=".ini_get('safe_mode')."</i>
-				In safe_mode PHP is restricted in several ways. This is a good thing because it adds protection to your (and others) scripts. But it may also introduce problems. In TYPO3 this <em>may be</em> a problem in two areas: File administration and execution of external programs, in particular ImageMagick.
-				If you just ignore this warning, you'll most likely find, that TYPO3 seems to work except from the image-generation. The problem in that case is that the external ImageMagick programs are not allowed to be executed from the regular paths like \"/usr/bin/\" or \"/usr/X11R6/bin/\".
-				If you use safe_mode with TYPO3, you should disable use of external programs ([BE][disable_exec_function]=1).
-				In safe mode you must ensure that all the php-scripts and upload folders are owned by the same user.
-
-					<i>safe_mode_exec_dir=".ini_get('safe_mode_exec_dir')."</i>
-					If the ImageMagick utilities are located in this directory, everything is fine. Below on this page, you can see if ImageMagick is found here. If not, ask you ISP to put the three ImageMagick programs, 'convert', 'combine'/'composite' and 'identify' there (eg. with symlinks if Unix server)
-
-
+		if (ini_get('safe_mode')) {
+			$this->message($ext, 'Safe mode turned on', '
+				<p>
+					<em>safe_mode=' . ini_get('safe_mode') . '</em>
+					<br />
+					In safe_mode PHP is restricted in several ways. This is a
+					good thing because it adds protection to your (and others)
+					scripts. But it may also introduce problems. In TYPO3 this
+					<em>may be</em> a problem in two areas: File administration
+					and execution of external programs, in particular
+					ImageMagick.
+					<br />
+					If you just ignore this warning, you\'ll most likely find,
+					that TYPO3 seems to work except from the image-generation.
+					The problem in that case is that the external ImageMagick
+					programs are not allowed to be executed from the regular
+					paths like "/usr/bin/" or "/usr/X11R6/bin/".
+					<br />
+					If you use safe_mode with TYPO3, you should disable use of
+					external programs ([BE][disable_exec_function]=1).
+					<br />
+					In safe mode you must ensure that all the php-scripts and
+					upload folders are owned by the same user.
+				</p>
+				<p>
+					<em>safe_mode_exec_dir=' . ini_get('safe_mode_exec_dir') . '</em>
+					<br />
+					If the ImageMagick utilities are located in this directory,
+					everything is fine. Below on this page, you can see if
+					ImageMagick is found here. If not, ask you ISP to put the
+					three ImageMagick programs, \'convert\',
+					\'combine\'/\'composite\' and \'identify\' there (eg. with
+					symlinks if Unix server)
+				</p>
+				<p>
 					<strong>Example of safe_mode settings:</strong>
+					<br />
 					Set this in the php.ini file:
-
+				</p>
+				<p>
 					; Safe Mode
-					safe_mode               =       On
-					safe_mode_exec_dir      = /usr/bin/
-
-					...and the ImageMagick '/usr/bin/convert' will be executable.
-					The last slash is important (..../) and you can only specify one directory.
-
+					<br />
+					safe_mode = On
+					<br />
+					safe_mode_exec_dir = /usr/bin/
+				</p>
+				<p>
+					...and the ImageMagick \'/usr/bin/convert\' will be
+					executable.
+					<br />
+					The last slash is important (..../) and you can only specify
+					one directory.
+				</p>
+				<p>
 					<strong>Notice: </strong>
-					ImageMagick 4.2.9 is recommended and the binaries are normally installed by RPM in /usr/X11R6/bin or by compiling in /usr/local/bin. Please look in the \"Inside TYPO3\" pdf-document for extensive information about ImageMagick issues.
-					Paths to ImageMagick are defined in localconf.php and may be something else than /usr/bin/, but this is default for ImageMagick 5+
-
-
-			",2);
-			if (ini_get('doc_root'))	{
-				$this->message($ext, 'doc_root set',"
-					<i>doc_root=".ini_get('doc_root')."</i>
-					PHP cannot execute scripts outside this directory. If that is a problem is please correct it.
-				",1);
+					<br />
+					ImageMagick 4.2.9 is recommended and the binaries are
+					normally installed by RPM in /usr/X11R6/bin or by compiling
+					in /usr/local/bin. Please look in the "Inside TYPO3"
+					pdf-document for extensive information about ImageMagick issues.
+					<br />
+					Paths to ImageMagick are defined in localconf.php and may be
+					something else than /usr/bin/, but this is default for
+					ImageMagick 5+
+				</p>
+			', 2);
+			if (ini_get('doc_root')) {
+				$this->message($ext, 'doc_root set', '
+					<p>
+						<em>doc_root=' . ini_get('doc_root') . '</em>
+						<br />
+						PHP cannot execute scripts outside this directory. If
+						that is a problem is please correct it.
+					</p>
+				', 1);
 			}
 			$this->config_array['safemode']=1;
-		} else $this->message($ext, 'safe_mode: off',"",-1);
-		if (ini_get('sql.safe_mode'))	{
-			$this->message($ext, 'sql.safe_mode is enabled',"
-				<i>sql.safe_mode=".ini_get('sql.safe_mode').'</i>
-				This means that you can only connect to the database with a username corresponding to the user of the webserver process or fileowner. Consult your ISP for information about this. Also see '.$this->linkIt('http://www.wrox.com/Consumer/Store/Books/2963/29632002.htm').'
-				The owner of the current file is: <strong>'.get_current_user ()."</strong>
-			",1);
+		} else {
+			$this->message($ext, 'safe_mode: off',"",-1);
+		}
+		if (ini_get('sql.safe_mode')) {
+			$this->message($ext, 'sql.safe_mode is enabled', '
+				<p>
+					<em>sql.safe_mode=' . ini_get('sql.safe_mode') . '</em>
+					<br />
+					This means that you can only connect to the database with a
+					username corresponding to the user of the webserver process
+					or fileowner. Consult your ISP for information about this.
+					Also see <a href="http://www.wrox.com/Consumer/Store/Books/2963/29632002.htm">
+					http://www.wrox.com/Consumer/Store/Books/2963/29632002.htm</a>
+					<br />
+					The owner of the current file is:
+					<strong>' . get_current_user () . '</strong>
+				</p>
+			', 1);
 			$this->config_array['sql.safe_mode_user'] = get_current_user();
-		} else $this->message($ext, 'sql.safe_mode: off',"",-1);
-		if (ini_get('open_basedir'))	{
-			$this->message($ext, 'open_basedir set',"
-				<i>open_basedir=".ini_get('open_basedir')."</i>
-				This restricts TYPO3 to open and include files only in this path. Please make sure that this does not prevent TYPO3 from running.
-				<strong>Notice (UNIX):</strong> Before checking a path according to open_basedir, PHP resolves all symbolic links.
-			",1);
-//	????			If this option was set falsely you probably didn't see this page in the first place, but this option <strong>may spoil this configuration test</strong> when checking for such as ImageMagick executables.
-		} else $this->message($ext, 'open_basedir: off',"",-1);
+		} else {
+			$this->message($ext, 'sql.safe_mode: off',"",-1);
+		}
+		if (ini_get('open_basedir')) {
+			$this->message($ext, 'open_basedir set', '
+				<p>
+					<em>open_basedir=' . ini_get('open_basedir') . '</em>
+					<br />
+					This restricts TYPO3 to open and include files only in this
+					path. Please make sure that this does not prevent TYPO3 from
+					running.
+					<br />
+					<strong>Notice (UNIX):</strong> Before checking a path
+					according to open_basedir, PHP resolves all symbolic links.
+				</p>
+			', 1);
+			//	???? If this option was set falsely you probably didn't see this page in the
+			// first place, but this option <strong>may spoil this configuration test</strong>
+			//  when checking for such as ImageMagick executables.
+		} else {
+			$this->message($ext, 'open_basedir: off',"",-1);
+		}
 
 			// Check availability of PHP session support
 		if (extension_loaded('session')) {
-			$this->message($ext, 'PHP sessions availiable','
-				<i>PHP Sessions availiabe</i>
-				PHP is compiled with session support and session support is available.
-			',-1);
+			$this->message($ext, 'PHP sessions availiable', '
+				<p>
+					<em>PHP Sessions availiabe</em>
+					<br />
+					PHP is compiled with session support and session support is
+					available.
+				</p>
+			', -1);
 		} else {
-			$this->message($ext, 'PHP Sessions not availiabe','
-				PHP is not compiled with session support, or session support is disabled in php.ini.
-				TYPO3 needs session support
-			',3);
+			$this->message($ext, 'PHP Sessions not availiabe', '
+				<p>
+					PHP is not compiled with session support, or session support
+					is disabled in php.ini.
+					<br />
+					TYPO3 needs session support
+				</p>
+			', 3);
 		}
 
-				// Suhosin/Hardened PHP:
-		$suhosinDescription = 'Suhosin limits the number of elements that can be submitted in forms to the server. ' .
-			'This will affect for example the "All configuration" section in the Install Tool or Inline Relational ' .
-			'Record Editing (IRRE) with many child records.';
+			// Suhosin/Hardened PHP:
+		$suhosinDescription = '
+			<p>
+				Suhosin limits the number of elements that can be submitted in
+				forms to the server. This will affect for example the
+				"All configuration" section in the Install Tool or Inline
+				Relational Record Editing (IRRE) with many child records.
+			</p>';
 		if (extension_loaded('suhosin')) {
-			$suhosinSuggestion = 'At least a value of 400 is suggested.';
+			$suhosinSuggestion = '
+				<p>
+					At least a value of 400 is suggested.
+				</p>
+			';
 
 			$suhosinRequestMaxVars = ini_get('suhosin.request.max_vars');
 			$suhosinPostMaxVars = ini_get('suhosin.post.max_vars');
@@ -1674,13 +2598,24 @@
 			// Check for stripped PHPdoc comments that are required to evaluate annotations:
 		$method = new ReflectionMethod('tx_install', 'check_mail');
 		if (strlen($method->getDocComment()) === 0) {
-			$description = 'The system extension Extbase evaluates annotations in PHPdoc comments ' .
-				'and thus requires eAccelerator not to strip away these parts. However, this is currently ' .
-				'the only part in the TYPO3 Core (beside deprecation log and unit tests). If Extbase is not ' .
-				'used, recompiling eAccelerator is not required at all.<br/><br/>' .
-				'If you do not want comments to be stripped by eAccelerator, please recompile with the following ' .
-				'configuration setting (<a href="http://eaccelerator.net/ticket/229" target="_blank">more details</a>):<br />' .
-				'<i>--with-eaccelerator-doc-comment-inclusion</i>';
+			$description = '
+				<p>
+					The system extension Extbase evaluates annotations in PHPdoc
+					comments and thus requires eAccelerator not to strip away
+					these parts. However, this is currently the only part in the
+					TYPO3 Core (beside deprecation log and unit tests). If
+					Extbase is not used, recompiling eAccelerator is not
+					required at all.
+					<br/>
+					<br/>
+					If you do not want comments to be stripped by eAccelerator,
+					please recompile with the following configuration setting
+					(<a href="http://eaccelerator.net/ticket/229" target="_blank">
+					more details</a>):
+					<br />
+					<em>--with-eaccelerator-doc-comment-inclusion</em>
+				</p>
+			';
 			$this->message($ext, 'PHPdoc comments are stripped', $description, 2);
 		}
 	}
@@ -1688,23 +2623,65 @@
 	/**
 	 * Check if PHP function mail() works
 	 *
-	 * @param	string		$cmd	If "get_form" then a formfield for the mail-address is shown. If not, it's checked if "check_mail" was in the INSTALL array and if so a test mail is sent to the recipient given.
-	 * @return	[type]		...
+	 * @param string $cmd If "get_form" then a formfield for the mail-address is shown. If not, it's checked if "check_mail" was in the INSTALL array and if so a test mail is sent to the recipient given.
+	 * @return string The mail form if it is requested with get_form
 	 */
-	function check_mail($cmd='')	{
-		switch($cmd)	{
+	function check_mail($cmd='') {
+		switch($cmd) {
 			case 'get_form':
-				$out='
-				You can check the mail() function by entering your email address here and press the button. You should then receive a testmail from test@test.test.<br /> Since almost all mails in TYPO3 are sent using the t3lib_htmlmail class, sending with this class can be tested by checking the box <strong>Test t3lib_htmlmail</strong> below. The return-path of the mail is set to null@'.t3lib_div::getIndpEnv('HTTP_HOST').'. Some mail servers won\'t send the mail if the host of the return-path is not resolved correctly.
-				<form action="'.$this->action.'" method="post"><input type="text" name="TYPO3_INSTALL[check_mail]"><br /><input type="checkbox" name="TYPO3_INSTALL[use_htmlmail]" id="use_htmlmail" ><label for="use_htmlmail">Test t3lib_htmlmail.</label>
-					<input type="submit" value="Send test mail"></form>';
+				$out = '
+					<p id="checkMailForm">
+						You can check the mail() function by entering your email
+						address here and press the button. You should then
+						receive a testmail from test@test.test.
+						<br />
+						Since almost all mails in TYPO3 are sent using the
+						t3lib_htmlmail class, sending with this class can be
+						tested by checking the box
+						<strong>Test t3lib_htmlmail</strong> below.
+						The return-path of the mail is set to null@' . t3lib_div::getIndpEnv('HTTP_HOST') . '.
+						Some mail servers won\'t send the mail if the host of
+						the return-path is not resolved correctly.
+					</p>
+				';
+					// Get the template file
+				$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'CheckMail.html');
+					// Get the template part from the file
+				$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+
+				if (!empty($this->mailMessage)) {
+						// Get the subpart for the mail is sent message
+					$mailSentSubpart = $this->contentObject->getSubpart($template, '###MAILSENT###');
+				}
+					// Substitute the subpart for the mail is sent message
+				$template = $this->contentObject->substituteSubpart(
+					$template,
+					'###MAILSENT###',
+					$mailSentSubpart
+				);
+					// Define the markers content
+				$markers = array(
+					'message' => $this->mailMessage,
+					'enterEmail' => 'Enter the email address',
+					'actionUrl' => $this->action . '#checkMailForm',
+					'useHtmlMailLabel' => 'Test t3lib_htmlmail',
+					'submit' => 'Send test mail'
+				);
+					// Fill the markers
+				$out .= $this->contentObject->substituteMarkerArray(
+					$template,
+					$markers,
+					'###|###',
+					1,
+					1
+				);
 			break;
 			default:
-				if (trim($this->INSTALL['check_mail']))	{
+				if (trim($this->INSTALL['check_mail'])) {
 					$subject = 'TEST SUBJECT';
 					$email = trim($this->INSTALL['check_mail']);
 
-					if($this->INSTALL['use_htmlmail'])	{
+					if($this->INSTALL['use_htmlmail']) {
 					  	$emailObj = t3lib_div::makeInstance('t3lib_htmlmail');
 					  	/* @var $emailObj t3lib_htmlmail */
 						$emailObj->start();
@@ -1718,7 +2695,7 @@
 					} else {
 						t3lib_div::plainMailEncoded($email,$subject,'TEST CONTENT','From: test@test.test');
 					}
-					$this->messages[]= 'MAIL WAS SENT TO: '.$email;
+					$this->mailMessage= 'Mail was sent to: ' . $email;
 				}
 			break;
 		}
@@ -1728,14 +2705,14 @@
 	/**
 	 * Checking php extensions, specifically GDLib and Freetype
 	 *
-	 * @return	[type]		...
+	 * @return void
 	 */
-	function checkExtensions()	{
+	function checkExtensions() {
 		$ext = 'GDLib';
 		$this->message($ext);
 
 		$software_info=1;
-		if (extension_loaded('gd') && $this->isGD())	{
+		if (extension_loaded('gd') && $this->isGD()) {
 			$this->config_array['gd']=1;
 			$this->message($ext, 'GDLib found',"",-1);
 			if ($this->isPNG()) {
@@ -1750,49 +2727,109 @@
 				$this->config_array['gd_jpg']=1;
 				$this->message($ext, 'JPG supported (not used by TYPO3)','');
 			}
-			if (!$this->config_array['gd_gif'] && !$this->config_array['gd_png'])	{
-				$this->message($ext, 'PNG or GIF not supported', nl2br(trim('
-					Your GDLib supports either GIF nor PNG. It must support either one of them.
-				')), 2);
+			if (!$this->config_array['gd_gif'] && !$this->config_array['gd_png']) {
+				$this->message($ext, 'PNG or GIF not supported', '
+					<p>
+						Your GDLib supports either GIF nor PNG. It must support
+						either one of them.
+					</p>
+				', 2);
 			} else {
 				$msg=array();
 				if ($this->config_array['gd_gif'] && $this->config_array['gd_png'])		{
-					$msg[0]='You can choose between generating GIF or PNG files, as your GDLib supports both.';
+					$msg[] = '
+						<p>
+							You can choose between generating GIF or PNG files,
+							as your GDLib supports both.
+						</p>
+					';
 				}
 				if ($this->config_array['gd_gif'])		{
-					$msg[10]="You should watch out for the generated size of the GIF-files because some versions of the GD library do not compress them with LZW, but RLE and ImageMagick is subsequently used to compress with LZW. But in the case of ImageMagick failing this task (eg. not being compiled with LZW which is the case with some versions) you'll end up with GIF-filesizes all too big!
-					This install tool tests what kinds of GIF compression are available in the ImageMagick installations by a physical test. You can also check it manually by opening a TYPO3 generated gif-file with Photoshop and save it in a new file. If the file sizes of the original and the new file are almost the same, you're having LZW compression and everything is fine.";
+					$msg[] = '
+						<p>
+							You should watch out for the generated size of the
+							GIF-files because some versions of the GD library do
+							not compress them with LZW, but RLE and ImageMagick
+							is subsequently used to compress with LZW. But in
+							the case of ImageMagick failing this task (eg. not
+							being compiled with LZW which is the case with some
+							versions) you\'ll end up with GIF-filesizes all too
+							big!
+							<br />
+							This install tool tests what kinds of GIF
+							compression are available in the ImageMagick
+							installations by a physical test. You can also check
+							it manually by opening a TYPO3 generated gif-file
+							with Photoshop and save it in a new file. If the
+							file sizes of the original and the new file are
+							almost the same, you\'re having LZW compression and
+							everything is fine.
+						</p>
+					';
 				}
 				if ($this->config_array['gd_png'])		{
-					$msg[20]='TYPO3 prefers the use of GIF-files and most likely your visitors on your website does too as not all browsers support PNG yet.';
+					$msg[] = '
+						<p>
+							TYPO3 prefers the use of GIF-files and most likely
+							your visitors on your website does too as not all
+							browsers support PNG yet.
+						</p>
+					';
 				}
-				$this->message($ext, 'GIF / PNG issues', nl2br(trim(implode($msg,chr(10)))), 1);
+				$this->message($ext, 'GIF / PNG issues', implode($msg, chr(10)), 1);
 			}
-			if (!$this->isTTF())	{
-				$this->message($ext, 'FreeType is apparently not installed', "
-					It looks like the FreeType library is not compiled into GDLib. This is required when TYPO3 uses GDLib and you'll most likely get errors like 'ImageTTFBBox is not a function' or 'ImageTTFText is not a function'.
-				", 2);
+			if (!$this->isTTF()) {
+				$this->message($ext, 'FreeType is apparently not installed', '
+					<p>
+						It looks like the FreeType library is not compiled into
+						GDLib. This is required when TYPO3 uses GDLib and
+						you\'ll most likely get errors like \'ImageTTFBBox is
+						not a function\' or \'ImageTTFText is not a function\'.
+					</p>
+				', 2);
 			} else {
-				$this->message($ext, 'FreeType quick-test ('.($this->isGIF()?'as GIF':'as PNG').')', '<img src="'.htmlspecialchars(t3lib_div::getIndpEnv('REQUEST_URI').'&testingTrueTypeSupport=1').'" alt=""><br />(If the text is exceeding the image borders you are using Freetype 2 and need to set TYPO3_CONF_VARS[GFX][TTFdpi]=96.<br />If there is no image at all Freetype is most likely NOT available and you can just as well disable GDlib for TYPO3...)', -1);
+				$this->message($ext, 'FreeType quick-test (' . ($this->isGIF() ? 'as GIF' : 'as PNG') . ')', '
+					<p>
+						<img src="' . htmlspecialchars(t3lib_div::getIndpEnv('REQUEST_URI') . '&testingTrueTypeSupport=1') . '" alt="" />
+						<br />
+						(If the text is exceeding the image borders you are
+						using Freetype 2 and need to set
+						TYPO3_CONF_VARS[GFX][TTFdpi]=96.
+						<br />
+						If there is no image at all Freetype is most likely NOT
+						available and you can just as well disable GDlib for
+						TYPO3...)
+					</p>
+				', -1);
 				$this->config_array['freetype']=1;
 			}
 		} else {
-			$this->message($ext, 'GDLib not found', "
-				GDLib is required if you want to use the GIFBUILDER object in TypoScript. GIFBUILDER is in charge of all advanced image generation in TypoScript, including graphical menuitems.
-				GDLib is also used in the TYPO3 Backend (TBE) to generate record icons and new module tabs.
-				It's highly recommended to install this library. Remember to compile GD with FreeType which is also required.
-				If you choose not to install GDLib, you can disable it in the configuration with [GFX][gdlib]=0;.
-			", 2);
+			$this->message($ext, 'GDLib not found', '
+				<p>
+					GDLib is required if you want to use the GIFBUILDER object
+					in TypoScript. GIFBUILDER is in charge of all advanced image
+					generation in TypoScript, including graphical menuitems.
+					<br />
+					GDLib is also used in the TYPO3 Backend (TBE) to generate
+					record icons and new module tabs.
+					<br />
+					It\'s highly recommended to install this library. Remember
+					to compile GD with FreeType which is also required.
+					<br />
+					If you choose not to install GDLib, you can disable it in
+					the configuration with [GFX][gdlib]=0;.
+				</p>
+			', 2);
 		}
-		$this->message($ext, 'GDLib software information', nl2br(trim($this->getGDSoftwareInfo())));
+		$this->message($ext, 'GDLib software information', $this->getGDSoftwareInfo());
 	}
 
 	/**
 	 * Checking and testing that the required writable directories are writable.
 	 *
-	 * @return	[type]		...
+	 * @return void
 	 */
-	function checkDirs()	{
+	function checkDirs() {
 		// Check typo3/temp/
 		$ext='Directories';
 		$this->message($ext);
@@ -1825,42 +2862,52 @@
 			$GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'] . '_temp_/' => array('Typical temporary location for default upload of files by administrators.',0),
 		);
 
-		foreach ($checkWrite as $relpath => $descr)	{
+		foreach ($checkWrite as $relpath => $descr) {
 
 				// Check typo3temp/
 			$general_message = $descr[0];
 
-			if (!@is_dir(PATH_site.$relpath))	{	// If the directory is missing, try to create it
+				// If the directory is missing, try to create it
+			if (!@is_dir(PATH_site.$relpath)) {
 				t3lib_div::mkdir(PATH_site.$relpath);
 			}
 
-			if (!@is_dir(PATH_site.$relpath))	{
-				if ($descr[1])	{	// required...
-					$this->message($ext, $relpath.' directory does not exist and could not be created','
-					<em>Full path: '.PATH_site.$relpath.'</em>
-					'.$general_message.'
-
-					This error should not occur as '.$relpath.' must always be accessible in the root of a TYPO3 website.
-					',3);
+			if (!@is_dir(PATH_site.$relpath)) {
+				if ($descr[1]) {	// required...
+					$this->message($ext, $relpath.' directory does not exist and could not be created', '
+						<p>
+							<em>Full path: ' . PATH_site . $relpath . '</em>
+							<br />
+							' . $general_message . '
+						</p>
+						<p>
+							This error should not occur as ' . $relpath . ' must
+							always be accessible in the root of a TYPO3 website.
+						</p>
+					', 3);
 				} else {
-					if ($descr[1] == 0)	{
+					if ($descr[1] == 0) {
 						$msg = 'This directory does not necessarily have to exist but if it does it must be writable.';
 					} else {
 						$msg = 'This directory does not necessarily have to exist and if it does it can be writable or not.';
 					}
-					$this->message($ext, $relpath.' directory does not exist','
-					<em>Full path: '.PATH_site.$relpath.'</em>
-					'.$general_message.'
-
-					'.$msg.'
-					',2);
+					$this->message($ext, $relpath.' directory does not exist', '
+						<p>
+							<em>Full path: ' . PATH_site . $relpath . '</em>
+							<br />
+							' . $general_message . '
+						</p>
+						<p>
+							' . $msg . '
+						</p>
+					', 2);
 				}
 			} else {
 				$file = PATH_site.$relpath.$uniqueName;
 				@touch($file);
-				if (@is_file($file))	{
+				if (@is_file($file)) {
 					unlink($file);
-					if ($descr[2])	{ $this->config_array[$descr[2]]=1; }
+					if ($descr[2]) { $this->config_array[$descr[2]]=1; }
 					$this->message($ext, $relpath.' writable','',-1);
 				} else {
 					$severity = ($descr[1]==2 || $descr[1]==0) ? 3 : 2;
@@ -1869,13 +2916,19 @@
 					} elseif ($descr[1] == -1 || $descr[1] == 1) {
 						$msg = 'The directory '.$relpath.' does not neccesarily have to be writable.';
 					}
-					$this->message($ext, $relpath.' directory not writable','
-					<em>Full path: '.$file.'</em>
-					'.$general_message.'
-
-					Tried to write this file (with touch()) but didn\'t succeed.
-					'.$msg.'
-					',$severity);
+					$this->message($ext, $relpath .' directory not writable', '
+						<p>
+							<em>Full path: ' . $file . '</em>
+							<br />
+							' . $general_message . '
+						</p>
+						<p>
+							Tried to write this file (with touch()) but didn\'t
+							succeed.
+							<br />
+							' . $msg . '
+						</p>
+					', $severity);
 				}
 			}
 		}
@@ -1886,36 +2939,41 @@
 	 *
 	 * This tries to find available ImageMagick installations and tries to find the version numbers by executing "convert" without parameters. If the ->checkIMlzw is set, LZW capabilities of the IM installs are check also.
 	 *
-	 * @param	[type]		$paths: ...
-	 * @return	[type]		...
+	 * @param array $paths Possible ImageMagick paths
+	 * @return void
 	 */
-	function checkImageMagick($paths)	{
+	function checkImageMagick($paths) {
 		$ext='Check Image Magick';
 		$this->message($ext);
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'CheckImageMagick.html');
 
 		$paths = array_unique($paths);
 
 		$programs = explode(',','gm,convert,combine,composite,identify');
 		$isExt = TYPO3_OS=="WIN" ? ".exe" : "";
 		$this->config_array['im_combine_filename']='combine';
-		reset($paths);
-		while(list($k,$v)=each($paths))	{
-			reset($programs);
+		foreach ($paths as $k => $v) {
 			if (!preg_match('/[\\/]$/',$v)) $v.='/';
-			while(list(,$filename)=each($programs))	{
+			foreach ($programs as $filename) {
 				if (ini_get('open_basedir') || (file_exists($v)&&@is_file($v.$filename.$isExt))) {
 					$version = $this->_checkImageMagick_getVersion($filename,$v);
-					if($version > 0)	{
-						if($filename=='gm')	{	// Assume GraphicsMagick
+					if($version > 0) {
+							// Assume GraphicsMagick
+						if($filename=='gm') {
 							$index[$v]['gm']=$version;
-							continue;	// No need to check for "identify" etc.
-						} else	{	// Assume ImageMagick
+								// No need to check for "identify" etc.
+							continue;
+						} else	{
+								// Assume ImageMagick
 							$index[$v][$filename]=$version;
 						}
 					}
 				}
 			}
-			if (count($index[$v])>=3 || $index[$v]['gm'])	{ $this->config_array['im']=1; }
+			if (count($index[$v])>=3 || $index[$v]['gm']) {
+				$this->config_array['im'] = 1;
+			}
 
 			if ($index[$v]['gm'] || (!$index[$v]['composite'] && $index[$v]['combine'])) {
 				$this->config_array['im_combine_filename']='combine';
@@ -1923,59 +2981,97 @@
 				$this->config_array['im_combine_filename']='composite';
 			}
 
-			if (isset($index[$v]['convert']) && $this->checkIMlzw)	{
+			if (isset($index[$v]['convert']) && $this->checkIMlzw) {
 				$index[$v]['gif_capability'] = ''.$this->_checkImageMagickGifCapability($v);
 			}
 		}
 		$this->config_array['im_versions']=$index;
-		if (!$this->config_array['im'])	{
-			$this->message($ext, 'No ImageMagick installation available',"
-			It seems that there is no adequate ImageMagick installation available at the checked locations (".implode($paths, ', ').")
-			An 'adequate' installation for requires 'convert', 'combine'/'composite' and 'identify' to be available
-			",2);
+		if (!$this->config_array['im']) {
+			$this->message($ext, 'No ImageMagick installation available', '
+				<p>
+					It seems that there is no adequate ImageMagick installation
+					available at the checked locations (' . implode(', ', $paths) . ')
+					<br />
+					An \'adequate\' installation for requires \'convert\',
+					\'combine\'/\'composite\' and \'identify\' to be available
+				</p>
+			', 2);
 		} else {
-			$theCode='';
-			reset($this->config_array['im_versions']);
-			while(list($p,$v)=each($this->config_array['im_versions']))	{
-				$ka=array();
+				// Get the subpart for the ImageMagick versions
+			$theCode = $this->contentObject->getSubpart($templateFile, '###VERSIONS###');
+				// Get the subpart for each ImageMagick version
+			$rowsSubPart = $this->contentObject->getSubpart($theCode, '###ROWS###');
+
+			foreach ($this->config_array['im_versions'] as $p => $v) {
+				$ka = array();
 				reset($v);
-				while(list($ka[])=each($v)){}
-				$theCode.='<tr><td>'.$this->fw($p).'</td><td>'.$this->fw(implode($ka,'<br />')).'</td><td>'.$this->fw(implode($v,'<br />')).'</td></tr>';
+				while(list($ka[])=each($v)) {}
+					// Define the markers content
+				$rowsMarkers = array(
+					'file' => $p,
+					'type' => implode('<br />', $ka),
+					'version' => implode('<br />', $v)
+				);
+					// Fill the markers in the subpart
+				$rows[] = $this->contentObject->substituteMarkerArray(
+					$rowsSubPart,
+					$rowsMarkers,
+					'###|###',
+					1,
+					1
+				);
 			}
-			$this->message($ext, 'Available ImageMagick/GraphicsMagick installations:','<table border="1" cellpadding="2" cellspacing="2">'.$theCode.'</table>',-1);
+				// Substitute the subpart for the ImageMagick versions
+			$theCode = $this->contentObject->substituteSubpart(
+				$theCode,
+				'###ROWS###',
+				implode(chr(10), $rows)
+			);
+				// Add the content to the message array
+			$this->message($ext, 'Available ImageMagick/GraphicsMagick installations:', $theCode, -1);
 		}
-		$this->message($ext, 'Search for ImageMagick:','
-			<form action="'.$this->action.'" method="post">
-				<input type="checkbox" name="TYPO3_INSTALL[checkIM][lzw]" id="checkImLzw" value="1"'.($this->INSTALL['checkIM']['lzw']?' checked="checked"':'').'> <label for="checkImLzw">Check LZW capabilities.</label>
-
-				Check this path for ImageMagick installation:
-				<input type="text" name="TYPO3_INSTALL[checkIM][path]" value="'.htmlspecialchars($this->INSTALL['checkIM']['path']).'">
-				(Eg. "D:\wwwroot\im537\ImageMagick\" for Windows or "/usr/bin/" for Unix)<br />
-
-				<input type="submit" value="Send">
-			</form>
-		',0);
-
+			// Get the template file
+		$formSubPart = $this->contentObject->getSubpart($templateFile, '###FORM###');
+			// Define the markers content
+		$formMarkers = array(
+			'actionUrl' => $this->action,
+			'lzwChecked' => ($this->INSTALL['checkIM']['lzw'] ? 'checked="checked"' : ''),
+			'lzwLabel' => 'Check LZW capabilities.',
+			'checkPath' => 'Check this path for ImageMagick installation:',
+			'imageMagickPath' => htmlspecialchars($this->INSTALL['checkIM']['path']),
+			'comment' => '(Eg. "D:\wwwroot\im537\ImageMagick\" for Windows or "/usr/bin/" for Unix)',
+			'send' => 'Send'
+		);
+			// Fill the markers
+		$formSubPart = $this->contentObject->substituteMarkerArray(
+			$formSubPart,
+			$formMarkers,
+			'###|###',
+			1,
+			1
+		);
+			// Add the content to the message array
+		$this->message($ext, 'Search for ImageMagick:', $formSubPart, 0);
 	}
 
 	/**
 	 * Checking GIF-compression capabilities of ImageMagick install
 	 *
-	 * @param	[type]		$file: ...
-	 * @return	[type]		...
+	 * @param string $path Path of ImageMagick installation
+	 * @return string Type of compression
 	 */
-	function _checkImageMagickGifCapability($path)	{
-		if ($this->config_array['dir_typo3temp'])	{		//  && !$this->config_array['safemode']
+	function _checkImageMagickGifCapability($path) {
+		if ($this->config_array['dir_typo3temp']) { //  && !$this->config_array['safemode']
 			$tempPath = $this->typo3temp_path;
 			$uniqueName = md5(uniqid(microtime()));
 			$dest = $tempPath.$uniqueName.'.gif';
 			$src = $this->backPath.'gfx/typo3logo.gif';
-			if (@is_file($src) && !strstr($src,' ') && !strstr($dest,' '))	{
+			if (@is_file($src) && !strstr($src,' ') && !strstr($dest,' ')) {
 				$cmd = t3lib_div::imageMagickCommand('convert', $src.' '.$dest, $path);
 				exec($cmd);
 			} else die('No typo3/gfx/typo3logo.gif file!');
 			$out='';
-			if (@is_file($dest))	{
+			if (@is_file($dest)) {
 				$new_info = @getimagesize($dest);
 				clearstatcache();
 				$new_size = filesize($dest);
@@ -1983,12 +3079,14 @@
 				clearstatcache();
 				$src_size = @filesize($src);
 
-				if ($new_info[0]!=$src_info[0] || $new_info[1]!=$src_info[1] || !$new_size || !$src_size)	{
+				if ($new_info[0]!=$src_info[0] || $new_info[1]!=$src_info[1] || !$new_size || !$src_size) {
 					$out='error';
 				} else {
-					if ($new_size/$src_size > 4) {	// NONE-LZW ratio was 5.5 in test
+						// NONE-LZW ratio was 5.5 in test
+					if ($new_size/$src_size > 4) {
 						$out='NONE';
-					} elseif ($new_size/$src_size > 1.5) {	// NONE-RLE ratio was not tested
+						// NONE-RLE ratio was not tested
+					} elseif ($new_size/$src_size > 1.5) {
 						$out='RLE';
 					} else {
 						$out='LZW';
@@ -2003,23 +3101,26 @@
 	/**
 	 * Extracts the version number for ImageMagick
 	 *
-	 * @param	string		The program name to execute in order to find out the version number
-	 * @param	string		Path for the above program
-	 * @return	string		Version number of the found ImageMagick instance
+	 * @param string $file The program name to execute in order to find out the version number
+	 * @param string $path Path for the above program
+	 * @return string Version number of the found ImageMagick instance
 	 */
-	function _checkImageMagick_getVersion($file, $path)	{
+	function _checkImageMagick_getVersion($file, $path) {
 			// Temporarily override some settings
 		$im_version = $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'];
 		$combine_filename = $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_combine_filename'];
 
-		if ($file=='gm')	{
+		if ($file=='gm') {
 			$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'] = 'gm';
-			$file = 'identify';		// Work-around, preventing execution of "gm gm"
-			$parameters = '-version';	// Work-around - GM doesn't like to be executed without any arguments
+				// Work-around, preventing execution of "gm gm"
+			$file = 'identify';
+				// Work-around - GM doesn't like to be executed without any arguments
+			$parameters = '-version';
 		} else {
 			$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'] = 'im5';
 
-			if($file=='combine' || $file=='composite')	{	// Override the combine_filename setting
+				// Override the combine_filename setting
+			if ($file=='combine' || $file=='composite') {
 				$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_combine_filename'] = $file;
 			}
 		}
@@ -2040,59 +3141,101 @@
 	/**
 	 * Checks database username/password/host/database
 	 *
-	 * @return	[type]		...
+	 * @return void
 	 */
-	function checkDatabase()		{
+	function checkDatabase() {
 		$ext='Check database';
 		$this->message($ext);
 
-		if (!extension_loaded('mysql') && !t3lib_extMgm::isLoaded('dbal'))	{
-			$this->message($ext, 'MySQL not available',"
-				PHP does not feature MySQL support (which is pretty unusual).
-			",2);
+		if (!extension_loaded('mysql') && !t3lib_extMgm::isLoaded('dbal')) {
+			$this->message($ext, 'MySQL not available', '
+				<p>
+					PHP does not feature MySQL support (which is pretty unusual).
+				</p>
+			', 2);
 		} else {
-			$cInfo='
-				Username: <strong>'.TYPO3_db_username.'</strong>
-				Host: <strong>'.TYPO3_db_host.'</strong>
-			';
-			if (!TYPO3_db_host || !TYPO3_db_username)	{
-				$this->message($ext, 'Username, password or host not set',"
-					You may need to enter data for these values:
-					".trim($cInfo)."
-
-					Use the form below.
-				",2);
+			if (!TYPO3_db_host || !TYPO3_db_username) {
+				$this->message($ext, 'Username, password or host not set', '
+					<p>
+						You may need to enter data for these values:
+						<br />
+						Username: <strong>' . TYPO3_db_username . '</strong>
+						<br />
+						Host: <strong>' . TYPO3_db_host . '</strong>
+						<br />
+						<br />
+						Use the form below.
+					</p>
+				', 2);
 			}
-			if ($result = $GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password))	{
-				$this->message($ext, 'Connected to SQL database successfully',"
-				".trim($cInfo)."
-				",-1,1);
+			if ($result = $GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password)) {
+				$this->message($ext, 'Connected to SQL database successfully', '
+					<dl id="databaseConnected">
+						<dt>
+							Username:
+						</dt>
+						<dd>
+							' . TYPO3_db_username . '
+						</dd>
+						<dt>
+							Host:
+						</dt>
+						<dd>
+							' . TYPO3_db_host . '
+						</dd>
+					</dl>
+				', -1, 1);
 				$this->config_array['mysqlConnect']=1;
-				if (!TYPO3_db)	{
-					$this->message($ext, 'No database selected',"
-						Currently you have no database selected.
-						Please select one or create a new database.
-					",3);
+				if (!TYPO3_db) {
+					$this->message($ext, 'No database selected', '
+						<p>
+							Currently you have no database selected.
+							<br />
+							Please select one or create a new database.
+						</p>
+					', 3);
 					$this->config_array['no_database']=1;
 				} elseif (!$GLOBALS['TYPO3_DB']->sql_select_db(TYPO3_db))  {
-					$this->message($ext, 'Database',"
-						'".TYPO3_db."' could not be selected as database!
-						Please select another one or create a new database.
-					",3,1);
+					$this->message($ext, 'Database', '
+						<p>
+							\''.TYPO3_db.'\' could not be selected as database!
+							<br />
+							Please select another one or create a new database.
+						</p>
+					', 3, 1);
 					$this->config_array['no_database']=1;
 				} else  {
-					$this->message($ext, 'Database',"
-						<strong>".TYPO3_db."</strong> is selected as database.
-					",1,1);
+					$this->message($ext, 'Database', '
+						<p>
+							<strong>' . TYPO3_db . '</strong> is selected as
+							database.
+						</p>
+					', 1, 1);
 				}
 			} else {
-				$this->message($ext, 'Could not connect to SQL database!',"
-				Connecting to SQL database failed with these settings:
-				".trim($cInfo)."
+				$sqlSafeModeUser = '';
 
-				Make sure you're using the correct set of data.".($this->config_array['sql.safe_mode_user']? "
-				<strong>Notice:</strong> <em>sql.safe_mode</em> is turned on, so apparently your username to the database is the same as the scriptowner, which is '".$this->config_array['sql.safe_mode_user']."'":"")."
-				",3);
+				if ($this->config_array['sql.safe_mode_user']) {
+					$sqlSafeModeUser = '
+						<strong>Notice:</strong>
+						<em>sql.safe_mode</em> is turned on, so apparently your
+						username to the database is the same as the scriptowner,
+						which is ' . $this->config_array['sql.safe_mode_user'];
+				}
+				$this->message($ext, 'Could not connect to SQL database!', '
+					<p>
+						Connecting to SQL database failed with these settings:
+						<br />
+						Username: <strong>' . TYPO3_db_username . '</strong>
+						<br />
+						Host: <strong>' . TYPO3_db_host . '</strong>
+					</p>
+					<p>
+						Make sure you\'re using the correct set of data.
+						<br />
+						' . $sqlSafeModeUser . '
+					</p>
+				', 3);
 			}
 		}
 	}
@@ -2100,128 +3243,565 @@
 	/**
 	 * Prints form for updating localconf.php or updates localconf.php depending on $cmd
 	 *
-	 * @param	string		$cmd	If "get_form" it outputs the form. Default is to write "localconf.php" based on input in ->INSTALL[localconf.php] array and flag ->setLocalconf
-	 * @return	[type]		...
+	 * @param string $cmd If "get_form" it outputs the form. Default is to write "localconf.php" based on input in ->INSTALL[localconf.php] array and flag ->setLocalconf
+	 * @return string Form HTML
 	 */
-	function setupGeneral($cmd='')	{
-		switch($cmd)	{
+	function setupGeneral($cmd='') {
+		switch($cmd) {
 			case 'get_form':
-					// Database:
-				$out='
-				<form name="setupGeneral" action="'.$this->action.'" method="post">
-				<table border="0" cellpadding="0" cellspacing="0">';
+					// Get the template file
+				$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'SetupGeneral.html');
+					// Get the template part from the file
+				$form = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+					// Get the subpart for all modes
+				$allModesSubpart = $this->contentObject->getSubpart($form, '###ALLMODES###');
+					// Define the markers content
+				$formMarkers['actionUrl'] = $this->action;
 
-				$out.=$this->wrapInCells('Username:', '<input type="text" name="TYPO3_INSTALL[localconf.php][typo_db_username]" value="'.htmlspecialchars(TYPO3_db_username?TYPO3_db_username:($this->config_array['sql.safe_mode_user']?$this->config_array['sql.safe_mode_user']:"")).'">'.($this->config_array['sql.safe_mode_user']?"<br />sql.safe_mode_user: <strong>".$this->config_array['sql.safe_mode_user']."</strong>":""));
-				$out.=$this->wrapInCells('Password:', '<input type="password" name="TYPO3_INSTALL[localconf.php][typo_db_password]" value="'.htmlspecialchars(TYPO3_db_password).'">');
-				$out.=$this->wrapInCells('Host:', '<input type="text" name="TYPO3_INSTALL[localconf.php][typo_db_host]" value="'.htmlspecialchars(TYPO3_db_host).'">');
-				if ($this->config_array['mysqlConnect'])	{
+					// Username
+				if (TYPO3_db_username) {
+					$username = TYPO3_db_username;
+				} elseif ($this->config_array['sql.safe_mode_user']) {
+					$username = $this->config_array['sql.safe_mode_user'];
+						// Get the subpart for the sql safe mode user
+					$sqlSafeModeUserSubpart = $this->contentObject->getSubpart($allModesSubpart, '###SQLSAFEMODEUSERSUBPART###');
+						// Define the markers content
+					$sqlSafeModeUserMarkers = array(
+						'labelSqlSafeModeUser' => 'sql.safe_mode_user:',
+						'sqlSafeModeUser' => $this->config_array['sql.safe_mode_user']
+					);
+						// Fill the markers in the subpart
+					$sqlSafeModeUserSubpart = $this->contentObject->substituteMarkerArray(
+						$sqlSafeModeUserSubpart,
+						$sqlSafeModeUserMarkers,
+						'###|###',
+						1,
+						1
+					);
+				}
+					// Get the subpart for all modes
+				$allModesSubpart = $this->contentObject->substituteSubpart(
+					$allModesSubpart,
+					'###SQLSAFEMODEUSERSUBPART###',
+					$sqlSafeModeUserSubpart
+				);
+					// Define the markers content
+				$allModesMarkers = array(
+					'labelUsername' => 'Username:',
+					'username' => htmlspecialchars($username),
+					'labelPassword' => 'Password:',
+					'password' => htmlspecialchars(TYPO3_db_password),
+					'labelHost' => 'Host:',
+					'host' => htmlspecialchars(TYPO3_db_host),
+					'labelDatabase' => 'Database:',
+					'labelCreateDatabase' => 'Create database?'
+				);
+					// Get the subpart for the database list
+				$databasesSubpart = $this->contentObject->getSubpart($allModesSubpart, '###DATABASELIST###');
+				if ($this->config_array['mysqlConnect']) {
+						// Get the subpart when database is available
+					$databaseAvailableSubpart = $this->contentObject->getSubpart($databasesSubpart, '###DATABASEAVAILABLE###');
+						// Get the subpart for each database table
+					$databaseItemSubpart = $this->contentObject->getSubpart($databaseAvailableSubpart, '###DATABASEITEM###');
 					$dbArr = $this->getDatabaseList();
-					reset($dbArr);
 					$options='';
 					$dbIncluded=0;
-					while(list(,$dbname)=each($dbArr))	{
-						$options.='<option value="'.htmlspecialchars($dbname).'"'.($dbname==TYPO3_db?' selected="selected"':'').'>'.htmlspecialchars($dbname).'</option>';
+					foreach ($dbArr as $dbname) {
+							// Define the markers content
+						$databaseItemMarkers = array(
+							'databaseSelected' => '',
+							'databaseName' => htmlspecialchars($dbname),
+							'databaseValue' => htmlspecialchars($dbname)
+						);
+						if ($dbname == TYPO3_db) {
+							$databaseItemMarkers['databaseSelected'] = 'selected="selected"';
+						}
+							// Fill the markers in the subpart
+						$databaseItems[]  = $this->contentObject->substituteMarkerArray(
+							$databaseItemSubpart,
+							$databaseItemMarkers,
+							'###|###',
+							1,
+							0
+						);
 						if ($dbname==TYPO3_db)	$dbIncluded=1;
 					}
-					if (!$dbIncluded && TYPO3_db)	{
-						$options.='<option value="'.htmlspecialchars(TYPO3_db).'" selected="selected">'.htmlspecialchars(TYPO3_db).' (NO ACCESS!)</option>';
+					if (!$dbIncluded && TYPO3_db) {
+						$databaseItemMarkers['databaseName'] = htmlspecialchars(TYPO3_db);
+						$databaseItemMarkers['databaseSelected'] = 'selected="selected"';
+						$databaseItemMarkers['databaseValue'] = htmlspecialchars(TYPO3_db) . ' (NO ACCESS!)';
+							// Fill the markers in the subpart
+						$databaseItems[]  = $this->contentObject->substituteMarkerArray(
+							$databaseItemSubpart,
+							$databaseItemMarkers,
+							'###|###',
+							1,
+							0
+						);
 					}
-					$theCode='<select name="TYPO3_INSTALL[localconf.php][typo_db]">'.$options.'</select><br />Create database? (Enter name):<br /><input type="text" name="TYPO3_INSTALL[localconf.php][NEW_DATABASE_NAME]" value="">';
+						// Substitute the subpart for the database tables
+					$databaseAvailableSubpart = $this->contentObject->substituteSubpart(
+						$databaseAvailableSubpart,
+						'###DATABASEITEM###',
+						implode(chr(10), $databaseItems)
+					);
 				} else {
-					$theCode='<strong>'.htmlspecialchars(TYPO3_db).'</strong><br />(Can only select database if username/password/host is correctly set first)<input type="hidden" name="TYPO3_INSTALL[localconf.php][typo_db]" value="'.htmlspecialchars(TYPO3_db).'">';
+						// Get the subpart when the database is not available
+					$databaseNotAvailableSubpart = $this->contentObject->getSubpart($databasesSubpart, '###DATABASENOTAVAILABLE###');
+					$databaseNotAvailableMarkers = array(
+						'typo3Db' => htmlspecialchars(TYPO3_db),
+						'labelNoDatabase' => '
+							(Can only select database if username/password/host
+							is correctly set first)
+						'
+					);
+						// Fill the markers in the subpart
+					$databaseNotAvailableSubpart = $this->contentObject->substituteMarkerArray(
+						$databaseNotAvailableSubpart,
+						$databaseNotAvailableMarkers,
+						'###|###',
+						1,
+						0
+					);
 				}
-				$out.=$this->wrapInCells('', '<br />');
-				$out.=$this->wrapInCells('Database:', $theCode);
-				$out.=$this->wrapInCells('', '<br />');
+					// Substitute the subpart when database is available
+				$databasesSubpart = $this->contentObject->substituteSubpart(
+					$databasesSubpart,
+					'###DATABASEAVAILABLE###',
+					$databaseAvailableSubpart
+				);
+					// Substitute the subpart when database is not available
+				$databasesSubpart = $this->contentObject->substituteSubpart(
+					$databasesSubpart,
+					'###DATABASENOTAVAILABLE###',
+					$databaseNotAvailableSubpart
+				);
+					// Substitute the subpart for the databases
+				$allModesSubpart = $this->contentObject->substituteSubpart(
+					$allModesSubpart,
+					'###DATABASELIST###',
+					$databasesSubpart
+				);
+					// Fill the markers in the subpart for all modes
+				$allModesSubpart = $this->contentObject->substituteMarkerArray(
+					$allModesSubpart,
+					$allModesMarkers,
+					'###|###',
+					1,
+					1
+				);
+					// Substitute the subpart for all modes
+				$form = $this->contentObject->substituteSubpart(
+					$form,
+					'###ALLMODES###',
+					$allModesSubpart
+				);
 
-				if ($this->mode!='123')	{
-					$this->headerStyle .= chr(10) .
-						'<script type="text/javascript" src="' . t3lib_div::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . 'contrib/prototype/prototype.js"></script>
-						 <script type="text/javascript" src="' . t3lib_div::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . 'sysext/install/mod/install.js"></script>';
+				if ($this->mode!='123') {
+					$this->javascript[] = '<script type="text/javascript" src="' .
+						t3lib_div::getIndpEnv('TYPO3_SITE_URL') .
+						TYPO3_mainDir .
+						'contrib/prototype/prototype.js"></script>';
+					$this->javascript[] = '<script type="text/javascript" src="' .
+						t3lib_div::getIndpEnv('TYPO3_SITE_URL') .
+						TYPO3_mainDir .
+						'sysext/install/Resources/Public/Javascript/install.js"></script>';
+						// Get the subpart for the regular mode
+					$regularModeSubpart = $this->contentObject->getSubpart($form, '###REGULARMODE###');
+						// Define the markers content
+					$regularModeMarkers = array(
+						'labelSiteName' => 'Site name:',
+						'siteName' => htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']),
+						'labelEncryptionKey' => 'Encryption key:',
+						'encryptionKey' => htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']),
+						'labelGenerateRandomKey' => 'Generate random key'
+					);
 
-
-					$out.=$this->wrapInCells('Site name:', '<input type="text" name="TYPO3_INSTALL[localconf.php][sitename]" value="'.htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']).'">');
-					$out.=$this->wrapInCells('', '<br />');
-					$out.=$this->wrapInCells('Encryption key:', '<a name="set_encryptionKey"></a><input type="text" name="TYPO3_INSTALL[localconf.php][encryptionKey]" value="'.htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']).'"><br /><input type="button" onclick="EncryptionKey.load(this)" value="Generate random key">');
-					$out.=$this->wrapInCells('', '<br />');
-
 						// Other
 					$fA = $this->setupGeneralCalculate();
+					$regularModeMarkers['labelCurrentValueIs'] = 'current value is';
 
-					if (is_array($fA['disable_exec_function']))	{
-						$out.=$this->wrapInCells('[BE][disable_exec_function]=', $this->getFormElement($fA['disable_exec_function'], $fA['disable_exec_function'], 'TYPO3_INSTALL[localconf.php][disable_exec_function]', $GLOBALS['TYPO3_CONF_VARS']['BE']['disable_exec_function']));
+						// Disable exec function
+					if (is_array($fA['disable_exec_function'])) {
+							// Get the subpart for the disable exec function
+						$disableExecFunctionSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###DISABLEEXECFUNCTIONSUBPART###');
+						$regularModeMarkers['labelDisableExecFunction'] = '[BE][disable_exec_function]=';
+						$regularModeMarkers['strongDisableExecFunction'] = (integer) current($fA['disable_exec_function']);
+						$regularModeMarkers['defaultDisableExecFunction'] = (integer) $GLOBALS['TYPO3_CONF_VARS']['BE']['disable_exec_function'];
+						$regularModeMarkers['disableExecFunction'] = (integer) current($fA['disable_exec_function']);
+							// Fill the markers in the subpart
+						$disableExecFunctionSubpart = $this->contentObject->substituteMarkerArray(
+							$disableExecFunctionSubpart,
+							$regularModeMarkers,
+							'###|###',
+							1,
+							1
+						);
 					}
-					if (is_array($fA['gdlib']))	{
-						$out.=$this->wrapInCells('[GFX][gdlib]=', $this->getFormElement($fA['gdlib'], $fA['gdlib'], 'TYPO3_INSTALL[localconf.php][gdlib]', $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib']));
-						if (is_array($fA['gdlib_png']) && $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'])	{
-							$out.=$this->wrapInCells('[GFX][gdlib_png]=', $this->getFormElement($this->setLabelValueArray($fA['gdlib_png'],2), $fA['gdlib_png'], 'TYPO3_INSTALL[localconf.php][gdlib_png]', $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png']));
+						// Substitute the subpart for the disable exec function
+					$regularModeSubpart = $this->contentObject->substituteSubpart(
+						$regularModeSubpart,
+						'###DISABLEEXECFUNCTIONSUBPART###',
+						$disableExecFunctionSubpart
+					);
+
+						// GDlib
+					if (is_array($fA['gdlib'])) {
+							// Get the subpart for the disable gd lib
+						$gdLibSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###DISABLEGDLIB###');
+						$regularModeMarkers['labelGdLib'] = '[GFX][gdlib]=';
+						$regularModeMarkers['strongGdLib'] = (integer) current($fA['gdlib']);
+						$regularModeMarkers['defaultGdLib'] = (integer) $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'];
+						$regularModeMarkers['gdLib'] = (integer) current($fA['gdlib']);
+							// Fill the markers in the subpart
+						$gdLibSubpart = $this->contentObject->substituteMarkerArray(
+							$gdLibSubpart,
+							$regularModeMarkers,
+							'###|###',
+							1,
+							1
+						);
+					}
+						// Substitute the subpart for the disable gdlib
+					$regularModeSubpart = $this->contentObject->substituteSubpart(
+						$regularModeSubpart,
+						'###DISABLEGDLIB###',
+						$gdLibSubpart
+					);
+
+						// GDlib PNG
+					if (is_array($fA['gdlib_png']) && $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib']) {
+							// Get the subpart for the gdlib png
+						$gdLibPngSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###GDLIBPNGSUBPART###');
+							// Get the subpart for the dropdown options
+						$gdLibPngOptionSubpart = $this->contentObject->getSubpart($gdLibPngSubpart, '###GDLIBPNGOPTION###');
+						$gdLibPngLabels = $this->setLabelValueArray($fA['gdlib_png'], 2);
+						reset($gdLibPngLabels);
+
+						$regularModeMarkers['labelGdLibPng'] = '[GFX][gdlib_png]=';
+						$regularModeMarkers['strongGdLibPng'] = (string) current($gdLibPngLabels);
+						$regularModeMarkers['defaultGdLibPng'] = (integer) $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png'];
+
+						foreach ($gdLibPngLabels as $k => $v) {
+							list($cleanV) = explode('|', $fA['gdlib_png'][$k]);
+							$gdLibPngMarker['value'] = htmlspecialchars($fA['gdlib_png'][$k]);
+							$gdLibPngMarker['data'] = htmlspecialchars($v);
+							if (!strcmp($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png'], $cleanV)) {
+								$gdLibPngMarker['selected'] = 'selected="selected"';
+							}
+								// Fill the markers in the subpart
+							$gdLibPngOptions[] = $this->contentObject->substituteMarkerArray(
+								$gdLibPngOptionSubpart,
+								$gdLibPngMarker,
+								'###|###',
+								1,
+								1
+							);
 						}
+							// Substitute the subpart for the dropdown options
+						$gdLibPngSubpart = $this->contentObject->substituteSubpart(
+							$gdLibPngSubpart,
+							'###GDLIBPNGOPTION###',
+							implode(chr(10), $gdLibPngOptions)
+						);
+							// Fill the markers in the subpart
+						$gdLibPngSubpart = $this->contentObject->substituteMarkerArray(
+							$gdLibPngSubpart,
+							$regularModeMarkers,
+							'###|###',
+							1,
+							1
+						);
 					}
-					if (is_array($fA['im']))	{
-						$out.=$this->wrapInCells('[GFX][im]=', $this->getFormElement($fA['im'], $fA['im'], 'TYPO3_INSTALL[localconf.php][im]', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im']));
-						$out.=$this->wrapInCells('[GFX][im_combine_filename]=', $this->getFormElement($fA['im_combine_filename'], ($fA['im_combine_filename']?$fA['im_combine_filename']:"combine"), 'TYPO3_INSTALL[localconf.php][im_combine_filename]', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_combine_filename']));
-						$out.=$this->wrapInCells('[GFX][im_version_5]=', $this->getFormElement($fA['im_version_5'], ($fA['im_version_5']?$fA['im_version_5']:''), 'TYPO3_INSTALL[localconf.php][im_version_5]', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5']));
-						if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im'])	{
-							if (is_array($fA['im_path']))	{
-								$out.=$this->wrapInCells('[GFX][im_path]=', $this->getFormElement($this->setLabelValueArray($fA['im_path'],1), $this->setLabelValueArray($fA['im_path'],0), 'TYPO3_INSTALL[localconf.php][im_path]', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path']));
+						// Substitute the subpart for the gdlib png
+					$regularModeSubpart = $this->contentObject->substituteSubpart(
+						$regularModeSubpart,
+						'###GDLIBPNGSUBPART###',
+						$gdLibPngSubpart
+					);
+
+						// ImageMagick
+					if (is_array($fA['im'])) {
+							// Get the subpart for ImageMagick
+						$imageMagickSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###IMAGEMAGICKSUBPART###');
+							// Define the markers content
+						$regularModeMarkers['labelImageMagick'] = '[GFX][im]=';
+						$regularModeMarkers['strongImageMagick'] = (string) current($fA['im']);
+						$regularModeMarkers['defaultImageMagick'] = (integer) $GLOBALS['TYPO3_CONF_VARS']['GFX']['im'];
+						$regularModeMarkers['imageMagick'] = (integer) current($fA['im']);
+							// Fill the markers in the subpart
+						$imageMagickSubpart = $this->contentObject->substituteMarkerArray(
+							$imageMagickSubpart,
+							$regularModeMarkers,
+							'###|###',
+							1,
+							1
+						);
+
+							// IM Combine Filename
+							// Get the subpart for ImageMagick Combine filename
+						$imCombineFileNameSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###IMCOMBINEFILENAMESUBPART###');
+							// Define the markers content
+						$regularModeMarkers['labelImCombineFilename'] = '[GFX][im_combine_filename]';
+						$regularModeMarkers['strongImCombineFilename'] = (string) current($fA['im_combine_filename']);
+						$regularModeMarkers['defaultImCombineFilename'] = (string) $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_combine_filename'];
+						$regularModeMarkers['imCombineFilename'] = (string) ($fA['im_combine_filename'] ? current($fA['im_combine_filename']) : 'combine');
+							// Fill the markers in the subpart
+						$imCombineFileNameSubpart = $this->contentObject->substituteMarkerArray(
+							$imCombineFileNameSubpart,
+							$regularModeMarkers,
+							'###|###',
+							1,
+							1
+						);
+
+							// IM Version 5
+							// Get the subpart for ImageMagick Version 5
+						$imVersion5Subpart = $this->contentObject->getSubpart($regularModeSubpart, '###IMVERSION5SUBPART###');
+							// Define the markers content
+						$regularModeMarkers['labelImVersion5'] = '[GFX][im_version_5]=';
+						$regularModeMarkers['strongImVersion5'] = (string) current($fA['im_version_5']);
+						$regularModeMarkers['defaultImVersion5'] = (string) $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'];
+						$regularModeMarkers['imVersion5'] = (string) ($fA['im_version_5'] ? current($fA['im_version_5']) : '');
+							// Fill the markers in the subpart
+						$imVersion5Subpart = $this->contentObject->substituteMarkerArray(
+							$imVersion5Subpart,
+							$regularModeMarkers,
+							'###|###',
+							1,
+							1
+						);
+
+						if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im']) {
+								// IM Path
+							if (is_array($fA['im_path'])) {
+									// Get the subpart for ImageMagick path
+								$imPathSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###IMPATHSUBPART###');
+
+								$labelImPath = $this->setLabelValueArray($fA['im_path'], 1);
+								reset($labelImPath);
+								$imPath = $this->setLabelValueArray($fA['im_path'], 0);
+								reset($imPath);
+									// Define the markers content
+								$regularModeMarkers['labelImPath'] = '[GFX][im_path]=';
+								$regularModeMarkers['strongImPath'] = (string) current($labelImPath);
+								$regularModeMarkers['defaultImPath'] = (string) $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path'];
+								$regularModeMarkers['ImPath'] = (string) current($imPath);
+									// Fill the markers in the subpart
+								$imPathSubpart = $this->contentObject->substituteMarkerArray(
+									$imPathSubpart,
+									$regularModeMarkers,
+									'###|###',
+									1,
+									1
+								);
 							}
-							if (is_array($fA['im_path_lzw']))	{
-								$out.=$this->wrapInCells('[GFX][im_path_lzw]=', $this->getFormElement($this->setLabelValueArray($fA['im_path_lzw'],1), $this->setLabelValueArray($fA['im_path_lzw'],0), 'TYPO3_INSTALL[localconf.php][im_path_lzw]', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw']));
+								// IM Path LZW
+							if (is_array($fA['im_path_lzw'])) {
+									// Get the subpart for ImageMagick lzw path
+								$imPathLzwSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###IMPATHLZWSUBPART###');
+									// Get the subpart for ImageMagick lzw path dropdown options
+								$imPathOptionSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###IMPATHLZWOPTION###');
+
+								$labelImPathLzw = $this->setLabelValueArray($fA['im_path_lzw'], 1);
+								reset($labelImPathLzw);
+								$imPathLzw = $this->setLabelValueArray($fA['im_path_lzw'], 0);
+								reset($imPathLzw);
+									// Define the markers content
+								$regularModeMarkers['labelImPathLzw'] = '[GFX][im_path_lzw]=';
+								$regularModeMarkers['strongImPathLzw'] = (string) current($labelImPathLzw);
+								$regularModeMarkers['defaultImPathLzw'] = (string) $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw'];
+								$regularModeMarkers['ImPathLzw'] = (string) current($imPathLzw);
+
+								foreach ($labelImPathLzw as $k => $v) {
+									list($cleanV) = explode('|', $fA['im_path_lzw'][$k]);
+										// Define the markers content
+									$imPathLzwMarker = array(
+										'value' => htmlspecialchars($fA['im_path_lzw'][$k]),
+										'data' => htmlspecialchars($v)
+									);
+									if (!strcmp($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw'], $cleanV)) {
+										$imPathLzwMarker['selected'] = 'selected="selected"';
+									}
+										// Fill the markers in the subpart
+									$imPathLzwOptions[] = $this->contentObject->substituteMarkerArray(
+										$imPathOptionSubpart,
+										$imPathLzwMarker,
+										'###|###',
+										1,
+										1
+									);
+								}
+									// Substitute the subpart for ImageMagick lzw path dropdown options
+								$imPathLzwSubpart = $this->contentObject->substituteSubpart(
+									$imPathLzwSubpart,
+									'###IMPATHLZWOPTION###',
+									implode(chr(10), $imPathLzwOptions)
+								);
+									// Fill the markers in the subpart
+								$imPathLzwSubpart = $this->contentObject->substituteMarkerArray(
+									$imPathLzwSubpart,
+									$regularModeMarkers,
+									'###|###',
+									1,
+									1
+								);
 							}
 						}
 					}
-					$out.=$this->wrapInCells('[GFX][TTFdpi]=', '<input type="text" name="TYPO3_INSTALL[localconf.php][TTFdpi]" value="'.htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['GFX']['TTFdpi']).'">');
+						// Substitute the subpart for ImageMagick
+					$regularModeSubpart = $this->contentObject->substituteSubpart(
+						$regularModeSubpart,
+						'###IMAGEMAGICKSUBPART###',
+						$imageMagickSubpart
+					);
+						// Substitute the subpart for ImageMagick Combine filename
+					$regularModeSubpart = $this->contentObject->substituteSubpart(
+						$regularModeSubpart,
+						'###IMCOMBINEFILENAMESUBPART###',
+						$imCombineFileNameSubpart
+					);
+						// Substitute the subpart for ImageMagick Version 5
+					$regularModeSubpart = $this->contentObject->substituteSubpart(
+						$regularModeSubpart,
+						'###IMVERSION5SUBPART###',
+						$imVersion5Subpart
+					);
+						// Substitute the subpart for ImageMagick path
+					$regularModeSubpart = $this->contentObject->substituteSubpart(
+						$regularModeSubpart,
+						'###IMPATHSUBPART###',
+						$imPathSubpart
+					);
+						// Substitute the subpart for ImageMagick lzw path
+					$regularModeSubpart = $this->contentObject->substituteSubpart(
+						$regularModeSubpart,
+						'###IMPATHLZWSUBPART###',
+						$imPathLzwSubpart
+					);
+
+						// TrueType Font dpi
+						// Get the subpart for TrueType dpi
+					$ttfDpiSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###TTFDPISUBPART###');
+						// Define the markers content
+					$regularModeMarkers['labelTtfDpi'] = '[GFX][TTFdpi]=';
+					$regularModeMarkers['ttfDpi'] = htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['GFX']['TTFdpi']);
+						// Fill the markers in the subpart
+					$ttfDpiSubpart = $this->contentObject->substituteMarkerArray(
+						$ttfDpiSubpart,
+						$regularModeMarkers,
+						'###|###',
+						1,
+						1
+					);
+						// Substitute the subpart for TrueType dpi
+					$regularModeSubpart = $this->contentObject->substituteSubpart(
+						$regularModeSubpart,
+						'###TTFDPISUBPART###',
+						$ttfDpiSubpart
+					);
+						// Fill the markers in the regular mode subpart
+					$regularModeSubpart = $this->contentObject->substituteMarkerArray(
+						$regularModeSubpart,
+						$regularModeMarkers,
+						'###|###',
+						1,
+						1
+					);
 				}
 
-
-				$out.=$this->wrapInCells('', '<br /><input type="submit" value="Update localconf.php"><br />
-				<strong>NOTICE: </strong>By clicking this button, localconf.php is updated with new values for the parameters listed above!');
-				$out.='
-				</table>
-				</form>';
+				$formMarkers['labelUpdateLocalConf'] = 'Update localconf.php';
+				$formMarkers['labelNotice'] = 'NOTICE:';
+				$formMarkers['labelCommentUpdateLocalConf'] = 'By clicking this button, localconf.php is updated with new values for the parameters listed above!';
+					// Substitute the subpart for regular mode
+				$form = $this->contentObject->substituteSubpart(
+					$form,
+					'###REGULARMODE###',
+					$regularModeSubpart
+				);
+					// Fill the markers
+				$out = $this->contentObject->substituteMarkerArray(
+					$form,
+					$formMarkers,
+					'###|###',
+					1,
+					1
+				);
 			break;
 			default:
-				if (is_array($this->INSTALL['localconf.php']))		{
-					$errorMessages=array();
+				if (is_array($this->INSTALL['localconf.php'])) {
 					$lines = $this->writeToLocalconf_control();
 
 						// New database?
-#debug($this->INSTALL);
-					if (trim($this->INSTALL['localconf.php']['NEW_DATABASE_NAME']))	{
+					if (trim($this->INSTALL['localconf.php']['NEW_DATABASE_NAME'])) {
 						$newdbname=trim($this->INSTALL['localconf.php']['NEW_DATABASE_NAME']);
-						if (!preg_match('/[^[:alnum:]_-]/',$newdbname))	{
-							if ($result = $GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password))	{
+						if (!preg_match('/[^[:alnum:]_-]/',$newdbname)) {
+							if ($result = $GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password)) {
 								if ($GLOBALS['TYPO3_DB']->admin_query('CREATE DATABASE '.$newdbname)) {
 									$this->INSTALL['localconf.php']['typo_db'] = $newdbname;
 									$this->messages[]= "Database '".$newdbname."' created";
-								} else $this->messages[]= $errorMessages[] = "Could not create database '".$newdbname."' (...not created)";
-							} else $this->messages[]= $errorMessages[] = "Could not connect to database when creating database '".$newdbname."' (...not created)";
-						} else $this->messages[]= $errorMessages[] = "The NEW database name '".$newdbname."' was not alphanumeric, a-zA-Z0-9_- (...not created)";
+								} else {
+									$this->errorMessages[] = '
+										Could not create database \'' .
+										$newdbname . '\' (...not created)
+									';
+								}
+							} else {
+								$this->errorMessages[] = '
+									Could not connect to database when creating
+									database \'' . $newdbname . '\' (...not
+									created)
+								';
+							}
+						} else {
+							$this->errorMessages[] = '
+								The NEW database name \'' . $newdbname . '\' was
+								not alphanumeric, a-zA-Z0-9_- (...not created)
+							';
+						}
 					}
-#debug($this->messages)		;
 						// Parsing values
-					reset($this->INSTALL['localconf.php']);
-					while(list($key,$value)=each($this->INSTALL['localconf.php']))		{
-						switch((string)$key)	{
+					foreach ($this->INSTALL['localconf.php'] as $key => $value) {
+						switch((string)$key) {
 							case 'typo_db_username':
-								if (strlen($value)<50)	{
+								if (strlen($value)<50) {
 									if (strcmp(TYPO3_db_username,$value))		$this->setValueInLocalconfFile($lines, '$typo_db_username', trim($value));
-								} else $this->messages[]= $errorMessages[] = "Username '".$value."' was longer than 50 chars (...not saved)";
+								} else {
+									$this->errorMessages[] = '
+										Username \'' . $value . '\' was longer
+										than 50 chars (...not saved)
+									';
+								}
 							break;
 							case 'typo_db_password':
-								if (strlen($value)<50)	{
+								if (strlen($value)<50) {
 									if (strcmp(TYPO3_db_password,$value))		$this->setValueInLocalconfFile($lines, '$typo_db_password',  trim($value));
-								} else $this->messages[]= $errorMessages[] = "Password was longer than 50 chars (...not saved)";
+								} else {
+									$this->errorMessages[] = '
+										Password was longer than 50 chars (...not saved)
+									';
+								}
 							break;
 							case 'typo_db_host':
-								if (preg_match('/^[a-zA-Z0-9_\.-]+(:.+)?$/',$value) && strlen($value)<50)	{
+								if (preg_match('/^[a-zA-Z0-9_\.-]+(:.+)?$/',$value) && strlen($value)<50) {
 									if (strcmp(TYPO3_db_host,$value))		$this->setValueInLocalconfFile($lines, '$typo_db_host', $value);
-								} else $this->messages[]= $errorMessages[] = "Host '".$value."' was not alphanumeric (a-z, A-Z, 0-9 or _-.), or longer than 50 chars (...not saved)";
+								} else {
+									$this->errorMessages[] = '
+										Host \'' . $value . '\' was not
+										alphanumeric (a-z, A-Z, 0-9 or _-.), or
+										longer than 50 chars (...not saved)
+									';
+								}
 							break;
 							case 'typo_db':
-								if (strlen($value)<50)	{
+								if (strlen($value)<50) {
 									if (strcmp(TYPO3_db,$value))		$this->setValueInLocalconfFile($lines, '$typo_db',  trim($value));
-								} else $this->messages[]= $errorMessages[] = "Database name '".$value."' was longer than 50 chars (...not saved)";
+								} else {
+									$this->errorMessages[] = '
+										Database name \'' . $value . '\' was
+										longer than 50 chars (...not saved)
+									';
+								}
 							break;
 							case 'disable_exec_function':
 								if (strcmp($GLOBALS['TYPO3_CONF_VARS']['BE']['disable_exec_function'],$value))	$this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'BE\'][\'disable_exec_function\']', $value?1:0);
@@ -2247,32 +3827,44 @@
 							break;
 							case 'im_path':
 								list($value,$version) = explode('|',$value);
-								if (!preg_match('/[[:space:]]/',$value,$reg) && strlen($value)<100)	{
+								if (!preg_match('/[[:space:]]/',$value,$reg) && strlen($value)<100) {
 									if (strcmp($GLOBALS['TYPO3_CONF_VARS']['GFX'][$key], $value)) {
 										$this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'GFX\'][\'' . $key . '\']', $value);
 									}
-									if(doubleval($version)>0 && doubleval($version)<4)	{	// Assume GraphicsMagick
+									if(doubleval($version)>0 && doubleval($version)<4) {	// Assume GraphicsMagick
 										$value_ext = 'gm';
-									} elseif(doubleval($version)<5)	{	// Assume ImageMagick 4.x
+									} elseif(doubleval($version)<5) {	// Assume ImageMagick 4.x
 										$value_ext = '';
 									} elseif(doubleval($version) >= 6) {	// Assume ImageMagick 6.x
 										$value_ext = 'im6';
 									} else	{	// Assume ImageMagick 5.x
 										$value_ext = 'im5';
 									}
-									if (strcmp(strtolower($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5']),$value_ext))	{
+									if (strcmp(strtolower($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5']),$value_ext)) {
 										$this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'GFX\'][\'im_version_5\']', $value_ext);
 									}
 	// 								if (strcmp(strtolower($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5']),$value))	$this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS['GFX']['im_version_5']', $value);
-								} else $this->messages[]= $errorMessages[] = "Path '".$value."' contains spaces or is longer than 100 chars (...not saved)";
+								} else {
+									$this->errorMessages[] = '
+										Path \'' . $value . '\' contains spaces
+										or is longer than 100 chars (...not
+										saved)
+									';
+								}
 							break;
 							case 'im_path_lzw':
 								list($value) = explode('|',$value);
-								if (!preg_match('/[[:space:]]/',$value) && strlen($value)<100)	{
+								if (!preg_match('/[[:space:]]/',$value) && strlen($value)<100) {
 									if (strcmp($GLOBALS['TYPO3_CONF_VARS']['GFX'][$key], $value)) {
 										$this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'GFX\'][\'' . $key . '\']', $value);
 									}
-								} else $this->messages[]= $errorMessages[] = "Path '".$value."' contains spaces or is longer than 100 chars (...not saved)";
+								} else {
+									$this->errorMessages[] = '
+										Path \'' . $value . '\' contains spaces
+										or is longer than 100 chars (...not
+										saved)
+									';
+								}
 							break;
 							case 'TTFdpi':
 								if (strcmp($GLOBALS['TYPO3_CONF_VARS']['GFX']['TTFdpi'],$value))	$this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'GFX\'][\'TTFdpi\']', $value);
@@ -2282,12 +3874,6 @@
 
 					}
 
-					if (count($errorMessages))	{
-						echo '<h3>ERRORS</h3>';
-						echo t3lib_div::view_array($errorMessages);
-						echo 'Click the browsers "Back" button to reenter the values.';
-						exit;
-					}
 					$this->writeToLocalconf_control($lines);
 				}
 			break;
@@ -2298,23 +3884,80 @@
 	/**
 	 * Writes or returns lines from localconf.php
 	 *
-	 * @param	array		Array of lines to write back to localconf.php. Possibly
-	 * @param	boolean		If TRUE then print what has been done.
-	 * @return	mixed		If $lines is not an array it will return an array with the lines from localconf.php. Otherwise it will return a status string, either "continue" (updated) or "nochange" (not updated)
+	 * @param array $lines Array of lines to write back to localconf.php. Possibly
+	 * @param boolean $showOutput If TRUE then print what has been done.
+	 * @return mixed If $lines is not an array it will return an array with the lines from localconf.php. Otherwise it will return a status string, either "continue" (updated) or "nochange" (not updated)
 	 * @see parent::writeToLocalconf_control()
 	 */
-	function writeToLocalconf_control($lines='', $showOutput=TRUE)	{
+	function writeToLocalconf_control($lines='', $showOutput=TRUE) {
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'WriteToLocalConfControl.html');
+
 		$returnVal = parent::writeToLocalconf_control($lines);
 
-		if ($showOutput)	{
-			switch($returnVal)	{
+		if ($showOutput) {
+			switch($returnVal) {
 				case 'continue':
-					$content = '<br /><br />'.implode($this->messages,'<hr />').'<br /><br /><a href="'.$this->action.'">Click to continue...</a>';
+						// Get the template part from the file
+					$template = $this->contentObject->getSubpart($templateFile, '###CONTINUE###');
+						// Get the subpart for messages
+					$messagesSubPart = $this->contentObject->getSubpart($template, '###MESSAGES###');
+
+					$messages = array();
+
+					foreach ($this->messages as $message) {
+							// Define the markers content
+						$messagesMarkers['message'] = $message;
+							// Fill the markers in the subpart
+						$messages[] = $this->contentObject->substituteMarkerArray(
+							$messagesSubPart,
+							$messagesMarkers,
+							'###|###',
+							1,
+							1
+						);
+					}
+						// Substitute the subpart for messages
+					$content = $this->contentObject->substituteSubpart(
+						$template,
+						'###MESSAGES###',
+						implode(chr(10), $messages)
+					);
+						// Define the markers content
+					$markers = array(
+						'header' => 'Writing to \'localconf.php\'',
+						'action' => $this->action,
+						'label' => 'Click to continue...'
+					);
+						// Fill the markers
+					$content = $this->contentObject->substituteMarkerArray(
+						$content,
+						$markers,
+						'###|###',
+						1,
+						1
+					);
 					$this->outputExitBasedOnStep($content);
 				break;
 				case 'nochange':
-					$content = '<strong>Writing to \'localconf.php\':</strong><br /><br />No values were changed, so nothing is updated!<br /><br /><a href="'.$this->action.'">Click to continue...</a>';
-					$this->outputExitBasedOnStep('<br />'.$content);
+						// Get the template part from the file
+					$template = $this->contentObject->getSubpart($templateFile, '###NOCHANGE###');
+						// Define the markers content
+					$markers = array(
+						'header' => 'Writing to \'localconf.php\'',
+						'message' => 'No values were changed, so nothing is updated!',
+						'action' => $this->action,
+						'label' => 'Click to continue...'
+					);
+						// Fill the markers
+					$content = $this->contentObject->substituteMarkerArray(
+						$template,
+						$markers,
+						'###|###',
+						1,
+						1
+					);
+					$this->outputExitBasedOnStep($content);
 				break;
 			}
 		}
@@ -2322,12 +3965,13 @@
 	}
 
 	/**
-	 * [Describe function...]
+	 * If in 1-2-3 mode, send a redirect header response with the action and exit
+	 * otherwise send output to output() function
 	 *
-	 * @param	[type]		$content: ...
-	 * @return	[type]		...
+	 * @param string $content The HTML to output
+	 * @return void
 	 */
-	function outputExitBasedOnStep($content)	{
+	function outputExitBasedOnStep($content) {
 		if ($this->step) {
 			t3lib_utility_Http::redirect($this->action);
 		} else {
@@ -2339,25 +3983,26 @@
 	/**
 	 * This appends something to value in the input array based on $type. Private.
 	 *
-	 * @param	[type]		$arr: ...
-	 * @param	[type]		$type: ...
-	 * @return	[type]		...
+	 * @param array $arr
+	 * @param integer $type
+	 * @return array
 	 */
-	function setLabelValueArray($arr,$type)	{
-		reset($arr);
-		while(list($k,$v)=each($arr))	{
-			if($this->config_array['im_versions'][$v]['gm'])	{
+	function setLabelValueArray($arr,$type) {
+		foreach ($arr as $k => $v) {
+			if($this->config_array['im_versions'][$v]['gm']) {
 				$program = 'gm';
 			} else	{
 				$program = 'convert';
 			}
 
-			switch($type)	{
-				case 0:	// value, im
+			switch($type) {
+					// value, im
+				case 0:
 					$arr[$k].='|'.$this->config_array['im_versions'][$v][$program];
 				break;
-				case 1:	// labels, im
-					if($this->config_array['im_versions'][$v][$program])	{
+					// labels, im
+				case 1:
+					if($this->config_array['im_versions'][$v][$program]) {
 						$arr[$k].= ' ('.$this->config_array['im_versions'][$v][$program];
 						$arr[$k].= ($this->config_array['im_versions'][$v]['gif_capability'] ? ', '.$this->config_array['im_versions'][$v]['gif_capability'] : '');
 						$arr[$k].= ')';
@@ -2365,7 +4010,8 @@
 						$arr[$k].= '';
 					}
 				break;
-				case 2: // labels, gd
+					// labels, gd
+				case 2:
 					$arr[$k].=' ('.($v==1?'PNG':'GIF').')';
 				break;
 			}
@@ -2374,38 +4020,13 @@
 	}
 
 	/**
-	 * Returns a form-element for the localconf.php update form
-	 *
-	 * @param	[type]		$labels: ...
-	 * @param	[type]		$values: ...
-	 * @param	[type]		$fieldName: ...
-	 * @param	[type]		$default: ...
-	 * @param	[type]		$msg: ...
-	 * @return	[type]		...
-	 */
-	function getFormElement($labels,$values,$fieldName,$default,$msg='')	{
-		$out.='<strong>'.htmlspecialchars(current($labels)).'</strong><br />current value is '.htmlspecialchars($default).($msg?'<br />'.$msg:'');
-		if (count($labels)>1)		{
-			reset($labels);
-			while(list($k,$v)=each($labels))	{
-				list($cleanV) =explode('|',$values[$k]);
-				$options.='<option value="'.htmlspecialchars($values[$k]).'"'.(!strcmp($default,$cleanV)?' selected="selected"':'').'>'.htmlspecialchars($v).'</option>';
-			}
-			$out.='<br /><select name="'.$fieldName.'">'.$options.'</select>';
-		} else {
-			$out.='<input type="hidden" name="'.$fieldName.'" value="'.htmlspecialchars(current($values)).'">';
-		}
-		return $out.'<br />';
-	}
-
-	/**
 	 * Returns the list of available databases (with access-check based on username/password)
 	 *
-	 * @return	[type]		...
+	 * @return array List of available databases
 	 */
-	function getDatabaseList()	{
-		$dbArr=array();
-		if ($result = $GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password))	{
+	function getDatabaseList() {
+		$dbArr = array();
+		if ($result = $GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password)) {
 			$dbArr = $GLOBALS['TYPO3_DB']->admin_get_dbs();
 		}
 		return $dbArr;
@@ -2425,9 +4046,9 @@
 	 * 	- im_path (default to 4.2.9, preferable with LZW)		im_ver5-flag is set based on im_path being 4.2.9 or 5+
 	 * 	- im_path_lzw (default to LZW version, pref. 4.2.9)
 	 *
-	 * @return	[type]		...
+	 * @return array Suggested setup
 	 */
-	function setupGeneralCalculate()	{
+	function setupGeneralCalculate() {
 		$formArray['disable_exec_function']=array(0);
 		$formArray['im_path']=array('');
 		$formArray['im_path_lzw']=array('');
@@ -2435,10 +4056,10 @@
 		$formArray['im_version_5']=array('');
 		$formArray['im']=array(1);
 		$formArray['gdlib']=array(1);
-		if ($this->config_array['gd'] && ($this->config_array['gd_gif'] || $this->config_array['gd_png']))	{
-			if ($this->config_array['gd_gif'] && !$this->config_array['gd_png'])	{
+		if ($this->config_array['gd'] && ($this->config_array['gd_gif'] || $this->config_array['gd_png'])) {
+			if ($this->config_array['gd_gif'] && !$this->config_array['gd_png']) {
 				$formArray['gdlib_png']=array(0);
-			} elseif (!$this->config_array['gd_gif'] && $this->config_array['gd_png'])	{
+			} elseif (!$this->config_array['gd_gif'] && $this->config_array['gd_png']) {
 				$formArray['gdlib_png']=array(1);
 			} else {
 				$formArray['gdlib_png']=array(0,1);
@@ -2446,23 +4067,21 @@
 		} else {
 			$formArray['gdlib']=array(0);
 		}
-		if ($this->config_array['safemode'])	{
+		if ($this->config_array['safemode']) {
 			$formArray['disable_exec_function']=array(1);
 		}
-		if ($this->config_array['im'])	{
-			$formArray['im']=array(1);
-			$LZW_found=0;
-			$found=0;
-			reset($this->config_array['im_versions']);
-			$totalArr=array();
-			while(list($path,$dat)=each($this->config_array['im_versions']))	{
-				if (count($dat)>=3)	{
-					if (doubleval($dat['convert'])<5)	{
+		if ($this->config_array['im']) {
+			$formArray['im'] = array(1);
+			$found = $LZW_found = 0;
+			$totalArr = array();
+			foreach ($this->config_array['im_versions'] as $path => $dat) {
+				if (count($dat)>=3) {
+					if (doubleval($dat['convert'])<5) {
 						$formArray['im_version_5']=array(0);
-						if ($dat['gif_capability']=='LZW')	{
+						if ($dat['gif_capability']=='LZW') {
 							$formArray['im_path']=array($path);
 							$found=2;
-						} elseif ($found<2)	{
+						} elseif ($found<2) {
 							$formArray['im_path']=array($path);
 							$found=1;
 						}
@@ -2471,7 +4090,7 @@
 						if ($dat['gif_capability'] == 'LZW') {
 							$formArray['im_path'] = array($path);
 							$found = 2;
-						} elseif ($found < 2)	{
+						} elseif ($found < 2) {
 							$formArray['im_path'] = array($path);
 							$found = 1;
 						}
@@ -2480,22 +4099,22 @@
 						$formArray['im_path']=array($path);
 						$found=1;
 					}
-				} elseif ($dat['gm'])	{
+				} elseif ($dat['gm']) {
 					$formArray['im_version_5']=array('gm');
-					if ($dat['gif_capability']=='LZW')	{
+					if ($dat['gif_capability']=='LZW') {
 						$formArray['im_path']=array($path);
 						$found=2;
-					} elseif ($found<2)	{
+					} elseif ($found<2) {
 						$formArray['im_path']=array($path);
 						$found=1;
 					}
 				}
-				if ($dat['gif_capability']=='LZW')	{
-					if (doubleval($dat['convert'])<5 || !$LZW_found)	{
+				if ($dat['gif_capability']=='LZW') {
+					if (doubleval($dat['convert'])<5 || !$LZW_found) {
 						$formArray['im_path_lzw']=array($path);
 						$LZW_found=1;
 					}
-				} elseif ($dat['gif_capability']=="RLE" && !$LZW_found)	{
+				} elseif ($dat['gif_capability']=="RLE" && !$LZW_found) {
 					$formArray['im_path_lzw']=array($path);
 				}
 				$totalArr[]=$path;
@@ -2512,9 +4131,9 @@
 	/**
 	 * Returns the part of phpinfo() output that tells about GD library (HTML-code)
 	 *
-	 * @return	[type]		...
+	 * @return string HTML GD Library part
 	 */
-	function getGDPartOfPhpinfo()	{
+	function getGDPartOfPhpinfo() {
 		ob_start();
 		phpinfo();
 		$contents = ob_get_contents();
@@ -2528,36 +4147,40 @@
 	}
 
 	/**
-	 * Returns true if TTF lib is install according to phpinfo(). If $phpinfo supply as parameter that string is searched instead.
+	 * Returns true if TTF lib is install according to phpinfo().
+	 * If $phpinfo supply as parameter that string is searched instead.
 	 *
-	 * @param	[type]		$phpinfo: ...
-	 * @return	[type]		...
+	 * @param string $phpinfo PHPinfo HTML
+	 * @return boolean TRUE if TrueType support
 	 */
-	function isTTF($phpinfo='')	{
+	function isTTF($phpinfo='') {
 /*		$phpinfo = $phpinfo?$phpinfo:$this->getGDPartOfPhpinfo();
 		if (stristr($phpinfo, $this->getTTF_string))    return 1;
 		if (stristr($phpinfo, $this->getTTF_string_alt))        return 1;
 		*/
 
-		if (!function_exists('imagettftext'))	return 0;	// Return right away if imageTTFtext does not exist.
+		// Return right away if imageTTFtext does not exist.
+		if (!function_exists('imagettftext')) {
+			return 0;
+		}
 
 			// try, print truetype font:
-		$im = @imagecreate (300, 50);
-		$background_color = imagecolorallocate ($im, 255, 255, 55);
-		$text_color = imagecolorallocate ($im, 233, 14, 91);
+		$im = @imagecreate(300, 50);
+		$background_color = imagecolorallocate($im, 255, 255, 55);
+		$text_color = imagecolorallocate($im, 233, 14, 91);
 
 		$test = @imagettftext($im, t3lib_div::freetypeDpiComp(20), 0, 10, 20, $text_color, PATH_t3lib."/fonts/vera.ttf", 'Testing Truetype support');
-		if (t3lib_div::_GP('testingTrueTypeSupport'))	{
-			if ($this->isGIF())	{
-				header ('Content-type: image/gif');
-				imagegif ($im);
+		if (t3lib_div::_GP('testingTrueTypeSupport')) {
+			if ($this->isGIF()) {
+				header('Content-type: image/gif');
+				imagegif($im);
 			} else {
-				header ('Content-type: image/png');
-				imagepng ($im);
+				header('Content-type: image/png');
+				imagepng($im);
 			}
 			exit;
 		}
-		return is_array($test)?1:0;
+		return (is_array($test) ? 1 : 0);
 	}
 
 
@@ -2580,83 +4203,106 @@
 	 */
 
 	/**
-	 * @return	[type]		...
+	 * Check if GD module is available by checking the function imagecreate
+	 *
+	 * @return boolean TRUE if GD is available
 	 */
-	function isGD()	{
-		if (function_exists('imagecreate'))	{
-			if (@imagecreate (50, 100))	return 1;
+	function isGD() {
+		if (function_exists('imagecreate')) {
+			if (@imagecreate(50, 100)) {
+				return 1;
+			}
 		}
+		return 0;
 	}
 
 	/**
-	 * [Describe function...]
+	 * Check if GIF functions are available
 	 *
-	 * @return	[type]		...
+	 * @return boolean TRUE if GIF functions are available
 	 */
-	function isGIF()	{
-		if (function_exists('imagecreatefromgif') && function_exists('imagegif') && ($this->ImageTypes() & IMG_GIF))	{	// If GIF-functions exists, also do a real test of them:
+	function isGIF() {
+			// If GIF-functions exists, also do a real test of them:
+		if (function_exists('imagecreatefromgif') && function_exists('imagegif') && ($this->ImageTypes() & IMG_GIF)) {
 			$im = @imagecreatefromgif(t3lib_extMgm::extPath('install').'imgs/jesus.gif');
-			return $im?1:0;
+			return ($im ? 1 : 0);
 		}
 	}
 
 	/**
-	 * [Describe function...]
+	 * Check if JPG functions are available
 	 *
-	 * @return	[type]		...
+	 * @return boolean TRUE if JPEG functions are available
 	 */
-	function isJPG()	{
-		if (function_exists('imagecreatefromjpeg') && function_exists('imagejpeg') && ($this->ImageTypes() & IMG_JPG))	{
+	function isJPG() {
+		if (function_exists('imagecreatefromjpeg') && function_exists('imagejpeg') && ($this->ImageTypes() & IMG_JPG)) {
 			return 1;
 		}
 	}
 
 	/**
-	 * [Describe function...]
+	 * Check if PNG functions are available
 	 *
-	 * @return	[type]		...
+	 * @return boolean TRUE if PNG functions are available
 	 */
-	function isPNG()	{
-		if (function_exists('imagecreatefrompng') && function_exists('imagepng') && ($this->ImageTypes() & IMG_PNG))	{
+	function isPNG() {
+		if (function_exists('imagecreatefrompng') && function_exists('imagepng') && ($this->ImageTypes() & IMG_PNG)) {
 			$im = imagecreatefrompng(t3lib_extMgm::extPath('install').'imgs/jesus.png');
-			return $im?1:0;
+			return ($im ? 1 : 0);
 		}
 	}
 
 	/**
-	 * [Describe function...]
+	 * Return the image types supported by this PHP build
 	 *
-	 * @return	[type]		...
+	 * @return integer A bit-field corresponding to the image formats supported by the version of GD linked into PHP. The following bits are returned, IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP | IMG_XPM.
 	 */
-	function ImageTypes()	{
+	function ImageTypes() {
 		return imagetypes();
 	}
 
 	/**
 	 * Returns general information about GDlib
 	 *
-	 * @return	[type]		...
+	 * @return string HTML with GD lib information
 	 */
-	function getGDSoftwareInfo()	{
-		return trim('
-		You can get GDLib in the PNG version from ' . $this->linkIt('http://www.libgd.org/') . 
-		'. <br />FreeType is for download at ' . $this->linkIt('http://www.freetype.org/') . 
-		'. <br />Generally, TYPO3 packages are listed at ' . $this->linkIt('http://typo3.org/download/packages/') . '.'
-		);
+	function getGDSoftwareInfo() {
+		return '
+			<p>
+				You can get GDLib in the PNG version from
+				<a href="http://www.libgd.org/">http://www.libgd.org/</a>
+				<br />
+				FreeType is for download at
+				<a href="http://www.freetype.org/">http://www.freetype.org/</a>
+				<br />
+				Generally, TYPO3 packages are listed at
+				<a href="http://typo3.org/download/packages/">http://typo3.org/download/packages/</a>
+			</p>
+		';
 	}
 
 	/**
 	 * Returns general information about configuration of TYPO3.
 	 *
-	 * @return	[type]		...
+	 * @return string HTML with the general information
 	 */
-	function generallyAboutConfiguration()	{
-		$out='
-		Local configuration is done by overriding default values in the included file, typo3conf/localconf.php. In this file you enter the database information along with values in the global array TYPO3_CONF_VARS.
-		The options in the TYPO3_CONF_VARS array and how to use it for your own purposes is discussed in the base configuration file, t3lib/config_default.php. This file sets up the default values and subsequently includes the localconf.php file in which you can then override values.
-		See this page for '.$this->linkIt('http://typo3.org/1275.0.html','more information about system requirements.').'
-		';
-		return trim($out);
+	function generallyAboutConfiguration() {
+		return '
+		<p>
+			Local configuration is done by overriding default values in the
+			included file, typo3conf/localconf.php. In this file you enter the
+			database information along with values in the global array
+			TYPO3_CONF_VARS.
+			<br />
+			The options in the TYPO3_CONF_VARS array and how to use it for your
+			own purposes is discussed in the base configuration file,
+			t3lib/config_default.php. This file sets up the default values and
+			subsequently includes the localconf.php file in which you can then
+			override values.
+			<br />
+			See this page for <a href="http://typo3.org/1275.0.html">more
+			information about system requirements.</a>
+		</p>';
 	}
 
 
@@ -2708,44 +4354,110 @@
 	 *
 	 * From TypoScript: (GD only, GD+IM, IM)
 	 *
-	 * @return	[type]		...
+	 * @return void
 	 */
-	function checkTheImageProcessing()	{
-		$this->message('Image Processing','What is it?',"
-		TYPO3 is known for its ability to process images on the server.
-		In the backend interface (TBE) thumbnails are automatically generated (by ImageMagick in thumbs.php) as well as icons, menu items and pane tabs (by GDLib).
-		In the TypoScript enabled frontend all kinds of graphical elements are processed. Typically images are scaled down to fit the pages (by ImageMagick) and menu items, graphical headers and such are generated automatically (by GDLib + ImageMagick).
-		In addition TYPO3 is able to handle many file formats (thanks to ImageMagick), for example TIF, BMP, PCX, TGA, AI and PDF in addition to the standard web formats; JPG, GIF, PNG.
+	function checkTheImageProcessing() {
+		$this->message('Image Processing', 'What is it?', '
+			<p>
+				TYPO3 is known for its ability to process images on the server.
+				<br />
+				In the backend interface (TBE) thumbnails are automatically
+				generated (by ImageMagick in thumbs.php) as well as icons, menu
+				items and pane tabs (by GDLib).
+				<br />
+				In the TypoScript enabled frontend all kinds of graphical
+				elements are processed. Typically images are scaled down to fit
+				the pages (by ImageMagick) and menu items, graphical headers and
+				such are generated automatically (by GDLib + ImageMagick).
+				<br />
+				In addition TYPO3 is able to handle many file formats (thanks to
+				ImageMagick), for example TIF, BMP, PCX, TGA, AI and PDF in
+				addition to the standard web formats; JPG, GIF, PNG.
+			</p>
+			<p>
+				In order to do this, TYPO3 uses two sets of tools:
+			</p>
+			<p>
+				<strong>ImageMagick:</strong>
+				<br />
+				For conversion of non-web formats to webformats, combining
+				images with alpha-masks, performing image-effects like blurring
+				and sharpening.
+				<br />
+				ImageMagick is a collection of external programs on the server
+				called by the exec() function in PHP. TYPO3 uses three of these,
+				namely \'convert\' (converting fileformats, scaling, effects),
+				\'combine\'/\'composite\' (combining images with masks) and
+				\'identify\' (returns image information).
+				<br />
+				Because ImageMagick are external programs, two requirements must
+				be met: 1) The programs must be installed on the server and
+				working and 2) if safe_mode is enabled, the programs must be
+				located in the folder defined by the php.ini setting,
+				<em>safe_mode_exec_dir</em> (else they are not executed).
+				<br />
+				ImageMagick is available for both Windows and Unix. The current
+				version is 5+, but TYPO3 enthusiasts prefer an old version 4.2.9
+				because that version has three main advantages: It\'s faster in
+				some operations, the blur-function works, the sharpen-function
+				works. Anyway you do it, you must tell TYPO3 by configuration
+				whether you\'re using version 5+ or 4.2.9. (flag:
+				[GFX][im_version_5])
+				<br />
+				ImageMagick homepage is at <a href="http://www.imagemagick.org/">http://www.imagemagick.org/</a>
+			</p>
+			<p>
+				<strong>GDLib:</strong>
+				<br />
+				For drawing boxes and rendering text on images with truetype
+				fonts. Also used for icons, menuitems and generally the
+				TypoScript GIFBUILDER object is based on GDlib, but extensively
+				utilizing ImageMagick to process intermediate results.
+				<br />
+				GDLib is accessed through internal functions in PHP, so in this
+				case, you have no safe_mode problems, but you\'ll need a version
+				of PHP with GDLib compiled in. Also in order to use TrueType
+				fonts with GDLib you\'ll need FreeType compiled in as well.
+				<br />
+			</p>
+			' . $this->getGDSoftwareInfo() . '
+			<p>
+				You can disable all image processing options in TYPO3
+				([GFX][image_processing]=0), but that would seriously disable
+				TYPO3.
+			</p>
+		');
 
-		In order to do this, TYPO3 uses two sets of tools:
-
-		<strong>ImageMagick:</strong>
-		For conversion of non-web formats to webformats, combining images with alpha-masks, performing image-effects like blurring and sharpening.
-		ImageMagick is a collection of external programs on the server called by the exec() function in PHP. TYPO3 uses three of these, namely 'convert' (converting fileformats, scaling, effects), 'combine'/'composite' (combining images with masks) and 'identify' (returns image information).
-		Because ImageMagick are external programs, two requirements must be met: 1) The programs must be installed on the server and working and 2) if safe_mode is enabled, the programs must be located in the folder defined by the php.ini setting, <em>safe_mode_exec_dir</em> (else they are not executed).
-		ImageMagick is available for both Windows and Unix. The current version is 5+, but TYPO3 enthusiasts prefer an old version 4.2.9 because that version has three main advantages: It's faster in some operations, the blur-function works, the sharpen-function works. Anyway you do it, you must tell TYPO3 by configuration whether you're using version 5+ or 4.2.9. (flag: [GFX][im_version_5])
-		ImageMagick homepage is at ".$this->linkIt('http://www.imagemagick.org/')."
-
-		<strong>GDLib:</strong>
-		For drawing boxes and rendering text on images with truetype fonts. Also used for icons, menuitems and generally the TypoScript GIFBUILDER object is based on GDlib, but extensively utilizing ImageMagick to process intermediate results.
-		GDLib is accessed through internal functions in PHP, so in this case, you have no safe_mode problems, but you'll need a version of PHP with GDLib compiled in. Also in order to use TrueType fonts with GDLib you'll need FreeType compiled in as well.
-		".$this->getGDSoftwareInfo().'
-
-		You can disable all image processing options in TYPO3 ([GFX][image_processing]=0), but that would seriously disable TYPO3.
+		$this->message('Image Processing', 'Verifying the image processing capabilities of your server', '
+			<p>
+				This page performs image processing and displays the result.
+				It\'s a thorough check that everything you\'ve configured is
+				working correctly.
+				<br />
+				It\'s quite simple to verify your installation; Just look down
+				the page, the images in pairs should look like each other. If
+				some images are not alike, something is wrong. You may also
+				notice warnings and errors if this tool found signs of any
+				problems.
+			</p>
+			<p>
+				The image to the right is the reference image (how it should be)
+				and to the left the image made by your server.
+				<br />
+				The reference images are made with the classic ImageMagick
+				install based on the 4.2.9 RPM and 5.2.3 RPM. If the version 5
+				flag is set, the reference images are made by the 5.2.3 RPM.
+			</p>
+			<p>
+				This test will work only if your ImageMagick/GDLib configuration
+				allows it to. The typo3temp/ folder must be writable for all the
+				temporary image files. They are all prefixed \'install_\' so
+				they are easy to recognize and delete afterwards.
+			</p>
 		');
 
-		$this->message('Image Processing','Verifying the image processing capabilities of your server',"
-		This page performs image processing and displays the result. It's a thorough check that everything you've configured is working correctly.
-		It's quite simple to verify your installation; Just look down the page, the images in pairs should look like each other. If some images are not alike, something is wrong. You may also notice warnings and errors if this tool found signs of any problems.
-
-		The image to the right is the reference image (how it should be) and to the left the image made by your server.
-		The reference images are made with the classic ImageMagick install based on the 4.2.9 RPM and 5.2.3 RPM. If the version 5 flag is set, the reference images are made by the 5.2.3 RPM.
-
-		This test will work only if your ImageMagick/GDLib configuration allows it to. The typo3temp/ folder must be writable for all the temporary image files. They are all prefixed 'install_' so they are easy to recognize and delete afterwards.
-		");
-
 		$im_path = $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path'];
-		if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5']=='gm')	{
+		if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5']=='gm') {
 			$im_path_version = $this->config_array['im_versions'][$im_path]['gm'];
 		} else {
 			$im_path_version = $this->config_array['im_versions'][$im_path]['convert'];
@@ -2753,24 +4465,86 @@
 		$im_path_lzw = $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw'];
 		$im_path_lzw_version = $this->config_array['im_versions'][$im_path_lzw]['convert'];
 		$msg = '
-		ImageMagick enabled: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['im'].'</strong>
-		ImageMagick path: <strong>'.$im_path.'</strong> ('.$im_path_version.')
-		ImageMagick path/LZW: <strong>'.$im_path_lzw.'</strong>  ('.$im_path_lzw_version.')
-		Version 5/GraphicsMagick flag: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'].'</strong>
-
-		GDLib enabled: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'].'</strong>
-		GDLib using PNG: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png'].'</strong>
-		GDLib 2 enabled: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_2'].'</strong>
-		IM5 effects enabled: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_v5effects'].'</strong> (Blurring/Sharpening with IM 5+)
-		Freetype DPI: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['TTFdpi'].'</strong> (Should be 96 for Freetype 2)
-		Mask invert: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_imvMaskState'].'</strong> (Should be set for some IM versions approx. 5.4+)
-
-		File Formats: <strong>'.$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'].'</strong>
+			<dl id="imageProcessingIm">
+				<dt>
+					ImageMagick enabled:
+				</dt>
+				<dd>
+					' . $GLOBALS['TYPO3_CONF_VARS']['GFX']['im'] . '
+				</dd>
+				<dt>
+					ImageMagick path:
+				</dt>
+				<dd>
+					' . $im_path . ' <span>(' . $im_path_version . ')</span>
+				</dd>
+				<dt>
+					ImageMagick path/LZW:
+				</dt>
+				<dd>
+					' . $im_path_lzw . ' <span>(' . $im_path_lzw_version . ')</span>
+				</dd>
+				<dt>
+					Version 5/GraphicsMagick flag:
+				</dt>
+				<dd>
+					' . ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'] ? $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'] : '&nbsp;') . '
+				</dd>
+			</dl>
+			<dl id="imageProcessingOther">
+				<dt>
+					GDLib enabled:
+				</dt>
+				<dd>
+					' . ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'] ? $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'] : '&nbsp;') . '
+				</dd>
+				<dt>
+					GDLib using PNG:
+				</dt>
+				<dd>
+					' . ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png'] ? $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png'] : '&nbsp;') . '
+				</dd>
+				<dt>
+					GDLib 2 enabled:
+				</dt>
+				<dd>
+					' . ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_2'] ? $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_2'] : '&nbsp;') . '
+				</dd>
+				<dt>
+					IM5 effects enabled:
+				</dt>
+				<dd>
+					' . $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_v5effects'] . '
+					<span>(Blurring/Sharpening with IM 5+)</span>
+				</dd>
+				<dt>
+					Freetype DPI:
+				</dt>
+				<dd>
+					' . $GLOBALS['TYPO3_CONF_VARS']['GFX']['TTFdpi'] . '
+					<span>(Should be 96 for Freetype 2)</span>
+				</dd>
+				<dt>
+					Mask invert:
+				</dt>
+				<dd>
+					' . $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_imvMaskState'] . '
+					<span>(Should be set for some IM versions approx. 5.4+)</span>
+				</dd>
+			</dl>
+			<dl id="imageProcessingFileFormats">
+				<dt>
+					File Formats:
+				</dt>
+				<dd>
+					' . $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] . '
+				</dd>
+			</dl>
 		';
 
 			// Various checks to detect IM/GM version mismatches
 		$mismatch=false;
-		switch (strtolower($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5']))	{
+		switch (strtolower($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'])) {
 			case 'gm':
 				if (doubleval($im_path_version)>=2)	$mismatch=true;
 			break;
@@ -2782,46 +4556,61 @@
 			break;
 		}
 
-		if ($mismatch)	{
-			$msg.= 'Warning: Mismatch between the version of ImageMagick'.
-					' ('.$im_path_version.') and the configuration of '.
-					'[GFX][im_version_5] ('.$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'].')';
+		if ($mismatch) {
+			$msg .= '
+				<p>
+					Warning: Mismatch between the version of ImageMagick' .
+					' (' . $im_path_version.') and the configuration of ' .
+					'[GFX][im_version_5] (' . $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'] . ')
+				</p>
+			';
 			$etype=2;
 		} else $etype=1;
 
-		if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5']=='gm')	{
+		if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5']=='gm') {
 			$msg = str_replace('ImageMagick','GraphicsMagick',$msg);
 		}
 
-		$this->message('Image Processing','Current configuration',$msg,$etype);
+		$this->message('Image Processing', 'Current configuration',$msg,$etype);
 
 
 
 
-		if (!$GLOBALS['TYPO3_CONF_VARS']['GFX']['image_processing'])	{
-			$this->message('Image Processing','Image Processing disabled!',"
-				Image Processing is disabled by the config flag <nobr>[GFX][image_processing]</nobr> set to false (zero)
-			",2);
+		if (!$GLOBALS['TYPO3_CONF_VARS']['GFX']['image_processing']) {
+			$this->message('Image Processing', 'Image Processing disabled!', '
+				<p>
+					Image Processing is disabled by the config flag
+					[GFX][image_processing] set to false (zero)
+				</p>
+			', 2);
 			$this->output($this->outputWrapper($this->printAll()));
 			return;
 		}
-		if (!$this->config_array['dir_typo3temp'])	{
-			$this->message('Image Processing','typo3temp/ not writable!',"
-				You must make typo3temp/ write enabled before you can proceed with this test.
-			",2);
+		if (!$this->config_array['dir_typo3temp']) {
+			$this->message('Image Processing', 'typo3temp/ not writable!', '
+				<p>
+					You must make typo3temp/ write enabled before you can
+					proceed with this test.
+				</p>
+			', 2);
 			$this->output($this->outputWrapper($this->printAll()));
 			return;
 		}
 
 
 
-		$msg='<a name="testmenu"></a>Click each of these links in turn to test a topic. <strong>Please be aware that each test may take several seconds!</strong>:
-
-		'.$this->imagemenu();
+		$msg = '
+			<p>
+				<a id="testmenu"></a>
+				Click each of these links in turn to test a topic.
+				<strong>
+					Please be aware that each test may take several seconds!
+				</strong>:
+			</p>
+		' . $this->imagemenu();
 		$this->message('Image Processing','Testmenu',$msg,'');
 
 
-		$this->messageFunc_nl2br=0;
 		$parseStart = t3lib_div::milliseconds();
 		$imageProc = t3lib_div::makeInstance('t3lib_stdGraphic');
 		$imageProc->init();
@@ -2836,27 +4625,31 @@
 		// Very temporary!!!
 		$imageProc->dontUnlinkTempFiles=0;
 
-
 		$imActive = ($this->config_array['im'] && $im_path);
 		$gdActive = ($this->config_array['gd'] && $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib']);
 
-		switch($this->INSTALL['images_type'])	{
+		switch($this->INSTALL['images_type']) {
 			case 'read':
 				$refParseTime='5600';	// 4.2.9
 				$refParseTime='3300';	// 5.2.3
 				$headCode = 'Reading and converting images';
-				$this->message($headCode,'Supported file formats',"
-				This verifies that your ImageMagick installation is able to read the nine default file formats; JPG, GIF, PNG, TIF, BMP, PCX, TGA, PDF, AI.
-				The tool 'identify' will be used to read the pixeldimensions of non-web formats.
-				The tool 'convert' is used to read the image and write a temporary JPG-file
-				");
+				$this->message($headCode, 'Supported file formats', '
+					<p>
+						This verifies that your ImageMagick installation is able
+						to read the nine default file formats; JPG, GIF, PNG,
+						TIF, BMP, PCX, TGA, PDF, AI. The tool \'identify\' will
+						be used to read the  pixeldimensions of non-web formats.
+						The tool \'convert\' is used to read the image and write
+						a temporary JPG-file
+					</p>
+				');
 
-				if ($imActive)	{
+				if ($imActive) {
 						// Reading formats - writing JPG
 
 					$extArr = explode(',','jpg,gif,png,tif,bmp,pcx,tga');
-					while(list(,$ext)=each($extArr))	{
-						if ($this->isExtensionEnabled($ext, $headCode, "Read ".strtoupper($ext)))	{
+					foreach ($extArr as $ext) {
+						if ($this->isExtensionEnabled($ext, $headCode, "Read ".strtoupper($ext))) {
 							$imageProc->IM_commands=array();
 							$theFile = t3lib_extMgm::extPath('install').'imgs/jesus.'.$ext;
 							if (!@is_file($theFile))	die('Error: '.$theFile.' was not a file');
@@ -2868,7 +4661,7 @@
 						}
 					}
 
-					if ($this->isExtensionEnabled('pdf', $headCode, 'Read PDF'))	{
+					if ($this->isExtensionEnabled('pdf', $headCode, 'Read PDF')) {
 						$imageProc->IM_commands=array();
 						$theFile = t3lib_extMgm::extPath('install').'imgs/pdf_from_imagemagick.pdf';
 						if (!@is_file($theFile))	die('Error: '.$theFile.' was not a file');
@@ -2878,7 +4671,7 @@
 						$result = $this->displayTwinImage($fileInfo[3],$imageProc->IM_commands);
 						$this->message($headCode,'Read PDF',$result[0],$result[1]);
 					}
-					if ($this->isExtensionEnabled('ai', $headCode, 'Read AI'))	{
+					if ($this->isExtensionEnabled('ai', $headCode, 'Read AI')) {
 						$imageProc->IM_commands=array();
 						$theFile = t3lib_extMgm::extPath('install').'imgs/typo3logotype.ai';
 						if (!@is_file($theFile))	die('Error: '.$theFile.' was not a file');
@@ -2889,10 +4682,15 @@
 						$this->message($headCode,'Read AI',$result[0],$result[1]);
 					}
 				} else {
-					$this->message($headCode,'Test skipped',"
-					Use of ImageMagick has been disabled in the configuration.
-					Refer to section 'Basic Configuration' to change or review you configuration settings
-					",2);
+					$this->message($headCode, 'Test skipped', '
+						<p>
+							Use of ImageMagick has been disabled in the
+							configuration.
+							<br />
+							Refer to section \'Basic Configuration\' to change
+							or review you configuration settings
+						</p>
+					', 2);
 				}
 			break;
 			case 'write':
@@ -2900,12 +4698,17 @@
 
 					// Writingformats - writing JPG
 				$headCode = 'Writing images';
-				$this->message($headCode,'Writing GIF and PNG','
-				This verifies that ImageMagick is able to write GIF and PNG files.
-				The GIF-file is attempted compressed with LZW by the t3lib_div::gif_compress() function.
+				$this->message($headCode, 'Writing GIF and PNG', '
+					<p>
+						This verifies that ImageMagick is able to write GIF and
+						PNG files.
+						<br />
+						The GIF-file is attempted compressed with LZW by the
+						t3lib_div::gif_compress() function.
+					</p>
 				');
 
-				if ($imActive)	{
+				if ($imActive) {
 						// Writing GIF
 					$imageProc->IM_commands=array();
 					$theFile = t3lib_extMgm::extPath('install').'imgs/jesus.gif';
@@ -2913,7 +4716,7 @@
 
 					$imageProc->imageMagickConvert_forceFileNameBody='write_gif';
 					$fileInfo = $imageProc->imageMagickConvert($theFile,'gif',"",'',"",'',"",1);
-					if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gif_compress'])	{
+					if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gif_compress']) {
 						clearstatcache();
 						$prevSize=t3lib_div::formatSize(@filesize($fileInfo[3]));
 						$returnCode = t3lib_div::gif_compress($fileInfo[3],'');
@@ -2934,10 +4737,15 @@
 					$result = $this->displayTwinImage($fileInfo[3],$imageProc->IM_commands);
 					$this->message($headCode,'Write PNG',$result[0],$result[1]);
 				} else {
-					$this->message($headCode,'Test skipped',"
-					Use of ImageMagick has been disabled in the configuration.
-					Refer to section 'Basic Configuration' to change or review you configuration settings
-					",2);
+					$this->message($headCode, 'Test skipped', '
+						<p>
+							Use of ImageMagick has been disabled in the
+							configuration.
+							<br />
+							Refer to section \'Basic Configuration\' to change
+							or review you configuration settings
+						</p>
+					', 2);
 				}
 			break;
 			case 'scaling':
@@ -2945,11 +4753,14 @@
 
 					// Scaling
 				$headCode = 'Scaling images';
-				$this->message($headCode,'Scaling transparent images','
-				This shows how ImageMagick reacts when scaling transparent GIF and PNG files.
+				$this->message($headCode, 'Scaling transparent images', '
+					<p>
+						This shows how ImageMagick reacts when scaling
+						transparent GIF and PNG files.
+					</p>
 				');
 
-				if ($imActive)	{
+				if ($imActive) {
 						// Scaling transparent image
 					$imageProc->IM_commands=array();
 					$theFile = t3lib_extMgm::extPath('install').'imgs/jesus2_transp.gif';
@@ -2957,7 +4768,7 @@
 
 					$imageProc->imageMagickConvert_forceFileNameBody='scale_gif';
 					$fileInfo = $imageProc->imageMagickConvert($theFile,'gif',"150",'',"",'',"",1);
-					if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gif_compress'])	{
+					if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gif_compress']) {
 						clearstatcache();
 						$prevSize=t3lib_div::formatSize(@filesize($fileInfo[3]));
 						$returnCode = t3lib_div::gif_compress($fileInfo[3],'');
@@ -2985,10 +4796,15 @@
 					$result = $this->displayTwinImage($fileInfo[3],$imageProc->IM_commands);
 					$this->message($headCode,'GIF to JPG, 150 pixels wide',$result[0],$result[1]);
 				} else {
-					$this->message($headCode,'Test skipped',"
-					Use of ImageMagick has been disabled in the configuration.
-					Refer to section 'Basic Configuration' to change or review you configuration settings
-					",2);
+					$this->message($headCode, 'Test skipped', '
+						<p>
+							Use of ImageMagick has been disabled in the
+							configuration.
+							<br />
+							Refer to section \'Basic Configuration\' to change
+							or review you configuration settings
+						</p>
+					', 2);
 				}
 			break;
 			case 'combining':
@@ -2996,12 +4812,19 @@
 				$refParseTime='250';	// 5.2.3
 									// Combine
 				$headCode = 'Combining images';
-				$this->message($headCode,'Combining images',"
-				This verifies that the ImageMagick tool, 'combine'/'composite', is able to combine two images through a grayscale mask.<br />
-				If the masking seems to work but inverted, that just means you'll have to make sure the invert flag is set (some combination of im_negate_mask/im_imvMaskState)
-				");
+				$this->message($headCode, 'Combining images', '
+					<p>
+						This verifies that the ImageMagick tool,
+						\'combine\'/\'composite\', is able to combine two images
+						through a grayscale mask.
+						<br />
+						If the masking seems to work but inverted, that just
+						means you\'ll have to make sure the invert flag is set
+						(some combination of im_negate_mask/im_imvMaskState)
+					</p>
+				');
 
-				if ($imActive)	{
+				if ($imActive) {
 					$imageProc->IM_commands=array();
 					$input = t3lib_extMgm::extPath('install').'imgs/greenback.gif';
 					$overlay = t3lib_extMgm::extPath('install').'imgs/jesus.jpg';
@@ -3031,24 +4854,34 @@
 					$result = $this->displayTwinImage($fileInfo[3],$imageProc->IM_commands);
 					$this->message($headCode,'Combine using a JPG mask with graylevels',$result[0],$result[1]);
 				} else {
-					$this->message($headCode,'Test skipped',"
-					Use of ImageMagick has been disabled in the configuration.
-					Refer to section 'Basic Configuration' to change or review you configuration settings
-					",2);
+					$this->message($headCode, 'Test skipped', '
+						<p>
+							Use of ImageMagick has been disabled in the
+							configuration.
+							<br />
+							Refer to section \'Basic Configuration\' to change
+							or review you configuration settings
+						</p>
+					', 2);
 				}
 			break;
 			case 'gdlib':
-				$refParseTime='1800';	// GIF / 4.2.9 / LZW (5.2.3)
-				$refParseTime='2700';	// PNG / 4.2.9 / LZW (5.2.3)
-				$refParseTime='1600';	// GIF / 5.2.3 / LZW (5.2.3)
+					// GIF / 4.2.9 / LZW (5.2.3)
+				$refParseTime='1800';
+					// PNG / 4.2.9 / LZW (5.2.3)
+				$refParseTime='2700';
+					// GIF / 5.2.3 / LZW (5.2.3)
+				$refParseTime='1600';
 					// GDLibrary
 				$headCode = 'GDLib';
-				$this->message($headCode,'Testing GDLib','
-				This verifies that the GDLib installation works properly.
+				$this->message($headCode, 'Testing GDLib', '
+					<p>
+						This verifies that the GDLib installation works properly.
+					</p>
 				');
 
 
-				if ($gdActive)	{
+				if ($gdActive) {
 					// GD with box
 					$imageProc->IM_commands=array();
 					$im = $imageProc->imageCreate(170,136);
@@ -3067,7 +4900,7 @@
 					$this->message($headCode,'Create simple image',$result[0],$result[1]);
 
 
-					// GD from image with box
+						// GD from image with box
 					$imageProc->IM_commands=array();
 					$input = t3lib_extMgm::extPath('install').'imgs/jesus.'.$imageProc->gifExtension;
 						if (!@is_file($input))	die('Error: '.$input.' was not a file');
@@ -3085,7 +4918,7 @@
 					$this->message($headCode,'Create image from file',$result[0],$result[1]);
 
 
-					// GD with text
+						// GD with text
 					$imageProc->IM_commands=array();
 					$im = $imageProc->imageCreate(170,136);
 					$Bcolor = ImageColorAllocate ($im, 128,128,150);
@@ -3110,7 +4943,7 @@
 					$result = $this->displayTwinImage($fileInfo[3],$imageProc->IM_commands);
 					$this->message($headCode,'Render text with TrueType font',$result[0],$result[1]);
 
-					if ($imActive)	{
+					if ($imActive) {
 							// extension: GD with text, niceText
 						$conf['offset'] = '17,65';
 						$conf['niceText'] = 1;
@@ -3120,19 +4953,31 @@
 						$imageProc->ImageWrite($im,$output);
 						$fileInfo = $imageProc->getImageDimensions($output);
 						$result = $this->displayTwinImage($fileInfo[3],$imageProc->IM_commands, array("Note on 'niceText':","'niceText' is a concept that tries to improve the antialiasing of the rendered type by actually rendering the textstring in double size on a black/white mask, downscaling the mask and masking the text onto the image through this mask. This involves ImageMagick 'combine'/'composite' and 'convert'."));
-						$this->message($headCode,"Render text with TrueType font using 'niceText' option",
-							"(If the image has another background color than the image above (eg. dark background color with light text) then you will have to set TYPO3_CONF_VARS[GFX][im_imvMaskState]=1)<br /><br />".
-							$result[0],$result[1]);
+						$this->message($headCode, 'Render text with TrueType font using \'niceText\' option', '
+							<p>
+								(If the image has another background color than
+								the image above (eg. dark background color with
+								light text) then you will have to set
+								TYPO3_CONF_VARS[GFX][im_imvMaskState]=1)
+							</p>
+						' . $result[0], $result[1]);
 					} else {
-						$this->message($headCode,"Render text with TrueType font using 'niceText' option","
-						<strong>Test is skipped!</strong><br /><br />
-
-						Use of ImageMagick has been disabled in the configuration. ImageMagick is needed to generate text with the niceText option.
-						Refer to section 'Basic Configuration' to change or review you configuration settings
-						",2);
+						$this->message($headCode, 'Render text with TrueType font using \'niceText\' option', '
+							<p>
+								<strong>Test is skipped!</strong>
+							</p>
+							<p>
+								Use of ImageMagick has been disabled in the
+								configuration. ImageMagick is needed to generate
+								text with the niceText option.
+								<br />
+								Refer to section \'Basic Configuration\' to
+								change or review you configuration settings
+							</p>
+						', 2);
 					}
 
-					if ($imActive)	{
+					if ($imActive) {
 							// extension: GD with text, niceText AND shadow
 						$conf['offset'] = '17,90';
 						$conf['niceText'] = 1;
@@ -3148,35 +4993,93 @@
 						$output = $imageProc->tempPath.$imageProc->filenamePrefix.t3lib_div::shortMD5('GDwithText-niceText-shadow').'.'.$imageProc->gifExtension;
 						$imageProc->ImageWrite($im,$output);
 						$fileInfo = $imageProc->getImageDimensions($output);
-						$result = $this->displayTwinImage($fileInfo[3],$imageProc->IM_commands, array('Note on drop shadows:','Drop shadows are done by using ImageMagick to blur a mask through which the drop shadow is generated. The blurring of the mask only works in ImageMagick 4.2.9 and <i>not</i> ImageMagick 5 - which is why you may see a hard and not soft shadow.'));
-						$this->message($headCode,"Render 'niceText' with a shadow under",
-							"(This test makes sense only if the above test had a correct output. But if so, you may not see a soft dropshadow from the third text string as you should. In that case you are most likely using ImageMagick 5 and should set the flag TYPO3_CONF_VARS[GFX][im_v5effects]. However this may cost server performance!<br />Finally if you see no drop shadow at all or if the shadow is still not soft, then check if you are using GDlib2 and if so set TYPO3_CONF_VARS[GFX][gdlib_2]=1)<br /><br />".
-							$result[0],$result[1]);
+						$result = $this->displayTwinImage($fileInfo[3],$imageProc->IM_commands, array('Note on drop shadows:','Drop shadows are done by using ImageMagick to blur a mask through which the drop shadow is generated. The blurring of the mask only works in ImageMagick 4.2.9 and <em>not</em> ImageMagick 5 - which is why you may see a hard and not soft shadow.'));
+						$this->message($headCode, 'Render \'niceText\' with a shadow under', '
+							<p>
+								(This test makes sense only if the above test
+								had a correct output. But if so, you may not see
+								a soft dropshadow from the third text string as
+								you should. In that case you are most likely
+								using ImageMagick 5 and should set the flag
+								TYPO3_CONF_VARS[GFX][im_v5effects]. However this
+								may cost server performance!
+								<br />
+								Finally if you see no drop shadow at all or if
+								the shadow is still not soft, then check if you
+								are using GDlib2 and if so set
+								TYPO3_CONF_VARS[GFX][gdlib_2]=1)
+							</p>
+						' . $result[0], $result[1]);
 					} else {
-						$this->message($headCode,"Render 'niceText' with a shadow under","
-						<strong>Test is skipped!</strong><br /><br />
-
-						Use of ImageMagick has been disabled in the configuration. ImageMagick is needed to generate shadows.
-						Refer to section 'Basic Configuration' to change or review you configuration settings
-						",2);
+						$this->message($headCode, 'Render \'niceText\' with a shadow under', '
+							<p>
+								<strong>Test is skipped!</strong>
+							</p>
+							<p>
+								Use of ImageMagick has been disabled in the
+								configuration. ImageMagick is needed to generate
+								shadows.
+								<br />
+								Refer to section \'Basic Configuration\' to
+								change or review you configuration settings
+							</p>
+						', 2);
 					}
 
-					if ($imageProc->gifExtension=='gif')	{
+					if ($imageProc->gifExtension=='gif') {
 						$buffer=20;
 						$assess = "This assessment is based on the filesize from 'Create image from file' test, which were ".$GDWithBox_filesize.' bytes';
 						$goodNews = "If the image was LZW compressed you would expect to have a size of less than 9000 bytes. If you open the image with Photoshop and saves it from Photoshop, you'll a filesize like that.<br />The good news is (hopefully) that your [GFX][im_path_lzw] path is correctly set so the gif_compress() function will take care of the compression for you!";
-						if ($GDWithBox_filesize<8784+$buffer)	{
-							$msg="<strong>Your GDLib appears to have LZW compression!</strong><br />
-								This assessment is based on the filesize from 'Create image from file' test, which were ".$GDWithBox_filesize." bytes.<br />
-								This is a real advantage for you because you don't need to use ImageMagick for LZW compressing. In order to make sure that GDLib is used, <strong>please set the config option [GFX][im_path_lzw] to an empty string!</strong><br />
-								When you disable the use of ImageMagick for LZW compressing, you'll see that the gif_compress() function has a return code of 'GD' (for GDLib) instead of 'IM' (for ImageMagick)
-								";
-						} elseif ($GDWithBox_filesize>19000)	{
-							$msg='<strong>Your GDLib appears to have no compression at all!</strong><br />
-								'.$assess.'<br />'.$goodNews;
+						if ($GDWithBox_filesize<8784+$buffer) {
+							$msg = '
+								<p>
+									<strong>
+										Your GDLib appears to have LZW compression!
+									</strong>
+									<br />
+									This assessment is based on the filesize
+									from \'Create image from file\' test, which
+									were ' . $GDWithBox_filesize . ' bytes.
+									<br />
+									This is a real advantage for you because you
+									don\'t need to use ImageMagick for LZW
+									compressing. In order to make sure that
+									GDLib is used,
+									<strong>
+										please set the config option
+										[GFX][im_path_lzw] to an empty string!
+									</strong>
+									<br />
+									When you disable the use of ImageMagick for
+									LZW compressing, you\'ll see that the
+									gif_compress() function has a return code of
+									\'GD\' (for GDLib) instead of \'IM\' (for
+									ImageMagick)
+								</p>
+							';
+						} elseif ($GDWithBox_filesize>19000) {
+							$msg = '
+								<p>
+									<strong>
+										Your GDLib appears to have no
+										compression at all!
+									</strong>
+									<br />
+									' . $assess . '
+									<br />
+									' . $goodNews . '
+								</p>
+							';
 						} else {
-							$msg='Your GDLib appears to have RLE compression<br />
-								'.$assess.'<br />'.$goodNews;
+							$msg = '
+								<p>
+									Your GDLib appears to have RLE compression
+									<br />
+									' . $assess . '
+									<br />
+									' . $goodNews . '
+								</p>
+							';
 						}
 						$this->message($headCode,'GIF compressing in GDLib',"
 						".$msg."
@@ -3184,159 +5087,314 @@
 					}
 
 				} else {
-					$this->message($headCode,'Test skipped',"
-					Use of GDLib has been disabled in the configuration.
-					Refer to section 'Basic Configuration' to change or review you configuration settings
-					",2);
+					$this->message($headCode, 'Test skipped', '
+						<p>
+							Use of GDLib has been disabled in the configuration.
+							<br />
+							Refer to section \'Basic Configuration\' to change
+							or review you configuration settings
+						</p>
+					', 2);
 				}
 			break;
 		}
 
-		if ($this->INSTALL['images_type'])	{
+		if ($this->INSTALL['images_type']) {
 			// End info
-			if ($this->fatalError)	{
-				$this->message('Info','Errors',"
-				It seems that you had some fatal errors in this test. Please make sure that your ImageMagick and GDLib settings are correct.
-				Refer to the 'Basic Configuration' section for more information and debugging of your settings.
-				");
+			if ($this->fatalError) {
+				$this->message('Info', 'Errors', '
+					<p>
+						It seems that you had some fatal errors in this test.
+						Please make sure that your ImageMagick and GDLib
+						settings are correct. Refer to the
+						\'Basic Configuration\' section for more information and
+						debugging of your settings.
+					</p>
+				');
 			}
 
 			$parseMS = t3lib_div::milliseconds() - $parseStart;
-			$this->message('Info','Parsetime',$parseMS.' ms');
+			$this->message('Info', 'Parsetime', '
+				<p>
+					' . $parseMS . ' ms
+				</p>
+			');
 		}
 		$this->output($this->outputWrapper($this->printAll()));
 	}
 
 	/**
-	 * [Describe function...]
+	 * Check if image file extension is enabled
+	 * Adds error message to the message array
 	 *
-	 * @param	[type]		$ext: ...
-	 * @param	[type]		$headCode: ...
-	 * @param	[type]		$short: ...
-	 * @return	[type]		...
+	 * @param string $ext The image file extension
+	 * @param string $headCode The header for the message
+	 * @param string $short The short description for the message
+	 * @return boolean TRUE if extension is enabled
 	 */
-	function isExtensionEnabled($ext, $headCode, $short)	{
-		if (!t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],$ext))	{
-			$this->message($headCode,$short,'Skipped - extension not in the list of allowed extensions ([GFX][imagefile_ext]).',1);
+	function isExtensionEnabled($ext, $headCode, $short) {
+		if (!t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],$ext)) {
+			$this->message($headCode, $short, '
+				<p>
+					Skipped - extension not in the list of allowed extensions
+					([GFX][imagefile_ext]).
+				</p>
+			',1);
 		} else {
 			return 1;
 		}
 	}
 
 	/**
-	 * [Describe function...]
+	 * Generate the HTML after reading and converting images
+	 * Displays the verification and the converted image if succeeded
+	 * Adds error messages if needed
 	 *
-	 * @param	[type]		$imageFile: ...
-	 * @param	[type]		$IMcommands: ...
-	 * @param	[type]		$note: ...
-	 * @return	[type]		...
+	 * @param string $imageFile The file name of the converted image
+	 * @param array $IMcommands The ImageMagick commands used
+	 * @param string $note Additional note for image operation
+	 * @return array Contains content and highest error level
 	 */
-	function displayTwinImage ($imageFile, $IMcommands=array(), $note='')	{
-		$ex_rows='';
+	function displayTwinImage ($imageFile, $IMcommands=array(), $note='') {
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'DisplayTwinImage.html');
+			// Get the template part from the file
+		$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+
+		$content = '';
+
 		$errorLevels=array(-1);
-		if ($imageFile)	{
+		if ($imageFile) {
+				// Get the subpart for the images
+			$imageSubpart = $this->contentObject->getSubpart($template, '###IMAGE###');
 			$verifyFile = t3lib_extMgm::extPath('install').'verify_imgs/'.basename($imageFile);
-#debug(array($imageFile,$this->backPath.'../'.substr($imageFile,strlen(PATH_site))),1);
 			$destImg = @getImageSize($imageFile);
 			$destImgCode ='<img src="'.$this->backPath.'../'.substr($imageFile,strlen(PATH_site)).'" '.$destImg[3].'>';
 			$verifyImg = @getImageSize($verifyFile);
 			$verifyImgCode = '<img src="'.$this->backPath.t3lib_extMgm::extRelPath('install').'verify_imgs/'.basename($verifyFile).'" '.$verifyImg[3].'>';
-			if (!$verifyImg)	{
-				$gifVersion=1;
-				$verifyFile_alt = substr($verifyFile,0,-3).'gif';
-				$verifyImg = @getImageSize($verifyFile_alt);
-				if ($verifyImg)	{
-// FIXME what is that? old code? t3lib/install/verify_imgs/ do not exist
-					$verifyImgCode = '<img src="'.$this->backPath.'t3lib/install/verify_imgs/'.basename($verifyFile_alt).'" '.$verifyImg[3].'>';
-					$verifyImgCode= '<table border="0" cellpadding="4" cellspacing="0" bgcolor="red"><tr><td align="center">'.$verifyImgCode.'<br />'.$this->fw('<strong>NO REFERENCE FOUND!</strong><br /><br />GIF version looks like this.').'</td></tr></table>';
-				} else {
-					$verifyImgCode= '<table border="0" cellpadding="4" cellspacing="0" bgcolor="red"><tr><td align="center">'.$this->fw('<strong>NO REFERENCE FOUND!</strong><br /><br />'.basename($verifyFile)).'</td></tr></table>';
-				}
-			}
 
 			clearstatcache();
 			$destImg['filesize'] = @filesize($imageFile);
 			clearstatcache();
 			$verifyImg['filesize'] = @filesize($verifyFile);
+				// Define the markers content
+			$imageMarkers = array(
+				'destWidth' => $destImg[0],
+				'destHeight' => $destImg[1],
+				'destUrl' => $this->backPath . '../' . substr($imageFile, strlen(PATH_site)),
+				'verifyWidth' => $verifyImg[0],
+				'verifyHeight' => $verifyImg[1],
+				'verifyUrl' => $this->backPath . t3lib_extMgm::extRelPath('install') . 'verify_imgs/' . basename($verifyFile),
+				'yourServer' => 'Your server:',
+				'yourServerInformation' => t3lib_div::formatSize($destImg['filesize']) . ', ' . $destImg[0] . 'x' . $destImg[1] . ' pixels',
+				'reference' => 'Reference:',
+				'referenceInformation' => t3lib_div::formatSize($verifyImg['filesize']) . ', ' . $verifyImg[0] . 'x' . $verifyImg[1] . ' pixels'
+			);
 
-			$ex_rows.='<tr>';
-			$ex_rows.='<td>'.$destImgCode.'</td>';
-			$ex_rows.='<td><img src="clear.gif" width="30" height="1"></td>';
-			$ex_rows.='<td>'.$verifyImgCode.'</td>';
-			$ex_rows.='</tr>';
+				// Display a warning if the generated image is more than 2KB larger than its reference...
+			if (($destImg['filesize']!=$verifyImg['filesize']) && (intval($destImg['filesize']) && ($destImg['filesize']-$verifyImg['filesize']) > 2048)) {
+					// Get the subpart for the different filesize message
+				$differentFileSizeSubpart = $this->contentObject->getSubpart($imageSubpart, '###DIFFERENTFILESIZE###');
+					// Define the markers content
+				$differentFileSizeMarkers = array(
+					'message' => 'File size is very different from reference',
+					'yourServerFileSize' => $destImg['filesize'],
+					'referenceFileSize' => $verifyImg['filesize']
+				);
+					// Fill the markers in the subpart
+				$differentFileSizeSubpart = $this->contentObject->substituteMarkerArray(
+					$differentFileSizeSubpart,
+					$differentFileSizeMarkers,
+					'###|###',
+					1,
+					1
+				);
 
-			$ex_rows.=$this->getTwinImageMessage('', 'Your server:', 'Reference:');
-			$ex_rows.=$this->getTwinImageMessage('', t3lib_div::formatSize($destImg['filesize']).', '.$destImg[0].'x'.$destImg[1].' pixels', t3lib_div::formatSize($verifyImg['filesize']).', '.$verifyImg[0].'x'.$verifyImg[1].' pixels');
-
-			if (($destImg['filesize']!=$verifyImg['filesize']) && (intval($destImg['filesize']) && ($destImg['filesize']-$verifyImg['filesize']) > 2048))	{	// Display a warning if the generated image is more than 2KB larger than its reference...
-				$ex_rows.=$this->getTwinImageMessage('File size is very different from reference', $destImg['filesize'], $verifyImg['filesize']);
 				$errorLevels[]=2;
 			}
-			if ($destImg[0]!=$verifyImg[0] || $destImg[1]!=$verifyImg[1])	{
-				$ex_rows.=$this->getTwinImageMessage('Pixel dimension are not equal!');
+				// Substitute the subpart for different filesize message
+			$imageSubpart = $this->contentObject->substituteSubpart(
+				$imageSubpart,
+				'###DIFFERENTFILESIZE###',
+				$differentFileSizeSubpart
+			);
+
+			if ($destImg[0]!=$verifyImg[0] || $destImg[1]!=$verifyImg[1]) {
+					// Get the subpart for the different pixel dimensions message
+				$differentPixelDimensionsSubpart = $this->contentObject->getSubpart($imageSubpart, '###DIFFERENTPIXELDIMENSIONS###');
+					// Define the markers content
+				$differentPixelDimensionsMarkers = array(
+					'message' => 'Pixel dimension are not equal!'
+				);
+					// Fill the markers in the subpart
+				$differentPixelDimensionsSubpart = $this->contentObject->substituteMarkerArray(
+					$differentPixelDimensionsSubpart,
+					$differentPixelDimensionsMarkers,
+					'###|###',
+					1,
+					1
+				);
+
 				$errorLevels[]=2;
 			}
-			if ($note)	{
-				$ex_rows.=$this->getTwinImageMessage($note[0],$note[1]);
+					// Substitute the subpart for different pixel dimensions message
+			$imageSubpart = $this->contentObject->substituteSubpart(
+				$imageSubpart,
+				'###DIFFERENTPIXELDIMENSIONS###',
+				$differentPixelDimensionsSubpart
+			);
+
+			if ($note) {
+					// Get the subpart for the note
+				$noteSubpart = $this->contentObject->getSubpart($imageSubpart, '###NOTE###');
+					// Define the markers content
+				$noteMarkers = array(
+					'message' => $note[0],
+					'label' => $note[1]
+				);
+					// Fill the markers in the subpart
+				$noteSubpart = $this->contentObject->substituteMarkerArray(
+					$noteSubpart,
+					$noteMarkers,
+					'###|###',
+					1,
+					1
+				);
 			}
-			if ($this->dumpImCommands && count($IMcommands))	{
-				$ex_rows.=$this->getTwinImageMessage('ImageMagick commands executed:',$this->formatImCmds($IMcommands));
+				// Substitute the subpart for the note
+			$imageSubpart = $this->contentObject->substituteSubpart(
+				$imageSubpart,
+				'###NOTE###',
+				$noteSubpart
+			);
+
+			if ($this->dumpImCommands && count($IMcommands)) {
+				$commands = $this->formatImCmds($IMcommands);
+					// Get the subpart for the ImageMagick commands
+				$imCommandsSubpart = $this->contentObject->getSubpart($imageSubpart, '###IMCOMMANDS###');
+					// Define the markers content
+				$imCommandsMarkers = array(
+					'message' => 'ImageMagick commands executed:',
+					'rows' => t3lib_div::intInRange(count($commands), 2, 10),
+					'commands' => htmlspecialchars(implode($commands, chr(10)))
+				);
+					// Fill the markers in the subpart
+				$imCommandsSubpart = $this->contentObject->substituteMarkerArray(
+					$imCommandsSubpart,
+					$imCommandsMarkers,
+					'###|###',
+					1,
+					1
+				);
 			}
+				// Substitute the subpart for the ImageMagick commands
+			$imageSubpart = $this->contentObject->substituteSubpart(
+				$imageSubpart,
+				'###IMCOMMANDS###',
+				$imCommandsSubpart
+			);
+				// Fill the markers
+			$imageSubpart = $this->contentObject->substituteMarkerArray(
+				$imageSubpart,
+				$imageMarkers,
+				'###|###',
+				1,
+				1
+			);
+
 		} else {
-			$ex_rows.=$this->getTwinImageMessage('There was no result from the ImageMagick operation', "Below there's a dump of the ImageMagick commands executed:<br />".$this->formatImCmds($IMcommands));
+				// Get the subpart when no image has been generated
+			$noImageSubpart = $this->contentObject->getSubpart($template, '###NOIMAGE###');
+			$commands = $this->formatImCmds($IMcommands);
+
+			if (count($commands)) {
+					// Get the subpart for the ImageMagick commands
+				$commandsSubpart = $this->contentObject->getSubpart($noImageSubpart, '###COMMANDSAVAILABLE###');
+					// Define the markers content
+				$commandsMarkers = array(
+					'rows' => t3lib_div::intInRange(count($commands), 2, 10),
+					'commands' => htmlspecialchars(implode($commands, chr(10)))
+				);
+					// Fill the markers in the subpart
+				$commandsSubpart = $this->contentObject->substituteMarkerArray(
+					$commandsSubpart,
+					$commandsMarkers,
+					'###|###',
+					1,
+					1
+				);
+			}
+				// Substitute the subpart for the ImageMagick commands
+			$noImageSubpart = $this->contentObject->substituteSubpart(
+				$noImageSubpart,
+				'###COMMANDSAVAILABLE###',
+				$commandsSubpart
+			);
+				// Define the markers content
+			$noImageMarkers = array(
+				'message' => 'There was no result from the ImageMagick operation',
+				'label' => 'Below there\'s a dump of the ImageMagick commands executed:'
+			);
+				// Fill the markers
+			$noImageSubpart = $this->contentObject->substituteMarkerArray(
+				$noImageSubpart,
+				$noImageMarkers,
+				'###|###',
+				1,
+				1
+			);
+
 			$errorLevels[]=3;
 		}
-		$out='<table border="0" cellpadding="0" cellspacing="0" align="center" width="300">'.$ex_rows.'</table>';
+			// Substitute the subpart when image has been generated
+		$content = $this->contentObject->substituteSubpart(
+			$template,
+			'###IMAGE###',
+			$imageSubpart
+		);
+			// Substitute the subpart when no image has been generated
+		$content = $this->contentObject->substituteSubpart(
+			$content,
+			'###NOIMAGE###',
+			$noImageSubpart
+		);
 
-		return array($out,max($errorLevels));
+		return array($content, max($errorLevels));
 	}
 
 	/**
-	 * [Describe function...]
+	 * Format ImageMagick commands for use in HTML
 	 *
-	 * @param	[type]		$message: ...
-	 * @param	[type]		$label_1: ...
-	 * @param	[type]		$label_2: ...
-	 * @return	[type]		...
+	 * @param array $arr The ImageMagick commands
+	 * @return string The formatted commands
 	 */
-	function getTwinImageMessage($message, $label_1="", $label_2='')	{
-		if ($message)	$out.='<tr><td colspan="3"><strong>'.$this->fw($message).'</strong></td></tr>';
-		if ($label_1 && !$label_2)	{
-			$out.='<tr><td colspan="3">'.$this->fw($label_1).'</td></tr>';
-		} elseif ($label_1 || $label_2)	{
-			$out.='<tr><td>'.$this->fw($label_1).'</td><td></td><td>'.$this->fw($label_2).'</td></tr>';
+	function formatImCmds($arr) {
+		$out = array();
+		if (is_array($arr)) {
+			foreach ($arr as $k => $v) {
+				$out[] = $v[1];
+				if ($v[2]) {
+					$out[]='   RETURNED: ' . $v[2];
+				}
+			}
 		}
+
 		return $out;
 	}
 
 	/**
-	 * [Describe function...]
+	 * Generate the menu for the test menu in 'image processing'
 	 *
-	 * @param	[type]		$arr: ...
-	 * @return	[type]		...
+	 * @return string The HTML for the test menu
 	 */
-	function formatImCmds($arr)	{
-		$out=array();
-		if (is_array($arr))	{
-			reset($arr);
-			while(list($k,$v)=each($arr))	{
-				$out[]=$v[1];
-				if ($v[2])	$out[]='   RETURNED: '.$v[2];
-			}
-		}
-		if (count($out))	{
-			$col = t3lib_div::intInRange(count($out),2,10);
-			$outputStr = '<textarea cols=40 rows='.$col.' wrap="off" class="fixed-font">'.htmlspecialchars(implode($out,chr(10))).'</textarea>';
-			return '<form action="">'.$outputStr.'</form>';
-		};
-	}
+	function imagemenu() {
+			// Get the template file
+		$template = @file_get_contents(PATH_site . $this->templateFilePath . 'ImageMenu.html');
+			// Get the subpart for the menu
+		$menuSubPart = $this->contentObject->getSubpart($template, '###MENU###');
+			// Get the subpart for the single item in the menu
+		$menuItemSubPart = $this->contentObject->getSubpart($menuSubPart, '###MENUITEM###');
 
-	/**
-	 * [Describe function...]
-	 *
-	 * @return	[type]		...
-	 */
-	function imagemenu()	{
 		$menuitems = array(
 			'read' => 'Reading image formats',
 			'write' => 'Writing GIF and PNG',
@@ -3344,18 +5402,32 @@
 			'combining' => 'Combining images',
 			'gdlib' => 'GD library functions'
 		);
-		reset($menuitems);
-		$c=0;
-		$out=array();
-		while(list($k,$v)=each($menuitems))	{
-			$bgcolor = ($this->INSTALL['images_type']==$k ? ' class="activeMenu"' : ' class="generalTableBackground"');
-			$c++;
-			$out[]='<tr><td'.$bgcolor.'><a href="'.htmlspecialchars($this->action.'&TYPO3_INSTALL[images_type]='.$k.'#testmenu').'">'.$this->fw($c.': '.$v).'</a></td></tr>';
+		$c = 0;
+
+		foreach ($menuitems as $k => $v) {
+				// Define the markers content
+			$markers = array(
+				'backgroundColor' => $this->INSTALL['images_type'] == $k ? 'activeMenu' : 'generalTableBackground',
+				'url' => htmlspecialchars($this->action . '&TYPO3_INSTALL[images_type]=' . $k . '#imageMenu'),
+				'item' => $v
+			);
+				// Fill the markers in the subpart
+			$items[] = $this->contentObject->substituteMarkerArray(
+				$menuItemSubPart,
+				$markers,
+				'###|###',
+				1,
+				1
+			);
 		}
+			// Substitute the subpart for the single item in the menu
+		$menuSubPart = $this->contentObject->substituteSubpart(
+			$menuSubPart,
+			'###MENUITEM###',
+			implode(chr(10), $items)
+		);
 
-		$code = '<table border="0" cellpadding="0" cellspacing="1">'.implode($out,'').'</table>';
-		$code = '<table border="0" cellpadding="0" cellspacing="0" id="imageMenu"><tr><td>'.$code.'</td></tr></table>';
-		return '<div align="center">'.$code.'</div>';
+		return $menuSubPart;
 	}
 
 
@@ -3376,20 +5448,32 @@
 	 **********************/
 
 	/**
-	 * @return	[type]		...
+	 * The Database Analyzer
+	 *
+	 * @return void
 	 */
-	function checkTheDatabase()	{
-		if (!$this->config_array['mysqlConnect'])	{
-			$this->message('Database Analyser','Your database connection failed',"
-				Please go to the 'Basic Configuration' section and correct this problem first.
-			",2);
+	function checkTheDatabase() {
+		$this->javascript[] = '<script type="text/javascript" src="' .
+			t3lib_div::getIndpEnv('TYPO3_SITE_URL') .
+			TYPO3_mainDir .
+			'contrib/prototype/prototype.js"></script>';
+		if (!$this->config_array['mysqlConnect']) {
+			$this->message('Database Analyser', 'Your database connection failed', '
+				<p>
+					Please go to the \'Basic Configuration\' section and correct
+					this problem first.
+				</p>
+			', 2);
 			$this->output($this->outputWrapper($this->printAll()));
 			return;
 		}
-		if ($this->config_array['no_database'])	{
-			$this->message('Database Analyser','No database selected',"
-				Please go to the 'Basic Configuration' section and correct this problem first.
-			",2);
+		if ($this->config_array['no_database']) {
+			$this->message('Database Analyser', 'No database selected', '
+				<p>
+					Please go to the \'Basic Configuration\' section and correct
+					this problem first.
+				</p>
+			', 2);
 			$this->output($this->outputWrapper($this->printAll()));
 			return;
 		}
@@ -3399,32 +5483,48 @@
 
 
 			// Getting number of static_template records
-		if ($whichTables['static_template'])	{
+		if ($whichTables['static_template']) {
 			$static_template_count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', 'static_template');
 		}
 		$static_template_count=intval($static_template_count);
 
 		$headCode ='Database Analyser';
-		$this->message($headCode,'What is it?',"
-			In this section you can get an overview of your currently selected database compared to sql-files. You can also import sql-data directly into the database or upgrade tables from earlier versions of TYPO3.
-		",0);
+		$this->message($headCode, 'What is it?', '
+			<p>
+				In this section you can get an overview of your currently
+				selected database compared to sql-files. You can also import
+				sql-data directly into the database or upgrade tables from
+				earlier versions of TYPO3.
+			</p>
+		', 0);
 
-		$cInfo='
-			Username: <strong>'.TYPO3_db_username.'</strong>
-			Host: <strong>'.TYPO3_db_host.'</strong>
-		';
-		$this->message($headCode, 'Connected to SQL database successfully',"
-		".trim($cInfo)."
-		",-1,1);
-		$this->message($headCode, 'Database',"
-			<strong>".TYPO3_db.'</strong> is selected as database.
-			Has <strong>'.count($whichTables)."</strong> tables.
-		",-1,1);
+		$this->message($headCode, 'Connected to SQL database successfully', '
+			<dl id="databaseConnected">
+				<dt>
+					Username:
+				</dt>
+				<dd>
+					' . TYPO3_db_username . '
+				</dd>
+				<dt>
+					Host:
+				</dt>
+				<dd>
+					' . TYPO3_db_host . '
+				</dd>
+			</dl>
+		', -1, 1);
 
+		$this->message($headCode, 'Database', '
+			<p>
+				<strong>' . TYPO3_db . '</strong> is selected as database.
+				<br />
+				Has <strong>' . count($whichTables) . '</strong> tables.
+			</p>
+		', -1, 1);
 
+
 			// Menu
-		$this->messageFunc_nl2br = 0;
-
 		$sql_files = array_merge(
 			t3lib_div::getFilesInDir(PATH_typo3conf,'sql',1,1),
 			array()
@@ -3432,117 +5532,157 @@
 
 		$action_type = $this->INSTALL['database_type'];
 		$actionParts = explode('|',$action_type);
-		if (count($actionParts)<2)	{
+		if (count($actionParts)<2) {
 			$action_type='';
 		}
 
-		$out='';
-		$out.='<tr>
-				<td nowrap="nowrap"><strong>'.$this->fw('Update required tables').'</strong></td>
-				<td' . ($action_type == 'cmpFile|CURRENT_TABLES' ? ' class="notice"' : '') . '>' . $this->fw('<a href="' . htmlspecialchars($this->action . '&TYPO3_INSTALL[database_type]=cmpFile|CURRENT_TABLES#bottom') . '"><strong>COMPARE</strong></a>') . '</td>
-				<td>'.$this->fw('&nbsp;').'</td>
-				<td>'.$this->fw('&nbsp;').'</td>
-			</tr>';
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'CheckTheDatabaseMenu.html');
+			// Get the template part from the file
+		$menu = $this->contentObject->getSubpart($templateFile, '###MENU###');
 
-		$out.='<tr>
-				<td nowrap="nowrap"><strong>'.$this->fw('Dump static data').'</strong></td>
-				<td>'.$this->fw('&nbsp;').'</td>
-				<td nowrap="nowrap"' . ($action_type == 'import|CURRENT_STATIC' ? ' class="notice"' : '').'>' . $this->fw('<a href="' . htmlspecialchars($this->action . '&TYPO3_INSTALL[database_type]=import|CURRENT_STATIC#bottom') . '"><strong>IMPORT</strong></a>') . '</td>
-				<td>'.$this->fw('&nbsp;').'</td>
-			</tr>';
+		$menuMarkers = array(
+			'action' => $this->action,
+			'updateRequiredTables' => 'Update required tables',
+			'compare' => 'COMPARE',
+			'noticeCmpFileCurrent' => ($action_type == 'cmpFile|CURRENT_TABLES' ? ' class="notice"' : ''),
+			'dumpStaticData' => 'Dump static data',
+			'import' => 'IMPORT',
+			'noticeImportCurrent' => ($action_type == 'import|CURRENT_STATIC' ? ' class="notice"' : ''),
+			'noticeCmpTca' => ($action_type == "cmpTCA|" ? ' class="notice"' : ''),
+			'compareWithTca' => 'Compare with $TCA',
+			'noticeAdminUser' => ($action_type == "adminUser|" ? ' class="notice"' : ''),
+			'createAdminUser' => 'Create "admin" user',
+			'noticeUc' => ($action_type == "UC|" ? ' class="notice"' : ''),
+			'resetUserPreferences' => 'Reset user preferences',
+			'noticeCache' => ($action_type == "cache|" ? ' class="notice"' : ''),
+			'clearTables' => 'Clear tables'
+		);
+			// Get the subpart for extra SQL
+		$extraSql = $this->contentObject->getSubpart($menu, '###EXTRASQL###');
 
-		$out.='<tr>
-				<td colspan="4">&nbsp;</td>
-			</tr>';
-
-
-		reset($sql_files);
 		$directJump='';
-		while(list($k,$file)=each($sql_files))	{
-			if ($this->mode=="123" && !count($whichTables) && strstr($file,'_testsite'))	{
+		$extraSqlFiles = array();
+		foreach ($sql_files as $k => $file) {
+			if ($this->mode=="123" && !count($whichTables) && strstr($file,'_testsite')) {
 				$directJump = $this->action.'&TYPO3_INSTALL[database_type]=import|'.rawurlencode($file);
 			}
 			$lf=t3lib_div::testInt($k);
 			$fShortName = substr($file,strlen(PATH_site));
 
 			$spec1 = $spec2 = '';
-
-			$out.='<tr>
-				<td nowrap="nowrap">'.$this->fw($fShortName.' ('.t3lib_div::formatSize(filesize($file)).')').'</td>
-				<td' . ($action_type == 'cmpFile|' . $file ? ' class="notice"' : '') . '>' . $this->fw('<a href="' . htmlspecialchars($this->action . '&TYPO3_INSTALL[database_type]=cmpFile|' . rawurlencode($file) . '#bottom') . '"><strong>COMPARE</strong></a>') . '</td>
-				<td nowrap="nowrap"' . ($action_type == 'import|' . $file ? ' class="notice"' : '') . '>' . $this->fw('<a href="' . htmlspecialchars($this->action . '&TYPO3_INSTALL[database_type]=import|' . rawurlencode($file) . '#bottom') . '"><strong>IMPORT' . $spec1 . $spec2 . '</strong></a>') . '</td>
-				<td nowrap="nowrap"' . ($action_type == 'view|' . $file ? ' class="notice"' : '') . '>' . $this->fw('<a href="' . htmlspecialchars($this->action . '&TYPO3_INSTALL[database_type]=view|' . rawurlencode($file) . '#bottom') . '"><strong>VIEW' . $spec1 . $spec2 . '</strong></a>') . '</td>
-			</tr>';
+				// Define the markers content
+			$extraSqlMarkers = array(
+				'fileShortName' => $fShortName,
+				'fileSize' => t3lib_div::formatSize(filesize($file)),
+				'noticeCmpFile' => ($action_type == 'cmpFile|' . $file ? ' class="notice"' : ''),
+				'file' => rawurlencode($file),
+				'noticeImport' => ($action_type == 'import|' . $file ? ' class="notice"' : ''),
+				'specs' => $spec1 . $spec2,
+				'noticeView' => ($action_type == 'view|' . $file ? ' class="notice"' : ''),
+				'view' => 'VIEW'
+			);
+				// Fill the markers in the subpart
+			$extraSqlFiles[] = $this->contentObject->substituteMarkerArray(
+				$extraSql,
+				$extraSqlMarkers,
+				'###|###',
+				1,
+				0
+			);
 		}
-			// TCA
-		$out.='<tr>
-			<td></td>
-			<td colspan="3"' . ($action_type == "cmpTCA|" ? ' class="notice"' : '') . '><strong>' . $this->fw('<a href="' . htmlspecialchars($this->action . '&TYPO3_INSTALL[database_type]=cmpTCA|#bottom') . '">Compare with $TCA</a>') . '</strong></td>
-		</tr>';
-		$out.='<tr>
-			<td></td>
-			<td colspan="3"' . ($action_type == "adminUser|" ? ' class="notice"' : '') . '><strong>' . $this->fw('<a href="' . htmlspecialchars($this->action . '&TYPO3_INSTALL[database_type]=adminUser|#bottom') . '">Create "admin" user</a>') . '</strong></td>
-		</tr>';
-		$out.='<tr>
-			<td></td>
-			<td colspan="3"' . ($action_type == "UC|" ? ' class="notice"' : '') . '><strong>' . $this->fw('<a href="' . htmlspecialchars($this->action . '&TYPO3_INSTALL[database_type]=UC|#bottom') . '">Reset user preferences</a>') . '</strong></td>
-		</tr>';
-		$out.='<tr>
-			<td></td>
-			<td colspan="3"' . ($action_type == "cache|" ? ' class="notice"' : '') . '><strong>' . $this->fw('<a href="' . htmlspecialchars($this->action . '&TYPO3_INSTALL[database_type]=cache|#bottom') . '">Clear tables</a>') . '</strong></td>
-		</tr>';
+			// Substitute the subpart for extra SQL
+		$menu = $this->contentObject->substituteSubpart(
+			$menu,
+			'###EXTRASQL###',
+			implode(chr(10), $extraSqlFiles)
+		);
+			// Fill the markers
+		$menu = $this->contentObject->substituteMarkerArray(
+			$menu,
+			$menuMarkers,
+			'###|###',
+			1,
+			1
+		);
 
-		$theForm='<table border="0" cellpadding="2" cellspacing="2">'.$out.'</table>';
-		$theForm.='<a name="bottom"></a>';
-
-		if ($directJump)	{
-			if (!$action_type)	{
-				$this->message($headCode, 'Menu','
-				<script language="javascript" type="text/javascript">
-				window.location.href = "'.$directJump.'";
-				</script>',0,1);
+		if ($directJump) {
+			if (!$action_type) {
+				$this->message($headCode, 'Menu', '
+					<script language="javascript" type="text/javascript">
+						window.location.href = "' . $directJump . '";
+					</script>',
+				0, 1);
 			}
 		} else {
-			$this->message($headCode, 'Menu',"
-			From this menu you can select which of the available SQL files you want to either compare or import/merge with the existing database.<br /><br />
-			<strong>COMPARE:</strong> Compares the tables and fields of the current database and the selected file. It also offers to 'update' the difference found.<br />
-			<strong>IMPORT:</strong> Imports the SQL-dump file into the current database. You can either dump the raw file or choose which tables to import. In any case, you'll see a new screen where you must confirm the operation.<br />
-			<strong>VIEW:</strong> Shows the content of the SQL-file, limiting characters on a single line to a reader-friendly amount.<br /><br />
-			The SQL-files are selected from typo3conf/ (here you can put your own) and t3lib/stddb/ (TYPO3 distribution). The SQL-files should be made by the <em>mysqldump</em> tool or at least be formatted like that tool would do.
-	<br />
-			<br />
-			".$theForm."
-			",0,1);
+			$this->message($headCode, 'Menu', '
+				<p>
+					From this menu you can select which of the available SQL
+					files you want to either compare or import/merge with the
+					existing database.
+				</p>
+				<dl id="checkTheDatabaseExplanation">
+					<dt>
+						COMPARE:
+					</dt>
+					<dd>
+						Compares the tables and fields of the current database
+						and the selected file. It also offers to \'update\' the
+						difference found.
+					</dd>
+					<dt>
+						IMPORT:
+					</dt>
+					<dd>
+						Imports the SQL-dump file into the current database. You
+						can either dump the raw file or choose which tables to
+						import. In any case, you\'ll see a new screen where you
+						must confirm the operation.
+					</dd>
+					<dt>
+						VIEW:
+					</dt>
+					<dd>
+						Shows the content of the SQL-file, limiting characters
+						on a single line to a reader-friendly amount.
+					</dd>
+				</dl>
+				<p>
+					The SQL-files are selected from typo3conf/ (here you can put
+					your own) and t3lib/stddb/ (TYPO3 distribution). The
+					SQL-files should be made by the <em>mysqldump</em> tool or
+					at least be formatted like that tool would do.
+				</p>
+			' . $menu, 0, 1);
 		}
 
-
-		if ($action_type)	{
-			switch($actionParts[0])	{
+		if ($action_type) {
+			switch($actionParts[0]) {
 				case 'cmpFile':
 					$tblFileContent='';
 					if (!strcmp($actionParts[1],'CURRENT_TABLES')) {
 						$tblFileContent = t3lib_div::getUrl(PATH_t3lib.'stddb/tables.sql');
 
 						foreach ($GLOBALS['TYPO3_LOADED_EXT'] as $loadedExtConf) {
-							if (is_array($loadedExtConf) && $loadedExtConf['ext_tables.sql'])	{
+							if (is_array($loadedExtConf) && $loadedExtConf['ext_tables.sql']) {
 								$tblFileContent.= chr(10).chr(10).chr(10).chr(10).t3lib_div::getUrl($loadedExtConf['ext_tables.sql']);
 							}
 						}
-					} elseif (@is_file($actionParts[1]))	{
+					} elseif (@is_file($actionParts[1])) {
 						$tblFileContent = t3lib_div::getUrl($actionParts[1]);
 					}
-					if ($tblFileContent)	{
+					if ($tblFileContent) {
 						$fileContent = implode(
 							chr(10),
 							$this->getStatementArray($tblFileContent,1,'^CREATE TABLE ')
 						);
 						$FDfile = $this->getFieldDefinitions_fileContent($fileContent);
-						if (!count($FDfile))	{
+						if (!count($FDfile)) {
 							die ("Error: There were no 'CREATE TABLE' definitions in the provided file");
 						}
 
 							// Updating database...
-						if (is_array($this->INSTALL['database_update']))	{
+						if (is_array($this->INSTALL['database_update'])) {
 							$FDdb = $this->getFieldDefinitions_database();
 							$diff = $this->getDatabaseExtra($FDfile, $FDdb);
 							$update_statements = $this->getUpdateSuggestions($diff);
@@ -3572,18 +5712,27 @@
 
 						$tLabel = 'Update database tables and fields';
 
-						if ($remove_statements || $update_statements)	{
+						if ($remove_statements || $update_statements) {
 							$formContent = $this->generateUpdateDatabaseForm('get_form',$update_statements,$remove_statements,$action_type);
-							$this->message($tLabel,'Table and field definitions should be updated',"
-							There seems to be a number of differencies between the database and the selected SQL-file.
-							Please select which statements you want to execute in order to update your database:<br /><br />
-							".$formContent."
-							",2);
+							$this->message($tLabel, 'Table and field definitions should be updated', '
+								<p>
+									There seems to be a number of differencies
+									between the database and the selected
+									SQL-file.
+									<br />
+									Please select which statements you want to
+									execute in order to update your database:
+								</p>
+							' . $formContent, 2);
 						} else {
 							$formContent = $this->generateUpdateDatabaseForm('get_form',$update_statements,$remove_statements,$action_type);
-							$this->message($tLabel,'Table and field definitions are OK.',"
-							The tables and fields in the current database corresponds perfectly to the database in the selected SQL-file.
-							",-1);
+							$this->message($tLabel, 'Table and field definitions are OK.', '
+								<p>
+									The tables and fields in the current
+									database corresponds perfectly to the
+									database in the selected SQL-file.
+								</p>
+							', -1);
 						}
 					}
 				break;
@@ -3594,16 +5743,25 @@
 						// Displaying configured fields which are not in the database
 					$tLabel='Tables and fields in $TCA, but not in database';
 					$cmpTCA_DB = $this->compareTCAandDatabase($GLOBALS['TCA'],$FDdb);
-					if (!count($cmpTCA_DB['extra']))	{
-						$this->message($tLabel,'Table and field definitions OK','
-						All fields and tables configured in $TCA appeared to exist in the database as well
-						',-1);
+					if (!count($cmpTCA_DB['extra'])) {
+						$this->message($tLabel, 'Table and field definitions OK', '
+							<p>
+								All fields and tables configured in $TCA
+								appeared to exist in the database as well
+							</p>
+						', -1);
 					} else {
-						$this->message($tLabel,'Invalid table and field definitions in $TCA!','
-						There are some tables and/or fields configured in the $TCA array which do not exist in the database!
-						This will most likely cause you trouble with the TYPO3 backend interface!
-						',3);
-						while(list($tableName, $conf)=each($cmpTCA_DB['extra']))	{
+						$this->message($tLabel, 'Invalid table and field definitions in $TCA!', '
+							<p>
+								There are some tables and/or fields configured
+								in the $TCA array which do not exist in the
+								database!
+								<br />
+								This will most likely cause you trouble with the
+								TYPO3 backend interface!
+							</p>
+						', 3);
+						foreach ($cmpTCA_DB['extra'] as $tableName => $conf) {
 							$this->message($tLabel, $tableName,$this->displayFields($conf['fields'],0,'Suggested database field:'),2);
 						}
 					}
@@ -3611,7 +5769,7 @@
 						// Displaying tables that are not setup in
 					$cmpDB_TCA = $this->compareDatabaseAndTCA($FDdb,$GLOBALS['TCA']);
 					$excludeTables='be_sessions,fe_session_data,fe_sessions';
-					if (TYPO3_OS=='WIN')	{$excludeTables = strtolower($excludeTables);}
+					if (TYPO3_OS=='WIN') {$excludeTables = strtolower($excludeTables);}
 					$excludeFields = array(
 						'be_users' => 'uc,lastlogin,usergroup_cached_list',
 						'fe_users' => 'uc,lastlogin,fe_cruser_id',
@@ -3626,55 +5784,89 @@
 					$tLabel="Tables from database, but not in \$TCA";
 					$fLabel="Fields from database, but not in \$TCA";
 					$this->message($tLabel);
-					if (is_array($cmpDB_TCA['extra']))	{
-						while(list($tableName, $conf)=each($cmpDB_TCA['extra']))	{
+					if (is_array($cmpDB_TCA['extra'])) {
+						foreach ($cmpDB_TCA['extra'] as $tableName => $conf) {
 							if (!t3lib_div::inList($excludeTables,$tableName)
 									&& substr($tableName,0,4)!="sys_"
 									&& substr($tableName,-3)!="_mm"
 									&& substr($tableName,0,6)!="index_"
-									&& substr($tableName,0,6)!='cache_')	{
-								if ($conf['whole_table'])	{
+									&& substr($tableName,0,6)!='cache_') {
+								if ($conf['whole_table']) {
 									$this->message($tLabel, $tableName,$this->displayFields($conf['fields']),1);
 									$tCount++;
 								} else {
 									list($theContent, $fC)	= $this->displaySuggestions($conf['fields'],$excludeFields[$tableName]);
 									$fCount+=$fC;
-									if ($fC)	$this->message($fLabel, $tableName,$theContent,1);
+									if ($fC) {
+										$this->message($fLabel, $tableName,$theContent,1);
+									}
 								}
 							}
 						}
 					}
-					if (!$tCount)	{
-						$this->message($tLabel,'Correct number of tables in the database',"
-						There are no extra tables in the database compared to the configured tables in the \$TCA array.
-						",-1);
+					if (!$tCount) {
+						$this->message($tLabel, 'Correct number of tables in the database', '
+							<p>
+								There are no extra tables in the database
+								compared to the configured tables in the $TCA
+								array.
+							</p>
+						', -1);
 					} else {
-						$this->message($tLabel,'Extra tables in the database',"
-						There are some tables in the database which are not configured in the \$TCA array.
-						You should probably not worry about this, but please make sure that you know what these tables are about and why they are not configured in \$TCA.
-						",2);
+						$this->message($tLabel, 'Extra tables in the database', '
+							<p>
+								There are some tables in the database which are
+								not configured in the $TCA array.
+								<br />
+								You should probably not worry about this, but
+								please make sure that you know what these tables
+								are about and why they are not configured in
+								$TCA.
+							</p>
+						', 2);
 					}
 
-					if (!$fCount)	{
-						$this->message($fLabel,'Correct number of fields in the database',"
-						There are no additional fields in the database tables compared to the configured fields in the \$TCA array.
-						",-1);
+					if (!$fCount) {
+						$this->message($fLabel, 'Correct number of fields in the database', '
+							<p>
+								There are no additional fields in the database
+								tables compared to the configured fields in the
+								$TCA array.
+							</p>
+						', -1);
 					} else {
-						$this->message($fLabel,'Extra fields in the database',"
-						There are some additional fields the database tables which are not configured in the \$TCA array.
-						You should probably not worry about this, but please make sure that you know what these fields are about and why they are not configured in \$TCA.
-						",2);
+						$this->message($fLabel, 'Extra fields in the database', '
+							<p>
+								There are some additional fields the database
+								tables which are not configured in the $TCA
+								array.
+								<br />
+								You should probably not worry about this, but
+								please make sure that you know what these fields
+								are about and why they are not configured in
+								$TCA.
+							</p>
+						', 2);
 					}
 
 						// Displaying actual and suggested field database defitions
-					if (is_array($cmpTCA_DB['matching']))	{
+					if (is_array($cmpTCA_DB['matching'])) {
 						$tLabel="Comparison between database and \$TCA";
 
-						$this->message($tLabel,'Actual and suggested field definitions',"
-						This table shows you the suggested field definitions which are calculated based on the configuration in \$TCA.
-						If the suggested value differs from the actual current database value, you should not panic, but simply check if the datatype of that field is sufficient compared to the data, you want TYPO3 to put there.
-						",0);
-						while(list($tableName, $conf)=each($cmpTCA_DB['matching']))	{
+						$this->message($tLabel, 'Actual and suggested field definitions', '
+							<p>
+								This table shows you the suggested field
+								definitions which are calculated based on the
+								configuration in $TCA.
+								<br />
+								If the suggested value differs from the actual
+								current database value, you should not panic,
+								but simply check if the datatype of that field
+								is sufficient compared to the data, you want
+								TYPO3 to put there.
+							</p>
+						', 0);
+						foreach ($cmpTCA_DB['matching'] as $tableName => $conf) {
 							$this->message($tLabel, $tableName,$this->displayFieldComp($conf['fields'], $FDdb[$tableName]['fields']),1);
 						}
 					}
@@ -3682,44 +5874,44 @@
 				case 'import':
 					$mode123Imported=0;
 					$tblFileContent='';
-					if (preg_match('/^CURRENT_/', $actionParts[1]))	{
-						if (!strcmp($actionParts[1],'CURRENT_TABLES') || !strcmp($actionParts[1],'CURRENT_TABLES+STATIC'))	{
+					if (preg_match('/^CURRENT_/', $actionParts[1])) {
+						if (!strcmp($actionParts[1],'CURRENT_TABLES') || !strcmp($actionParts[1],'CURRENT_TABLES+STATIC')) {
 							$tblFileContent = t3lib_div::getUrl(PATH_t3lib.'stddb/tables.sql');
 
-							reset($GLOBALS['TYPO3_LOADED_EXT']);
-							while(list(,$loadedExtConf)=each($GLOBALS['TYPO3_LOADED_EXT']))	{
-								if (is_array($loadedExtConf) && $loadedExtConf['ext_tables.sql'])	{
+							foreach ($GLOBALS['TYPO3_LOADED_EXT'] as $loadedExtConf) {
+								if (is_array($loadedExtConf) && $loadedExtConf['ext_tables.sql']) {
 									$tblFileContent.= chr(10).chr(10).chr(10).chr(10).t3lib_div::getUrl($loadedExtConf['ext_tables.sql']);
 								}
 							}
 						}
-						if (!strcmp($actionParts[1],'CURRENT_STATIC') || !strcmp($actionParts[1],'CURRENT_TABLES+STATIC'))	{
-							reset($GLOBALS['TYPO3_LOADED_EXT']);
-							while(list(,$loadedExtConf)=each($GLOBALS['TYPO3_LOADED_EXT']))	{
-								if (is_array($loadedExtConf) && $loadedExtConf['ext_tables_static+adt.sql'])	{
+						if (!strcmp($actionParts[1],'CURRENT_STATIC') || !strcmp($actionParts[1],'CURRENT_TABLES+STATIC')) {
+							foreach ($GLOBALS['TYPO3_LOADED_EXT'] as $loadedExtConf) {
+								if (is_array($loadedExtConf) && $loadedExtConf['ext_tables_static+adt.sql']) {
 									$tblFileContent.= chr(10).chr(10).chr(10).chr(10).t3lib_div::getUrl($loadedExtConf['ext_tables_static+adt.sql']);
 								}
 							}
 						}
-					} elseif (@is_file($actionParts[1]))	{
+					} elseif (@is_file($actionParts[1])) {
 						$tblFileContent = t3lib_div::getUrl($actionParts[1]);
 					}
 
-					if ($tblFileContent)	{
+					if ($tblFileContent) {
 						$tLabel='Import SQL dump';
 							// Getting statement array from
 						$statements = $this->getStatementArray($tblFileContent,1);
 						list($statements_table, $insertCount) = $this->getCreateTables($statements,1);
 
 							// Updating database...
-						if ($this->INSTALL['database_import_all'])	{
+						if ($this->INSTALL['database_import_all']) {
 							$r=0;
-							foreach ($statements as $k=>$v)	{
+							foreach ($statements as $k=>$v) {
 								$res = $GLOBALS['TYPO3_DB']->admin_query($v);
 								$r++;
 							}
 
-								// Make a database comparison because some tables that are defined twice have not been created at this point. This applies to the "pages.*" fields defined in sysext/cms/ext_tables.sql for example.
+								// Make a database comparison because some tables that are defined twice have
+								// not been created at this point. This applies to the "pages.*"
+								// fields defined in sysext/cms/ext_tables.sql for example.
 							$fileContent = implode(
 								$this->getStatementArray($tblFileContent,1,'^CREATE TABLE '),
 								chr(10)
@@ -3728,13 +5920,13 @@
 							$FDdb = $this->getFieldDefinitions_database();
 							$diff = $this->getDatabaseExtra($FDfile, $FDdb);
 							$update_statements = $this->getUpdateSuggestions($diff);
-							if (is_array($update_statements['add']))	{
-								foreach ($update_statements['add'] as $statement)	{
+							if (is_array($update_statements['add'])) {
+								foreach ($update_statements['add'] as $statement) {
 									$res = $GLOBALS['TYPO3_DB']->admin_query($statement);
 								}
 							}
 
-							if ($this->mode=='123')	{
+							if ($this->mode=='123') {
 									// Create default be_user admin/password
 								$username = 'admin';
 								$pass = 'password';
@@ -3759,77 +5951,157 @@
 								}
 							}
 
-							$this->message($tLabel,'Imported ALL',"
-								Queries: ".$r."
-							",1,1);
-							if (t3lib_div::_GP('goto_step'))	{
+							$this->message($tLabel, 'Imported ALL', '
+								<p>
+									Queries: ' . $r . '
+								</p>
+							', 1, 1);
+							if (t3lib_div::_GP('goto_step')) {
 								$this->action.='&step='.t3lib_div::_GP('goto_step');
 								t3lib_utility_Http::redirect($this->action);
 							}
-						} elseif (is_array($this->INSTALL['database_import']))	{
+						} elseif (is_array($this->INSTALL['database_import'])) {
 								// Traverse the tables
-							reset($this->INSTALL['database_import']);
-							while(list($table,$md5str)=each($this->INSTALL['database_import']))	{
-								if ($md5str==md5($statements_table[$table]))	{
+							foreach ($this->INSTALL['database_import'] as $table => $md5str) {
+								if ($md5str==md5($statements_table[$table])) {
 									$res = $GLOBALS['TYPO3_DB']->admin_query('DROP TABLE IF EXISTS '.$table);
 									$res = $GLOBALS['TYPO3_DB']->admin_query($statements_table[$table]);
 
-									if ($insertCount[$table])	{
+									if ($insertCount[$table]) {
 										$statements_insert = $this->getTableInsertStatements($statements, $table);
-										reset($statements_insert);
-										while(list($k,$v)=each($statements_insert))	{
+										foreach ($statements_insert as $k => $v) {
 											$res = $GLOBALS['TYPO3_DB']->admin_query($v);
 										}
 									}
 
-									$this->message($tLabel,"Imported '".$table."'","
-										Rows: ".$insertCount[$table]."
-									",1,1);
+									$this->message($tLabel, 'Imported \'' . $table . '\'', '
+										<p>
+											Rows: ' . $insertCount[$table] . '
+										</p>
+									', 1, 1);
 								}
 							}
 						}
 
 						$mode123Imported=$this->isBasicComplete($tLabel);
 
-						if (!$mode123Imported)	{
+						if (!$mode123Imported) {
 								// Re-Getting current tables - may have been changed during import
 							$whichTables=$this->getListOfTables();
 
-							if (count($statements_table))	{
+							if (count($statements_table)) {
 								reset($statements_table);
 								$out='';
-								while(list($table,$definition)=each($statements_table))	{
-									$exist=isset($whichTables[$table]);
-									$out.='<tr>
-										<td><input type="checkbox" name="TYPO3_INSTALL[database_import]['.$table.']" id="database_import_'.$table.'" value="'.md5($definition).'"></td>
-										<td><label for="database_import_'.$table.'"><strong>'.$this->fw($table).'</strong></label></td>
-										<td><img src="clear.gif" width="10" height="1"></td>
-										<td nowrap="nowrap">'.$this->fw($insertCount[$table]?"Rows: ".$insertCount[$table]:"").'</td>
-										<td><img src="clear.gif" width="10" height="1"></td>
-										<td nowrap="nowrap">'.($exist?'<img src="'.$this->backPath.'gfx/icon_warning.gif" width="18" height="16" align="top" alt="">'.$this->fw('Table exists!'):'').'</td>
-										</tr>';
-								}
+									// Get the template file
+								$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'CheckTheDatabaseImport.html');
+									// Get the template part from the file
+								$content = $this->contentObject->getSubpart($templateFile, '###IMPORT###');
 
-								$content ='';
-								if ($this->mode!='123')	{
-									$content.='<table border="0" cellpadding="0" cellspacing="0">'.$out.'</table>
-									<hr />
-									';
+								if ($this->mode!='123') {
+									$tables = array();
+										// Get the subpart for regular mode
+									$regularModeSubpart = $this->contentObject->getSubpart($content, '###REGULARMODE###');
+									foreach ($statements_table as $table => $definition) {
+											// Get the subpart for rows
+										$tableSubpart = $this->contentObject->getSubpart($content, '###ROWS###');
+											// Fill the 'table exists' part when it exists
+										$exist=isset($whichTables[$table]);
+										if ($exist) {
+												// Get the subpart for table exists
+											$existSubpart = $this->contentObject->getSubpart($tableSubpart, '###EXIST###');
+												// Define the markers content
+											$existMarkers = array (
+												'tableExists' => 'Table exists!',
+												'backPath' => $this->backPath
+											);
+												// Fill the markers in the subpart
+											$existSubpart = $this->contentObject->substituteMarkerArray(
+												$existSubpart,
+												$existMarkers,
+												'###|###',
+												1,
+												1
+											);
+										}
+											// Substitute the subpart for table exists
+										$tableHtml = $this->contentObject->substituteSubpart(
+											$tableSubpart,
+											'###EXIST###',
+											$existSubpart
+										);
+											// Define the markers content
+										$tableMarkers = array (
+											'table' => $table,
+											'definition' => md5($definition),
+											'count' => $insertCount[$table] ? $insertCount[$table] : '',
+											'rowLabel' => $insertCount[$table] ? 'Rows: ' : '',
+											'tableExists' => 'Table exists!',
+											'backPath' => $this->backPath
+										);
+											// Fill the markers
+										$tables[] = $this->contentObject->substituteMarkerArray(
+											$tableHtml,
+											$tableMarkers,
+											'###|###',
+											1,
+											1
+										);
+									}
+										// Substitute the subpart for the rows
+									$regularModeSubpart = $this->contentObject->substituteSubpart(
+										$regularModeSubpart,
+										'###ROWS###',
+										implode(chr(10), $tables)
+									);
 								}
-								$content.='<input type="checkbox" name="TYPO3_INSTALL[database_import_all]" id="database_import_all" value="1"'.($this->mode=="123"||t3lib_div::_GP('presetWholeTable')?' checked="checked"':'').'> <label for="database_import_all">'.$this->fw("Import the whole file '".basename($actionParts[1])."' directly (ignores selections above)").'</label><br />
+									// Substitute the subpart for the regular mode
+								$content = $this->contentObject->substituteSubpart(
+									$content,
+									'###REGULARMODE###',
+									$regularModeSubpart
+								);
+									// Define the markers content
+								$contentMarkers = array(
+									'checked' => ($this->mode == '123' || t3lib_div::_GP('presetWholeTable') ? 'checked="checked"' : ''),
+									'label' => 'Import the whole file \'' . basename($actionParts[1]) . '\' directly (ignores selections above)'
+								);
+									// Fill the markers
+								$content = $this->contentObject->substituteMarkerArray(
+									$content,
+									$contentMarkers,
+									'###|###',
+									1,
+									1
+								);
 
-								';
 								$form = $this->getUpdateDbFormWrap($action_type, $content);
-								$this->message($tLabel,'Select tables to import',"
-								This is an overview of the CREATE TABLE definitions in the SQL file.
-								Select which tables you want to dump to the database.
-								Any table you choose dump to the database is dropped from the database first, so you'll lose all data in existing tables.
-								".$form,1,1);
+								$this->message($tLabel, 'Select tables to import', '
+									<p>
+										This is an overview of the CREATE TABLE
+										definitions in the SQL file.
+										<br />
+										Select which tables you want to dump to
+										the database.
+										<br />
+										Any table you choose dump to the
+										database is dropped from the database
+										first, so you\'ll lose all data in
+										existing tables.
+									</p>
+								' . $form, 1, 1);
 							} else {
-								$this->message($tLabel,'No tables',"
-								There seems to be no CREATE TABLE definitions in the SQL file.
-								This tool is intelligently creating one table at a time and not just dumping the whole content of the file uncritically. That's why there must be defined tables in the SQL file.
-								",3,1);
+								$this->message($tLabel, 'No tables', '
+									<p>
+										There seems to be no CREATE TABLE
+										definitions in the SQL file.
+										<br />
+										This tool is intelligently creating one
+										table at a time and not just dumping the
+										whole content of the file uncritically.
+										That\'s why there must be defined tables
+										in the SQL file.
+									</p>
+								', 3, 1);
 							}
 						}
 					}
@@ -3843,101 +6115,178 @@
 						$maxL = 1000;
 						$strLen = strlen($fileContent);
 						$maxlen = 200+($maxL-t3lib_div::intInRange(($strLen-20000)/100,0,$maxL));
-						if (count($statements))	{
+						if (count($statements)) {
 							$out = '';
 							foreach ($statements as $statement) {
-								$out.= nl2br(htmlspecialchars(t3lib_div::fixed_lgd_cs($statement,$maxlen)).chr(10).chr(10));
+								$out.= '<p>' . nl2br(htmlspecialchars(t3lib_div::fixed_lgd_cs($statement,$maxlen))) . '</p>';
 							}
 						}
 						$this->message($tLabel,'Content of '.basename($actionParts[1]),$out,1);
 					}
 				break;
-				case 'adminUser':	// Create admin user
-					if ($whichTables['be_users'])	{
-						if (is_array($this->INSTALL['database_adminUser']))	{
+					// Create admin user
+				case 'adminUser':
+					if ($whichTables['be_users']) {
+						if (is_array($this->INSTALL['database_adminUser'])) {
 							$username = preg_replace('/[^\da-z._-]/i', '', trim($this->INSTALL['database_adminUser']['username']));
 							$pass = trim($this->INSTALL['database_adminUser']['password']);
 							$pass2 = trim($this->INSTALL['database_adminUser']['password2']);
-							if ($username && $pass && $pass2)	{
+							if ($username && $pass && $pass2) {
 								if ($pass != $pass2) {
 									$this->message($headCode, 'Passwords are not equal!', '
-										The passwords entered twice are not equal.',2,1);
+										<p>
+											The passwords entered twice are not
+											equal.
+										</p>
+									', 2, 1);
 								} else {
-								$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'be_users', 'username='.$GLOBALS['TYPO3_DB']->fullQuoteStr($username, 'be_users'));
-								if (!$GLOBALS['TYPO3_DB']->sql_num_rows($res))	{
+									$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'be_users', 'username='.$GLOBALS['TYPO3_DB']->fullQuoteStr($username, 'be_users'));
+									if (!$GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
 
-									$insertFields = array(
-										'username' => $username,
-										'password' => md5($pass),
-										'admin' => 1,
-										'uc' => '',
-										'fileoper_perms' => 0,
-										'tstamp' => $GLOBALS['EXEC_TIME'],
-										'crdate' => $GLOBALS['EXEC_TIME']
-									);
+										$insertFields = array(
+											'username' => $username,
+											'password' => md5($pass),
+											'admin' => 1,
+											'uc' => '',
+											'fileoper_perms' => 0,
+											'tstamp' => $GLOBALS['EXEC_TIME'],
+											'crdate' => $GLOBALS['EXEC_TIME']
+										);
 
-									$result = $GLOBALS['TYPO3_DB']->exec_INSERTquery('be_users', $insertFields);
+										$result = $GLOBALS['TYPO3_DB']->exec_INSERTquery('be_users', $insertFields);
 
-									$this->isBasicComplete($headCode);
+										$this->isBasicComplete($headCode);
 
-									if ($result) {
-										$this->message($headCode,'User created','
-												Username: <strong>'.htmlspecialchars($username).'</strong><br />',
-											1,1);
+										if ($result) {
+											$this->message($headCode, 'User created', '
+												<p>
+													Username:
+													<strong>' .
+														htmlspecialchars($username) . '
+													</strong>
+												</p>
+											', 1, 1);
+										} else {
+											$this->message($headCode, 'User not created', '
+												<p>
+													Error:
+													<strong>' .
+														htmlspecialchars($GLOBALS['TYPO3_DB']->sql_error()) . '
+													</strong>
+												</p>
+											', 3, 1);
+										}
 									} else {
-										$this->message($headCode,'User not created','
-											Error: <strong>'.htmlspecialchars($GLOBALS['TYPO3_DB']->sql_error()).'</strong><br />',
-											3,1);
+										$this->message($headCode, 'Username not unique!', '
+											<p>
+												The username,
+												<strong>' .
+													htmlspecialchars($username) . '
+												</strong>
+												, was not unique.
+											</p>
+										', 2, 1);
 									}
-								} else {
-									$this->message($headCode,'Username not unique!','
-									The username, <strong>'.htmlspecialchars($username).'</strong>, was not unique.',2,1);
 								}
+							} else {
+								$this->message($headCode, 'Missing data!', '
+									<p>
+										Not all required form fields have been
+										filled.
+									</p>
+								', 2, 1);
 							}
-						} else {
-							$this->message($headCode,'Missing data!','
-								Not all required form fields have been filled.',2,1);
 						}
-						}
-						$content = '
-						<input type="text" name="TYPO3_INSTALL[database_adminUser][username]"> username - unique, no space, lowercase<br />
-						<input type="password" name="TYPO3_INSTALL[database_adminUser][password]"> password
-						<input type="password" name="TYPO3_INSTALL[database_adminUser][password2]"> password (repeated)
-						';
+							// Get the template file
+						$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'CheckTheDatabaseAdminUser.html');
+							// Get the template part from the file
+						$content = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+							// Define the markers content
+						$contentMarkers = array(
+							'userName' => 'username - unique, no space, lowercase',
+							'password' => 'password',
+							'repeatPassword' => 'password (repeated)'
+						);
+							// Fill the markers
+						$content = $this->contentObject->substituteMarkerArray(
+							$content,
+							$contentMarkers,
+							'###|###',
+							1,
+							1
+						);
 						$form = $this->getUpdateDbFormWrap($action_type, $content);
-						$this->message($headCode,'Create admin user',"
-						Enter username and password for a new admin user.<br />
-						You should use this function only if there are no admin users in the database, for instance if this is a blank database.<br />
-						After you've created the user, log in and add the rest of the user information, like email and real name.<br />
-						<br />
-						".$form."
-						",0,1);
+						$this->message($headCode, 'Create admin user', '
+							<p>
+								Enter username and password for a new admin
+								user.
+								<br />
+								You should use this function only if there are
+								no admin users in the database, for instance if
+								this is a blank database.
+								<br />
+								After you\'ve created the user, log in and add
+								the rest of the user information, like email and
+								real name.
+							</p>
+						' . $form, 0, 1);
 					} else {
-						$this->message($headCode,'Required table not in database',"
-						'be_users' must be a table in the database!
-						",3,1);
+						$this->message($headCode, 'Required table not in database', '
+							<p>
+								\'be_users\' must be a table in the database!
+							</p>
+						', 3, 1);
 					}
 				break;
-				case 'UC':	// clear uc
-					if ($whichTables['be_users'])	{
-						if (!strcmp($this->INSTALL['database_UC'],1))	{
+					// clear uc
+				case 'UC':
+					if ($whichTables['be_users']) {
+						if (!strcmp($this->INSTALL['database_UC'],1)) {
 							$GLOBALS['TYPO3_DB']->exec_UPDATEquery('be_users', '', array('uc' => ''));
-							$this->message($headCode,'Clearing be_users.uc','Done.',1);
+							$this->message($headCode, 'Clearing be_users.uc', '
+								<p>
+									Done.
+								</p>
+							', 1);
 						}
-						$content = '
-						<input type="checkbox" name="TYPO3_INSTALL[database_UC]" id="database_UC" value="1" checked="checked"> <label for="database_UC">Clear be_users preferences ("uc" field)</label>
-						';
+							// Get the template file
+						$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'CheckTheDatabaseUc.html');
+							// Get the template part from the file
+						$content = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+							// Define the markers content
+						$contentMarkers = array(
+							'clearBeUsers' => 'Clear be_users preferences ("uc" field)'
+						);
+							// Fill the markers
+						$content = $this->contentObject->substituteMarkerArray(
+							$content,
+							$contentMarkers,
+							'###|###',
+							1,
+							1
+						);
+
 						$form = $this->getUpdateDbFormWrap($action_type, $content);
-						$this->message($headCode,'Clear user preferences',"
-						If you press this button all backend users from the tables be_users will have their user preferences cleared (field 'uc' set to an empty string).<br />
-						This may come in handy in rare cases where that configuration may be corrupt.<br />
-						Clearing this will clear all user settings from the 'Setup' module.<br />
-						<br />
-						".$form);
+						$this->message($headCode, 'Clear user preferences', '
+							<p>
+								If you press this button all backend users from
+								the tables be_users will have their user
+								preferences cleared (field \'uc\' set to an
+								empty string).
+								<br />
+								This may come in handy in rare cases where that
+								configuration may be corrupt.
+								<br />
+								Clearing this will clear all user settings from
+								the \'Setup\' module.
+							</p>
+						' . $form);
 					} else {
-						$this->message($headCode,'Required table not in database',"
-						'be_users' must be a table in the database!
-						",3);
+						$this->message($headCode, 'Required table not in database', '
+							<p>
+								\'be_users\' must be a table in the database!
+							</p>
+						', 3);
 					}
 				break;
 				case 'cache':
@@ -3948,23 +6297,47 @@
 						(t3lib_extMgm::isLoaded('sys_stat') ? ',--div--,sys_stat' : '')
 					);
 
-					if (is_array($this->INSTALL['database_clearcache']))	{
-						$qList=array();
-						reset($tableListArr);
-						while(list(,$table)=each($tableListArr))	{
-							if ($table!='--div--')	{
+					if (is_array($this->INSTALL['database_clearcache'])) {
+						$qList = array();
+							// Get the template file
+						$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'CheckTheDatabaseCache.html');
+							// Get the subpart for emptied tables
+						$emptiedTablesSubpart = $this->contentObject->getSubpart($templateFile, '###EMPTIEDTABLES###');
+							// Get the subpart for table
+						$tableSubpart = $this->contentObject->getSubpart($emptiedTablesSubpart, '###TABLE###');
+						foreach ($tableListArr as $table) {
+							if ($table!='--div--') {
 								$table_c = TYPO3_OS=='WIN' ? strtolower($table) : $table;
-								if ($this->INSTALL['database_clearcache'][$table] && $whichTables[$table_c])	{
+								if ($this->INSTALL['database_clearcache'][$table] && $whichTables[$table_c]) {
 									$GLOBALS['TYPO3_DB']->exec_DELETEquery($table, '');
-									$qList[] = $table;
+										// Define the markers content
+									$emptiedTablesMarkers = array(
+										'tableName' => $table
+									);
+										// Fill the markers in the subpart
+									$qList[] = $this->contentObject->substituteMarkerArray(
+										$tableSubpart,
+										$emptiedTablesMarkers,
+										'###|###',
+										1,
+										1
+									);
 								}
 							}
 						}
-						if (count($qList))	{
-							$this->message($headCode,'Clearing cache','
-							The following tables were emptied:<br /><br />
-							'.implode($qList,'<br />')
-							,1);
+							// Substitute the subpart for table
+						$emptiedTablesSubpart = $this->contentObject->substituteSubpart(
+							$emptiedTablesSubpart,
+							'###TABLE###',
+							implode(chr(10), $qList)
+						);
+
+						if (count($qList)) {
+							$this->message($headCode, 'Clearing cache', '
+								<p>
+									The following tables were emptied:
+								</p>
+							' . $emptiedTablesSubpart, 1);
 						}
 					}
 						// Count entries and make checkboxes
@@ -3987,27 +6360,71 @@
 					$checkBoxes=array();
 					$countEntries=array();
 					reset($tableListArr);
-					while(list(,$table)=each($tableListArr))	{
-						if ($table!='--div--')	{
+						// Get the template file
+					$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'CheckTheDatabaseCache.html');
+						// Get the subpart for table list
+					$tableListSubpart = $this->contentObject->getSubpart($templateFile, '###TABLELIST###');
+						// Get the subpart for the group separator
+					$groupSubpart = $this->contentObject->getSubpart($tableListSubpart, '###GROUP###');
+						// Get the subpart for a single table
+					$singleTableSubpart = $this->contentObject->getSubpart($tableListSubpart, '###SINGLETABLE###');
+					$group = array();
+					$checkBoxes = array();
+					foreach ($tableListArr as $table) {
+						if ($table!='--div--') {
 							$table_c = TYPO3_OS=='WIN' ? strtolower($table) : $table;
-							if ($whichTables[$table_c])	{
+							if ($whichTables[$table_c]) {
 								$countEntries[$table] = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('*', $table);
 									// Checkboxes:
-								$checkBoxes[]= '<input type="checkbox" name="TYPO3_INSTALL[database_clearcache]['.$table.']" id="TYPO3_INSTALL[database_clearcache]['.$table.']" value="1"'.($this->INSTALL['database_clearcache'][$table]||$_GET['PRESET']['database_clearcache'][$table]?' checked="checked"':'').'> <label for="TYPO3_INSTALL[database_clearcache]['.$table.']"><strong>'.$table.'</strong> ('.$countEntries[$table].' rows) - '.$labelArr[$table].'</label>';
+								if (
+									$this->INSTALL['database_clearcache'][$table] ||
+									$_GET['PRESET']['database_clearcache'][$table]
+								) {
+									$checked = 'checked="checked"';
+								} else {
+									$checked = '';
+								}
+									// Define the markers content
+								$singleTableMarkers = array(
+									'table' => $table,
+									'checked' => $checked,
+									'count' => '(' . $countEntries[$table] . ' rows)',
+									'label' => $labelArr[$table]
+
+								);
+									// Fill the markers in the subpart
+								$checkBoxes[] = $this->contentObject->substituteMarkerArray(
+									$singleTableSubpart,
+									$singleTableMarkers,
+									'###|###',
+									1,
+									1
+								);
 							}
 						} else {
-								$checkBoxes[]= 	'<hr />';
+								$checkBoxes[] = $groupSubpart;
 						}
 					}
+						// Substitute the subpart for the single tables
+					$content = $this->contentObject->substituteSubpart(
+						$tableListSubpart,
+						'###SINGLETABLE###',
+						implode(chr(10), $checkBoxes)
+					);
+						// Substitute the subpart for the group separator
+					$content = $this->contentObject->substituteSubpart(
+						$content,
+						'###GROUP###',
+						''
+					);
 
-					$content = implode('<br />',$checkBoxes).'<br /><br />';
-
 					$form = $this->getUpdateDbFormWrap($action_type, $content);
-					$this->message($headCode,'Clear out selected tables','
-					Pressing this button will delete all records from the selected tables.<br />
-					<br />
-					'.$form.'
-					');
+					$this->message($headCode, 'Clear out selected tables', '
+						<p>
+							Pressing this button will delete all records from
+							the selected tables.
+						</p>
+					' . $form);
 				break;
 			}
 		}
@@ -4016,11 +6433,11 @@
 	}
 
 	/**
-	 * Generates update wizard, outputs it as well
+	 * Generates update wizard
 	 *
-	 * @return	void
+	 * @return void
 	 */
-	function updateWizard()	{
+	function updateWizard() {
 		global $TYPO3_CONF_VARS;
 
 			// clear cache files
@@ -4029,12 +6446,12 @@
 			// generate new cache files and include them
 		$GLOBALS['TYPO3_CONF_VARS']['EXT']['extCache'] = 1;
 		$TYPO3_LOADED_EXT = t3lib_extMgm::typo3_loadExtensions();
-		if ($TYPO3_LOADED_EXT['_CACHEFILE'])	{
-			require(PATH_typo3conf.$TYPO3_LOADED_EXT['_CACHEFILE'].'_ext_localconf.php');
+		if ($TYPO3_LOADED_EXT['_CACHEFILE']) {
+			require(PATH_typo3conf . $TYPO3_LOADED_EXT['_CACHEFILE'] . '_ext_localconf.php');
 		}
 
 			// call wizard
-		$action = ($this->INSTALL['database_type']?$this->INSTALL['database_type']:'checkForUpdate');
+		$action = ($this->INSTALL['database_type'] ? $this->INSTALL['database_type'] : 'checkForUpdate');
 		$this->updateWizard_parts($action);
 		$this->output($this->outputWrapper($this->printAll()));
 	}
@@ -4042,131 +6459,331 @@
 	/**
 	 * Implements the steps for the update wizard
 	 *
-	 * @param	string		action which should be done.
-	 * @return	void
+	 * @param string $action Which should be done.
+	 * @return void
 	 */
-	function updateWizard_parts($action)	{
+	function updateWizard_parts($action) {
 		$content = '';
-		switch ($action)	{
-			case 'checkForUpdate':	// first step - check for updates available
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'UpdateWizardParts.html');
+
+		switch ($action) {
+				// first step - check for updates available
+			case 'checkForUpdate':
+					// Get the subpart for check for update
+				$checkForUpdateSubpart = $this->contentObject->getSubpart($templateFile, '###CHECKFORUPDATE###');
 				$title = 'Step 1 - Introduction';
 				$updateWizardBoxes = '';
-				if (!$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'])	{
-					$content = '<strong>No updates registered!</strong>';
-					break;
-				}
+				if (!$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']) {
+					$updatesAvailableSubpart = '
+						<p>
+							<strong>
+								No updates registered!
+							</strong>
+						</p>
+					';
+				} else {
 
-					// step through list of updates, and check if update is needed and if yes, output an explanation
-				foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'] as $identifier => $className)	{
-					$tmpObj = $this->getUpgradeObjInstance($className, $identifier);
-					if (method_exists($tmpObj,'checkForUpdate'))	{
-						$explanation = '';
-						if ($tmpObj->checkForUpdate($explanation))	{
-							$updateWizardBoxes.= '
-								<div class="updateWizardBoxes">
-									<h3>'.$identifier.'</h3>
-									<p>'.str_replace(chr(10),'<br />',$explanation).'</p>
-									<input type="submit" name="TYPO3_INSTALL[update]['.$identifier.']" id="TYPO3_INSTALL[update]['.$identifier.']" value="Next" />
-								</div>';
+						// step through list of updates, and check if update is needed and if yes, output an explanation
+					$updatesAvailableSubpart = $this->contentObject->getSubpart($checkForUpdateSubpart, '###UPDATESAVAILABLE###');
+					$updateWizardBoxesSubpart = $this->contentObject->getSubpart($updatesAvailableSubpart, '###UPDATEWIZARDBOXES###');
+					$singleUpdateWizardBoxSubpart = $this->contentObject->getSubpart($updateWizardBoxesSubpart, '###SINGLEUPDATEWIZARDBOX###');
+					$singleUpdate = array();
+					foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'] as $identifier => $className) {
+						$tmpObj = $this->getUpgradeObjInstance($className, $identifier);
+						if (method_exists($tmpObj,'checkForUpdate')) {
+							$explanation = '';
+							if ($tmpObj->checkForUpdate($explanation)) {
+								$updateMarkers = array(
+									'identifier' => $identifier,
+									'explanation' => $explanation,
+									'next' => 'Next'
+								);
+								$singleUpdate[] = $this->contentObject->substituteMarkerArray(
+									$singleUpdateWizardBoxSubpart,
+									$updateMarkers,
+									'###|###',
+									1,
+									1
+								);
+							}
 						}
 					}
-				}
 
-				if ($updateWizardBoxes)	{
-					$updateWizardBoxes = '<table><tr><td>'.$updateWizardBoxes.'</td></tr></table>';
-					$content = '
-						<form action="'.$this->action.'#bottom" method="post">
-							<input type="hidden" name="TYPO3_INSTALL[database_type]" value="'.htmlspecialchars('getUserInput').'">
-							'.$updateWizardBoxes.'</form>';
-				} else {
-					$content = '<strong>No updates to perform!</strong>';
+					if (!empty($singleUpdate)) {
+						$updateWizardBoxesSubpart = $this->contentObject->substituteSubpart(
+							$updateWizardBoxesSubpart,
+							'###SINGLEUPDATEWIZARDBOX###',
+							implode(chr(10), $singleUpdate)
+						);
+						$updateWizardBoxesMarkers = array(
+							'action' => $this->action
+						);
+						$updateWizardBoxesSubpart = $this->contentObject->substituteMarkerArray(
+							$updateWizardBoxesSubpart,
+							$updateWizardBoxesMarkers,
+							'###|###',
+							1,
+							1
+						);
+					} else {
+						$updateWizardBoxesSubpart = '
+							<p>
+								<strong>
+									No updates to perform!
+								</strong>
+							</p>
+						';
+					}
+					$updatesAvailableSubpart = $this->contentObject->substituteSubpart(
+						$updatesAvailableSubpart,
+						'###UPDATEWIZARDBOXES###',
+						$updateWizardBoxesSubpart
+					);
+					$updatesAvailableMarkers = array(
+							'finalStep' => 'Final Step',
+							'finalStepExplanation' => '
+								<p>
+									When all updates are done you should check
+									your database for required updates.
+									<br />
+									Perform
+									<strong>
+										COMPARE DATABASE
+									</strong>
+									as often until no more changes are required.
+									<br />
+									<br />
+								</p>
+							',
+							'compareDatabase' => 'COMPARE DATABASE'
+						);
+						$updatesAvailableSubpart = $this->contentObject->substituteMarkerArray(
+							$updatesAvailableSubpart,
+							$updatesAvailableMarkers,
+							'###|###',
+							1,
+							1
+						);
 				}
-				$content .= '<table><tbody><tr><td>
-				<div class="updateWizardBoxes">
-				<h3>Final Step</h3>
-				<p>When all updates are done you should check your database for required updates.<br />
-				Perform <strong>COMPARE DATABASE</strong> as often until no more changes are required.<br /><br />
-				<input type="button" onclick="document.location.href=\'index.php?TYPO3_INSTALL[type]=database&TYPO3_INSTALL[database_type]=cmpFile|CURRENT_TABLES#bottom\';"
-				value="COMPARE DATABASE" />
-				</p>
-				</div>
-				</td></tr></tbody></table>';
+				$content = $this->contentObject->substituteSubpart(
+					$checkForUpdateSubpart,
+					'###UPDATESAVAILABLE###',
+					$updatesAvailableSubpart
+				);
 			break;
-			case 'getUserInput':	// second step - get user input and ask for final confirmation
+				// second step - get user input and ask for final confirmation
+			case 'getUserInput':
 				$title = 'Step 2 - Configuration of updates';
-				$formContent = '<p class="innerWidth"><strong>The following updates will be performed:</strong></p>';
-				if (!$this->INSTALL['update'])	{
-					$content = '<strong>No updates selected!</strong>';
+				$getUserInputSubpart = $this->contentObject->getSubpart($templateFile, '###GETUSERINPUT###');
+
+				$markers = array(
+					'introduction' => 'The following updates will be performed:',
+					'showDatabaseQueries' => 'Show database queries performed',
+					'performUpdates' => 'Perform updates!',
+					'action' => $this->action
+				);
+
+				if (!$this->INSTALL['update']) {
+					$noUpdatesAvailableSubpart = $this->contentObject->getSubpart($getUserInputSubpart, '###NOUPDATESAVAILABLE###');
+
+					$noUpdateMarkers['noUpdates'] = 'No updates selected!';
+
+					$noUpdatesAvailableSubpart = $this->contentObject->substituteMarkerArray(
+						$noUpdatesAvailableSubpart,
+						$noUpdateMarkers,
+						'###|###',
+						1,
+						1
+					);
 					break;
-				}
+				} else {
 					// update methods might need to get custom data
-				foreach ($this->INSTALL['update'] as $identifier => $tmp)	{
-					$className = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][$identifier];
+					$updatesAvailableSubpart = $this->contentObject->getSubpart($getUserInputSubpart, '###UPDATESAVAILABLE###');
+					foreach ($this->INSTALL['update'] as $identifier => $tmp) {
+						$updateMarkers = array();
 
-					$tmpObj = $this->getUpgradeObjInstance($className, $identifier);
+						$className = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][$identifier];
 
-					$formContent .= '<p><strong>'.$identifier.'</strong><input type="hidden" name="TYPO3_INSTALL[update][extList][]" value="'.$identifier.'" /><br />';
-					if (method_exists($tmpObj,'getUserInput'))	{
-						$formContent .= $tmpObj->getUserInput('TYPO3_INSTALL[update]['.$identifier.']');
+						$tmpObj = $this->getUpgradeObjInstance($className, $identifier);
+
+						$updateMarkers['identifier'] = $identifier;
+
+						if (method_exists($tmpObj,'getUserInput')) {
+							$updateMarkers['identifierMethod'] = $tmpObj->getUserInput('TYPO3_INSTALL[update][' . $identifier . ']');
+						}
+
+						$updateItems[] = $this->contentObject->substituteMarkerArray(
+							$updatesAvailableSubpart,
+							$updateMarkers,
+							'###|###',
+							1,
+							1
+						);
 					}
-					$formContent.= '</p>';
+					$updatesAvailableSubpart = implode(chr(10), $updateItems);
 				}
-				$formContent.= '<input type="checkbox" name="TYPO3_INSTALL[update][showDatabaseQueries]" id="TYPO3_INSTALL[update][showDatabaseQueries]" value="1" /> <label for="TYPO3_INSTALL[update][showDatabaseQueries]">Show database queries performed</label><br />';
-				$content = $this->getUpdateDbFormWrap('performUpdate', $formContent,'Perform updates!');
-			break;
+
+				$content = $this->contentObject->substituteSubpart(
+					$getUserInputSubpart,
+					'###NOUPDATESAVAILABLE###',
+					$noUpdatesAvailableSubpart
+				);
+				$content = $this->contentObject->substituteSubpart(
+					$content,
+					'###UPDATESAVAILABLE###',
+					$updatesAvailableSubpart
+				);
+				$content = $this->contentObject->substituteMarkerArray(
+					$content,
+					$markers,
+					'###|###',
+					1,
+					1
+				);
+				break;
 			case 'performUpdate':	// third step - perform update
 				$title = 'Step 3 - Perform updates';
-				if (!$this->INSTALL['update']['extList'])	{ break; }
+				$performUpdateSubpart = $this->contentObject->getSubpart($templateFile, '###PERFORMUPDATE###');
+				$updateItemsSubpart = $this->contentObject->getSubpart($performUpdateSubpart, '###UPDATEITEMS###');
+				$checkUserInputSubpart = $this->contentObject->getSubpart($updateItemsSubpart, '###CHECKUSERINPUT###');
+				$updatePerformedSubpart = $this->contentObject->getSubpart($updateItemsSubpart, '###UPDATEPERFORMED###');
+				$noPerformUpdateSubpart = $this->contentObject->getSubpart($updateItemsSubpart, '###NOPERFORMUPDATE###');
+				$databaseQueriesSubpart = $this->contentObject->getSubpart($updatePerformedSubpart, '###DATABASEQUERIES###');
+				$customOutputSubpart = $this->contentObject->getSubpart($updatePerformedSubpart, '###CUSTOMOUTPUT###');
+				if (!$this->INSTALL['update']['extList']) { break; }
 
 				$GLOBALS['TYPO3_DB']->store_lastBuiltQuery = TRUE;
-				foreach ($this->INSTALL['update']['extList'] as $identifier)	{
+				foreach ($this->INSTALL['update']['extList'] as $identifier) {
 					$className = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][$identifier];
 
 					$tmpObj = $this->getUpgradeObjInstance($className, $identifier);
-
-					$content = '<p class="innerWidth"><strong>'.$identifier.'</strong></p>';
+					$updateItemsMarkers['identifier'] = $identifier;
 						// check user input if testing method is available
-					if (method_exists($tmpObj,'checkUserInput'))	{
+					if (method_exists($tmpObj,'checkUserInput') && !$tmpObj->checkUserInput($customOutput)) {
 						$customOutput = '';
-						if (!$tmpObj->checkUserInput($customOutput))	{
-							$content.= ($customOutput?$customOutput:'Something went wrong').'<br /><br />';
-							$content.= '<a href="javascript:history.back()">Go back to update configuration</a>';
-							break;
-						}
-					}
+						$userInputMarkers = array(
+							'customOutput' => ($customOutput ? $customOutput : 'Something went wrong'),
+							'goBack' => 'Go back to update configuration'
+						);
+						$checkUserInput = $this->contentObject->substituteMarkerArray(
+							$checkUserInputSubpart,
+							$userInputMarkers,
+							'###|###',
+							1,
+							1
+						);
+					} else {
 
-					if (method_exists($tmpObj,'performUpdate'))	{
-						$customOutput = '';
-						$dbQueries = array();
-						if ($tmpObj->performUpdate($dbQueries, $customOutput))	{
-							$content .= '<strong>Update successful!</strong>';
+						if (method_exists($tmpObj,'performUpdate')) {
+							$customOutput = '';
+							$dbQueries = array();
+							if ($tmpObj->performUpdate($dbQueries, $customOutput)) {
+								$performUpdateMarkers['updateStatus'] = 'Update successful!';
+							} else {
+								$performUpdateMarkers['updateStatus'] = 'Update FAILED!';
+							}
+							if ($this->INSTALL['update']['showDatabaseQueries']) {
+								$content .= '<br />' . implode('<br />',$dbQueries);
+								foreach($dbQueries as $query) {
+									$databaseQueryMarkers['query'] = $query;
+									$databaseQueries[] = $this->contentObject->substituteMarkerArray(
+										$databaseQueriesSubpart,
+										$databaseQueryMarkers,
+										'###|###',
+										1,
+										1
+									);
+								}
+							}
+
+							if (strlen($customOutput)) {
+								$content.= '<br />' . $customOutput;
+								$customOutputMarkers['custom'] = $customOutput;
+								$customOutputItem = $this->contentObject->substituteMarkerArray(
+									$customOutputSubpart,
+									$customOutputMarkers,
+									'###|###',
+									1,
+									1
+								);
+							}
+
+							$updatePerformed = $this->contentObject->substituteSubpart(
+								$updatePerformedSubpart,
+								'###DATABASEQUERIES###',
+								implode(chr(10), $databaseQueries)
+							);
+							$updatePerformed = $this->contentObject->substituteSubpart(
+								$updatePerformed,
+								'###CUSTOMOUTPUT###',
+								$customOutputItem
+							);
+							$updatePerformed = $this->contentObject->substituteMarkerArray(
+								$updatePerformed,
+								$performUpdateMarkers,
+								'###|###',
+								1,
+								1
+							);
 						} else {
-							$content.= '<strong>Update FAILED!</strong>';
+							$noPerformUpdateMarkers['noUpdateMethod'] = 'No update method available!';
+							$noPerformUpdate = $this->contentObject->substituteMarkerArray(
+								$noPerformUpdateSubpart,
+								$noPerformUpdateMarkers,
+								'###|###',
+								1,
+								1
+							);
 						}
-						if ($this->INSTALL['update']['showDatabaseQueries'])	{
-							$content .= '<br />' . implode('<br />',$dbQueries);
-						}
-						if (strlen($customOutput))	{
-							$content.= '<br />' . $customOutput;
-						}
-					} else {
-						$content .= '<strong>No update method available!</strong>';
 					}
+					$updateItem = $this->contentObject->substituteSubpart(
+						$updateItemsSubpart,
+						'###CHECKUSERINPUT###',
+						$checkUserInput
+					);
+					$updateItem = $this->contentObject->substituteSubpart(
+						$updateItem,
+						'###UPDATEPERFORMED###',
+						$updatePerformed
+					);
+					$updateItem = $this->contentObject->substituteSubpart(
+						$updateItem,
+						'###NOPERFORMUPDATE###',
+						$noPerformUpdate
+					);
+					$updateItem = $this->contentObject->substituteSubpart(
+						$updateItem,
+						'###UPDATEITEMS###',
+						implode(chr(10), $updateItems)
+					);
+					$updateItems[] = $this->contentObject->substituteMarkerArray(
+						$updateItem,
+						$updateItemsMarkers,
+						'###|###',
+						1,
+						1
+					);
 				}
+				$content = $this->contentObject->substituteSubpart(
+					$performUpdateSubpart,
+					'###UPDATEITEMS###',
+					implode(chr(10), $updateItems)
+				);
 				$GLOBALS['TYPO3_DB']->store_lastBuiltQuery = FALSE;
 			break;
 		}
-		$this->message('Update Wizard',$title,$content);
+		$this->message('Update Wizard', $title, $content);
 	}
 
 	/**
 	 * Creates instance of an upgrade object, setting the pObj, versionNumber and pObj
 	 *
-	 * @param	string		class name
-	 * @param	identifier		identifier of upgrade object - needed to fetch user input
-	 * @return	object		newly instanciated upgrade object
+	 * @param string $className The class name
+	 * @param string $identifier The identifier of upgrade object - needed to fetch user input
+	 * @return object Newly instanciated upgrade object
 	 */
-	function getUpgradeObjInstance($className, $identifier)	{
+	function getUpgradeObjInstance($className, $identifier) {
 		$tmpObj = t3lib_div::getUserObj($className);
 		$tmpObj->versionNumber = t3lib_div::int_from_ver(TYPO3_version);
 		$tmpObj->pObj = $this;
@@ -4175,41 +6792,42 @@
 	}
 
 	/**
-	 * [Describe function...]
+	 * Check if at lease one backend admin user has been created
 	 *
-	 * @return	[type]		...
+	 * @return integer Amount of backend users in the database
 	 */
-	function isBackendAdminUser()	{
+	function isBackendAdminUser() {
 		return $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', 'be_users', 'admin=1');
 	}
 
 	/**
-	 * [Describe function...]
+	 * Check if static templates are available in database
 	 *
-	 * @return	[type]		...
+	 * @return integer Amount of static templates in the database
 	 */
-	function isStaticTemplates()	{
+	function isStaticTemplates() {
 		return $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', 'static_template');
 	}
 
 	/**
-	 * [Describe function...]
+	 * Check if the basic settings are complete
+	 * Only used by 1-2-3 mode
 	 *
-	 * @param	[type]		$tLabel: ...
-	 * @return	[type]		...
+	 * @param string $tLabel The header for the message
+	 * @return boolean TRUE if complete
 	 */
-	function isBasicComplete($tLabel)	{
-		if ($this->mode=='123')	{
+	function isBasicComplete($tLabel) {
+		if ($this->mode=='123') {
 			$tables = $this->getListOfTables();
 
-			if (count($tables))	{
+			if (count($tables)) {
 				$beuser = $this->isBackendAdminUser();
 				$static = $this->isStaticTemplates();
 			}
-			if (count($tables) && $beuser && $static)	{
+			if (count($tables) && $beuser && $static) {
 				$mode123Imported=1;
-				$this->message($tLabel,'Basic Installation Completed',nl2br($this->messageBasicFinished()),-1,1);
-				$this->message($tLabel,'Security Risk!',nl2br($this->securityRisk().$this->alterPasswordForm()),2,1);
+				$this->message($tLabel, 'Basic Installation Completed', $this->messageBasicFinished(), -1, 1);
+				$this->message($tLabel,'Security Risk!',$this->securityRisk().$this->alterPasswordForm(),2,1);
 			} else {
 				$this->message($tLabel,'Still missing something?',nl2br('
 				You may be missing one of these points before your TYPO3 installation is complete:
@@ -4230,17 +6848,18 @@
 	}
 
 	/**
-	 * [Describe function...]
+	 * Generate the contents for the form for 'Database Analyzer'
+	 * when the 'COMPARE' still contains errors
 	 *
-	 * @param	[type]		$type: ...
-	 * @param	[type]		$arr_update: ...
-	 * @param	[type]		$arr_remove: ...
-	 * @param	[type]		$action_type: ...
-	 * @return	[type]		...
+	 * @param string $type get_form if the form needs to be generated
+	 * @param array $arr_update The tables/fields which needs an update
+	 * @param array $arr_remove The tables/fields which needs to be removed
+	 * @param string $action_type The action type
+	 * @return string HTML for the form
 	 */
-	function generateUpdateDatabaseForm($type, $arr_update, $arr_remove, $action_type)	{
+	function generateUpdateDatabaseForm($type, $arr_update, $arr_remove, $action_type) {
 		$content = '';
-		switch($type)	{
+		switch($type) {
 			case 'get_form':
 				$content.= $this->generateUpdateDatabaseForm_checkboxes($arr_update['clear_table'],'Clear tables (use with care!)',false,true);
 
@@ -4263,63 +6882,121 @@
 	}
 
 	/**
-	 * [Describe function...]
+	 * Form wrap for 'Database Analyzer'
+	 * when the 'COMPARE' still contains errors
 	 *
-	 * @param	[type]		$action_type: ...
-	 * @param	[type]		$content: ...
-	 * @param	[type]		$label: ...
-	 * @return	[type]		...
+	 * @param string $action_type The action type
+	 * @param string $content The form content
+	 * @param string $label The submit button label
+	 * @return string HTML of the form
 	 */
-	function getUpdateDbFormWrap($action_type, $content, $label='Write to database')	{
-		$form = '<form action="' . $this->action . '#bottom" method="post">' .
-			'<input type="hidden" name="TYPO3_INSTALL[database_type]" value="' . htmlspecialchars($action_type) . '">' .
-				$content . '<br />' .
-			'<input type="submit" value="' . $label . '">';
+	function getUpdateDbFormWrap($action_type, $content, $label='Write to database') {
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'GetUpdateDbFormWrap.html');
+			// Get the template part from the file
+		$form = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+			// Define the markers content
+		$formMarkers = array(
+			'action' => $this->action,
+			'actionType' => htmlspecialchars($action_type),
+			'content' => $content,
+			'label' => $label
+		);
+			// Fill the markers
+		$form = $this->contentObject->substituteMarkerArray(
+			$form,
+			$formMarkers,
+			'###|###',
+			1,
+			1
+		);
+
 		return $form;
 	}
 
 	/**
-	 * [Describe function...]
+	 * Generates an HTML table for the setup of database tables
+	 * Used in 'Database analyzer > Compare with $TCA'
 	 *
-	 * @param	[type]		$arr: ...
-	 * @param	[type]		$pre: ...
-	 * @param	[type]		$label: ...
-	 * @return	[type]		...
+	 * @param array $arr Description of the table with fieldname and fieldcontent
+	 * @param boolean $pre TRUE if the field content needs to be wrapped with a <pre> tag
+	 * @param string $label The header label
+	 * @return string HTML of the table
 	 */
-	function displayFields($arr, $pre=0, $label='')	{
-		$out='';
-		$out.='<tr><td class="tcaTableHeader" align="center"><strong>'.$this->fw('Field name:').'</strong></td><td class="tcaTableHeader" align="center"><strong>'.$this->fw($label?$label:'Info:').'</strong></td></tr>';
-		if (is_array($arr))	{
-			reset($arr);
-			while(list($fieldname, $fieldContent)=each($arr))	{
-				if ($pre)	{
+	function displayFields($arr, $pre=0, $label='') {
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'DisplayFields.html');
+			// Get the template part from the file
+		$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+			// Define the markers content
+		$templateMarkers = array(
+			'headerFieldName' => 'Field name:',
+			'headerLabel' => $label ? $label : 'Info:'
+		);
+		if (is_array($arr)) {
+			$rows = array();
+				// Get the subpart for rows
+			$rowsSubpart = $this->contentObject->getSubpart($template, '###ROWS###');
+			foreach ($arr as $fieldname => $fieldContent) {
+				if ($pre) {
 					$fieldContent = '<pre>'.trim($fieldContent).'</pre>';
-				} else {
-					$fieldContent = $this->fw($fieldContent);
 				}
-				$out.='<tr><td class="tcaTableBackground">'.$this->fw($fieldname).'</td><td class="tcaTableBackground">'.$fieldContent.'</td></tr>';
+					// Define the markers content
+				$rowsMarkers = array(
+					'fieldName' => $fieldname,
+					'fieldContent' => $fieldContent
+				);
+					// Fill the markers in the subpart
+				$rows[] = $this->contentObject->substituteMarkerArray(
+					$rowsSubpart,
+					$rowsMarkers,
+					'###|###',
+					1,
+					1
+				);
 			}
 		}
-		$out = '<table border="0" cellpadding="0" cellspacing="1">' . $out . '</table>';
-		return $out;
+			// Substitute the subpart for rows
+		$template = $this->contentObject->substituteSubpart(
+			$template,
+			'###ROWS###',
+			implode(chr(10), $rows)
+		);
+			// Fill the markers
+		$template = $this->contentObject->substituteMarkerArray(
+			$template,
+			$templateMarkers,
+			'###|###',
+			1,
+			1
+		);
+		return $template;
 	}
 
 	/**
-	 * [Describe function...]
+	 * Generates an HTML table with comparison between database and $TCA
+	 * Used in 'Database analyzer > Compare with $TCA'
 	 *
-	 * @param	[type]		$arr: ...
-	 * @param	[type]		$arr_db: ...
-	 * @return	[type]		...
+	 * @param array $arr Description of the table with fieldname and fieldcontent
+	 * @param array $arr_db The actual content of a field in the database
+	 * @return string HTML of the table
 	 */
-	function displayFieldComp($arr, $arr_db)	{
-		$out='';
-		$out.='<tr><td bgcolor="#9BA1A8" align="center"><strong>'.$this->fw('Field name:').'</strong></td>
-			<td bgcolor="#9BA1A8" align="center"><strong>'.$this->fw("Suggested value from \$TCA:").'</strong></td>
-			<td bgcolor="#9BA1A8" align="center"><strong>'.$this->fw('Actual value from database:').'</strong></td>
-			</tr>';
-		if (is_array($arr))	{
-			reset($arr);
-			while(list($fieldname, $fieldContent)=each($arr))	{
+	function displayFieldComp($arr, $arr_db) {
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'DisplayFieldComp.html');
+			// Get the template part from the file
+		$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+			// Define the markers content
+		$templateMarkers = array(
+			'headerFieldName' => 'Field name:',
+			'headerSuggested' => 'Suggested value from $TCA:',
+			'headerActual' => 'Actual value from database:'
+		);
+		$rows = array();
+		if (is_array($arr)) {
+				// Get the subpart for rows
+			$rowsSubpart = $this->contentObject->getSubpart($template, '###ROWS###');
+			foreach ($arr as $fieldname => $fieldContent) {
 					// This tries to equalize the types tinyint and int
 				$str1 = $fieldContent;
 				$str2 = trim($arr_db[$fieldname]);
@@ -4328,76 +7005,151 @@
 				$str1 = str_replace('int(10)','int(11)',$str1);
 				$str2 = str_replace('int(10)','int(11)',$str2);
 					// Compare:
-				if (strcmp($str1,$str2))	{
+				if (strcmp($str1,$str2)) {
 					$bgcolor=' class="warning"';
 				} else {
-					$bgcolor=' class="generalTableBackground"';
+					$bgcolor='';
 				}
-				$fieldContent = $this->fw($fieldContent);
-				$fieldContent_db = $this->fw($arr_db[$fieldname]);
-				$out.='<tr>
-					<td class="generalTableBackground">'.$this->fw($fieldname).'</td>
-					<td'.$bgcolor.'>'.$fieldContent.'</td>
-					<td'.$bgcolor.'>'.$fieldContent_db.'</td>
-					</tr>';
+					// Define the markers content
+				$rowsMarkers = array(
+					'fieldName' => $fieldname,
+					'fieldContent' => $fieldContent,
+					'fieldContentDb' => $arr_db[$fieldname],
+					'class' => $bgcolor
+				);
+					// Fill the markers in the subpart
+				$rows[] = $this->contentObject->substituteMarkerArray(
+					$rowsSubpart,
+					$rowsMarkers,
+					'###|###',
+					1,
+					1
+				);
 			}
 		}
-		$out= '<table border="0" cellpadding="2" cellspacing="2">'.$out.'</table>';
+			// Substitute the subpart for rows
+		$template = $this->contentObject->substituteSubpart(
+			$template,
+			'###ROWS###',
+			implode(chr(10), $rows)
+		);
+			// Fill the markers
+		$out = $this->contentObject->substituteMarkerArray(
+			$template,
+			$templateMarkers,
+			'###|###',
+			1,
+			1
+		);
 		return $out;
 	}
 
 	/**
-	 * [Describe function...]
+	 * Generates an HTML table with $TCA suggestions looking at the type of field
+	 * Used in 'Database analyzer > Compare with $TCA'
 	 *
-	 * @param	[type]		$arr: ...
-	 * @param	[type]		$excludeList: ...
-	 * @return	[type]		...
+	 * @param array $arr Description of the table with fieldname and fieldcontent
+	 * @param string $excludeList Comma separated list of fields which should be excluded from this table
+	 * @return string HTML of the table
 	 */
-	function displaySuggestions($arr, $excludeList='')	{
-		$out='';
-		$out.='<tr><td bgcolor="#9BA1A8" align="center"><strong>'.$this->fw('Field name:').'</strong></td><td bgcolor="#9BA1A8" align="center"><strong>'.$this->fw('Info / Suggestion for the field:').'</strong></td></tr>';
+	function displaySuggestions($arr, $excludeList='') {
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'DisplaySuggestions.html');
+			// Get the template part from the file
+		$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+
+		$templateMarkers = array();
 		$fC=0;
-		if (is_array($arr))	{
-			reset($arr);
-			while(list($fieldname, $fieldContent)=each($arr))	{
-				if (!t3lib_div::inList($excludeList,$fieldname) && substr($fieldname,0,strlen($this->deletedPrefixKey))!=$this->deletedPrefixKey && substr($fieldname,-1)!='.')	{
-					$fieldContent = $this->fw($fieldContent);
-					if ($arr[$fieldname.'.'])	{
-						$fieldContent.= '<hr />';
-						$fieldContent.= '<pre>'.trim($arr[$fieldname.'.']).'</pre>';
+		$rows = array();
+		if (is_array($arr)) {
+				// Get the subpart for rows
+			$rowsSubpart = $this->contentObject->getSubpart($template, '###ROWS###');
+			foreach ($arr as $fieldname => $fieldContent) {
+				if (!t3lib_div::inList($excludeList,$fieldname) && substr($fieldname,0,strlen($this->deletedPrefixKey))!=$this->deletedPrefixKey && substr($fieldname,-1)!='.') {
+					if ($arr[$fieldname.'.']) {
+							// Get the subpart for pre
+						$preSubpart = $this->contentObject->getSubpart($rowsSubpart, '###PRE###');
+							// Define the markers content
+						$preMarkers = array(
+							'code' => '<pre>' . trim($arr[$fieldname.'.']) . '</pre>'
+						);
+							// Fill the markers in the subpart
+						$preSubpart = $this->contentObject->substituteMarkerArray(
+							$preSubpart,
+							$preMarkers,
+							'###|###',
+							1,
+							1
+						);
 					}
-					$out.='<tr><td class="tcaTableBackground">'.$this->fw($fieldname).'</td><td class="tcaTableBackground">'.$fieldContent.'</td></tr>';
+						// Substitute the subpart for pre
+					$row = $this->contentObject->substituteSubpart(
+						$rowsSubpart,
+						'###PRE###',
+						$preSubpart
+					);
+						// Define the markers content
+					$rowsMarkers = array(
+						'headerFieldName' => 'Field name:',
+						'headerLabel' => 'Info:',
+						'headerSuggestion' => 'Suggestion for the field:',
+						'fieldName' => $fieldname,
+						'fieldContent' => $fieldContent,
+					);
+						// Fill the markers in the subpart
+					$rows[] = $this->contentObject->substituteMarkerArray(
+						$row,
+						$rowsMarkers,
+						'###|###',
+						1,
+						1
+					);
 					$fC++;
 				}
 			}
 		}
-		$out= '<table border="0" cellpadding="2" cellspacing="2">'.$out.'</table>';
+			// Substitute the subpart for rows
+		$template = $this->contentObject->substituteSubpart(
+			$template,
+			'###ROWS###',
+			implode(chr(10), $rows)
+		);
+			// Fill the markers
+		$out = $this->contentObject->substituteMarkerArray(
+			$template,
+			$templateMarkers,
+			'###|###',
+			1,
+			1
+		);
 		return array($out,$fC);
 	}
 
 	/**
 	 * Compares an array with field definitions with $TCA array
 	 *
-	 * @param	[type]		$FDsrc: ...
-	 * @param	[type]		$TCA: ...
-	 * @param	[type]		$onlyFields: ...
-	 * @return	[type]		...
+	 * @param array $FDsrc Field definition source
+	 * @param array $TCA The TCA array
+	 * @param boolean $onlyFields
+	 * @return array
 	 */
-	function compareDatabaseAndTCA($FDsrc, $TCA, $onlyFields=0)	{
+	function compareDatabaseAndTCA($FDsrc, $TCA, $onlyFields=0) {
 		$extraArr=array();
-		if (is_array($FDsrc))	{
-			reset($FDsrc);
-			while(list($table,$info)=each($FDsrc))	{
-				if (!isset($TCA[$table]))	{
-					if (!$onlyFields)	{
-						$extraArr[$table]=$info;		// If the table was not in the FDcomp-array, the result array is loaded with that table.
+		if (is_array($FDsrc)) {
+			foreach ($FDsrc as $table => $info) {
+				if (!isset($TCA[$table])) {
+					if (!$onlyFields) {
+							// If the table was not in the FDcomp-array, the result array is loaded with that table.
+						$extraArr[$table]=$info;
 						$extraArr[$table]['whole_table']=1;
 						unset($extraArr[$table]['keys']);
 					}
 				} else {
 					$theKey='fields';
 					$excludeListArr=array();
-					if (is_array($TCA[$table]['ctrl']['enablecolumns']))	$excludeListArr[]=$TCA[$table]['ctrl']['enablecolumns'];
+					if (is_array($TCA[$table]['ctrl']['enablecolumns'])) {
+						$excludeListArr[]=$TCA[$table]['ctrl']['enablecolumns'];
+					}
 					$excludeListArr[]=$TCA[$table]['ctrl']['tstamp'];
 					$excludeListArr[]=$TCA[$table]['ctrl']['sortby'];
 					$excludeListArr[]=$TCA[$table]['ctrl']['delete'];
@@ -4405,24 +7157,23 @@
 					$excludeListArr[]=$TCA[$table]['ctrl']['crdate'];
 					$excludeListArr[]='uid';
 					$excludeListArr[]='pid';
-					if ($table=='pages')	{
+					if ($table=='pages') {
 						$excludeListArr[]='perms_userid';
 						$excludeListArr[]='perms_groupid';
 						$excludeListArr[]='perms_user';
 						$excludeListArr[]='perms_group';
 						$excludeListArr[]='perms_everybody';
 					}
-					if ($table=='sys_dmail')	{
+					if ($table=='sys_dmail') {
 						$excludeListArr[]='scheduled';
 						$excludeListArr[]='scheduled_begin';
 						$excludeListArr[]='scheduled_end';
 						$excludeListArr[]='query_info';
 					}
 
-					if (is_array($info[$theKey]))	{
-						reset($info[$theKey]);
-						while(list($fieldN,$fieldC)=each($info[$theKey]))	{
-							if (!isset($TCA[$table]['columns'][$fieldN]) && !in_array($fieldN,$excludeListArr))	{
+					if (is_array($info[$theKey])) {
+						foreach ($info[$theKey] as $fieldN => $fieldC) {
+							if (!isset($TCA[$table]['columns'][$fieldN]) && !in_array($fieldN,$excludeListArr)) {
 								$extraArr[$table][$theKey][$fieldN] = $info['fields'][$fieldN];
 								$extraArr[$table][$theKey][$fieldN.'.']=$this->suggestTCAFieldDefinition($fieldN,$fieldC);
 							}
@@ -4437,26 +7188,23 @@
 	/**
 	 * Compares the $TCA array with a field definition array
 	 *
-	 * @param	[type]		$TCA: ...
-	 * @param	[type]		$FDcomp: ...
-	 * @return	[type]		...
+	 * @param array $TCA The TCA
+	 * @param array $FDcomp Field definition comparison
+	 * @return array
 	 */
-	function compareTCAandDatabase($TCA, $FDcomp)	{
-		$extraArr=array();
-		$matchingArr=array();
-		if (is_array($TCA))	{
-			reset($TCA);
-			while(list($table)=each($TCA))	{
-				$info=$TCA[$table];
-				if (!isset($FDcomp[$table]))	{
-//					$extraArr[$table]=$info;		// If the table was not in the FDcomp-array, the result array is loaded with that table.
+	function compareTCAandDatabase($TCA, $FDcomp) {
+		$matchingArr = $extraArr = array();
+		if (is_array($TCA)) {
+			foreach ($TCA as $table => $info) {
+				if (!isset($FDcomp[$table])) {
+						// If the table was not in the FDcomp-array, the result array is loaded with that table.
+					//$extraArr[$table]=$info;
 					$extraArr[$table]['whole_table']=1;
 				} else {
-					reset($info['columns']);
-					while(list($fieldN,$fieldC)=each($info['columns']))	{
+					foreach ($info['columns'] as $fieldN => $fieldC) {
 						$fieldDef = $this->suggestFieldDefinition($fieldC);
-						if (!is_array($fieldDef))	{
-							if (!isset($FDcomp[$table]['fields'][$fieldN]))	{
+						if (!is_array($fieldDef)) {
+							if (!isset($FDcomp[$table]['fields'][$fieldN])) {
 								$extraArr[$table]['fields'][$fieldN]=$fieldDef;
 							} else {
 								$matchingArr[$table]['fields'][$fieldN]=$fieldDef;
@@ -4472,18 +7220,18 @@
 	/**
 	 * Suggests a field definition for a TCA config array.
 	 *
-	 * @param	[type]		$fieldInfo: ...
-	 * @return	[type]		...
+	 * @param array $fieldInfo Info of a field
+	 * @return string The suggestion
 	 */
-	function suggestFieldDefinition($fieldInfo)	{
+	function suggestFieldDefinition($fieldInfo) {
 		$out='';
-		switch($fieldInfo['config']['type'])	{
+		switch($fieldInfo['config']['type']) {
 			case 'input':
-				if (preg_match('/date|time|int|year/',$fieldInfo['config']['eval']))	{
+				if (preg_match('/date|time|int|year/',$fieldInfo['config']['eval'])) {
 					$out = "int(11) NOT NULL default '0'";
 				} else {
 					$max = intval($fieldInfo['config']['max']);
-					if ($max>0 && $max<200)	{
+					if ($max>0 && $max<200) {
 						$out = 'varchar('.$max.") NOT NULL default ''";
 					} else {
 						$out = 'tinytext';
@@ -4494,42 +7242,45 @@
 				$out = 'text';
 			break;
 			case 'check':
-				if (is_array($fieldInfo['config']['items']) && count($fieldInfo['config']['items'])>8)	{
+				if (is_array($fieldInfo['config']['items']) && count($fieldInfo['config']['items'])>8) {
 					$out = "int(11) NOT NULL default '0'";
 				} else {
 					$out = "tinyint(3) NOT NULL default '0'";
 				}
 			break;
 			case 'radio':
-				if (is_array($fieldInfo['config']['items']))	{
+				if (is_array($fieldInfo['config']['items'])) {
 					$out = $this->getItemArrayType($fieldInfo['config']['items']);
 				} else {
 					$out = 'ERROR: Radiobox did not have items!';
 				}
 			break;
 			case 'group':
-				if ($fieldInfo['config']['internal_type']=='db')	{
+				if ($fieldInfo['config']['internal_type']=='db') {
 					$max = t3lib_div::intInRange($fieldInfo['config']['maxitems'],1,10000);
-					if (count(explode(',',$fieldInfo['config']['allowed']))>1)	{
-						$len = $max*(10+1+5+1);		// Tablenames are 10, "_" 1, uid's 5, comma 1
+					if (count(explode(',',$fieldInfo['config']['allowed']))>1) {
+							// Tablenames are 10, "_" 1, uid's 5, comma 1
+						$len = $max*(10+1+5+1);
 						$out=$this->getItemBlobSize($len);
 					} elseif ($max<=1) {
 						$out = "int(11) NOT NULL default '0'";
 					} else {
-						$len = $max*(5+1);		// uid's 5, comma 1
+							// uid's 5, comma 1
+						$len = $max*(5+1);
 						$out=$this->getItemBlobSize($len);
 					}
 				}
-				if ($fieldInfo['config']['internal_type']=='file')	{
+				if ($fieldInfo['config']['internal_type']=='file') {
 					$max = t3lib_div::intInRange($fieldInfo['config']['maxitems'],1,10000);
-					$len = $max*(30+1);		// Filenames is 30+ chars....
+						// Filenames is 30+ chars....
+					$len = $max*(30+1);
 					$out=$this->getItemBlobSize($len);
 				}
 			break;
 			case 'select':
 				$max = t3lib_div::intInRange($fieldInfo['config']['maxitems'],1,10000);
-				if ($max<=1)	{
-					if ($fieldInfo['config']['foreign_table'])	{
+				if ($max<=1) {
+					if ($fieldInfo['config']['foreign_table']) {
 						$out = "int(11) NOT NULL default '0'";
 					} else {
 						$out = $this->getItemArrayType($fieldInfo['config']['items']);
@@ -4547,25 +7298,24 @@
 	}
 
 	/**
+	 * Check if field needs to be varchar or int
 	 * Private
 	 *
-	 * @param	[type]		$arr: ...
-	 * @return	[type]		...
+	 * @param array $arr
+	 * @return string The definition
 	 */
-	function getItemArrayType($arr)	{
-		if (is_array($arr))	{
-			reset($arr);
-			$type[]=0;
-			$intSize[]=0;
-			while(list(,$item)=each($arr))	{
-				if (!t3lib_div::testInt($item[1]) && $item[1]!='--div--')	{
+	function getItemArrayType($arr) {
+		if (is_array($arr)) {
+			$type[] = $intSize[] = 0;
+			foreach ($arr as $item) {
+				if (!t3lib_div::testInt($item[1]) && $item[1]!='--div--') {
 					$type[]=strlen($item[1]);
 				} else {
 					$intSize[]=$item[1];
 				}
 			}
 			$us = min($intSize)>=0 ? ' unsigned' : '';
-			if (max($type)>0)	{
+			if (max($type)>0) {
 				$out = 'varchar('.max($type).") NOT NULL default ''";
 			} else {
 				$out = "int(11) NOT NULL default '0'";
@@ -4575,25 +7325,26 @@
 	}
 
 	/**
+	 * Defines the blob size of an item by a given length
 	 * Private
 	 *
-	 * @param	[type]		$len: ...
-	 * @return	[type]		...
+	 * @param integer $len The length
+	 * @return string The blob definition
 	 */
-	function getItemBlobSize($len)	{
+	function getItemBlobSize($len) {
 		return ($len>255 ? 'tiny' : '').'blob';
 	}
 
 	/**
 	 * Should suggest a TCA configuration for a specific field.
 	 *
-	 * @param	[type]		$fieldName: ...
-	 * @param	[type]		$fieldInfo: ...
-	 * @return	[type]		...
+	 * @param string $fieldName The field name
+	 * @param string $fieldInfo The field information
+	 * @return string Suggested TCA configuration
 	 */
-	function suggestTCAFieldDefinition($fieldName,$fieldInfo)	{
+	function suggestTCAFieldDefinition($fieldName,$fieldInfo) {
 		list($type,$len) = preg_split('/ |\(|\)/', $fieldInfo, 3);
-		switch($type)	{
+		switch($type) {
 			case 'int':
 $out="
 '".$fieldName."' => array (
@@ -4626,7 +7377,7 @@
 ),";
 			break;
 			case 'varchar':
-				if ($len>10)	{
+				if ($len>10) {
 					$out="
 '".$fieldName."' => array (
 	'label' => '".strtoupper($fieldName).":',
@@ -4732,26 +7483,25 @@
 	/**
 	 * Includes TCA
 	 *
-	 * @return	[type]		...
+	 * @return void
 	 */
-	function includeTCA()	{
+	function includeTCA() {
 		global $TCA;
 
 		include (TYPO3_tables_script ? PATH_typo3conf.TYPO3_tables_script : PATH_t3lib.'stddb/tables.php');
 
 			// Extension additions
-		if ($GLOBALS['TYPO3_LOADED_EXT']['_CACHEFILE'])	{
+		if ($GLOBALS['TYPO3_LOADED_EXT']['_CACHEFILE']) {
 			include(PATH_typo3conf.$GLOBALS['TYPO3_LOADED_EXT']['_CACHEFILE'].'_ext_tables.php');
 		} else {
 			include(PATH_t3lib.'stddb/load_ext_tables.php');
 		}
 
-		if (TYPO3_extTableDef_script)	{
+		if (TYPO3_extTableDef_script) {
 			include (PATH_typo3conf.TYPO3_extTableDef_script);
 		}
 
-		reset($TCA);
-		while(list($table)=each($TCA))	{
+		foreach ($TCA as $table => $conf) {
 			t3lib_div::loadTCA($table);
 		}
 	}
@@ -4770,440 +7520,806 @@
 	 **********************/
 
 	/**
-	 * This creates a link to the given $url. If $link is set, that'll be the link-text
-	 *
-	 * @param	[type]		$url: ...
-	 * @param	[type]		$link: ...
-	 * @return	[type]		...
-	 */
-	function linkIt($url,$link='')	{
-		return '<a href="'.$url.'" target="_blank">'.($link?$link:$url).'</a>';
-	}
-
-	/**
 	 * Setting a message in the message-log and sets the fatalError flag if error type is 3.
 	 *
-	 * @param	string		Section header
-	 * @param	string		A short description
-	 * @param	string		A long (more detailed) description
-	 * @param	integer		-1=OK sign, 0=message, 1=notification, 2=warning, 3=error
-	 * @param	boolean		Print message also in "Advanced" mode (not only in 1-2-3 mode)
-	 * @return	void
+	 * @param string $head Section header
+	 * @param string $short_string A short description
+	 * @param string $long_string A long (more detailed) description
+	 * @param integer $type -1=OK sign, 0=message, 1=notification, 2=warning, 3=error
+	 * @param boolean $force Print message also in "Advanced" mode (not only in 1-2-3 mode)
+	 * @return void
 	 */
-	function message($head, $short_string='', $long_string='', $type=0, $force=0)	{
-		if (!$force && $this->mode=='123' && $type<2)	{ return; }	// Return directly if mode-123 is enabled.
+	function message($head, $short_string='', $long_string='', $type=0, $force=0) {
+			// Return directly if mode-123 is enabled.
+		if (!$force && $this->mode=='123' && $type<2) {
+			return;
+		}
 
-		if ($type==3)	{ $this->fatalError=1; }
-		if ($this->messageFunc_nl2br && !preg_match('/<\/table>/', $long_string))	{
-			$long_string = nl2br(trim($long_string));
-		} else {
-			$long_string = trim($long_string);
-		}
+		if ($type==3) { $this->fatalError=1; }
+
+		$long_string = trim($long_string);
+
 		if (!$this->silent)	$this->printSection($head, $short_string, $long_string, $type);
 	}
 
 	/**
 	 * This "prints" a section with a message to the ->sections array
 	 *
-	 * @param	string		Section header
-	 * @param	string		A short description
-	 * @param	string		A long (more detailed) description
-	 * @param	integer		-1=OK sign, 0=message, 1=notification, 2=warning , 3=error
-	 * @return	void
+	 * @param string $head Section header
+	 * @param string $short_string A short description
+	 * @param string $long_string A long (more detailed) description
+	 * @param integer $type -1=OK sign, 0=message, 1=notification, 2=warning , 3=error
+	 * @return void
 	 */
-	function printSection($head, $short_string, $long_string, $type)	{
-		switch($type)	{
+	function printSection($head, $short_string, $long_string, $type) {
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'PrintSection.html');
+			// Get the template part from the file
+		$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+
+		switch($type) {
 			case 3:
-				$cssClass = ' class="typo3-message message-error"';
+				$messageType = 'message-error';
 			break;
 			case 2:
-				$cssClass = ' class="typo3-message message-warning"';
+				$messageType = 'message-warning';
 			break;
 			case 1:
-				$cssClass =' class="typo3-message message-notice"';
+				$messageType = 'message-notice';
 				break;
 			case 0:
-				$cssClass = ' class="typo3-message message-information"';
+				$messageType = 'message-information';
 				break;
 			case -1:
-				$cssClass = ' class="typo3-message message-ok"';
+				$messageType = 'message-ok';
 			break;
 		}
 
-		if (!trim($short_string))	{
-			$this->sections[$head][]='';
+		if (!trim($short_string)) {
+			$content = '';
 		} else {
-			$this->sections[$head][]='
-			<tr><td' . $cssClass . ' nowrap="nowrap">' . '<strong>' . $this->fw($short_string) . '</strong></td></tr>' . (trim($long_string) ? '
-			<tr><td>' . $this->fw($long_string) . '<br /><br /></td></tr>' : '');
+			if (trim($long_string)) {
+					// Get the subpart for the long string
+				$longStringSubpart = $this->contentObject->getSubpart($template, '###LONGSTRINGAVAILABLE###');
+			}
+				// Substitute the subpart for the long string
+			$content = $this->contentObject->substituteSubpart(
+				$template,
+				'###LONGSTRINGAVAILABLE###',
+				$longStringSubpart
+			);
+				// Define the markers content
+			$markers = array(
+				'messageType' => $messageType,
+				'shortString' => $short_string,
+				'longString' => $long_string
+			);
+				// Fill the markers
+			$content = $this->contentObject->substituteMarkerArray(
+				$content,
+				$markers,
+				'###|###',
+				1,
+				1
+			);
 		}
+		$this->sections[$head][] = $content;
 	}
 
 	/**
-	 * Wraps the str in a font-tag with verdana 1
+	 * This prints all the messages in the ->section array
 	 *
-	 * @param	[type]		$str: ...
-	 * @param	[type]		$size: ...
-	 * @return	[type]		...
+	 * @return string HTML of all the messages
 	 */
-	function fw($str,$size=1)	{
+	function printAll() {
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'PrintAll.html');
+			// Get the template part from the file
+		$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+		$sections = array();
 
-		if (preg_match('/^<table/', $str) && preg_match('/<\/table>$/', $str)) {
-			// no wrap
-		} else {
-			if($size==1) {
-				$size = 'class="smalltext"';
-			} elseif ($size==2) {
-				$size = 'class="bodytext"';
-			} else {
-				$size = 'size="size'.$size.'text"';
-			}
-			$str = '<span '.$size.'>'.$str.'</span>';
+		foreach ($this->sections as $header => $valArray) {
+				// Get the subpart for sections
+			$sectionSubpart = $this->contentObject->getSubpart($template, '###SECTIONS###');
+				// Define the markers content
+			$sectionMarkers = array(
+				'header' => $header . ':',
+				'sectionContent' => implode(chr(10), $valArray)
+			);
+				// Fill the markers in the subpart
+			$sections[] = $this->contentObject->substituteMarkerArray(
+				$sectionSubpart,
+				$sectionMarkers,
+				'###|###',
+				1,
+				1
+			);
 		}
-		return $str;
-	}
+			// Substitute the subpart for the sections
+		$content = $this->contentObject->substituteSubpart(
+			$template,
+			'###SECTIONS###',
+			implode(chr(10), $sections)
+		);
 
-	/**
-	 * Wraps the str in a font-tag with verdana 1
-	 *
-	 * @param	[type]		$str: ...
-	 * @return	[type]		...
-	 */
-	function fwheader($str)	{
-		return '<div align="center"><strong>'.$this->fw($str,3).'</strong></div>';
+		return $content;
 	}
 
 	/**
-	 * Wrapping labal/content in a table-row.
+	 * This wraps and returns the main content of the page into proper html-code.
 	 *
-	 * @param	[type]		$label: ...
-	 * @param	[type]		$content: ...
-	 * @return	[type]		...
+	 * @param string $content The page content
+	 * @return string The full HTML page
 	 */
-	function wrapInCells($label,$content)	{
-		return '<tr><td valign="top" nowrap="nowrap"><strong>'.$this->fw($label).'</strong></td><td>&nbsp;</td><td valign="top">'.$this->fw($content).'<br /></td></tr>';
-	}
+	function outputWrapper($content) {
+			// Get the template file
+		if (!$this->passwordOK) {
+			$this->template = @file_get_contents(PATH_site . $this->templateFilePath . 'Install_login.html');
+		} elseif ($this->mode == '123') {
+			$this->template = @file_get_contents(PATH_site . $this->templateFilePath . 'Install_123.html');
+		} else {
+			$this->template = @file_get_contents(PATH_site . $this->templateFilePath . 'Install.html');
+		}
 
-	/**
-	 * This prints all the messages in the ->section array
-	 *
-	 * @return	[type]		...
-	 */
-	function printAll()	{
-		reset($this->sections);
-		$out='';
-		while(list($header,$valArray)=each($this->sections))	{
-			$out.='
-			<tr><td>&nbsp;</td></tr>
-			<tr><td><div align="center"><strong>'.$this->fw($header.':',2).'</strong></div></td></tr>
-			';
-			$out.=implode($valArray,chr(10));
+			// Include the default stylesheets
+		$this->stylesheets[] = '<link rel="stylesheet" type="text/css" href="' .
+			$this->backPath .
+			'sysext/install/Resources/Public/Stylesheets/reset.css" />';
+		$this->stylesheets[] = '<link rel="stylesheet" type="text/css" href="' .
+			$this->backPath .
+			'sysext/install/Resources/Public/Stylesheets/general.css" />';
+
+			// Include the stylesheets based on screen
+		if ($this->mode == '123') {
+			$this->stylesheets[] = '<link rel="stylesheet" type="text/css" href="' .
+				$this->backPath .
+				'sysext/install/Resources/Public/Stylesheets/install_123.css" />';
+		} elseif ($this->passwordOK) {
+			$this->stylesheets[] = '<link rel="stylesheet" type="text/css" href="' .
+				$this->backPath .
+				'sysext/install/Resources/Public/Stylesheets/install.css" />';
+			if (!$this->session->inBackend()) {
+				$this->stylesheets[] = '<link rel="stylesheet" type="text/css" href="' .
+					$this->backPath .
+					'sysext/install/Resources/Public/Stylesheets/install_standalone.css" />';
+			}
+		} else {
+			$this->stylesheets[] = '<link rel="stylesheet" type="text/css" href="' .
+				$this->backPath .
+				'sysext/install/Resources/Public/Stylesheets/install_login.css" />';
+			if (!$this->session->inBackend()) {
+				$this->stylesheets[] = '<link rel="stylesheet" type="text/css" href="' .
+					$this->backPath .
+					'sysext/install/Resources/Public/Stylesheets/install_standalone.css" />';
+			}
 		}
-		return '<table border="0" cellpadding="2" cellspacing="2">'.$out.'</table>';
-	}
 
-	/**
-	 * This wraps and returns the main content of the page into proper html-code.
-	 *
-	 * @param	string		The page content
-	 * @return	string		The full HTML page
-	 */
-	function outputWrapper($content)	{
-		$out='
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-   "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset='.($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']?$GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']:'iso-8859-1').'" />
-'.$this->headerStyle.'
-		<link rel="stylesheet" type="text/css" href="'.$this->backPath.'sysext/install/mod/install.css" >
- 		<title>TYPO3 Install Tool</title>
-		'.($this->JSmessage?'
-<script language="javascript" type="text/javascript">alert(unescape(\'' . t3lib_div::rawUrlEncodeJS($this->JSmessage) . '\'));</script>
+			// Include javascript message
+		$this->javascript[] = $this->JSmessage ?
+			'<script type="text/javascript">alert(unescape(\'' . t3lib_div::rawUrlEncodeJS($this->JSmessage) . '\'));</script>' :
+			'';
 
-		':'').'
-<script type="text/javascript" src="../contrib/prototype/prototype.js"></script>
-	</head>
-	<body>'.$this->contentBeforeTable.'
-		<div align="center">';
-		if($this->INSTALL['type'] == 'about') {
-			$out .= '<table class="smallOuterTable" border="0" cellspacing="0" cellpadding="0">';
+			// Define the markers content
+		if ($this->mode == '123') {
+			$this->markers['headTitle'] = 'Installing TYPO3 ' . TYPO3_branch;
 		} else {
-			$out .= '<table class="outerTable" border="0" cellspacing="0" cellpadding="0">';
+			$this->markers['headTitle'] = '
+				TYPO3 ' . TYPO3_version . '
+				Install tool on site: ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . '
+			';
 		}
-		$out .= '<tr>
-			<td class="logo"><img src="'.$this->backPath.'gfx/typo3logo.gif" width="123" height="34" vspace="10" hspace="50" alt="TYPO3"></td>
-		</tr>
-		<tr>
-			<td class="createBorder">
-				<table width="100%" border="0" cellspacing="1" cellpadding="10">
-					<tr>
-						<td class="generalTableBackground">
-						<div align="center"><span class="size4text"><strong>TYPO3 '.TYPO3_branch.' Install Tool</strong></span></div>
-						<div align="center"><span class="siteInfo"><strong>Site: '.$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'].'</strong></span></div>
-						'.($this->passwordOK ? '<div align="center"><span class="siteInfo"><strong>Version: '.TYPO3_version.'</strong></span></div>':'').'<br />
+		$this->markers['title'] = 'TYPO3 ' . TYPO3_version;
+		$this->markers['javascript'] = implode(chr(10), $this->javascript);
+		$this->markers['stylesheets'] = implode(chr(10), $this->stylesheets);
+		$this->markers['llErrors'] = 'The following errors occured';
+		$this->markers['copyright'] = $this->copyright();
+		$this->markers['charset'] = $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] ? $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] : 'iso-8859-1';
+		$this->markers['backendUrl'] = '../index.php';
+		$this->markers['backend'] = 'Backend admin';
+		$this->markers['frontendUrl'] = '../../index.php';
+		$this->markers['frontend'] = 'Frontend website';
 
-'.($this->step?$this->stepHeader():$this->menu()).$content.'<hr />'.$this->note123().$this->endNotes().'
-						</td>
-					</tr>
-				</table>
-			</td>
-		</tr>
-		</table>
-		</div>
-	</body>
-</html>';
-		return $out;
+		$this->markers['metaCharset'] = 'Content-Type" content="text/html; charset=';
+		if (!empty($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'])) {
+			$this->markers['metaCharset'] .= $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'];
+		} else {
+			$this->markers['metaCharset'] .= 'iso-8859-1';
+		}
+
+			// Add the error messages
+		if (!empty($this->errorMessages)) {
+				// Get the subpart for all error messages
+			$errorMessagesSubPart = $this->contentObject->getSubpart($this->template, '###ERRORMESSAGES###');
+				// Get the subpart for a single error message
+			$errorMessageSubPart = $this->contentObject->getSubpart($errorMessagesSubPart, '###MESSAGES###');
+			$errors = array();
+
+			foreach ($this->errorMessages as $errorMessage) {
+					// Define the markers content
+				$errorMessageMarkers = array(
+					'message' => $errorMessage
+				);
+					// Fill the markers in the subpart
+				$errors[] = $this->contentObject->substituteMarkerArray(
+					$errorMessageSubPart,
+					$errorMessageMarkers,
+					'###|###',
+					1,
+					1
+				);
+			}
+				// Substitute the subpart for a single message
+			$errorMessagesSubPart = $this->contentObject->substituteSubpart(
+				$errorMessagesSubPart,
+				'###MESSAGES###',
+				implode(chr(10), $errors)
+			);
+		}
+
+			// Version subpart is only allowed when password is ok
+		if ($this->passwordOK) {
+				// Get the subpart for the version
+			$versionSubPart = $this->contentObject->getSubpart($this->template, '###VERSIONSUBPART###');
+				// Define the markers content
+			$versionSubPartMarkers['version'] = 'Version: ' . TYPO3_version;
+				// Fill the markers in the subpart
+			$versionSubPart = $this->contentObject->substituteMarkerArray(
+				$versionSubPart,
+				$versionSubPartMarkers,
+				'###|###',
+				1,
+				1
+			);
+		}
+			// Substitute the version subpart
+		$this->template = $this->contentObject->substituteSubpart(
+			$this->template,
+			'###VERSIONSUBPART###',
+			$versionSubPart
+		);
+			// Substitute the menu subpart
+		$this->template = $this->contentObject->substituteSubpart(
+			$this->template,
+			'###MENU###',
+			$this->menu()
+		);
+			// Substitute the error messages subpart
+		$this->template = $this->contentObject->substituteSubpart(
+			$this->template,
+			'###ERRORMESSAGES###',
+			$errorMessagesSubPart
+		);
+			// Substitute the content subpart
+		$this->template = $this->contentObject->substituteSubpart(
+			$this->template,
+			'###CONTENT###',
+			$content
+		);
+			// Fill the markers
+		$this->template = $this->contentObject->substituteMarkerArray(
+			$this->template,
+			$this->markers,
+			'###|###',
+			1,
+			1
+		);
+
+		return $this->template;
 	}
 
 	/**
 	 * Sends the page to the client.
 	 *
-	 * @param	string		The HTML page
+	 * @param string $content The HTML page
+	 * @return void
 	 */
-	function output($content)	{
+	function output($content) {
 		header ('Content-Type: text/html; charset=' .
 			($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']?$GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']:'iso-8859-1'));
 		echo $content;
 	}
 
 	/**
-	 * [Describe function...]
+	 * Generates the main menu
 	 *
-	 * @return	[type]		...
+	 * @return string HTML of the main menu
 	 */
-	function menu()	{
-		if (!$this->passwordOK)	return;
+	function menu() {
+		if ($this->mode !='123') {
+			if (!$this->passwordOK)	return;
 
-		reset($this->menuitems);
-		$c=0;
-		$out=array();
-		while(list($k,$v)=each($this->menuitems))	{
-			$bgcolor = ($this->INSTALL['type']==$k ? ' class="activeMenu"' : ' class="generalTableBackground"');
-			$c++;
-			$out[]='<tr><td'.$bgcolor.'><a href="'.htmlspecialchars($this->scriptSelf.'?TYPO3_INSTALL[type]='.$k.($this->mode?'&mode='.rawurlencode($this->mode):'')).'">'.$this->fw($c.': '.$v).'</a></td></tr>';
+			$c = 0;
+			$items = array();
+				// Get the subpart for the main menu
+			$menuSubPart = $this->contentObject->getSubpart($this->template, '###MENU###');
+				// Get the subpart for each single menu item
+			$menuItemSubPart = $this->contentObject->getSubpart($this->template, '###MENUITEM###');
+
+			foreach ($this->menuitems as $k => $v) {
+					// Define the markers content
+				$markers = array(
+					'class' => ($this->INSTALL['type']==$k ? 'class="act"' : ''),
+					'id' => $k,
+					'url' => htmlspecialchars(
+						$this->scriptSelf .
+						'?TYPO3_INSTALL[type]=' .
+						$k .
+						($this->mode ? '&mode=' . rawurlencode($this->mode) : '')
+					),
+					'item' => $v
+				);
+					// Fill the markers in the subpart
+				$items[] = $this->contentObject->substituteMarkerArray(
+					$menuItemSubPart,
+					$markers,
+					'###|###',
+					1,
+					1
+				);
+			}
+				// Substitute the subpart for the single menu items
+			$menuSubPart = $this->contentObject->substituteSubpart(
+				$menuSubPart,
+				'###MENUITEM###',
+				implode(chr(10), $items)
+			);
+
+			return $menuSubPart;
 		}
-
-		$code = '<table border="0" cellpadding="0" cellspacing="1">'.implode($out,chr(10)).'</table>';
-		$code = '<table border="0" cellpadding="0" cellspacing="0" id="menu"><tr><td>'.$code.'</td></tr></table>';
-		return '<div align="center">'.$code.'</div>';
 	}
 
 	/**
-	 * [Describe function...]
+	 * Generates the step header for 1-2-3 mode, the numbers at the top
 	 *
-	 * @return	[type]		...
+	 * @return string HTML for the step header
 	 */
-	function stepHeader()	{
-		$msg1='Type in your database parameters here:';
-		$msg2='Database';
-		$msg3='Import the database sql-file';
-		$msg4='You\'re done!';
-		$out='<img src="'.$this->backPath.'gfx/123_'.$this->step.'.png" width="402" height="73" border="0" alt="" usemap="#id123_print_Map">
-<map name="id123_print_Map">
-<area title="'.$msg4.'" shape="poly" alt="" coords="299,35, 303,19, 313,9, 335,5, 366,6, 379,11, 388,21, 392,35, 390,47, 381,58, 376,64, 359,67, 320,66, 307,60, 302,51, 300,44" href="'.htmlspecialchars($this->scriptSelf.'?mode='.$this->mode.'&step=go').'">
-<area title="'.$msg3.'" shape="circle" alt="" coords="234,36,32" href="'.htmlspecialchars($this->scriptSelf.'?mode='.$this->mode.'&step=3').'">
-<area title="'.$msg2.'" shape="circle" alt="" coords="136,37,30" href="'.htmlspecialchars($this->scriptSelf.'?mode='.$this->mode.'&step=2').'">
-<area title="'.$msg1.'" shape="circle" alt="" coords="40,36,29" href="'.htmlspecialchars($this->scriptSelf.'?mode='.$this->mode.'&step=1').'">
-</map>
+	function stepHeader() {
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'StepHeader.html');
+			// Get the template part from the file
+		$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+			// Get the subpart for each item
+		$stepItemSubPart = $this->contentObject->getSubpart($template, '###STEPITEM###');
 
+		$steps = array();
 
-		<br />';
-		$msg='';
-		switch(strtolower($this->step))	{
-			case 1:
-				$msg=$msg1;
-			break;
-			case 2:
-				$msg=$msg2;
-			break;
-			case 3:
-				$msg=$msg3;
-			break;
-			case 'go':
-				$msg=$msg4;
-			break;
-			default:
-			break;
+		for ($counter = 2; $counter <= $this->totalSteps; $counter++) {
+			$state = '';
+
+			if ($this->step === $counter) {
+				$state = 'act';
+			} elseif ($this->step === 'go' || $counter < $this->step) {
+				$state = 'done';
+			}
+				// Define the markers content
+			$stepItemMarkers = array(
+				'class' => 'class="step' . ($counter - 1) . ($state ? ' ' . $state : '') . '"',
+				'url' => $this->scriptSelf . '?mode=' . $this->mode . '&amp;step=' . $counter,
+				'step' => $counter
+			);
+				// Fill the markers in the subpart
+			$steps[] = $this->contentObject->substituteMarkerArray(
+				$stepItemSubPart,
+				$stepItemMarkers,
+				'###|###',
+				1,
+				1
+			);
 		}
-		$out.='<br /><div align="center"><strong>'.$this->fw($msg,2).'</strong></div>';
+			// Substitute the subpart for the items
+		$content = $this->contentObject->substituteSubpart(
+			$template,
+			'###STEPITEM###',
+			implode(chr(10), $steps)
+		);
 
-		return $out;
+		return $content;
 	}
 
 	/**
-	 * [Describe function...]
+	 * Generate HTML for the security risk message
 	 *
-	 * @return	[type]		...
+	 * @return string HTML for the security risk message
 	 */
-	function note123()	{
-		if ($this->mode=='123')	{
-			$c='<table border="0" cellpadding="0" cellspacing="0" width="100%">
-				<tr><td class="notice" nowrap="nowrap"><img src="' . $this->backPath . 'gfx/icon_note.gif" width="18" height="16" align="top" alt=""><strong>' . $this->fontTag1 . 'NOTICE: Install Tool is running in \'123\' mode. <a href="' . $this->scriptSelf . '">Click here to disable.</a></span></strong></td></tr>
-			</table>';
-			return $c;
-		}
+	function securityRisk() {
+		return '
+			<p>
+				This script is a
+				<strong>great danger to the security of TYPO3</strong>
+				if you don\'t secure it somehow.
+				<br />
+				We suggest one of the following:
+			</p>
+			<ul>
+				<li>
+					Change the password as defined by the md5-hash in
+					TYPO3_CONF_VARS[BE][installToolPassword]
+				</li>
+				<li>
+					Delete the folder \'typo3/install/\' with this script in or
+					just insert an \'exit;\' line in the script-file there
+				</li>
+				<li>
+					Password protect the \'typo3/install/\' folder, eg. with a
+					.htaccess file
+				</li>
+			</ul>
+			<p>
+				The TYPO3_CONF_VARS[BE][installToolPassword] is always active,
+				but choosing one of the other options will improve security and
+				is recommended highly.
+			</p>
+		';
 	}
 
 	/**
-	 * [Describe function...]
+	 * Generates the form to alter the password of the install tool
 	 *
-	 * @return	[type]		...
+	 * @return string HTML of the form
 	 */
-	function endNotes()	{
-		if ($this->mode!='123' && $this->passwordOK)	{
-			$c.='OS detected: <strong>'.(TYPO3_OS=='WIN'?'WIN':'UNIX').'</strong><br />';
-			$c.='UNIX/CGI detected: <strong>'.(PHP_SAPI=='cgi' ? 'YES' : 'NO').'</strong><br />';
-			$c.='PATH_thisScript: <strong>'.PATH_thisScript.'</strong><br />';
-			$c.='<br />';
-			$c.='<a href="../index.php" target="install_backend">Backend admin in new window.</a><br />';
-			$c.='<a href="../../index.php" target="install_frontend">Frontend website in new window.</a><br />';
+	function alterPasswordForm() {
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'AlterPasswordForm.html');
+			// Get the template part from the file
+		$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+			// Define the markers content
+		$markers = array(
+			'action' => $this->scriptSelf.'?TYPO3_INSTALL[type]=extConfig',
+			'enterPassword' => 'Enter new password:',
+			'enterAgain' => 'Enter again:',
+			'submit' => 'Set new password'
+		);
+			// Fill the markers
+		$content = $this->contentObject->substituteMarkerArray(
+			$template,
+			$markers,
+			'###|###',
+			1,
+			1
+		);
 
-			return $this->fw($c);
-		}
+		return $content;
 	}
 
 	/**
-	 * Convert a size from human-readable form into bytes
+	 * Generate HTML for the copyright
 	 *
-	 * @param	string		A string containing the size in bytes, kilobytes or megabytes. Example: 64M
-	 * @return	string		The string is returned in bytes and can also hold floating values
+	 * @return string HTML of the copyright
 	 */
-	function convertByteSize($bytes)	{
-		if (stristr($bytes,'m'))	{
-			$bytes=doubleval($bytes)*1024*1024;
-		} elseif (stristr($bytes,'k'))	{
-			$bytes=doubleval($bytes)*1024;
-		}
-		return $bytes;
-	}
-
-	/**
-	 * [Describe function...]
-	 *
-	 * @return	[type]		...
-	 */
-	function securityRisk()	{
-		$c='This script is a <strong>great danger to the security of TYPO3</strong> if you don\'t secure it somehow.
-			We suggest one of the following:
-
-			- change the password as defined by the md5-hash in TYPO3_CONF_VARS[BE][installToolPassword].
-			- delete the folder \'typo3/install/\' with this script in or just insert an \'exit;\' line in the script-file there.
-			- password protect the \'typo3/install/\' folder, eg. with a .htaccess file
-
-			The TYPO3_CONF_VARS[BE][installToolPassword] is always active, but choosing one of the other options will improve security and is recommended highly.
+	function copyright() {
+		$content = '
+			<p>
+				<strong>TYPO3 CMS.</strong> Copyright © 1998-' . date('Y') . '
+				Kasper Skårhøj. Extensions are copyright of their respective
+				owners. Go to <a href="http://typo3.com/">http://typo3.com/</a>
+				for details. TYPO3 comes with ABSOLUTELY NO WARRANTY;
+				<a href="http://typo3.com/1316.0.html">click</a> for details.
+				This is free software, and you are welcome to redistribute it
+				under certain conditions; click for details. Obstructing the
+				appearance of this notice is prohibited by law.
+			</p>
+			<p>
+				<a href="http://typo3.org/donate"><strong>Donate</strong></a> |
+				<a href="http://typo3.org">TYPO3.org</a>
+			</p>
 		';
-		return $c;
-	}
 
-	/**
-	 * [Describe function...]
-	 *
-	 * @return	[type]		...
-	 */
-	function alterPasswordForm()	{
-			$content = '<form action="'.$this->scriptSelf.'?TYPO3_INSTALL[type]=extConfig" method="post">
-			Enter new password:
-			<input type="password" name="TYPO3_INSTALL[extConfig][BE][installToolPassword]" /><br />Enter again:
-			<input type="password" name="installToolPassword_check" />
-			<input type="hidden" name="installToolPassword_md5" value="1" />
-			<input type="submit" value="Set new password" /><br />
-			</form>';
-			return $content;
+		return $content;
 	}
 
 	/**
-	 * [Describe function...]
+	 * Generate HTML for the message that the basic setup has been finished
 	 *
-	 * @return	[type]		...
+	 * @return string HTML of the message
 	 */
-	function messageBasicFinished()	{
-		$msg ='
+	function messageBasicFinished() {
+		return '
+			<p>
 				Apparently you have completed the basic setup of the TYPO3 database.
+				<br />
 				Now you can choose between these options:
-
-				- <a href="../../index.php"><strong>Go to the frontend pages</strong></a>
-
-				- <a href="../index.php"><strong>Go to the backend login</strong></a>
-				 (username may be: <i>admin</i>, password may be: <i>password</i>.)
-
-				- <a href="'.$this->scriptSelf.'"><strong>Continue to configure TYPO3</strong></a> (Recommended).
-				 This will let you analyse and verify that everything in your PHP installation is alright. Also if you want to configure TYPO3 to use all the cool features, you <em>must</em> dig into the this!
-				';
-		return $msg;
+			</p>
+			<ul>
+				<li>
+					<a href="../../index.php">
+						Go to the frontend pages
+					</a>
+				</li>
+				<li>
+					<a href="../index.php">
+						Go to the backend login
+					</a>
+					<br />
+			 		(username may be: <em>admin</em>, password may be: <em>password</em>.)
+				</li>
+				<li>
+					<a href="' . $this->scriptSelf . '">
+						Continue to configure TYPO3
+					</a> (Recommended).
+					<br />
+			 		This will let you analyse and verify that everything in your
+			 		PHP installation is alright. Also if you want to configure
+			 		TYPO3 to use all the cool features, you <em>must</em> dig
+			 		into the this!
+			 	</li>
+			 </ul>
+		';
 	}
 
 	/**
-	 * [Describe function...]
+	 * Make the url of the script according to type, mode and step
 	 *
-	 * @param	[type]		$type: ...
-	 * @return	[type]		...
+	 * @param string $type The type
+	 * @return string The url
 	 */
-	function setScriptName($type)	{
+	function setScriptName($type) {
 		$value = $this->scriptSelf.'?TYPO3_INSTALL[type]='.$type.($this->mode?'&mode='.rawurlencode($this->mode):'').($this->step?'&step='.rawurlencode($this->step):'');
 		return $value;
 	}
 
 	/**
-	 * [Describe function...]
+	 * Return the filename that will be used for the backup.
+	 * It is important that backups of PHP files still stay as a PHP file, otherwise they could be viewed un-parsed in clear-text.
 	 *
-	 * @param	[type]		$size: ...
-	 * @param	[type]		$textarea: ...
-	 * @param	[type]		$styleOverride: ...
-	 * @return	[type]		...
+	 * @param string $filename Full path to a file
+	 * @return string The name of the backup file (again, including the full path)
 	 */
-	function formWidth($size=48,$textarea=0,$styleOverride='') {
-			// Input or text-field attribute (size or cols)
-		$wAttrib = $textarea?'cols':'size';
-		if (!$GLOBALS['CLIENT']['FORMSTYLE'])	{	// If not setting the width by style-attribute
-			$size = ceil($size*1);
-			$retVal = ' '.$wAttrib.'="'.$size.'"';
-		} else {	// Setting width by style-attribute. "cols" MUST be avoided with NN6+
-			$pixels = ceil($size*10);
-			$retVal = $styleOverride ? ' style="'.$styleOverride.'"' : ' style="width:'.$pixels.'px;"';
+	function getBackupFilename($filename) {
+		if (preg_match('/\.php$/', $filename)) {
+			$backupFile = str_replace('.php', '_bak.php', $filename);
+		} else {
+			$backupFile = $filename.'~';
 		}
-		return $retVal;
+
+		return $backupFile;
 	}
 
 	/**
-	 * [Describe function...]
+	 * Creates a table which checkboxes for updating database.
 	 *
-	 * @param	[type]		$size: ...
-	 * @param	[type]		$styleOverride: ...
-	 * @param	[type]		$wrap: ...
-	 * @return	[type]		...
+	 * @param array $arr Array of statements (key / value pairs where key is used for the checkboxes)
+	 * @param string $label Label for the table.
+	 * @param boolean $checked If set, then checkboxes are set by default.
+	 * @param boolean $iconDis If set, then icons are shown.
+	 * @param array $currentValue Array of "current values" for each key/value pair in $arr. Shown if given.
+	 * @param boolean $cVfullMsg If set, will show the prefix "Current value" if $currentValue is given.
+	 * @return string HTML table with checkboxes for update. Must be wrapped in a form.
 	 */
-	function formWidthText($size=48,$styleOverride='',$wrap='') {
-		$wTags = $this->formWidth($size,1,$styleOverride);
-			// Netscape 6+ seems to have this ODD problem where there WILL ALWAYS be wrapping with the cols-attribute set and NEVER without the col-attribute...
-		if (strtolower(trim($wrap))!='off' && $GLOBALS['CLIENT']['BROWSER']=='net' && $GLOBALS['CLIENT']['VERSION']>=5)	{
-			$wTags.=' cols="'.$size.'"';
+	function generateUpdateDatabaseForm_checkboxes($arr,$label,$checked=1,$iconDis=0,$currentValue=array(),$cVfullMsg=0) {
+		$out = array();
+		$tableId = uniqid('table');
+		$templateMarkers = array();
+		if (is_array($arr)) {
+				// Get the template file
+			$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'GenerateUpdateDatabaseFormCheckboxes.html');
+				// Get the template part from the file
+			$content = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+				// Define the markers content
+			$templateMarkers = array(
+				'label' => $label,
+				'tableId' => $tableId
+			);
+				// Select/Deselect All
+			if (count($arr) > 1) {
+					// Get the subpart for multiple tables
+				$multipleTablesSubpart = $this->contentObject->getSubpart($content, '###MULTIPLETABLES###');
+					// Define the markers content
+				$multipleTablesMarkers = array(
+					'label' => $label,
+					'tableId' => $tableId,
+					'checked' => ($checked ? ' checked="checked"' : ''),
+					'selectAllId' => $tableId . '-checkbox',
+					'selectDeselectAll' => 'select/deselect all'
+				);
+					// Fill the markers in the subpart
+				$multipleTablesSubpart = $this->contentObject->substituteMarkerArray(
+					$multipleTablesSubpart,
+					$multipleTablesMarkers,
+					'###|###',
+					1,
+					1
+				);
+			}
+				// Substitute the subpart for multiple tables
+			$content = $this->contentObject->substituteSubpart(
+				$content,
+				'###MULTIPLETABLES###',
+				$multipleTablesSubpart
+			);
+				// Rows
+			foreach ($arr as $key => $string) {
+					// Get the subpart for rows
+				$rowsSubpart = $this->contentObject->getSubpart($content, '###ROWS###');
+				$currentSubpart = '';
+				$ico = '';
+				$warnings = array();
+					// Define the markers content
+				$rowsMarkers = array(
+					'checkboxId' => 'db-' . $key,
+					'name' => $this->dbUpdateCheckboxPrefix . '[' . $key . ']',
+					'checked' => ($checked ? 'checked="checked"' : ''),
+					'string' => htmlspecialchars($string)
+				);
+
+				if ($iconDis) {
+					$iconMarkers['backPath'] = $this->backPath;
+					if (preg_match('/^TRUNCATE/i', $string)) {
+						$iconMarkers['iconText'] = '';
+						$warnings['clear_table_info'] = 'Clearing the table is sometimes neccessary when adding new keys. In case of cache_* tables this should not hurt at all. However, use it with care.';
+					} elseif (stristr($string,' user_')) {
+						$iconMarkers['iconText'] = '(USER)';
+					} elseif (stristr($string,' app_')) {
+						$iconMarkers['iconText'] = '(APP)';
+					} elseif (stristr($string,' ttx_') || stristr($string,' tx_')) {
+						$iconMarkers['iconText'] = '(EXT)';
+					}
+
+					if (!empty($iconMarkers)) {
+							// Get the subpart for icons
+						$iconSubpart = $this->contentObject->getSubpart($content, '###ICONAVAILABLE###');
+							// Fill the markers in the subpart
+						$iconSubpart = $this->contentObject->substituteMarkerArray(
+							$iconSubpart,
+							$iconMarkers,
+							'###|###',
+							1,
+							1
+						);
+					}
+				}
+					// Substitute the subpart for icons
+				$rowsSubpart = $this->contentObject->substituteSubpart(
+					$rowsSubpart,
+					'###ICONAVAILABLE###',
+					$iconSubpart
+				);
+
+				if (isset($currentValue[$key])) {
+						// Get the subpart for current
+					$currentSubpart = $this->contentObject->getSubpart($rowsSubpart, '###CURRENT###');
+						// Define the markers content
+					$currentMarkers = array (
+						'message' => (!$cVfullMsg ? 'Current value:': ''),
+						'value' => $currentValue[$key]
+					);
+						// Fill the markers in the subpart
+					$currentSubpart = $this->contentObject->substituteMarkerArray(
+						$currentSubpart,
+						$currentMarkers,
+						'###|###',
+						1,
+						1
+					);
+				}
+					// Substitute the subpart for current
+				$rowsSubpart = $this->contentObject->substituteSubpart(
+					$rowsSubpart,
+					'###CURRENT###',
+					$currentSubpart
+				);
+					// Fill the markers in the subpart
+				$rowsSubpart = $this->contentObject->substituteMarkerArray(
+					$rowsSubpart,
+					$rowsMarkers,
+					'###|###',
+					1,
+					1
+				);
+
+				$rows[] = $rowsSubpart;
+			}
+				// Substitute the subpart for rows
+			$content = $this->contentObject->substituteSubpart(
+				$content,
+				'###ROWS###',
+				implode(chr(10), $rows)
+			);
+
+			if (count($warnings)) {
+					// Get the subpart for warnings
+				$warningsSubpart = $this->contentObject->getSubpart($content, '###WARNINGS###');
+
+				foreach ($warnings as $warning) {
+						// Get the subpart for single warning items
+					$warningItemSubpart = $this->contentObject->getSubpart($warningsSubpart, '###WARNINGITEM###');
+						// Define the markers content
+					$warningItemMarker['warning'] = $warning;
+						// Fill the markers in the subpart
+					$warningItem[] = $this->contentObject->substituteMarkerArray(
+						$warningItemSubpart,
+						$warningItemMarker,
+						'###|###',
+						1,
+						1
+					);
+				}
+					// Substitute the subpart for single warning items
+				$warningsSubpart = $this->contentObject->substituteSubpart(
+					$warningsSubpart,
+					'###WARNINGITEM###',
+					implode(chr(10), $warningItems)
+				);
+			}
+				// Substitute the subpart for warnings
+			$content = $this->contentObject->substituteSubpart(
+				$content,
+				'###WARNINGS###',
+				implode(chr(10), $warningsSubpart)
+			);
 		}
-		return $wTags;
+			// Fill the markers
+		$content = $this->contentObject->substituteMarkerArray(
+			$content,
+			$templateMarkers,
+			'###|###',
+			1,
+			1
+		);
+
+		return $content;
 	}
 
 	/**
-	 * Return the filename that will be used for the backup.
-	 * It is important that backups of PHP files still stay as a PHP file, otherwise they could be viewed un-parsed in clear-text.
+	 * Returns HTML-code, which is a visual representation of a multidimensional array
+	 * Returns false if $array_in is not an array
 	 *
-	 * @param	string		Full path to a file
-	 * @return	string		The name of the backup file (again, including the full path)
+	 * @param mixed $incomingValue Array to view
+	 * @return string HTML output
 	 */
-	function getBackupFilename($filename)	{
-		if (preg_match('/\.php$/', $filename))	{
-			$backupFile = str_replace('.php', '_bak.php', $filename);
-		} else {
-			$backupFile = $filename.'~';
+	function viewArray($incomingValue) {
+			// Get the template file
+		$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'ViewArray.html');
+
+		if (is_array($incomingValue) && !empty($incomingValue)) {
+				// Get the template part from the file
+			$content = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
+				// Get the subpart for a single item
+			$itemSubpart = $this->contentObject->getSubpart($content, '###ITEM###');
+
+			foreach ($incomingValue as $key => $value) {
+				if (is_array($value)) {
+					$description = $this->viewArray($value);
+				} elseif (is_object($value)) {
+					$description = get_class($value);
+					if (method_exists($value, '__toString')) {
+						$description .= ': ' . (string)$value;
+					}
+				} else {
+					if (gettype($value) == 'object') {
+						$description = 'Unknown object';
+					} else {
+						$description = htmlspecialchars((string) $value);
+					}
+				}
+					// Define the markers content
+				$itemMarkers = array(
+					'key' => htmlspecialchars((string) $key),
+					'description' => !empty($description) ? $description : '&nbsp;'
+				);
+					// Fill the markers in the subpart
+				$items[] = $this->contentObject->substituteMarkerArray(
+					$itemSubpart,
+					$itemMarkers,
+					'###|###',
+					1,
+					1
+				);
+			}
+				// Substitute the subpart for single item
+			$content = $this->contentObject->substituteSubpart(
+				$content,
+				'###ITEM###',
+				implode(chr(10), $items)
+			);
 		}
-
-		return $backupFile;
+		return $content;
 	}
 
 	/**
 	 * Returns a newly created TYPO3 encryption key with a given length.
 	 *
-	 * @param  integer  $keyLength  desired key length
-	 * @return string
+	 * @param integer $keyLength Desired key length
+	 * @return string The encryption key
 	 */
 	protected function createEncryptionKey($keyLength = 96) {
 		$bytes = t3lib_div::generateRandomBytes($keyLength);
@@ -5211,8 +8327,7 @@
 	}
 }
 
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/install/mod/class.tx_install.php'])	{
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/install/mod/class.tx_install.php']) {
 	include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/install/mod/class.tx_install.php']);
 }
-
-?>
+?>
\ No newline at end of file
Index: typo3/sysext/install/mod/class.tx_install_session.php
===================================================================
--- typo3/sysext/install/mod/class.tx_install_session.php	(revision 7289)
+++ typo3/sysext/install/mod/class.tx_install_session.php	(working copy)
@@ -75,6 +75,13 @@
 	private $regenerateSessionIdTime = 5;
 
 	/**
+	 * part of the referer when the install tool has been called from the backend
+	 *
+	 * @var string
+	 */
+	private $backendFile = 'backend.php';
+
+	/**
 	 * Constructor. Starts PHP session handling in our own private store
 	 *
 	 * Side-effect: might set a cookie, so must be called before any other output.
@@ -136,6 +143,14 @@
 	 */
 	public function startSession() {
 		$_SESSION['created'] = time();
+
+		$referer = parse_url(t3lib_div::getIndpEnv('HTTP_REFERER'));
+		if (strpos($referer['path'], $this->backendFile)) {
+			$_SESSION['backend'] = TRUE;
+		} else {
+			$_SESSION['backend'] = FALSE;
+		}
+
 		return session_id();
 	}
 
@@ -240,6 +255,18 @@
 	}
 
 	/**
+	 * Check if the install tool is called in the backend
+	 *
+	 * @return boolean True if the install tool has been called from the backend
+	 */
+	public function inBackend() {
+		if ($_SESSION['backend']) {
+			return TRUE;
+		}
+		return FALSE;
+	}
+
+	/**
 	 * Refreshes our session information, rising the expire time.
 	 * Also generates a new session ID every 5 minutes to minimize the risk of
 	 * session hijacking.
Index: typo3/sysext/install/mod/install.css
===================================================================
--- typo3/sysext/install/mod/install.css	(revision 7289)
+++ typo3/sysext/install/mod/install.css	(working copy)
@@ -1,282 +0,0 @@
-/* $Id$ */
-
-body, p, td, a, span, input, .bodytext {
-	font-family: verdana, arial, helvetica, sans-serif;
-	font-size: 1em;
-	color: #000;
-	text-align: left;
-	word-wrap: break-word;
-}
-
-h1,
-h2 {
-	font-family: verdana, arial, helvetica, sans-serif;
-	font-weight: bold;
-}
-
-h1 {
-	font-size: 14pt;
-}
-
-h2 {
-	font-size: 12pt;
-}
-
-a {
-	color: #600;
-	text-decoration: none;
-}
-
-a:active {
-	text-decoration: none;
-}
-
-a:hover {
-	color: #006;
-	text-decoration: underline;
-}
-
-table {
-	width: 100%;
-}
-
-th {
-	font-size: 10pt;
-	font-weight: bold;
-}
-
-textarea {
-	width: 99%;
-}
-
-.outerTable {
-	width: 80%;
-	max-width: 900px;
-}
-
-* html .outerTable {
-	width: 900px;
-}
-
-.smallOuterTable {
-	width:600px;
-}
-
-.logo {
-	text-align: center;
-}
-
-.smalltext {
-	font-size: 0.9em;
-	display: inline;
-}
-
-.bodytext {
-	display: inline;
-}
-
-.size3text {
-	font-size: 1.2em;
-}
-
-.size4text {
-	font-size: 1.5em;
-}
-
-.generalTableBackground {
-	background-color: #efeff4;
-}
-
-.activeMenu {
-	background-color: #66a552;
-}
-
-.createBorder {
-	background-color: black;
-}
-
-.editFile {
-	text-align: center;
-	max-width: 900px;
-	width: 80%;
-	margin: auto;
-}
-
-* html .editFile {
-	width: 900px;
-}
-
-.siteInfo {
-	color: navy;
-}
-
-.updateWizardBoxes {
-	border: 1px solid;
-	margin: 10px;
-	padding: 0px 10px 10px;
-}
-
-
-.tcaTableHeader {
-	background-color: #b3b7bd;
-	padding: 2px;
-}
-.tcaTableBackground {
-	background-color: #e4e5f0;
-	padding: 2px;
-}
-
-/* Styles for messages (matching flash messages) */
-
-.typo3-message {
-	padding: 6px;
-	padding-left: 26px;
-	margin-bottom: 4px;
-	background-repeat: no-repeat;
-	background-position: 5px 7px;
-	border: 1px solid;
-}
-.message-notice {
-	background-image: url("../../../gfx/notice.png");
-	background-color: #f6f7fa;
-	border-color: #c2cbcf;
-}
-.message-information {
-	background-image: url("../../../gfx/information.png");
-	background-color: #ddeef9;
-	border-color: #8aafc4;
-}
-.message-ok {
-	background-image: url("../../../gfx/ok.png");
-	background-color: #cdeaca;
-	border-color: #58b548;
-}
-.message-warning {
-	background-image: url("../../../gfx/warning.png");
-	background-color: #fbffb3;
-	border-color: #c4b70d;
-}
-.message-error {
-	background-image: url("../../../gfx/error.png");
-	background-color: #fbb19b;
-	border-color: #dc4c42;
-}
-/* Colors to match above message styles, but without the icon in the background */
-.warning {
-	background-color: #fbffb3;
-}
-.notice {
-	background-color: #f6f7fa;
-}
-
-
-/* Menus */
-#imageMenu,
-#menu {
-	width: 300px;
-	background-color: #b3b7bd;
-}
-
-#imageMenu td.generalTableBackground a,
-#menu td.generalTableBackground a,
-#menu td.activeMenu a {
-	display: block;
-	text-decoration: none;
-}
-
-#imageMenu td.generalTableBackground a:hover,
-#menu td.generalTableBackground a:hover {
-	display: block;
-	background-color: #fa8800;
-	text-decoration: none;
-}
-
-#imageMenu td.activeMenu a span,
-#imageMenu td.generalTableBackground a:hover span,
-#menu td.activeMenu a span,
-#menu td.generalTableBackground a:hover span {
-	color: #fff;
-	text-decoration: none;
-}
-
-#imageMenu td.activeMenu a,
-#menu td.activeMenu a {
-	color: #fff;
-	text-decoration: none;
-}
-
-
-/* phpinfo */
-pre {
-	margin: 0px;
-	font-family: monospace;
-}
-.phpinfo table {
-	border-collapse: collapse;
-}
-.center {
-	text-align: center;
-}
-.center table {
-	margin-left: auto;
-	margin-right: auto;
-	text-align: left;
-}
-
-.center th {
-	text-align: center !important;
-}
-.phpinfo td,
-.phpinfo th {
-	border: 1px solid #000000;
-	font-size: 75%;
-	vertical-align: baseline;
-}
-
-h1 {
-	font-size: 150%;
-}
-
-h2 {
-	font-size: 125%;
-}
-
-.p {
-	text-align: left;
-}
-
-.e {
-	background-color: #ccf;
-	font-weight: bold;
-	color: #000000;
-}
-
-.h {
-	background-color: #99c;
-	font-weight: bold;
-	color: #000000;
-}
-
-.v {
-	background-color: #ccc;
-	color: #000000;
-}
-
-.vr {
-	background-color: #ccc;
-	text-align: right;
-	color: #000000;
-}
-
-.phpinfo img {
-	float: right;
-	border: 0px;
-}
-
-.phpinfo hr {
-	width: 600px;
-	background-color: #ccc;
-	border: 0px;
-	height: 1px;
-	color: #000000;
-}
Index: typo3/sysext/install/mod/install.js
===================================================================
--- typo3/sysext/install/mod/install.js	(revision 7289)
+++ typo3/sysext/install/mod/install.js	(working copy)
@@ -1,49 +0,0 @@
-/***************************************************************
-*
-*  Javascript functions to provide AJAX calls for install tool
-*
-*  Copyright notice
-*
-*  (c) 2009 Marcus Krause, Helmut Hummel <security@typo3.org>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 backend provided by
-*  Kasper Skaarhoj <kasper@typo3.com> together with TYPO3
-*
-*  Released under GNU/GPL (see license file in /typo3/)
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*
-*  This copyright notice MUST APPEAR in all copies of this script
-*
-***************************************************************/
-
-
-/**
- *
- * @author	Marcus Krause
- */
-var EncryptionKey = {
-	thisScript: '../../index.php',
-	eID: 'tx_install_ajax',
-	cmd: 'encryptionKey',
-
-		// loads the ecryption key by an AJAX call
-	load: function(obj) {
-			// fallback if AJAX is not possible (e.g. IE < 6)
-		if (typeof Ajax.getTransport() != 'object') {
-			window.location.href = this.thisScript + '?eID=' + this.eID + '&cmd=' + this.cmd;
-			return;
-		}
-
-		new Ajax.Request(this.thisScript, {
-			method: 'get',
-			parameters: '?eID=' + this.eID + '&cmd=' + this.cmd,
-			onComplete: function(xhr) {
-				document.getElementsByName('TYPO3_INSTALL[localconf.php][encryptionKey]').item(0).value=xhr.responseText;
-			}.bind(this)
-		});
-	}
-};
Index: typo3/sysext/install/Resources/Private/Templates/AlterPasswordForm.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/AlterPasswordForm.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/AlterPasswordForm.html	(revision 0)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Alter Password Form</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<form action="###ACTION###" method="post">
+			<fieldset>
+				<ol>
+					<li>
+						<label for="alterPassword">###ENTERPASSWORD###</label>
+						<input class="inputText" type="password" id="alterPassword" name="TYPO3_INSTALL[extConfig][BE][installToolPassword]" />
+					</li>
+					<li>
+						<label for="alterPasswordRepeat">###ENTERAGAIN###</label>
+						<input class="inputText" type="password" id="alterPasswordRepeat" name="installToolPassword_check" />
+					</li>
+					<li class="hidden">
+						<input type="hidden" name="installToolPassword_md5" value="1" />
+					</li>
+				</ol>
+			</fieldset>
+			<fieldset class="submit">
+				<ol>
+					<li>
+						<button type="submit">###SUBMIT###<span class="positive">&nbsp;</span></button>
+					</li>
+				</ol>
+			</fieldset>
+		</form>
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/CheckImageMagick.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/CheckImageMagick.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/CheckImageMagick.html	(revision 0)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Check ImageMagick</title>
+	</head>
+	<body>
+		<!-- ###VERSIONS### begin -->
+		<table id="imageMagickVersions" cellpadding="0" cellspacing="0">
+			<!-- ###ROWS### begin -->
+			<tr>
+				<td>###FILE###</td>
+				<td>###TYPE###</td>
+				<td>###VERSION###</td>
+			</tr>
+			<!-- ###ROWS### end -->
+		</table>
+		<!-- ###VERSIONS### end -->
+		
+		<!-- ###FORM### begin -->
+		<form id="checkImageMagick" action="###ACTIONURL###" method="post">
+			<fieldset>
+				<ol>
+					<li class="labelAfter">
+						<input id="checkImLzw" type="checkbox" name="TYPO3_INSTALL[checkIM][lzw]" value="1" ###LZWCHECKED### />
+						<label for="checkImLzw" class="strong">###LZWLABEL###</label>
+					</li>
+					<li>
+						<label for="checkImPath" class="strong">###CHECKPATH###</label>
+						<input id="checkImPath" type="text" name="TYPO3_INSTALL[checkIM][path]" value="###IMAGEMAGICKPATH###" class="inputText" />
+					</li>
+					<li>
+						###COMMENT###
+					</li>
+				</ol>
+			</fieldset>
+			<fieldset class="submit">
+				<ol>
+					<li>
+						<button type="submit">###SEND###<span class="positive">&nbsp;</span></button>
+					</li>
+				</ol>
+			</fieldset>
+		</form>
+		<!-- ###FORM### begin -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/CheckMail.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/CheckMail.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/CheckMail.html	(revision 0)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Check Mail</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<!-- ###MAILSENT### begin -->
+		<h4 class="typo3-message message-information">###MESSAGE###</h4>
+		<!-- ###MAILSENT### end -->
+		<form action="###ACTIONURL###" method="post">
+			<fieldset>
+				<ol>
+					<li>
+						<label for="checkMail" class="strong">###ENTEREMAIL###</label>
+						<input id="checkMail" type="text" name="TYPO3_INSTALL[check_mail]" class="inputText" />
+					</li>
+					<li class="labelAfter">
+						<input id="useHtmlMail" type="checkbox" name="TYPO3_INSTALL[use_htmlmail]" />
+						<label for="useHtmlMail" class="strong">###USEHTMLMAILLABEL###</label>
+					</li>
+				</ol>
+			</fieldset>
+			<fieldset class="submit">
+				<ol>
+					<li>
+						<button type="submit">###SUBMIT###<span class="positive">&nbsp;</span></button>
+					</li>
+				</ol>
+			</fieldset>
+		</form>
+		<!-- ###TEMPLATE### begin -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/CheckTheDatabaseAdminUser.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/CheckTheDatabaseAdminUser.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/CheckTheDatabaseAdminUser.html	(revision 0)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Check the database admin user</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<fieldset class="labelWidth21">
+			<ol>
+				<li>
+					<label for="userName">###USERNAME###</label>
+					<input id="userName" type="text" name="TYPO3_INSTALL[database_adminUser][username]" />
+				</li>
+			</ol>
+		</fieldset>
+		<fieldset class="labelWidth21">
+			<ol>
+				<li>
+					<label for="password">###PASSWORD###</label>
+					<input id="password" type="password" name="TYPO3_INSTALL[database_adminUser][password]" />
+				</li>
+				<li>
+					<label for="passwordRepeat">###REPEATPASSWORD###</label>
+					<input id="passwordRepeat" type="password" name="TYPO3_INSTALL[database_adminUser][password2]" />
+				</li>
+			</ol>
+		</fieldset>
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/CheckTheDatabaseCache.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/CheckTheDatabaseCache.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/CheckTheDatabaseCache.html	(revision 0)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Check the database cache</title>
+	</head>
+	<body>
+		<!-- ###EMPTIEDTABLES### begin -->
+		<ul>
+			<!-- ###TABLE### begin -->
+			<li>
+				###TABLENAME###
+			</li>
+			<!-- ###TABLE### end -->
+		</ul>
+		<!-- ###EMPTIEDTABLES### end -->
+		
+		<!-- ###TABLELIST### begin -->
+		<fieldset id="checkTheDatabaseCache">
+			<ol>
+				<!-- ###SINGLETABLE### begin -->
+				<li class="labelAfter">
+				<input name="TYPO3_INSTALL[database_clearcache][###TABLE###]" id="database_clearcache###TABLE###" value="1" type="checkbox" ###CHECKED### />
+				<label for="database_clearcache###TABLE###">
+					<span class="strong column1">
+						###TABLE###
+					</span>
+					<span class="column2">
+						###COUNT###
+					</span>
+					<span class="column3">
+						###LABEL###
+					</span>
+				</label>
+				</li>
+				<!-- ###SINGLETABLE### end -->
+				<!-- ###GROUP### begin -->
+				<li>&nbsp;</li>
+				<!-- ###GROUP### end -->
+			</ol>
+		</fieldset>
+		<!-- ###TABLELIST### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/CheckTheDatabaseImport.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/CheckTheDatabaseImport.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/CheckTheDatabaseImport.html	(revision 0)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Check the database Import</title>
+	</head>
+	<body>
+		<!-- ###IMPORT### begin -->
+		<!-- ###REGULARMODE### begin-->
+		<fieldset id="checkTheDatabaseImport">
+			<ol>
+				<!-- ###ROWS### begin -->
+				<li class="labelAfter">
+					<input name="TYPO3_INSTALL[database_import][###TABLE###]" id="database_import_###TABLE###" value="###DEFINITION###" type="checkbox" />
+					<label for="database_import_###TABLE###">
+						<span class="strong">
+							###TABLE###
+						</span>
+						<span>
+							###ROWLABEL### ###COUNT###
+						</span>
+						<span>
+							<!-- ###EXIST### begin -->
+							<img src="###BACKPATH###gfx/icon_warning.gif" alt="" height="16" width="18" />
+							###TABLEEXISTS###
+							<!-- ###EXIST### end -->
+						</span>
+					</label>
+				</li>
+				<!-- ###ROWS### end -->
+			</ol>
+		</fieldset>
+		<!-- ###REGULARMODE### end-->
+		<fieldset>
+			<ol>
+				<li class="labelAfter">
+					<input name="TYPO3_INSTALL[database_import_all]" id="database_import_all" value="1" type="checkbox" ###CHECKED### />
+					<label for="database_import_all">
+						###LABEL###
+					</label>
+				</li>
+			</ol>
+		</fieldset>
+		<!-- ###IMPORT### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/CheckTheDatabaseMenu.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/CheckTheDatabaseMenu.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/CheckTheDatabaseMenu.html	(revision 0)
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Check the database Menu</title>
+	</head>
+	<body>
+		<!-- ###MENU### begin -->
+		<table id="databaseMenu" cellpadding="2" cellspacing="2">
+			<tr>
+				<td>
+					###UPDATEREQUIREDTABLES###
+				</td>
+				<td ###NOTICECMPFILECURRENT###>
+					<a href="###ACTION###&amp;TYPO3_INSTALL[database_type]=cmpFile|CURRENT_TABLES#bottom">
+						###COMPARE###
+					</a>
+				</td>
+				<td>
+					&nbsp;
+				</td>
+				<td>
+					&nbsp;
+				</td>
+			</tr>
+			<tr>
+				<td>
+					###DUMPSTATICDATA###
+				</td>
+				<td>
+					&nbsp;
+				</td>
+				<td ###NOTICEIMPORTCURRENT###>
+					<a href="###ACTION###&amp;TYPO3_INSTALL[database_type]=import|CURRENT_STATIC#bottom">
+						###IMPORT###
+					</a>
+				</td>
+				<td>
+					&nbsp;
+				</td>
+			</tr>
+			<tr>
+				<td colspan="4">
+					&nbsp;
+				</td>
+			</tr>
+			<!-- ###EXTRASQL### begin -->
+			<tr>
+				<td>
+					###FILESHORTNAME### (###FILESIZE###)
+				</td>
+				<td ###NOTICECMPFILE###>
+					<a href="###ACTION###&amp;TYPO3_INSTALL[database_type]=cmpFile|###FILE####bottom">
+						###COMPARE###
+					</a>
+				</td>
+				<td ###NOTICEIMPORT###>
+					<a href="###ACTION###&amp;TYPO3_INSTALL[database_type]=import|###FILE####bottom">
+						###IMPORT######SPECS###
+					</a>
+				</td>
+				<td ###NOTICEVIEW###>
+					<a href="###ACTION###&amp;TYPO3_INSTALL[database_type]=view|###FILE####bottom">
+						###VIEW######SPECS###
+					</a>
+				</td>
+			</tr>
+			<!-- ###EXTRASQL### end -->
+			<tr>
+				<td>
+					&nbsp;
+				</td>
+				<td colspan="3" ###NOTICECMPTCA###>
+					<a href="###ACTION###&amp;TYPO3_INSTALL[database_type]=cmpTCA|#bottom">
+						###COMPAREWITHTCA###
+					</a>
+				</td>
+			</tr>
+			<tr>
+				<td>
+					&nbsp;
+				</td>
+				<td colspan="3" ###NOTICEADMINUSER###>
+					<a href="###ACTION###&amp;TYPO3_INSTALL[database_type]=adminUser|#bottom">
+						###CREATEADMINUSER###
+					</a>
+				</td>
+			</tr>
+			<tr>
+				<td>
+					&nbsp;
+				</td>
+				<td colspan="3" ###NOTICEUC###>
+					<a href="###ACTION###&amp;TYPO3_INSTALL[database_type]=UC|#bottom">
+						###RESETUSERPREFERENCES###
+					</a>
+				</td>
+			</tr>
+			<tr>
+				<td>
+					&nbsp;
+				</td>
+				<td colspan="3" ###NOTICECACHE###>
+					<a href="###ACTION###&amp;TYPO3_INSTALL[database_type]=cache|#bottom">
+						###CLEARTABLES###
+					</a>
+				</td>
+			</tr>
+		</table>
+		<a id="bottom"></a>
+		<!-- ###MENU### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/CheckTheDatabaseUc.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/CheckTheDatabaseUc.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/CheckTheDatabaseUc.html	(revision 0)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Check the database UC</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<fieldset class="labelAfter">
+			<ol>
+				<li>
+					<input type="checkbox" name="TYPO3_INSTALL[database_UC]" id="database_UC" value="1" checked="checked" />
+					<label for="database_UC">###CLEARBEUSERS###</label>
+				</li>
+			</ol>
+		</fieldset>
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/CleanUpManager.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/CleanUpManager.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/CleanUpManager.html	(revision 0)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Clean up manager</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<dl id="cleanupManagerNumbers">
+			<dt>
+				###NUMBERCACHED###
+			</dt>
+			<dd>
+				###NUMBER###
+			</dd>
+		</dl>
+		<form method="post" action="###ACTION###">
+			<fieldset>
+				<ol>
+					<li>
+						<label for="cleanupType">###CLEANUP###</label>
+						<select id="cleanupType" name="TYPO3_INSTALL[cleanup_type]">
+							<!-- ###CLEANUPOPTIONS### begin -->
+							<option value="###VALUE###">###DATA###</option>
+							<!-- ###CLEANUPOPTIONS### begin -->
+						</select>
+					</li>
+				</ol>
+			</fieldset>
+			<fieldset class="submit">
+				<ol>
+					<li>
+						<button type="submit">###EXECUTE###<span class="positive">&nbsp;</span></button>
+					</li>
+				</ol>
+			</fieldset>
+		</form>
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/DisplayFieldComp.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/DisplayFieldComp.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/DisplayFieldComp.html	(revision 0)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Display fields compare</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<table cellpadding="0" cellspacing="0" class="displayFieldsCompare">
+			<thead>
+				<tr>
+					<th>
+						###HEADERFIELDNAME###
+					</th>
+					<th>
+						###HEADERSUGGESTED###
+					</th>
+					<th>
+						###HEADERACTUAL###
+					</th>
+				</tr>
+			</thead>
+			<tbody>
+				<!-- ###ROWS### begin -->
+				<tr>
+					<td>
+						###FIELDNAME###
+					</td>
+					<td ###CLASS###>
+						###FIELDCONTENT###
+					</td>
+					<td ###CLASS###>
+						###FIELDCONTENTDB###
+					</td>
+				</tr>
+				<!-- ###ROWS### end -->
+			</tbody>
+		</table>
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/DisplayFields.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/DisplayFields.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/DisplayFields.html	(revision 0)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Display fields</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<table cellpadding="0" cellspacing="0" class="displayFields">
+			<thead>
+				<tr>
+					<th class="column1">
+						###HEADERFIELDNAME###
+					</th>
+					<th>
+						###HEADERLABEL###
+					</th>
+				</tr>
+			</thead>
+			<tbody>
+			<!-- ###ROWS### begin -->
+			<tr>
+				<td class="column1">
+					###FIELDNAME###
+				</td>
+				<td>
+					###FIELDCONTENT###
+				</td>
+			</tr>
+			<!-- ###ROWS### end -->
+			</tbody>
+		</table>
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/DisplaySuggestions.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/DisplaySuggestions.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/DisplaySuggestions.html	(revision 0)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Display suggestions</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<!-- ###ROWS### begin -->
+		<table cellpadding="0" cellspacing="0" class="displaySuggestions">
+			<thead>
+				<tr>
+					<th class="column1">
+						###HEADERFIELDNAME###
+					</th>
+					<th>
+						###HEADERLABEL###
+					</th>
+				</tr>
+			</thead>
+			<tfoot>
+				<tr>
+					<td colspan="2" class="tfootHeader">
+						###HEADERSUGGESTION###
+					</td>
+				</tr>
+				<tr>
+					<td colspan="2">
+						<!-- ###PRE### begin -->
+						###CODE###
+						<!-- ###PRE### end -->
+					</td>
+				</tr>
+			</tfoot>
+			<tbody>
+				<tr>
+					<td class="column1">
+						###FIELDNAME###
+					</td>
+					<td>
+						###FIELDCONTENT###
+					</td>
+				</tr>
+			</tbody>
+		</table>
+		<!-- ###ROWS### end -->
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/DisplayTwinImage.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/DisplayTwinImage.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/DisplayTwinImage.html	(revision 0)
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Display twin image</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<!-- ###IMAGE### begin -->
+		<table cellspacing="0" cellpadding="0" class="displayTwinImageImages">
+			<tbody>
+				<tr>
+					<td>
+						<img width="###DESTWIDTH###" height="###DESTHEIGHT###" src="###DESTURL###" alt="Your server" />
+					</td>
+					<td>
+						<img width="###VERIFYWIDTH###" height="###VERIFYHEIGHT###" src="###VERIFYURL###" alt="Reference"/>
+					</td>
+				</tr>
+			</tbody>
+		</table>
+		<table cellspacing="0" cellpadding="0" class="displayTwinImageReference">
+			<thead>
+				<tr>
+					<th>
+						###YOURSERVER###
+					</th>
+					<th>
+						###REFERENCE###
+					</th>
+				</tr>
+			</thead>
+			<tbody>
+				<tr>
+					<td>
+						###YOURSERVERINFORMATION###
+					</td>
+					<td>
+						###REFERENCEINFORMATION###
+					</td>
+				</tr>
+			</tbody>
+		</table>
+		<!-- ###DIFFERENTFILESIZE### begin -->
+		<table cellspacing="0" cellpadding="0" class="displayTwinImageDifferentFileSize">
+			<thead>
+				<tr>
+					<th colspan="2">
+						###MESSAGE###
+					</th>
+				</tr>
+			</thead>
+			<tbody>
+				<tr>
+					<td>
+						###YOURSERVERFILESIZE###
+					</td>
+					<td>
+						###REFERENCEFILESIZE###
+					</td>
+				</tr>
+			</tbody>
+		</table>
+		<!-- ###DIFFERENTFILESIZE### end -->
+		<!-- ###DIFFERENTPIXELDIMENSIONS### begin -->
+		<p>###MESSAGE###</p>
+		<!-- ###DIFFERENTPIXELDIMENSIONS### end -->
+		<!-- ###NOTE### begin -->
+		<p>
+			<strong>
+				###MESSAGE###
+			</strong>
+			<br />
+			###LABEL###
+		</p>
+		<!-- ###NOTE### end -->
+		<!-- ###IMCOMMANDS### begin -->
+		<p>
+			###MESSAGE###
+		</p>
+		<form action="">
+			<fieldset>
+				<div class="displayTwinImageTextarea">
+					<textarea cols="40" rows="###ROWS###">###COMMANDS###</textarea>
+				</div>
+			</fieldset>
+		</form>
+		<!-- ###IMCOMMANDS### end -->
+		<!-- ###IMAGE### end -->
+		<!-- ###NOIMAGE### begin -->
+		<p>
+			###MESSAGE###
+			<br />
+			###LABEL###
+		</p>
+		<!-- ###COMMANDSAVAILABLE### begin -->
+		<form action="">
+			<fieldset>
+				<div class="displayTwinImageTextarea">
+					<textarea cols="40" rows="###ROWS###">###COMMANDS###</textarea>
+		</div>
+			</fieldset>
+		</form>
+		<!-- ###COMMANDSAVAILABLE### end -->
+		<!-- ###NOIMAGE### end -->
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/GenerateConfigForm.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/GenerateConfigForm.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/GenerateConfigForm.html	(revision 0)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Generate config form</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<fieldset>
+			<ol>
+				<li>
+					###DESCRIPTION###
+				</li>
+				<!-- ###TEXTAREA### begin -->
+				<li class="labelAbove">
+					<label for="###ID###" class="strong">###KEY### = ###LABEL###</label>
+					<textarea id="###ID###" rows="5" cols="60" name="###NAME###">###VALUE###</textarea>
+				</li>
+				<!-- ###TEXTAREA### end -->
+				<!-- ###BOOLEAN### begin -->
+				<li class="labelAfter">
+					<input type="hidden" value="0" name="###NAME###" />
+					<input id="###ID###" type="checkbox" value="###VALUE###" ###CHECKED### name="###NAME###" />
+					<label for="###ID###" class="strong">###KEY### = ###LABEL###</label>
+				</li>
+				<!-- ###BOOLEAN### end -->
+				<!-- ###TEXTLINE### begin -->
+				<li class="labelAbove">
+					<label for="###ID###" class="strong">###KEY### = ###LABEL###</label>
+					<input id="###ID###" type="text" value="###VALUE###" name="###NAME###" class="inputText" />
+				</li>
+				<!-- ###TEXTLINE### end -->
+			</ol>
+		</fieldset>
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/GenerateUpdateDatabaseFormCheckboxes.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/GenerateUpdateDatabaseFormCheckboxes.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/GenerateUpdateDatabaseFormCheckboxes.html	(revision 0)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Generate Update Database Form Checkboxes</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<fieldset id="###TABLEID###">
+			<legend>###LABEL###</legend>
+			<ol>
+				<!-- ###MULTIPLETABLES### begin -->
+				<li class="labelAfter">
+					<input type="checkbox" id="###SELECTALLID###" ###CHECKED### onclick="$('###TABLEID###').select('input[type=checkbox]').invoke('setValue', $(this).checked);" />
+					<label for="###SELECTALLID###">###SELECTDESELECTALL###</label>
+				</li>
+				<!-- ###MULTIPLETABLES### end -->
+				<!-- ###ROWS### begin -->
+				<li class="labelAfter">
+					<input type="checkbox" id="###CHECKBOXID###" name="###NAME###" value="1" ###CHECKED### />
+					<label for="###CHECKBOXID###">
+						<!-- ###ICONAVAILABLE### begin -->
+						<img src="###BACKPATH###gfx/icon_warning.gif" width="18" height="16" alt="" />
+						<strong>###ICONTEXT###</strong>
+						<!-- ###ICONAVAILABLE### begin -->
+						###STRING###
+						<!-- ###CURRENT### begin -->
+						<br />
+						###MESSAGE### <em>###VALUE###</em>
+						<!-- ###CURRENT### end -->
+					</label>
+				</li>
+				<!-- ###ROWS### end -->
+				<!-- ###WARNINGS### begin -->
+				<!-- ###WARNINGITEM### begin -->
+				<li>
+					###WARNING###
+				</li>
+				<!-- ###WARNINGITEM### end -->
+				<!-- ###WARNINGS### end -->
+			</ol>
+		</fieldset>
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/GetUpdateDbFormWrap.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/GetUpdateDbFormWrap.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/GetUpdateDbFormWrap.html	(revision 0)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Generate update database form wrap</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<form action="###ACTION####bottom" method="post">
+			<fieldset>
+				<ol>
+					<li class="hidden">
+						<input type="hidden" name="TYPO3_INSTALL[database_type]" value="###ACTIONTYPE###" />
+					</li>
+				</ol>
+			</fieldset>
+			###CONTENT###
+			<fieldset>
+				<ol>
+					<li>
+						<button type="submit">
+							###LABEL###
+							<span class="positive">&nbsp;</span>
+						</button>
+					</li>
+				</ol>
+			</fieldset>
+		</form>
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/ImageMenu.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/ImageMenu.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/ImageMenu.html	(revision 0)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Image menu</title>
+	</head>
+	<body>
+		<!-- ###MENU### begin -->
+		<ol id="imageMenu">
+			<!-- ###MENUITEM### begin -->
+			<li class="###BACKGROUNDCOLOR###">
+				<a href="###URL###">
+					###ITEM###
+				</a>
+			</li>
+			<!-- ###MENUITEM### end -->
+		</ol>
+		<!-- ###MENU### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/InitExtConfig.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/InitExtConfig.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/InitExtConfig.html	(revision 0)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Init ext config</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<form action="###ACTION###" method="post">
+			###CONTENT###
+			<fieldset>
+				<ol>
+					<li>
+						<button type="submit">
+							###WRITE######LABEL###
+							<span class="positive">&nbsp;</span>
+						</button>
+					</li>
+					<li>
+						<strong>###NOTICE### </strong>
+						###EXPLANATION###
+					</li>
+				</ol>
+			</fieldset>
+		</form>
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/Install.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/Install.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/Install.html	(revision 0)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="###CHARSET###"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="###METACHARSET###" />
+		<title>###HEADTITLE###</title>
+		###JAVASCRIPT###
+		###STYLESHEETS###
+	</head>
+	<body>
+		<div id="contentBeforeTable">###CONTENTBEFORETABLE###</div>
+		<div id="container">
+			<h1>###TITLE###</h1>
+			<h2>###HEADTITLE###</h2>
+			<div id="left">
+				<!-- ###MENU### begin -->
+				<div id="menuTop">&nbsp;</div>
+				<ol id="menu">
+					<!-- ###MENUITEM### begin -->
+					<li id="###ID###" ###CLASS###>
+						<a href="###URL###">
+							###ITEM###
+						</a>
+					</li>
+					<!-- ###MENUITEM### end -->
+				</ol>
+				<div id="menuBottom">&nbsp;</div>
+				<!-- ###MENU### end -->
+				<ol id="links">
+					<li>
+						<a href="###BACKENDURL###">
+							###BACKEND###
+						</a>
+					</li>
+					<li>
+						<a href="###FRONTENDURL###">
+							###FRONTEND###
+						</a>
+					</li>
+				</ol>
+			</div>
+			<div id="right">
+				<div id="contentTop">&nbsp;</div>
+				<div id="content">
+					<!-- ###ERRORMESSAGES### begin -->
+					<div class="typo3-message message-error">
+						<h4>###LLERRORS###</h4>
+						<ul>
+							<!-- ###MESSAGES### begin -->
+							<li>
+								###MESSAGE###
+							</li>
+							<!-- ###MESSAGES### end -->
+						</ul>
+					</div>
+					<!-- ###ERRORMESSAGES### end -->
+					<!-- ###CONTENT### begin -->
+					<!-- ###CONTENT### end -->
+				</div>
+				<div id="contentBottom">&nbsp;</div>
+			</div>
+			<div id="copyright">
+				###COPYRIGHT###
+			</div>
+		</div>
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/Install_123.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/Install_123.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/Install_123.html	(revision 0)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="###CHARSET###"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="###METACHARSET###" />
+		<title>###HEADTITLE###</title>
+		###JAVASCRIPT###
+		###STYLESHEETS###
+	</head>
+	<body>
+		<div id="contentBeforeTable">###CONTENTBEFORETABLE###</div>
+		<div id="container">
+			<h1>###TITLE###</h1>
+			<div id="contentTop">&nbsp;</div>
+			<h2>###HEADTITLE###</h2>
+			<div id="content">
+				<!-- ###MENU### begin -->
+				<ol id="menu">
+					<!-- ###MENUITEM### begin -->
+					<li ###CLASS###>
+						<a href="###URL###">
+							###ITEM###
+						</a>
+					</li>
+					<!-- ###MENUITEM### end -->
+				</ol>
+				<!-- ###MENU### end -->
+				<!-- ###CONTENT### begin -->
+				<!-- ###CONTENT### end -->
+			</div>
+			<div id="contentBottom">&nbsp;</div>
+			<div id="copyright">
+				###COPYRIGHT###
+			</div>
+		</div>
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/Install_login.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/Install_login.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/Install_login.html	(revision 0)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="###CHARSET###"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="###METACHARSET###" />
+		<title>###HEADTITLE###</title>
+		###JAVASCRIPT###
+		###STYLESHEETS###
+	</head>
+	<body>
+		<div id="container" class="login">
+			<h1>###TITLE###</h1>
+			<!-- ###CONTENT### begin -->
+			<!-- ###CONTENT### end -->
+		</div>
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/LoginForm.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/LoginForm.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/LoginForm.html	(revision 0)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Login Form</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<div id="contentTop">&nbsp;</div>
+		<h2>###HEADTITLE###</h2>
+		<div id="content">
+			<h3>###SITENAME###</h3>
+			<form action="index.php" method="post" id="passwordForm">
+				<fieldset>
+					<ol>
+						<li class="labelWidth7">
+							<label for="password">###ENTERPASSWORD###</label>
+							<input id="password" type="password" name="password" class="inputText" />
+						</li>
+						<li class="hidden">
+							<input type="hidden" name="redirect_url" value="###REDIRECTURL###" />
+						</li>
+					</ol>
+				</fieldset>
+				<fieldset class="submit">
+					<ol>
+						<li>
+							<button type="submit">
+								###LOGIN###
+								<span class="positive">&nbsp;</span>
+							</button>
+						</li>
+					</ol>
+				</fieldset>
+			</form>
+		</div>
+		<div id="contentBottom">&nbsp;</div>
+		<!-- ###WRONGPASSWORD### begin -->
+		<p class="typo3-message message-error">
+			###PASSWORDMESSAGE###
+			<br />
+			###PASSWORD###
+		</p>
+		<!-- ###WRONGPASSWORD### end -->
+		<!-- ###SESSIONEXPIRED### begin -->
+		<p class="typo3-message message-error">
+			###MESSAGE###
+		</p>
+		<!-- ###SESSIONEXPIRED### end -->
+		###MESSAGE###
+		<script type="text/javascript">
+		<!--
+			$('password').focus();
+		//-->
+		</script>
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/PhpInformation.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/PhpInformation.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/PhpInformation.html	(revision 0)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: PHP information</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<p>
+			###EXPLANATION###
+		</p>
+		<form action="">
+			<fieldset>
+				<div id="debugInformation">
+					<textarea cols="80" rows="10">###DEBUGINFO###</textarea>
+				</div>
+			</fieldset>
+		</form>
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/PrintAll.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/PrintAll.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/PrintAll.html	(revision 0)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Print All</title>
+	</head>
+	<body>
+		<div id="container">
+			<div id="content">
+				<!-- ###TEMPLATE### begin -->
+				<!-- ###SECTIONS### begin -->
+				<h3>###HEADER###</h3>
+				###SECTIONCONTENT###
+				<!-- ###SECTIONS### end -->
+				<!-- ###TEMPLATE### end -->
+			</div>
+		</div>
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/PrintSection.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/PrintSection.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/PrintSection.html	(revision 0)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Print Section</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<h4 class="typo3-message ###MESSAGETYPE###">###SHORTSTRING###</h4>
+		<!-- ###LONGSTRINGAVAILABLE### begin -->
+		###LONGSTRING###
+		<!-- ###LONGSTRINGAVAILABLE### end -->
+		<!--  ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/SetupGeneral.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/SetupGeneral.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/SetupGeneral.html	(revision 0)
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Setup General</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<form action="###ACTIONURL###" method="post" id="setupGeneral">
+			<!-- ###ALLMODES### begin -->
+			<fieldset>
+				<ol>
+					<li>
+						<label for="userName">###LABELUSERNAME###</label>
+						<input id="userName" type="text" name="TYPO3_INSTALL[localconf.php][typo_db_username]" value="###USERNAME###" class="inputText" />
+					</li>
+					<!-- ###SQLSAFEMODEUSERSUBPART### begin -->
+					<li>
+						###LABELSQLSAFEMODEUSER###
+						<br />
+						<strong>
+							###SQLSAFEMODEUSER###
+						</strong>
+					</li>
+					<!-- ###SQLSAFEMODEUSERSUBPART### end -->
+					<li>
+						<label for="password">###LABELPASSWORD###</label>
+						<input id="password" type="password" name="TYPO3_INSTALL[localconf.php][typo_db_password]" value="###PASSWORD###" class="inputText" />
+					</li>
+					<li>
+						<label for="host">###LABELHOST###</label>
+						<input id="host" type="text" name="TYPO3_INSTALL[localconf.php][typo_db_host]" value="###HOST###" class="inputText" />
+					</li>
+				</ol>
+			</fieldset>
+			<!-- ###DATABASELIST### begin -->
+			<fieldset>
+				<ol>
+					<!-- ###DATABASEAVAILABLE### begin -->
+					<li>
+						<label for="db">###LABELDATABASE###</label>
+						<select id="db" name="TYPO3_INSTALL[localconf.php][typo_db]">
+							<!-- ###DATABASEITEM### begin -->
+							<option value="###DATABASENAME###" ###DATABASESELECTED###>
+								###DATABASEVALUE###
+							</option>
+							<!-- ###DATABASEITEM### end -->
+						</select>
+					</li>
+					<li>
+						<label for="createDatabase">###LABELCREATEDATABASE###</label>
+						<input id="createDatabase" type="text" name="TYPO3_INSTALL[localconf.php][NEW_DATABASE_NAME]" value="" class="inputText" />
+					</li>
+					<!-- ###DATABASEAVAILABLE### end -->
+					<!-- ###DATABASENOTAVAILABLE### begin -->
+					<li>
+						<label>###LABELDATABASE###</label>
+						<strong>
+							###TYPO3DB###
+						</strong>
+						<br />
+						###LABELNODATABASE###
+						<input type="hidden" name="TYPO3_INSTALL[localconf.php][typo_db]" value="###TYPO3DB###" />
+					</li>
+					<!-- ###DATABASENOTAVAILABLE### end -->
+				</ol>
+			</fieldset>
+			<!-- ###DATABASELIST### end -->
+			<!-- ###ALLMODES### end -->
+			<!-- ###REGULARMODE### begin -->
+			<fieldset>
+				<ol>
+					<li>
+						<label for="siteName">###LABELSITENAME###</label>
+						<input id="siteName" type="text" name="TYPO3_INSTALL[localconf.php][sitename]" value="###SITENAME###" class="inputText" />
+					</li>
+				</ol>
+			</fieldset>
+			<fieldset>
+				<ol>
+					<li>
+						<label for="encryptionKey">###LABELENCRYPTIONKEY###</label>
+						<span>
+							<input id="encryptionKey" type="text" name="TYPO3_INSTALL[localconf.php][encryptionKey]" value="###ENCRYPTIONKEY###" class="inputText" />
+							<br />
+							<button type="button" onclick="EncryptionKey.load(this)">###LABELGENERATERANDOMKEY###<span class="positive">&nbsp;</span></button>
+						</span>
+					</li>
+				</ol>
+			</fieldset>
+			<!--  ###DISABLEEXECFUNCTIONSUBPART### begin -->
+			<fieldset>
+				<ol>
+					<li>
+						<label>###LABELDISABLEEXECFUNCTION###</label>
+						<span>
+							###STRONGDISABLEEXECFUNCTION###
+							<br />
+							###LABELCURRENTVALUEIS### ###DEFAULTDISABLEEXECFUNCTION###
+							<input type="hidden" name="TYPO3_INSTALL[localconf.php][disable_exec_function]" value="###DISABLEEXECFUNCTION###" />
+						</span>
+					</li>
+				</ol>
+			</fieldset>
+			<!--  ###DISABLEEXECFUNCTIONSUBPART### end -->
+			<!--  ###GDLIBSUBPART### begin -->
+			<fieldset>
+				<ol>
+					<li>
+						<label>###LABELGDLIB###</label>
+						<span>
+							###STRONGGDLIB###
+							<br />
+							###LABELCURRENTVALUEIS### ###DEFAULTGDLIB###
+							<input type="hidden" name="TYPO3_INSTALL[localconf.php][gdlib]" value="###GDLIB###" />
+						</span>
+					</li>
+				</ol>
+			</fieldset>
+			<!--  ###GDLIBSUBPART### end -->
+			<!--  ###GDLIBPNGSUBPART### begin -->
+			<fieldset>
+				<ol>
+					<li>
+						<label>###LABELGDLIBPNG###</label>
+						<span>
+							###STRONGGDLIBPNG###
+							<br />
+							###LABELCURRENTVALUEIS### ###DEFAULTGDLIBPNG###
+							<br />
+							<select name="TYPO3_INSTALL[localconf.php][gdlib_png]">
+								<!-- ###GDLIBPNGOPTION### -->
+								<option value="###VALUE###" ###SELECTED###>
+									###DATA###
+								</option>
+								<!-- ###GDLIBPNGOPTION### -->
+							</select>
+						</span>
+					</li>
+				</ol>
+			</fieldset>
+			<!--  ###GDLIBPNGSUBPART### end -->
+			<!--  ###IMAGEMAGICKSUBPART### begin -->
+			<fieldset>
+				<ol>
+					<li>
+						<label>###LABELIMAGEMAGICK###</label>
+						<span>
+							###STRONGIMAGEMAGICK###
+							<br />
+							###LABELCURRENTVALUEIS### ###DEFAULTIMAGEMAGICK###
+							<input type="hidden" name="TYPO3_INSTALL[localconf.php][im]" value="###IMAGEMAGICK###" />
+						</span>
+					</li>
+				</ol>
+			</fieldset>
+			<!--  ###IMAGEMAGICKSUBPART### end -->
+			<!--  ###IMCOMBINEFILENAMESUBPART### begin -->
+			<fieldset>
+				<ol>
+					<li>
+						<label>###LABELIMCOMBINEFILENAME###</label>
+						<span>
+							###STRONGIMCOMBINEFILENAME###
+							<br />
+							###LABELCURRENTVALUEIS### ###DEFAULTIMCOMBINEFILENAME###
+							<input type="hidden" name="TYPO3_INSTALL[localconf.php][im_combine_filename]" value="###IMCOMBINEFILENAME###" />
+						</span>
+					</li>
+				</ol>
+			</fieldset>
+			<!--  ###IMCOMBINEFILENAMESUBPART### end -->
+			<!--  ###IMVERSION5SUBPART### begin -->
+			<fieldset>
+				<ol>
+					<li>
+						<label>###LABELIMVERSION5###</label>
+						<span>
+							###STRONGIMVERSION5###
+							<br />
+							###LABELCURRENTVALUEIS### ###DEFAULTIMVERSION5###
+							<input type="hidden" name="TYPO3_INSTALL[localconf.php][im_version_5]" value="###IMVERSION5###" />
+						</span>
+					</li>
+				</ol>
+			</fieldset>
+			<!--  ###IMVERSION5SUBPART### end -->
+			<!--  ###IMPATHSUBPART### begin -->
+			<fieldset>
+				<ol>
+					<li>
+						<label>###LABELIMPATH###</label>
+						<span>
+							###STRONGIMPATH###
+							<br />
+							###LABELCURRENTVALUEIS### ###DEFAULTIMPATH###
+							<input type="hidden" name="TYPO3_INSTALL[localconf.php][im_path]" value="###IMPATH###" />
+						</span>
+					</li>
+				</ol>
+			</fieldset>
+			<!--  ###IMPATHSUBPART### end -->
+			<!--  ###IMPATHLZWSUBPART### begin -->
+			<fieldset>
+				<ol>
+					<li>
+						<label>###LABELIMPATHLZW###</label>
+						<span>
+							###STRONGIMPATHLZW###
+							<br />
+							###LABELCURRENTVALUEIS### ###DEFAULTIMPATH###
+							<br />
+							<select name="TYPO3_INSTALL[localconf.php][im_path_lzw]">
+								<!-- ###IMPATHLZWOPTION### begin -->
+								<option value="###VALUE###" ###SELECTED###>
+									###DATA###
+								</option>
+								<!-- ###IMPATHLZWOPTION### end -->
+							</select>
+						</span>
+					</li>
+				</ol>
+			</fieldset>
+			<!--  ###IMPATHLZWSUBPART### end -->
+			<!--  ###TTFDPISUBPART### begin -->
+			<fieldset>
+				<ol>
+					<li>
+						<label for="ttfDpi">###LABELTTFDPI###</label>
+						<input id="ttfDpi" type="text" name="TYPO3_INSTALL[localconf.php][TTFdpi]" value="###TTFDPI###" class="inputText" />
+					</li>
+				</ol>
+			</fieldset>
+			<!--  ###TTFDPISUBPART### end -->
+			<!-- ###REGULARMODE### end -->
+			<fieldset class="submit">
+				<ol>
+					<li>
+						<button type="submit">
+							###LABELUPDATELOCALCONF###
+							<span class="positive">&nbsp;</span>
+						</button>
+					</li>
+					<li>
+						<strong>###LABELNOTICE###</strong> 
+						###LABELCOMMENTUPDATELOCALCONF###
+					</li>
+				</ol>
+			</fieldset>
+		</form>
+		<!-- ###TEMPLATE### begin -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/StepHeader.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/StepHeader.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/StepHeader.html	(revision 0)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Step Header</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<ol id="stepHeader" class="clearfix">
+			<!-- ###STEPITEM### begin -->
+			<li ###CLASS###>
+				<a href="###URL###">
+					###STEP###
+				</a>
+			</li>
+			<!-- ###STEPITEM### end -->
+		</ol>
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/StepOutput.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/StepOutput.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/StepOutput.html	(revision 0)
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Step Output</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		###STEPHEADER###
+		<h3>###HEADER###</h3>
+		###STEP###
+		<div id="skip123">
+			<a href="###SKIP123###">
+				###NOTICE###
+			</a>
+		</div>
+		<!-- ###TEMPLATE### end -->
+		
+		<!-- ###STEP1### begin -->
+		###LLINTRODUCTION###
+		<form method="post" action="###ACTION###">
+			<fieldset>
+				<ol>
+					<li class="hidden">
+						<input type="hidden" value="###STEP###" name="step" />
+					</li>
+				</ol>
+			</fieldset>
+			<fieldset class="submit">
+				<ol>
+					<li>
+						<button type="submit">###CONTINUE###<span class="positive">&nbsp;</span></button>
+					</li>
+				</ol>
+			</fieldset>
+		</form>
+		<!-- ###STEP1### end -->
+		
+		<!-- ###STEP2### begin -->
+		<form method="post" action="###ACTION###">
+			<fieldset class="labelWidth7">
+				<ol>
+					<li class="hidden">
+						<input type="hidden" value="###STEP###" name="step" />
+						<input type="hidden" value="###ENCRYPTIONKEY###" name="TYPO3_INSTALL[localconf.php][encryptionKey]" />
+						<input type="hidden" value="###BRANCH###" name="TYPO3_INSTALL[localconf.php][compat_version]" />
+					</li>
+					<li>
+						<label for="userName">###LABELUSERNAME###</label>
+						<input id="userName" class="inputText" type="text" value="###USERNAME###" name="TYPO3_INSTALL[localconf.php][typo_db_username]" />
+					</li>
+					<li>
+						<label for="password">###LABELPASSWORD###</label>
+						<input id="password" class="inputText" type="password" value="###PASSWORD###" name="TYPO3_INSTALL[localconf.php][typo_db_password]" />
+					</li>
+					<li>
+						<label for="host">###LABELHOST###</label>
+						<input id="host" class="inputText" type="text" value="###HOST###" name="TYPO3_INSTALL[localconf.php][typo_db_host]" />
+					</li>
+				</ol>
+			</fieldset>
+			<fieldset class="submit">
+				<ol>
+					<li>
+						<button type="submit">###CONTINUE###<span class="positive">&nbsp;</span></button>
+					</li>
+				</ol>
+			</fieldset>
+		</form>
+		<!-- ###STEP2### end -->
+		
+		<!-- ###STEP3### begin -->
+		<p>###LLOPTIONS###</p>
+		<form id="step3" method="post" action="###ACTION###">
+			<fieldset>
+				<ol>
+					<li class="hidden">
+						<input type="hidden" value="###STEP###" name="step" />
+					</li>
+					<li>
+						<label for="newDatabase">###LLOPTION1###</label>
+						<p>###LLREMARK1###</p>
+						<input id="newDatabase" class="inputText" type="text" name="TYPO3_INSTALL[localconf.php][NEW_DATABASE_NAME]" />
+					</li>
+					<li>
+						<label for="database">###LLOPTION2###</label>
+						<p>###LLREMARK2###</p>
+						<select id="database" name="TYPO3_INSTALL[localconf.php][typo_db]">
+							<option value="">Select database</option>
+							<!-- ###DATABASEOPTIONS### begin -->
+							<option value="###DATABASEVALUE###" ###DATABASESELECTED###>###DATABASENAME###</option>
+							<!-- ###DATABASEOPTIONS### end -->
+						</select>
+					</li>
+				</ol>
+			</fieldset>
+			<fieldset class="submit">
+				<ol>
+					<li>
+						<button type="submit">###CONTINUE###<span class="positive">&nbsp;</span></button>
+					</li>
+				</ol>
+			</fieldset>
+		</form>
+		<!-- ###STEP3### end -->
+		
+		<!-- ###STEP4### begin -->
+		<h4>###LLSUMMARY###</h4>
+		<dl id="stepOutputSummary" class="clearfix">
+			<dt>###LLUSERNAME###</dt>
+			<dd>###USERNAME###</dd>
+			<dt>###LLHOST###</dt>
+			<dd>###HOST###</dd>
+			<dt>###LLDATABASE###</dt>
+			<dd>###DATABASE###</dd>
+			<dt>###LLNUMBERTABLES###</dt>
+			<dd>###NUMBERTABLES###</dd>
+		</dl>
+		<form action="###ACTION####bottom" method="post">
+			<fieldset>
+				<ol>
+					<li class="hidden">
+						<input type="hidden" name="TYPO3_INSTALL[database_type]" value="import" />
+						<input type="hidden" name="TYPO3_INSTALL[database_import_all]" value="1" />
+						<input type="hidden" name="step" value="" />
+						<input type="hidden" name="goto_step" value="go" />
+					</li>
+					<li>
+						<label for="databaseType">###LLDATABASETYPE###</label>
+						<select id="databaseType" name="TYPO3_INSTALL[database_type]">
+							<!-- ###DATABASETYPEOPTIONS### begin -->
+							<option value="###DATABASETYPEVALUE###">###DATABASENAME###</option>
+							<!-- ###DATABASETYPEOPTIONS### end -->
+						</select>
+					</li>
+				</ol>
+			</fieldset>
+			<fieldset>
+				<ol>
+					<li>
+						<button type="submit">
+							###LABEL###
+							<span class="positive">&nbsp;</span>
+						</button>
+					</li>
+				</ol>
+			</fieldset>
+		</form>
+		<!-- ###STEP4### end -->
+
+		<!-- ###STEPGO### begin -->
+		###MESSAGEBASICFINISHED###
+		<h4 class="typo3-message message-warning">###LLIMPORTANT###</h4>
+		###SECURITYRISK###
+		###LLSWITCHMODE###
+		<!-- ###STEPGO### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/Typo3ConfEdit.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/Typo3ConfEdit.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/Typo3ConfEdit.html	(revision 0)
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: TYPO3 Conf Edit</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<dl id="confEditFileList">
+			<!-- ###FILES### begin -->
+			<dt ###CLASS###>
+				<a href="###EDITURL###">
+					###FILENAME###
+				</a>
+			</dt>
+			<dd>
+				###FILESIZE### 
+			</dd>
+			<!-- ###FILES### end -->
+		</dl>
+		<p>
+			###EDITPATH###
+		</p>
+		<!-- ###ALLOWFILEEDITOUTSIDETYPO3CONFDIR### begin -->
+		<form action="###ACTION###" method="post">
+			<fieldset>
+				<ol>
+					<li>
+						<label for="editPath">###PATHSITE###</label>
+						<input id="editPath" type="text" name="TYPO3_INSTALL[FILE][EDIT_path]" value="###EDITPATH###" class="inputText" />
+					</li>
+				</ol>
+			</fieldset>
+			<fieldset class="submit">
+				<ol>
+					<li>
+						<button type="submit">###SET###<span class="positive">&nbsp;</span></button>
+					</li>
+				</ol>
+			</fieldset>
+		</form>
+		<!-- ###ALLOWFILEEDITOUTSIDETYPO3CONFDIR### end -->
+		<p>
+			<a href="###DELETETEMPCACHEDURL###">
+				###DELETETEMPCACHED###
+			</a>
+		</p>
+		<!--  ###FILEEDIT### begin -->
+		<h4 id="fileEditHeader" class="typo3-message message-information">
+			###LLEDITING### ###FILE###
+		</h4>
+		###MESSAGES###
+		<p>
+			###MD5SUM###
+		</p>
+		<form id="fileEdit" action="###ACTION###" method="post">
+			<fieldset>
+				<ol>
+					<li class="hidden">
+						<input type="hidden" name="TYPO3_INSTALL[FILE][name]" value="###FILENAME###" />
+						<!-- ###ALLOWFILEEDITOUTSIDETYPO3CONFDIR### begin -->
+						<input type="hidden" name="TYPO3_INSTALL[FILE][EDIT_path]" value="###FILEEDITPATH###" />
+						<!-- ###ALLOWFILEEDITOUTSIDETYPO3CONFDIR### end -->
+						<input type="hidden" name="TYPO3_INSTALL[FILE][prevMD5]" value="###FILEPREVIOUSMD5###" />
+					</li>
+					<li>
+						<textarea cols="48" rows="30" name="TYPO3_INSTALL[FILE][###FILEMD5###]" wrap="off">###FILECONTENT###</textarea>
+					</li>
+				</ol>
+			</fieldset>
+			<fieldset>
+				<ol>
+					<li class="labelAfter">
+						<input type="checkbox" name="TYPO3_INSTALL[FILE][win_to_unix_br]" id="winToUnixBr" value="1" ###WINTOUNIXBRCHECKED### />
+						<label for="winToUnixBr">###WINTOUNIXBR###</label>
+					</li>
+					<li class="labelAfter">
+						<input type="checkbox" name="TYPO3_INSTALL[FILE][backup]" id="backup" value="1" ###BACKUPCHECKED### />
+						<label for="backup">###BACKUP###</label>
+					</li>
+				</ol>
+			</fieldset>
+			<fieldset class="submit">
+				<ol>
+					<li>
+						<!-- ###SHOWSAVEBUTTON### begin -->
+						<button type="submit" name="TYPO3_INSTALL[SAVE_FILE]" value="###SAVEFILE###">###SAVEFILE###<span class="positive">&nbsp;</span></button>
+						<!-- ###SHOWSAVEBUTTON### end -->
+						<button type="submit" name="_close" value="###CLOSE###">###CLOSE###<span class="positive">&nbsp;</span></button>
+					</li>
+				</ol>
+			</fieldset>
+		</form>
+		<!--  ###FILEEDIT### end -->
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/Typo3TempManager.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/Typo3TempManager.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/Typo3TempManager.html	(revision 0)
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: TYPO3 Temp Manager</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<dl id="tempManagerNumbers">
+			<dt>
+				###NUMBERTEMPORARY###
+			</dt>
+			<dd>
+				###TEMPORARY###
+			</dd>
+			<dt>
+				###NUMBERMATCHING###
+			</dt>
+			<dd>
+				###MATCHING### ###DELETETYPE###
+			</dd>
+			<dt>
+				###NUMBERDELETED###
+			</dt>
+			<dd>
+				###DELETED###
+			</dd>
+		</dl>
+		<form id="tempManagerForm" method="post" action="index.php?TYPO3_INSTALL[type]=typo3temp">
+			<fieldset>
+				<ol>
+					<li>
+						<label for="delete">###DELETECONDITION###</label>
+						<select id="delete" name="TYPO3_INSTALL[typo3temp_delete]">
+							<!-- ###DELETEOPTIONS### begin -->
+							<option value="###VALUE###" ###SELECTED###>###DATA###</option>
+							<!-- ###DELETEOPTIONS### end -->
+						</select>
+					</li>
+					<li>
+						<label for="action">###NUMBERFILES###</label>
+						<select id="action" name="TYPO3_INSTALL[typo3temp_action]">
+							<!-- ###ACTIONOPTIONS### begin -->
+							<option value="###VALUE###">###DATA###</option>
+							<!-- ###ACTIONOPTIONS### end -->
+						</select>
+					</li>
+					<li>
+						<label for="subDirectory">###FROMSUBDIRECTORY###</label>
+						<select id="subDirectory" name="TYPO3_INSTALL[typo3temp_subdir]">
+							<!-- ###SUBDIRECTORYOPTIONS### begin -->
+							<option value="###VALUE###" ###SELECTED###>###DATA###</option>
+							<!-- ###SUBDIRECTORYOPTIONS### end -->
+						</select>
+					</li>
+				</ol>
+			</fieldset>
+			<fieldset class="submit">
+				<ol>
+					<li>
+						<button type="submit">###EXECUTE###<span class="positive">&nbsp;</span></button>
+					</li>
+				</ol>
+			</fieldset>
+		</form>
+		###EXPLANATION###
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/UpdateWizardParts.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/UpdateWizardParts.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/UpdateWizardParts.html	(revision 0)
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Update wizard parts</title>
+	</head>
+	<body>
+		<!-- ###CHECKFORUPDATE### begin -->
+		<!-- ###UPDATESAVAILABLE### begin -->
+		<!-- ###UPDATEWIZARDBOXES### begin -->
+		<form action="###ACTION####bottom" method="post">
+			<fieldset class="hidden">
+				<ol>
+					<li>
+						<input type="hidden" name="TYPO3_INSTALL[database_type]" value="getUserInput" />
+					</li>
+				</ol>
+			</fieldset>
+			<!-- ###SINGLEUPDATEWIZARDBOX### begin -->
+			<h3>###IDENTIFIER###</h3>
+			###EXPLANATION###
+			<fieldset class="submit">
+				<ol>
+					<li>
+						<button type="submit" name="TYPO3_INSTALL[update][###IDENTIFIER###]">
+							###NEXT###
+							<span class="positive">&nbsp;</span>
+						</button>
+					</li>
+				</ol>
+			</fieldset>
+			<!-- ###SINGLEUPDATEWIZARDBOX### end -->
+		</form>
+		<!-- ###UPDATEWIZARDBOXES### end -->
+		<h3>###FINALSTEP###</h3>
+		###FINALSTEPEXPLANATION###
+		<a href="index.php?TYPO3_INSTALL[type]=database&amp;TYPO3_INSTALL[database_type]=cmpFile|CURRENT_TABLES#bottom" class="button">###COMPAREDATABASE###<span class="positive">&nbsp;</span></a>
+		<!-- ###UPDATESAVAILABLE### end -->
+		<!-- ###CHECKFORUPDATE### end -->
+		
+		<!-- ###GETUSERINPUT### begin -->
+		<form action="###ACTION####bottom" method="post">
+			<fieldset class="hidden">
+				<ol>
+					<li>
+						<input type="hidden" value="performUpdate" name="TYPO3_INSTALL[database_type]" />
+					</li>
+				</ol>
+			</fieldset>
+			<p>
+				<strong>
+					###INTRODUCTION###
+				</strong>
+			</p>
+			<!-- ###NOUPDATESAVAILABLE### begin -->
+			<p>
+				<strong>
+					###NOUPDATES###
+				</strong>
+			</p>
+			<!-- ###NOUPDATESAVAILABLE### end -->
+			<!-- ###UPDATESAVAILABLE### begin -->
+			<fieldset>
+				<ol>
+					<li class="hidden">
+						<input type="hidden" name="TYPO3_INSTALL[update][extList][]" value="###IDENTIFIER###" />
+					</li>
+				</ol>
+			</fieldset>
+			<p>
+				<strong>
+					###IDENTIFIER###
+				</strong>
+			</p>
+			###IDENTIFIERMETHOD###
+			<!-- ###UPDATESAVAILABLE### end -->
+			<fieldset>
+				<ol>
+					<li class="labelAfter">
+						<input type="checkbox" name="TYPO3_INSTALL[update][showDatabaseQueries]" id="showDatabaseQueries" value="1" />
+						<label for="showDatabaseQueries">###SHOWDATABASEQUERIES###</label>
+					</li>
+				</ol>
+			</fieldset>
+			<fieldset class="submit">
+				<ol>
+					<li>
+						<button type="submit">
+							###PERFORMUPDATES###
+							<span class="positive">&nbsp;</span>
+						</button>
+					</li>
+				</ol>
+			</fieldset>
+		</form>
+		<!-- ###GETUSERINPUT### end -->
+		
+		<!-- ###PERFORMUPDATE### begin -->
+			<!-- ###UPDATEITEMS### begin -->
+			<p class="innerWidth">
+				<strong>
+					###IDENTIFIER###
+				</strong>
+			</p>
+				<!-- ###CHECKUSERINPUT### begin -->
+				###CUSTOMOUTPUT###
+				<br />
+				<br />
+				<a href="javascript:history.back()">
+					###GOBACK###
+				</a>
+				<!-- ###CHECKUSERINPUT### end -->
+				<!-- ###UPDATEPERFORMED### begin -->
+				<strong>
+					###UPDATESTATUS###
+				</strong>
+				<!-- ###DATABASEQUERIES### begin -->
+				<br />
+				###QUERY###
+				<!-- ###DATABASEQUERIES### end -->
+				
+				<!-- ###CUSTOMOUTPUT### begin -->
+				<br />
+				###CUSTOM###
+				<!-- ###CUSTOMOUTPUT### end -->
+				
+				<!-- ###UPDATEPERFORMED### end -->
+				<!-- ###NOPERFORMUPDATE### begin -->
+				<strong>
+					###NOUPDATEMETHOD###
+				</strong>
+				<!-- ###NOPERFORMUPDATE### end -->
+			<!-- ###UPDATEITEMS### end -->
+		<!-- ###PERFORMUPDATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/ViewArray.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/ViewArray.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/ViewArray.html	(revision 0)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: View Array</title>
+	</head>
+	<body>
+		<!-- ###TEMPLATE### begin -->
+		<dl class="viewArray">
+			<!-- ###ITEM### begin -->
+			<dt>
+				###KEY###
+			</dt>
+			<dd>
+				###DESCRIPTION###
+			</dd>
+			<!-- ###ITEM### end -->
+		</dl>
+		<!-- ###TEMPLATE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Private/Templates/WriteToLocalConfControl.html
===================================================================
--- typo3/sysext/install/Resources/Private/Templates/WriteToLocalConfControl.html	(revision 0)
+++ typo3/sysext/install/Resources/Private/Templates/WriteToLocalConfControl.html	(revision 0)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+		<title>Template: Write to localconf control</title>
+	</head>
+	<body>
+		<!-- ###CONTINUE### begin -->
+		<h4 class="typo3-message message-ok">###HEADER###</h4>
+		<ul>
+			<!-- ###MESSAGES### begin -->
+			<li>
+				###MESSAGE###
+			</li>
+			<!-- ###MESSAGES### end -->
+		</ul>
+		<p>
+			<a href="###ACTION###">
+				###LABEL###
+			</a>
+		</p>
+		<!-- ###CONTINUE### end -->
+		<!-- ###NOCHANGE### begin -->
+		<h4 class="typo3-message message-warning">###HEADER###</h4>
+		<p>###MESSAGE###</p>
+		<p>
+			<a href="###ACTION###">
+				###LABEL###
+			</a>
+		</p>
+		<!-- ###NOCHANGE### end -->
+	</body>
+</html>
\ No newline at end of file
Index: typo3/sysext/install/Resources/Public/Images/body-background.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\body-background.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/button-background.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\button-background.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/content-background.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\content-background.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/content-bottom.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\content-bottom.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/content-top.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\content-top.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/input-background.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\input-background.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/login-icon-key.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\login-icon-key.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/logo.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\logo.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/menuAbout.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\menuAbout.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/menuBackground.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\menuBackground.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/menuCleanup.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\menuCleanup.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/menuConfig.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\menuConfig.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/menuDatabase.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\menuDatabase.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/menuExtConfig.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\menuExtConfig.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/menuImages.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\menuImages.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/menuPhpinfo.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\menuPhpinfo.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/menuTypo3confEdit.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\menuTypo3confEdit.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/menuTypo3temp.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\menuTypo3temp.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/menuUpdate.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\menuUpdate.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Images/numbers.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: typo3\sysext\install\Resources\Public\Images\numbers.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: typo3/sysext/install/Resources/Public/Javascript/install.js
===================================================================
--- typo3/sysext/install/Resources/Public/Javascript/install.js	(revision 0)
+++ typo3/sysext/install/Resources/Public/Javascript/install.js	(revision 0)
@@ -0,0 +1,49 @@
+/***************************************************************
+*
+*  Javascript functions to provide AJAX calls for install tool
+*
+*  Copyright notice
+*
+*  (c) 2009 Marcus Krause, Helmut Hummel <security@typo3.org>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 backend provided by
+*  Kasper Skaarhoj <kasper@typo3.com> together with TYPO3
+*
+*  Released under GNU/GPL (see license file in /typo3/)
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*
+*  This copyright notice MUST APPEAR in all copies of this script
+*
+***************************************************************/
+
+
+/**
+ *
+ * @author	Marcus Krause
+ */
+var EncryptionKey = {
+	thisScript: '../../index.php',
+	eID: 'tx_install_ajax',
+	cmd: 'encryptionKey',
+
+		// loads the ecryption key by an AJAX call
+	load: function(obj) {
+			// fallback if AJAX is not possible (e.g. IE < 6)
+		if (typeof Ajax.getTransport() != 'object') {
+			window.location.href = this.thisScript + '?eID=' + this.eID + '&cmd=' + this.cmd;
+			return;
+		}
+
+		new Ajax.Request(this.thisScript, {
+			method: 'get',
+			parameters: '?eID=' + this.eID + '&cmd=' + this.cmd,
+			onComplete: function(xhr) {
+				document.getElementsByName('TYPO3_INSTALL[localconf.php][encryptionKey]').item(0).value=xhr.responseText;
+			}.bind(this)
+		});
+	}
+};
Index: typo3/sysext/install/Resources/Public/Stylesheets/general.css
===================================================================
--- typo3/sysext/install/Resources/Public/Stylesheets/general.css	(revision 0)
+++ typo3/sysext/install/Resources/Public/Stylesheets/general.css	(revision 0)
@@ -0,0 +1,342 @@
+@CHARSET "UTF-8";
+
+/* Font size 62.8% = 1em = 10px */
+body {
+	font: 62.8% Verdana, Arial, Helvetica, sans-serif;
+}
+
+p, form, fieldset, h3, h4, h5, h6, dl { 
+	margin: 1em 0 1em 0;
+}
+
+ol, ul { 
+	margin: 1em 0 1em 1.5em;
+	padding: 0 0 0 1em;
+}
+
+ul { 
+	list-style:disc;
+}
+
+ol { 
+	list-style: decimal;
+}
+
+h2 {
+	margin: 2.5em 0 1.7em 0.8em;
+	color: #585858;
+	font-size: 120%;
+	font-weight: bold;
+}
+
+h3 {
+	font-size: 120%;
+	margin: 0.7em 0 1.5em
+}
+
+.clearfix:after { 
+	content: "."; 
+	display: block; 
+	height: 0; 
+	clear: both; 
+	visibility: hidden;
+}
+
+* html .clearfix { 
+	height: 1%; 
+}
+
+legend {
+	margin-left: 1em;
+	font-weight: bold;
+}
+
+fieldset ol {
+	margin: 0;
+	padding: 0;
+	list-style: none;
+}
+
+fieldset li {
+	margin-bottom: 0.5em;
+	float: left;
+	clear: left;
+	width: 100%;
+}
+
+label {
+	float: left;
+	width: 18em;
+	margin-right: 1em;
+	padding: 0.2em 0;
+}
+
+fieldset span {
+	float: left;
+	width: 29em;
+}
+
+.labelAfter input {
+	float: left;
+}
+
+.labelAfter label,
+.labelAbove label {
+	float: none;
+	display: block;
+	width: auto;
+	margin-right: 0;
+}
+
+.labelAbove label {
+	margin-bottom: 0.5em;
+}
+
+.labelAfter label {
+	padding-left: 3em;
+}
+
+.labelWidth7 label {
+	width: 7em;
+}
+
+.labelWidth21 label {
+	width: 21em;
+}
+
+fieldset.submit {
+	float: none;
+	width: auto;
+}
+
+fieldset select,
+input.inputText,
+textarea {
+	background: url('../Images/input-background.gif') repeat-x scroll 0 0 #FFFFFF;
+	border: 1px solid #7C7C7C;
+	color: #000000;
+	font-size: 1.1em;
+	line-height: 1.7em;
+	margin: 0;
+	width: 14.7em;
+}
+
+fieldset select {
+	height: 2em;
+	padding: 0.2em;
+	width: 17.4em;
+}
+
+input.inputText {
+	height: 1.7em;
+	padding: 0.1em 2.1em 0 0.45em;
+}
+
+textarea {
+	width: 99%;
+	font-size: 1.2em;
+}
+
+button {
+	color: #606060;
+	font-size: 1.1em;
+	padding: 0.3em 0.6em;
+	border: 1px solid #7c7c7c;
+	background: #f6f6f6 url('../Images/button-background.jpg') repeat-x left bottom;
+	cursor: pointer;
+}
+
+button span {
+	background-repeat: no-repeat;
+	display: inline-block;
+	width: 16px;
+	height: 16px;
+	margin-left: 0.6em;
+	float: none;
+}
+
+button span.negative {
+	background-image: url('../../../../../gfx/error.png');
+}
+
+button span.positive {
+	background-image: url('../../../../../gfx/ok.png');
+}
+
+.hidden {
+	display: none;
+}
+
+.strong {
+	font-weight: bold;
+}
+
+#container {
+	width: 76em;
+	margin: 1em auto;
+}
+
+#left {
+	float: left;
+	width: 19em;
+	clear: both;
+}
+
+#right {
+	padding-left: 19em;
+	width: 57em;
+}
+
+#menu {
+	margin: 0;
+	padding: 0.5em 0;
+	list-style: none;
+	width: 16em;
+	font-size: 110%;
+	line-height: 2em;
+}
+
+#menu li {
+	padding: 0 0 0 2.8em;
+}
+
+#menu li.act {
+	background-color: #585858;
+}
+
+#menu a {
+	color: #606060;
+	text-decoration: none;
+}
+
+#menu a:hover {
+	text-decoration: underline;
+}
+
+#menu li.act a {
+	font-weight: bold;
+	color: #ffffff;
+}
+
+#menu li {
+	background-repeat: no-repeat;
+	background-position: 0.7em center;
+}
+
+#menu #config {
+	background-image: url('../Images/menuConfig.png');
+}
+
+#menu #database {
+	background-image: url('../Images/menuDatabase.png');
+}
+
+#menu #update {
+	background-image: url('../Images/menuUpdate.png');
+}
+
+#menu #images {
+	background-image: url('../Images/menuImages.png');
+}
+
+#menu #extConfig {
+	background-image: url('../Images/menuExtConfig.png');
+}
+
+#menu #typo3temp {
+	background-image: url('../Images/menuTypo3temp.png');
+}
+
+#menu #cleanup {
+	background-image: url('../Images/menuCleanup.png');
+}
+
+#menu #phpinfo {
+	background-image: url('../Images/menuPhpinfo.png');
+}
+
+#menu #typo3conf_edit {
+	background-image: url('../Images/menuTypo3confEdit.png');
+}
+
+#menu #about {
+	background-image: url('../Images/menuAbout.png');
+}
+
+#links {
+	margin: 2em 0 0 0.8em;
+	padding: 0;
+	list-style: none;
+	width: 15.2em;
+	font-size: 110%;
+	line-height: 2em;
+}
+
+#links a {
+	color: #797878;
+	text-decoration: none;
+}
+
+#links a:hover {
+	text-decoration: underline;
+}
+
+#content {
+	font-size: 110%;
+	line-height: 1.5em;
+	padding: 0.1em 1.8em 1em 1.8em;
+	color: #606060;
+}
+
+.typo3-message {
+	padding: 0.6em 0.6em 0.6em 2.6em;
+	background-repeat: no-repeat;
+	background-position: 0.5em 0.7em;
+	border: 1px solid;
+	color: #000000;
+}
+
+.typo3-message h4 {
+	margin-top: 0;
+}
+
+.message-notice {
+	background-image: url("../../../../../gfx/notice.png");
+	background-color: #f6f7fa;
+	border-color: #c2cbcf;
+}
+
+.message-information {
+	background-image: url("../../../../../gfx/information.png");
+	background-color: #ddeef9;
+	border-color: #8aafc4;
+}
+
+.message-ok {
+	background-image: url("../../../../../gfx/ok.png");
+	background-color: #cdeaca;
+	border-color: #58b548;
+}
+
+.message-warning {
+	background-image: url("../../../../../gfx/warning.png");
+	background-color: #fbffb3;
+	border-color: #c4b70d;
+}
+
+.message-error {
+	background-image: url("../../../../../gfx/error.png");
+	background-color: #fbb19b;
+	border-color: #dc4c42;
+}
+
+#copyright {
+	color: #797878;
+	border-top: 1px #5f5f5f solid;
+	margin-top: 3.7em;
+	clear: both;
+}
+
+#copyright a {
+	color: #797878;
+}
\ No newline at end of file
Index: typo3/sysext/install/Resources/Public/Stylesheets/install.css
===================================================================
--- typo3/sysext/install/Resources/Public/Stylesheets/install.css	(revision 0)
+++ typo3/sysext/install/Resources/Public/Stylesheets/install.css	(revision 0)
@@ -0,0 +1,385 @@
+@CHARSET "UTF-8";
+
+body {
+	background-color: #f2f2f2;
+}
+
+h1,
+#menuTop,
+#menuBottom,
+#links,
+#contentTop,
+#contentBottom,
+#copyright {
+	display: none;
+}
+
+#content,
+#menu {
+	border: 1px #dcdcdc solid;
+	background-color: #ffffff;
+}
+
+/* 0: Login form */
+
+/* 1: Basic configuration */
+#checkImageMagick label {
+	width: 27em;
+}
+
+#systemInformation dt {
+	float: left;
+	width: 11em;
+}
+
+#systemInformation dd {
+	padding-left: 11em;
+	font-weight: bold;
+}
+
+#imageMagickVersions td {
+	padding-right: 1em;
+}
+
+/* 2: Database Analyzer */
+#databaseMenu {
+	width: 100%;
+}
+
+#databaseConnected dt,
+#checkTheDatabaseExplanation dt {
+	float: left;
+	width: 7em;
+}
+
+#databaseConnected dd,
+#checkTheDatabaseExplanation dd {
+	padding-left: 7em;
+}
+
+#databaseConnected dd,
+#checkTheDatabaseExplanation dt {
+	font-weight: bold;
+}
+
+#checkTheDatabaseImport label span,
+#checkTheDatabaseCache label span {
+	float: none;
+	display: inline-block;
+	vertical-align: top;
+}
+
+#checkTheDatabaseImport label span {
+	width: 32%;
+}
+
+#checkTheDatabaseCache label span.column1 {
+	width: 27%;
+}
+#checkTheDatabaseCache label span.column3 {
+	width: 56%;
+}
+
+#checkTheDatabaseCache label span.column2 {
+	width: 15%;
+}
+
+.displayFields,
+.displaySuggestions,
+.displayFieldsCompare {
+	width: 100%;
+	margin-bottom: 1em;
+}
+
+.displayFields th,
+.displaySuggestions th,
+.displayFieldsCompare th {
+	text-align: left;
+	background-color: #B3B7BD;
+}
+
+.displaySuggestions .tfootHeader {
+	font-weight: bold;
+	background-color: #d0d0d0;
+}
+
+.displayFields th,
+.displayFields td,
+.displaySuggestions th,
+.displaySuggestions td,
+.displayFieldsCompare th,
+.displayFieldsCompare td {
+	padding: 0.2em;
+}
+
+.displayFields thead,
+.displayFields tbody,
+.displaySuggestions thead,
+.displaySuggestions tfoot,
+.displaySuggestions tbody,
+.displayFieldsCompare thead,
+.displayFieldsCompare tbody {
+	border: 1px #B3B7BD solid;
+}
+
+.displayFields .column1,
+.displaySuggestions .column1 {
+	width: 35%;
+}
+
+.displaySuggestions tr {
+	border-top: 1px #B3B7BD solid;
+}
+
+.displaySuggestions pre {
+	font-size: 110%;
+}
+
+.displayFieldsCompare .warning {
+	color: red;
+}
+
+/* 4: Image processing */
+#imageProcessingIm dt,
+#imageProcessingOther dt,
+#imageProcessingFileFormats dt {
+	float: left;
+	width: 19em;
+}
+
+#imageProcessingIm dd,
+#imageProcessingOther dd,
+#imageProcessingFileFormats dd {
+	font-weight: bold;
+	padding-left: 19em;
+}
+
+#imageProcessingIm dd span,
+#imageProcessingOther dd span,
+#imageProcessingFileFormats dd span {
+	font-weight: normal;
+}
+
+.displayTwinImageTextarea {
+	width: 48em; 
+	overflow: scroll;
+	border: 1px #797878 solid;
+}
+
+.displayTwinImageTextarea textarea {
+	width: 300em; 
+	border: 0;
+}
+
+.displayTwinImageImages,
+.displayTwinImageReference,
+.displayTwinImageDifferentFileSize {
+	width: 100%;
+	margin: 0.3em 0;
+}
+
+.displayTwinImageImages td,
+.displayTwinImageReference th,
+.displayTwinImageReference td,
+.displayTwinImageDifferentFileSize th,
+.displayTwinImageDifferentFileSize td {
+	text-align: center;
+}
+
+/* 5: All configuration */
+
+/* 6: typo3temp/ */
+#tempManagerNumbers dt {
+	float: left;
+	width: 19em;
+}
+
+#tempManagerNumbers dd {
+	font-weight: bold;
+	padding-left: 19em;
+}
+
+#tempManagerNumbers dd span {
+	font-weight: normal;
+}
+
+/* 7: Clean up database */
+#cleanupManagerNumbers dt {
+	float: left;
+	width: 19em;
+}
+
+#cleanupManagerNumbers dd {
+	font-weight: bold;
+	padding-left: 19em;
+}
+
+#cleanupManagerNumbers dd span {
+	font-weight: normal;
+}
+
+/* 8: phpinfo() */
+#debugInformation {
+	width: 48em; 
+	height: 20em; 
+	overflow: scroll;
+	border: 1px #797878 solid;
+}
+
+#debugInformation textarea {
+	width: 200em; 
+	height: 68em;
+	border: 0;
+}
+
+.viewArray {
+	border: 1px solid #B3B7BD;
+	border-bottom: 0;
+}
+
+.viewArray .viewArray {
+	border: 0;
+}
+
+.viewArray dt {
+	float: left;
+	width: 19em;
+	font-weight: bold;
+}
+
+.viewArray dd {
+	padding-left: 19em;
+	border-bottom: 1px #d0d0d0 solid
+}
+
+.viewArray .viewArray dt {
+	width: 10em;
+}
+
+.viewArray .viewArray dd {
+	padding-left: 10em;
+	border: 0;
+}
+
+.viewArray dl {
+	margin: 0;
+}
+
+.phpinfo pre {
+	margin: 0px;
+	font-family: monospace;
+}
+
+.phpinfo table {
+	border-collapse: collapse;
+	width: 100%;
+	table-layout: fixed;
+}
+
+.phpinfo .center table {
+	margin-left: auto;
+	margin-right: auto;
+	text-align: left;
+}
+
+.phpinfo .center th {
+	text-align: center !important;
+}
+
+.phpinfo td,
+.phpinfo th {
+	border: 1px solid #000000;
+	vertical-align: baseline;
+	padding: 0.3em;
+	overflow: hidden;
+}
+
+.phpinfo h1 {
+	font-size: 150%;
+	background-image: none;
+	text-indent: 0;
+	height: auto;
+	color: #000000;
+	margin: 1em 0 1em 0;
+	text-align: center;
+	float: none;
+}
+
+.phpinfo h2 {
+	margin: 1em 0 1em 0;
+	color: #000000;
+	padding: 0;
+	text-align: center;
+	background-color: transparent;
+	float: none;
+}
+
+.phpinfo .p {
+	text-align: left;
+}
+
+.phpinfo .e {
+	background-color: #ccf;
+	font-weight: bold;
+	color: #000000;
+}
+
+.phpinfo .h {
+	background-color: #99c;
+	font-weight: bold;
+	color: #000000;
+}
+
+.phpinfo .v {
+	background-color: #ccc;
+	color: #000000;
+}
+
+.phpinfo .vr {
+	background-color: #ccc;
+	text-align: right;
+	color: #000000;
+}
+
+.phpinfo img {
+	float: right;
+	border: 0px;
+}
+
+.phpinfo hr {
+	background-color: #ccc;
+	border: 0px;
+	height: 1px;
+	color: #000000;
+}
+
+/* 9: Edit files in typo3conf/ */
+#confEditFileList dt {
+	float: left;
+	width: 45em;
+}
+
+#confEditFileList dd {
+	padding-left: 45em;
+}
+
+#confEditFileList dt a {
+	color: blue;
+	text-decoration: none;
+}
+
+#confEditFileList dt a:hover {
+	text-decoration: underline;
+}
+
+#confEditFileList dt.act a {
+	font-weight: bold;
+}
+
+#fileEdit textarea {
+	height: 10em;
+	width: 99%;
+	padding: 0;
+}
+
+/* 10: About */
\ No newline at end of file
Index: typo3/sysext/install/Resources/Public/Stylesheets/install_123.css
===================================================================
--- typo3/sysext/install/Resources/Public/Stylesheets/install_123.css	(revision 0)
+++ typo3/sysext/install/Resources/Public/Stylesheets/install_123.css	(revision 0)
@@ -0,0 +1,201 @@
+@CHARSET "UTF-8";
+
+/* Font size 62.8% = 1em = 10px */
+body {
+	background: #4f4f4f url('../Images/body-background.jpg') repeat-x fixed;
+}
+
+#container {
+	width: 43em;
+	margin-left: 16em;
+}
+
+h1 {
+	background: url('../Images/logo.gif') no-repeat scroll 0 0 transparent;
+	text-indent:-999em;
+	margin: 2em 0 3.7em 0;
+	height: 34px;
+}
+
+h2 {
+	background-color: #585858;
+	font-size: 120%;
+	font-weight: bold;
+	color: #ffffff;
+	padding: 0.5em 1.8em 0.5em 1.8em;
+	margin: 0;
+}
+
+h3 {
+	font-size: 163%;
+}
+
+#contentTop {
+	height: 3px;
+	background: #3e3e3e url('../Images/content-top.png') no-repeat center bottom;
+}
+
+#contentBottom {
+	height: 3px;
+	background: #4d4c4d url('../Images/content-bottom.png') no-repeat center top;
+}
+
+#content {
+	color: #787878;
+	background: #ebebeb url('../Images/content-background.jpg') repeat-x left bottom;
+	padding: 1em 1.8em 1em;
+}
+
+/* 1-2-3 General */
+#stepHeader {
+	list-style: none;
+	margin: 1em 0 0;
+	padding: 0;
+}
+
+#stepHeader li {
+	float: left;
+	text-indent:-999em;
+	width: 35px;
+	height: 35px;
+	margin-right: 1.1em;
+	background: url('../Images/numbers.png') no-repeat scroll 0 0 transparent;
+}
+
+#stepHeader li a {
+	width: 100%;
+	height: 100%;
+	display: block;
+}
+
+#stepHeader li.step1 {
+	background-position: 0 0;
+}
+
+#stepHeader li.step1.act {
+	background-position: 0 center;
+}
+
+#stepHeader li.step1.done {
+	background-position: 0 bottom;
+}
+
+#stepHeader li.step2 {
+	background-position: -35px 0;
+}
+
+#stepHeader li.step2.act {
+	background-position: -35px center;
+}
+
+#stepHeader li.step2.done {
+	background-position: -35px bottom;
+}
+
+#stepHeader li.step3 {
+	background-position: -70px 0;
+}
+
+#stepHeader li.step3.act {
+	background-position: -70px center;
+}
+
+#stepHeader li.step3.done {
+	background-position: -70px bottom;
+}
+
+#stepHeader li.step4 {
+	background-position: -105px 0;
+}
+
+#stepHeader li.step4.act {
+	background-position: -105px center;
+}
+
+#stepHeader li.step4.done {
+	background-position: -105px bottom;
+}
+
+#stepHeader li.step5 {
+	background-position: -140px 0;
+}
+
+#stepHeader li.step5.act {
+	background-position: -140px center;
+}
+
+#stepHeader li.step5.done {
+	background-position: -140px bottom;
+}
+
+#stepHeader li.step6 {
+	background-position: -175px 0;
+}
+
+#stepHeader li.step6.act {
+	background-position: -175px center;
+}
+
+#stepHeader li.step6.done {
+	background-position: -175px bottom;
+}
+
+#stepHeader li.step7 {
+	background-position: -210px 0;
+}
+
+#stepHeader li.step7.act {
+	background-position: -210px center;
+}
+
+#stepHeader li.step7.done {
+	background-position: -210px bottom;
+}
+
+#stepHeader li.step8 {
+	background-position: -245px 0;
+}
+
+#stepHeader li.step8.act {
+	background-position: -245px center;
+}
+
+#stepHeader li.step8.done {
+	background-position: -245px bottom;
+}
+
+#skip123 {
+	text-align: right;
+	font-size: 0.91em;
+}
+
+#skip123 a {
+	color: #888888;
+	text-decoration: none;
+}
+
+#skip123 a:hover {
+	text-decoration: underline;
+}
+
+/* 1-2-3: Step 3 */
+#step3 label {
+	float: none;
+	font-weight: bold;
+}
+
+#step3 p {
+	margin: 0 0 0.5em;
+}
+
+/* 1-2-3: Step 4 */
+#stepOutputSummary dt {
+	float: left;
+	clear: both;
+	width: 15em;
+	margin-right: 1em;
+}
+
+#stepOutputSummary dd {
+	float: left;
+}
\ No newline at end of file
Index: typo3/sysext/install/Resources/Public/Stylesheets/install_login.css
===================================================================
--- typo3/sysext/install/Resources/Public/Stylesheets/install_login.css	(revision 0)
+++ typo3/sysext/install/Resources/Public/Stylesheets/install_login.css	(revision 0)
@@ -0,0 +1,49 @@
+@CHARSET "UTF-8";
+
+body {
+	background-color: #f2f2f2;
+}
+
+#container {
+	width: 43em;
+	margin: 1em auto;
+}
+
+h1,
+#contentTop,
+#contentBottom {
+	display: none;
+}
+
+.login h1 {
+	float: none;
+}
+
+.login h2 {
+	background: url('../Images/login-icon-key.gif') no-repeat scroll 1em center #585858;
+	color: #ffffff;
+	font-size: 120%;
+	padding:0.5em 0 0.5em 3.35em;
+	margin: 0;
+}
+
+h3 {
+	margin: 1em 0 2em 0;
+}
+
+#content {
+	border: 1px #dcdcdc solid;
+	border-top: 0;
+	color: #606060;
+	background-color: #eeeeee;
+	padding: 1em 3.6em 1em;
+}
+
+.typo3-message {
+	font-size: 110%;
+	line-height: 1.5em;
+}
+
+.message-information {
+	color: #64859c;
+}
\ No newline at end of file
Index: typo3/sysext/install/Resources/Public/Stylesheets/install_standalone.css
===================================================================
--- typo3/sysext/install/Resources/Public/Stylesheets/install_standalone.css	(revision 0)
+++ typo3/sysext/install/Resources/Public/Stylesheets/install_standalone.css	(revision 0)
@@ -0,0 +1,70 @@
+@CHARSET "UTF-8";
+
+body {
+	background: #4f4f4f url('../Images/body-background.jpg') repeat-x fixed;
+}
+
+#container {
+	margin: 0 auto;
+}
+
+h1,
+#menuTop,
+#menuBottom,
+#links,
+#contentTop,
+#contentBottom,
+#copyright {
+	display: block;
+}
+
+h1 {
+	background: url('../Images/logo.gif') no-repeat scroll 0 0 transparent;
+	text-indent:-999em;
+	margin: 2em 0 3.7em 0;
+	height: 34px;
+	width: 19em;
+	float: left;
+}
+
+h2 {
+	padding: 3.3em 0 3.7em 17.5em;
+	margin: 0;
+	height: auto;
+	color: #ffffff;
+}
+
+#contentTop {
+	height: 3px;
+	background: #3e3e3e url('../Images/content-top.png') no-repeat center bottom;
+}
+
+#content {
+	background-color: #eeeeee;
+}
+
+#contentBottom {
+	height: 3px;
+	background: #4d4c4d url('../Images/content-bottom.png') no-repeat center top;
+}
+
+#menu,
+#content {
+	border: 0;
+}
+
+#menuTop {
+	width: 17.6em;
+	height: 3px;
+	background: #3e3e3e url('../Images/content-top.png') no-repeat center bottom;
+}
+
+#menu {
+	background: #ebebeb url('../Images/menuBackground.gif') repeat-x left bottom;
+}
+
+#menuBottom {
+	width: 17.6em;
+	height: 3px;
+	background: #3e3e3e url('../Images/content-top.png') no-repeat center bottom;
+}
\ No newline at end of file
Index: typo3/sysext/install/Resources/Public/Stylesheets/reset.css
===================================================================
--- typo3/sysext/install/Resources/Public/Stylesheets/reset.css	(revision 0)
+++ typo3/sysext/install/Resources/Public/Stylesheets/reset.css	(revision 0)
@@ -0,0 +1,55 @@
+@CHARSET "UTF-8";
+
+/* http://meyerweb.com/eric/tools/css/reset/ */
+/* v1.0 | 20080212 */
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, font, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend
+table, caption, tbody, tfoot, thead, tr, th, td {
+	margin: 0;
+	padding: 0;
+	border: 0;
+	outline: 0;
+	font-size: 100%;
+	vertical-align: baseline;
+	background: transparent;
+}
+body {
+	line-height: 1;
+}
+ol, ul {
+	list-style: none;
+}
+blockquote, q {
+	quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+	content: '';
+	content: none;
+}
+
+/* remember to define focus styles! */
+:focus {
+	outline: 0;
+}
+
+/* remember to highlight inserts somehow! */
+ins {
+	text-decoration: none;
+}
+del {
+	text-decoration: line-through;
+}
+
+/* tables still need 'cellspacing="0"' in the markup */
+table {
+	border-collapse: collapse;
+	border-spacing: 0;
+}
\ No newline at end of file
Index: typo3/sysext/install/updates/class.tx_coreupdates_compatversion.php
===================================================================
--- typo3/sysext/install/updates/class.tx_coreupdates_compatversion.php	(revision 7289)
+++ typo3/sysext/install/updates/class.tx_coreupdates_compatversion.php	(working copy)
@@ -52,21 +52,63 @@
 		global $TYPO3_CONF_VARS;
 
 		if ($this->compatVersionIsCurrent())	{
-			$description = '<strong>Up to date!</strong><br />If you do not use the wizard, your current TYPO3 installation is configured to use all the features included in the current release '.TYPO3_version.'.<br />
-			There are two possibilities that you see this screen:<ol><li><b>You just updated from a previous version of TYPO3:</b>
-			Because of some new features, the frontend output of your site might have changed. To emulate the "old" frontend behavior, change the compatibility version by continuing to step 2.
-			This is <b>recommended</b> after every update to make sure the frontend output is not altered. When re-running the wizard, you will see the changes needed for using the new features.
-			<i>Please continue to step two.</i></li>
-			<li><b>You just made a fresh install of TYPO3:</b>
-			Perfect! All new features will be used.
-			<i>You can stop here and do not need this wizard now.</i></li></ol>';
+			$description = '
+				<p>
+					<strong>Up to date!</strong>
+					<br />
+					If you do not use the wizard, your current TYPO3
+					installation is configured to use all the features included
+					in the current release ' . TYPO3_version . '.
+					<br />
+					There are two possibilities that you see this screen:
+				</p>
+				<ol>
+					<li>
+						<strong>You just updated from a previous version of
+						TYPO3:</strong>
+						Because of some new features, the frontend output of
+						your site might have changed. To emulate the "old"
+						frontend behavior, change the compatibility version
+						by continuing to step 2.
+						This is <strong>recommended</strong> after every update
+						to make sure the frontend output is not altered. When
+						re-running the wizard, you will see the changes needed
+						for using the new features.
+						<em>Please continue to step two.</em>
+					</li>
+					<li>
+						<strong>You just made a fresh install of TYPO3:</strong>
+						Perfect! All new features will be used.
+						<em>You can stop here and do not need this wizard now.</em>
+					</li>
+				</ol>
+			';
 
 			if (!$TYPO3_CONF_VARS['SYS']['compat_version'])	{
 				$description .= '
-				The compatibility version has been set to the current TYPO3 version. This is a stamp and has no impact for your installation.';
+					<p>
+						The compatibility version has been set to the current
+						TYPO3 version. This is a stamp and has no impact for
+						your installation.
+					</p>
+				';
 			}
 		} else {
-			$description = 'Your current TYPO3 installation is configured to <b>behave like version '.$TYPO3_CONF_VARS['SYS']['compat_version'].'</b> of TYPO3. If you just upgraded from this version, you most likely want to <b>use new features</b> as well.</p><p>In the next step, you will see the things that need to be adjusted to make your installation compatible with the new features.';
+			$description = '
+				<p>
+					Your current TYPO3 installation is configured to
+					<strong>behave like version
+					' . $TYPO3_CONF_VARS['SYS']['compat_version'] . '
+					</strong> of TYPO3. If you just upgraded from this version,
+					you most likely want to <strong>use new features</strong> as
+					well.
+				</p>
+				<p>
+					In the next step, you will see the things that need to be
+					adjusted to make your installation compatible with the new
+					features.
+				</p>
+			';
 		}
 
 		return 1;	// Return 1 in any case so user has possibility to switch back to a previous compat_version.
@@ -81,24 +123,64 @@
 	function getUserInput($inputPrefix)	{
 		global $TYPO3_CONF_VARS;
 		if ($this->compatVersionIsCurrent())	{
-			$content = '<strong>You updated from an older version of TYPO3</strong>:<br />
-			<label for="'.$inputPrefix.'[version]">Select the version where you have upgraded from:</label> <select name="'.$inputPrefix.'[version]" id="'.$inputPrefix.'[version]">';
+			$content = '
+				<fieldset>
+					<ol>
+						<li>
+							<strong>You updated from an older version of TYPO3</strong>:
+						</li>
+						<li>
+							<label for="version">Select the version where you have upgraded from:</label>
+							<select name="' . $inputPrefix . '[version]" id="version">
+			';
 			$versions = array(
 				'3.8' => '<= 3.8',
 				'4.1' => '<= 4.1',
 				'4.2' => '<= 4.2',
 			);
 			foreach ($versions as $singleVersion => $caption)	{
-				$content .= '<option value="'.$singleVersion.'">'.$caption.'</option>';
+				$content .= '
+								<option value="'.$singleVersion.'">'.$caption.'</option>
+				';
 			}
-			$content .= '</select>';
+			$content .= '
+							</select>
+						</li>
+					</ol>
+				</fieldset>
+			';
 		} else {
-			$content = 'TYPO3 output is currently compatible to version '.$TYPO3_CONF_VARS['SYS']['compat_version'].'. To use all the new features in the current TYPO3 version, make sure you follow the guidelines below to upgrade without problems.<br />
-			<p><strong>Follow the steps below carefully and confirm every step!</strong><br />You will see this list again after you performed the update.</p>';
+			$content = '
+				<p>
+					TYPO3 output is currently compatible to version ' . $TYPO3_CONF_VARS['SYS']['compat_version'] . '.
+					To use all the new features in the current TYPO3 version,
+					make sure you follow the guidelines below to upgrade without
+					problems.
+				</p>
+				<p>
+					<strong>
+						Follow the steps below carefully and confirm every step!
+					</strong>
+					<br />
+					You will see this list again after you performed the update.
+				</p>
+			';
 
 			$content .= $this->showChangesNeeded($inputPrefix);
 
-			$content.= '<p><input type="checkbox" name="'.$inputPrefix.'[compatVersion][all]" id="'.$inputPrefix.'[compatVersion][all]" value="1">&nbsp;<strong><label for="'.$inputPrefix.'[compatVersion][all]">Check all (ignore selection above)<br />WARNING: this might break the output of your website.</label></strong></p><hr />';
+			$content.= '
+				<fieldset>
+					<ol>
+						<li class="labelAfter">
+							<input type="checkbox" name="' . $inputPrefix . '[compatVersion][all]" id="compatVersionAll" value="1" />
+							<label for="compatVersionAll">Check all (ignore selection above)</label>
+						</li>
+						<li>
+							WARNING: this might break the output of your website.
+						</li>
+					</ol>
+				</fieldset>
+			';
 		}
 		return $content;
 	}
@@ -203,15 +285,24 @@
 					$updateWizardBoxes.= '
 						<div style="border: 1px solid; padding: 10px; margin: 10px; padding-top: 0px; width: 500px;">
 							<h3>'.(isset($details['title'])?$details['title']:$internalName).'</h3>
-							<p>'.$description.'</p>'.
+							' . $description .
 							(strlen($description_acknowledge) ? '<p>'.$description_acknowledge.'</p>' : '').
-							(strlen($inputPrefix) ? '<p><input type="checkbox" name="'.$inputPrefix.'[compatVersion]['.$internalName.']" id="'.$inputPrefix.'[compatVersion]['.$internalName.']" value="1">&nbsp;<strong><label for="'.$inputPrefix.'[compatVersion]['.$internalName.']">Acknowledged</label></strong></p>' : '').'
+							(strlen($inputPrefix) ? '
+								<fieldset>
+									<ol>
+										<li class="labelAfter">
+											<input type="checkbox" name="' . $inputPrefix . '[compatVersion][' . $internalName . ']" id="compatVersion' . $internalName . '" value="1" />
+											<label for="compatVersion' . $internalName . '">Acknowledged</label>
+										</li>
+									</ol>
+								</fieldset>
+							' : '').'
 						</div>';
 				}
 			}
 		}
 		if (strlen($updateWizardBoxes))	{
-			return '<table><tr><td>'.$updateWizardBoxes.'</td></tr></table>';
+			return $updateWizardBoxes;
 		}
 		return '';
 	}
Index: typo3/sysext/install/updates/class.tx_coreupdates_installnewsysexts.php
===================================================================
--- typo3/sysext/install/updates/class.tx_coreupdates_installnewsysexts.php	(revision 7289)
+++ typo3/sysext/install/updates/class.tx_coreupdates_installnewsysexts.php	(working copy)
@@ -55,21 +55,40 @@
 	 */
 	public function checkForUpdate(&$description) {
 		$result = false;
-		$description = 'Install the following system extensions that are new in TYPO3 4.3:<br />';
+		$description = '
+			<p>
+				Install the following system extensions that are new in TYPO3
+				4.3:
+			</p>
+		';
 
+		$description .= '
+			<ul>
+		';
+
 		foreach($this->newSystemExtensions as $_EXTKEY) {
 			if (!t3lib_extMgm::isLoaded($_EXTKEY)) {
 				$EM_CONF = FALSE;
 					// extension may not been loaded at this point, so we can't use an API function from t3lib_extmgm
 				require (PATH_site . 'typo3/sysext/' . $_EXTKEY . '/ext_emconf.php');
 				$description .= '
-					<strong>' . $EM_CONF[$_EXTKEY]['title'] . ' [' . $_EXTKEY . ']</strong>
-					' . $EM_CONF[$_EXTKEY]['description'] . '<br />';
+					<li>
+						<strong>
+							' . $EM_CONF[$_EXTKEY]['title'] . ' [' . $_EXTKEY . ']
+						</strong>
+						<br />
+						' . $EM_CONF[$_EXTKEY]['description'] . '
+					</li>
+				';
 
 				$result = true;
 			}
 		}
 
+		$description .= '
+			</ul>
+		';
+
 		return $result;
 	}
 
@@ -80,17 +99,39 @@
 	 * @return	string		HTML output
 	 */
 	public function getUserInput($inputPrefix) {
-		$content = '<strong>Install the following system extensions that are new in TYPO3 4.3:</strong><br />';
+		$content = '
+			<p>
+				<strong>
+					Install the following system extensions that are new in
+					TYPO3 4.3:
+				</strong>
+			</p>
+		';
+
+		$content .= '
+			<fieldset>
+				<ol>
+		';
+
 		foreach($this->newSystemExtensions as $_EXTKEY) {
 			if (!t3lib_extMgm::isLoaded($_EXTKEY)) {
 				$EM_CONF = FALSE;
 					// extension may not been loaded at this point, so we can't use an API function from t3lib_extmgm
 				require (PATH_site . 'typo3/sysext/' . $_EXTKEY . '/ext_emconf.php');
 				$content .= '
-					<input type="checkbox" id="' . $_EXTKEY . '" name="' . $inputPrefix . '[sysext][' . $_EXTKEY . ']" value="1" checked="checked" /><label for="' . $_EXTKEY . '">' . $EM_CONF[$_EXTKEY]['title'] . ' [' . $_EXTKEY . ']</label><br />';
+					<li class="labelAfter">
+						<input type="checkbox" id="' . $_EXTKEY . '" name="' . $inputPrefix . '[sysext][' . $_EXTKEY . ']" value="1" checked="checked" />
+						<label for="' . $_EXTKEY . '">' . $EM_CONF[$_EXTKEY]['title'] . ' [' . $_EXTKEY . ']</label>
+					</li>
+				';
 			}
 		}
 
+		$content .= '
+				</ol>
+			</fieldset>
+		';
+
 		return $content;
 	}
 
Index: typo3/sysext/install/updates/class.tx_coreupdates_installsysexts.php
===================================================================
--- typo3/sysext/install/updates/class.tx_coreupdates_installsysexts.php	(revision 7289)
+++ typo3/sysext/install/updates/class.tx_coreupdates_installsysexts.php	(working copy)
@@ -55,12 +55,44 @@
 	 */
 	public function checkForUpdate(&$description) {
 		$result = false;
-		$description = 'Install the following system extensions as their functionality is moved out of the TYPO3 base installation and now optional:<br />
-		<strong>Help&gt;About [about]</strong><br />Shows info about TYPO3 and installed extensions.<br />
-		<strong>Help&gt;TYPO3 Manual [cshmanual]</strong><br />Shows TYPO3 inline user manual.<br />
-		<strong>Frontend Editing [feedit]</strong><br />This module enables FE-editing, configuration is done by Typoscript.<br />
-		<strong>User&gt;Open Documents [opendocs]</strong><br />Handles the list of opened documents in TYPO3 backend.<br />
-		<strong>Simulate Static URLs [simulatestatic]</strong><br />If you do not want to use RealURL or CoolURI but still want the Speaking URL feature. If you used "config.simulateStaticDocuments = 1" in this installation before, you should install this system extension. Be sure to read the manual of "simulatestatic".';
+		$description = '
+			<p>
+				Install the following system extensions as their functionality
+				is moved out of the TYPO3 base installation and now optional:
+			</p>
+			<ul>
+				<li>
+					<strong>Help&gt;About [about]</strong>
+					<br />
+					Shows info about TYPO3 and installed extensions.
+				</li>
+				<li>
+					<strong>Help&gt;TYPO3 Manual [cshmanual]</strong>
+					<br />
+					Shows TYPO3 inline user manual.
+				</li>
+				<li>
+					<strong>Frontend Editing [feedit]</strong>
+					<br />
+					This module enables FE-editing, configuration is done by
+					Typoscript.
+				</li>
+				<li>
+					<strong>User&gt;Open Documents [opendocs]</strong>
+					<br />
+					Handles the list of opened documents in TYPO3 backend.
+				</li>
+				<li>
+					<strong>Simulate Static URLs [simulatestatic]</strong>
+					<br />
+					If you do not want to use RealURL or CoolURI but still want
+					the Speaking URL feature. If you used
+					"config.simulateStaticDocuments = 1" in this installation
+					before, you should install this system extension. Be sure to
+					read the manual of "simulatestatic".
+				</li>
+			</ul>
+		';
 
 		foreach($this->newSystemExtensions as $ext) {
 			if (!t3lib_extMgm::isLoaded($ext)) {
@@ -77,12 +109,37 @@
 	 * @return	string		HTML output
 	 */
 	public function getUserInput($inputPrefix) {
-		$content = '<strong>Install the following SystemExtensions</strong>:<br />
-		<input type="checkbox" id="about" name="' . $inputPrefix . '[sysext][about]" value="1" checked="checked" /><label for="about">Help&gt;About [about]</label><br />
-		<input type="checkbox" id="cshmanual" name="' . $inputPrefix . '[sysext][cshmanual]" value="1" checked="checked" /><label for="cshmanual">Help&gt;TYPO3 Manual [cshmanual]</label><br />
-		<input type="checkbox" id="feedit" name="' . $inputPrefix . '[sysext][feedit]" value="1" checked="checked" /><label for="feedit">Frontend Editing [feedit]</label><br />
-		<input type="checkbox" id="opendocs" name="' . $inputPrefix . '[sysext][opendocs]" value="1" checked="checked" /><label for="opendocs">User&gt;Open Documents [opendocs]</label><br />
-		<input type="checkbox" id="simulatestatic" name="' . $inputPrefix . '[sysext][simulatestatic]" value="1" checked="checked" /><label for="simulatestatic">Simulate Static URLs [simulatestatic]</label><br />';
+		$content = '
+			<p>
+				<strong>
+					Install the following SystemExtensions
+				</strong>:
+			</p>
+			<fieldset>
+				<ol>
+					<li class="labelAfter">
+						<input type="checkbox" id="about" name="' . $inputPrefix . '[sysext][about]" value="1" checked="checked" />
+						<label for="about">Help&gt;About [about]</label>
+					</li>
+					<li class="labelAfter">
+						<input type="checkbox" id="cshmanual" name="' . $inputPrefix . '[sysext][cshmanual]" value="1" checked="checked" />
+						<label for="cshmanual">Help&gt;TYPO3 Manual [cshmanual]</label>
+					</li>
+					<li class="labelAfter">
+						<input type="checkbox" id="feedit" name="' . $inputPrefix . '[sysext][feedit]" value="1" checked="checked" />
+						<label for="feedit">Frontend Editing [feedit]</label>
+					</li>
+					<li class="labelAfter">
+						<input type="checkbox" id="opendocs" name="' . $inputPrefix . '[sysext][opendocs]" value="1" checked="checked" />
+						<label for="opendocs">User&gt;Open Documents [opendocs]</label>
+					</li>
+					<li class="labelAfter">
+						<input type="checkbox" id="simulatestatic" name="' . $inputPrefix . '[sysext][simulatestatic]" value="1" checked="checked" />
+						<label for="simulatestatic">Simulate Static URLs [simulatestatic]</label>
+					</li>
+				</ol>
+			</fieldset>
+		';
 
 		return $content;
 	}
