function echoPage()
{
    $edition = KICKSTARTPRO ? 'Professional' : 'Core';
    $automation = AKAutomation::getInstance();
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Akeeba Kickstart <?php 
    echo $edition;
    ?>
 <?php 
    echo VERSION;
    ?>
</title>
<style type="text/css" media="all" rel="stylesheet">
<?php 
    echoCSS();
    ?>
</style>
<?php 
    if (@file_exists('jquery.min.js')) {
        ?>
<script type="text/javascript" src="jquery.min.js"></script>
<?php 
    } else {
        ?>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<?php 
    }
    if (@file_exists('json2.min.js')) {
        ?>
<script type="text/javascript" src="json2.min.js"></script>
<?php 
    } else {
        ?>
<script type="text/javascript" src="http://yandex.st/json2/2011-10-19/json2.min.js"></script>
<?php 
    }
    ?>
<script type="text/javascript" language="javascript">
	var akeeba_automation = <?php 
    echo $automation->hasAutomation() ? 'true' : 'false';
    ?>
;
	var akeeba_debug = <?php 
    echo defined('KSDEBUG') ? 'true' : 'false';
    ?>
;

	$(document).ready(function(){
		// Hide 2nd Page
		$('#page2').css('display','none');

		// Translate the GUI
		translateGUI();

		// Hook interaction handlers
		$(document).keyup( closeLightbox );
		$('#kickstart\\.procengine').change( onChangeProcengine );
		$('#checkFTPTempDir').click( oncheckFTPTempDirClick );
		$('#resetFTPTempDir').click( onresetFTPTempDir );
		$('#testFTP').click( onTestFTPClick );
		$('#gobutton').click( onStartExtraction );
		$('#runInstaller').click( onRunInstallerClick );
		$('#runCleanup').click( onRunCleanupClick );
		$('#gotoSite').click(function(event){window.open('index.php','finalstepsite'); window.close();});
		$('#gotoAdministrator').click(function(event){window.open('administrator/index.php','finalstepadmin'); window.close();});
		$('#gotoStart').click( onGotoStartClick );

		// Reset the progress bar
		setProgressBar(0);

		// Do we have automation?
		if(akeeba_automation) {
			$('#automode').css('display','block');
			$('#gobutton').click();
		} else {
			// Show warning
			if( jQuery.browser.msie && (jQuery.browser.version.substr(0,1) == '7') )
			{
				$('#ie7Warning').css('display','block');
			}
			if(!akeeba_debug) {
				$('#preextraction').css('display','block');
				$('#fade').css('display','block');
			}
		}
	});

	var translation = {
	<?php 
    echoTranslationStrings();
    ?>
	}

	var akeeba_ajax_url = '<?php 
    echo basename(__FILE__);
    ?>
';
	var akeeba_error_callback = onGenericError;
	var akeeba_restoration_stat_inbytes = 0;
	var akeeba_restoration_stat_outbytes = 0;
	var akeeba_restoration_stat_files = 0;
	var akeeba_restoration_stat_total = 0;
	var akeeba_factory = null;

	function translateGUI()
	{
		$('*').each(function(i,e){
			transKey = $(e).text();
			if(array_key_exists(transKey, translation))
			{
				$(e).text( translation[transKey] );
			}
		});
	}

	function trans(key)
	{
		if(array_key_exists(key, translation)) {
			return translation[key];
		} else {
			return key;
		}
	}

	function array_key_exists ( key, search ) {
	   if (!search || (search.constructor !== Array && search.constructor !== Object)){
	        return false;
	    }
	    return key in search;
	}

	function empty (mixed_var) {
	    var key;

	    if (mixed_var === "" ||
	        mixed_var === 0 ||
	        mixed_var === "0" ||
	        mixed_var === null ||
	        mixed_var === false ||
	        typeof mixed_var === 'undefined'
	    ){
	        return true;
	    }

	    if (typeof mixed_var == 'object') {
	        for (key in mixed_var) {
	            return false;
	        }
	        return true;
	    }

	    return false;
	}

	function is_array (mixed_var) {
	    var key = '';
	    var getFuncName = function (fn) {
	        var name = (/\W*function\s+([\w\$]+)\s*\(/).exec(fn);
	        if (!name) {
	            return '(Anonymous)';
	        }
	        return name[1];
	    };

	    if (!mixed_var) {
	        return false;
	    }

	    // BEGIN REDUNDANT
	    this.php_js = this.php_js || {};
	    this.php_js.ini = this.php_js.ini || {};
	    // END REDUNDANT

	    if (typeof mixed_var === 'object') {

	        if (this.php_js.ini['phpjs.objectsAsArrays'] &&  // Strict checking for being a JavaScript array (only check this way if call ini_set('phpjs.objectsAsArrays', 0) to disallow objects as arrays)
	            (
	            (this.php_js.ini['phpjs.objectsAsArrays'].local_value.toLowerCase &&
	                    this.php_js.ini['phpjs.objectsAsArrays'].local_value.toLowerCase() === 'off') ||
	                parseInt(this.php_js.ini['phpjs.objectsAsArrays'].local_value, 10) === 0)
	            ) {
	            return mixed_var.hasOwnProperty('length') && // Not non-enumerable because of being on parent class
	                            !mixed_var.propertyIsEnumerable('length') && // Since is own property, if not enumerable, it must be a built-in function
	                                getFuncName(mixed_var.constructor) !== 'String'; // exclude String()
	        }

	        if (mixed_var.hasOwnProperty) {
	            for (key in mixed_var) {
	                // Checks whether the object has the specified property
	                // if not, we figure it's not an object in the sense of a php-associative-array.
	                if (false === mixed_var.hasOwnProperty(key)) {
	                    return false;
	                }
	            }
	        }

	        // Read discussion at: http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_is_array/
	        return true;
	    }

	    return false;
	}

	/**
	 * Performs an AJAX request and returns the parsed JSON output.
	 * The global akeeba_ajax_url is used as the AJAX proxy URL.
	 * If there is no errorCallback, the global akeeba_error_callback is used.
	 * @param data An object with the query data, e.g. a serialized form
	 * @param successCallback A function accepting a single object parameter, called on success
	 * @param errorCallback A function accepting a single string parameter, called on failure
	 */
	function doAjax(data, successCallback, errorCallback)
	{
		var structure =
		{
			type: "POST",
			url: akeeba_ajax_url,
			cache: false,
			data: data,
			timeout: 600000,
			success: function(msg) {
				// Initialize
				var junk = null;
				var message = "";

				// Get rid of junk before the data
				var valid_pos = msg.indexOf('###');
				if( valid_pos == -1 ) {
					// Valid data not found in the response
					msg = 'Invalid AJAX data received:<br/>' + msg;
					if(errorCallback == null)
					{
						if(akeeba_error_callback != null)
						{
							akeeba_error_callback(msg);
						}
					}
					else
					{
						errorCallback(msg);
					}
					return;
				} else if( valid_pos != 0 ) {
					// Data is prefixed with junk
					junk = msg.substr(0, valid_pos);
					message = msg.substr(valid_pos);
				}
				else
				{
					message = msg;
				}
				message = message.substr(3); // Remove triple hash in the beginning

				// Get of rid of junk after the data
				var valid_pos = message.lastIndexOf('###');
				message = message.substr(0, valid_pos); // Remove triple hash in the end

				try {
					var data = eval('('+message+')');
				} catch(err) {
					var msg = err.message + "\n<br/>\n<pre>\n" + message + "\n</pre>";
					if(errorCallback == null)
					{
						if(akeeba_error_callback != null)
						{
							akeeba_error_callback(msg);
						}
					}
					else
					{
						errorCallback(msg);
					}
					return;
				}

				// Call the callback function
				successCallback(data);
			},
			error: function(Request, textStatus, errorThrown) {
				var message = '<strong>AJAX Loading Error</strong><br/>HTTP Status: '+Request.status+' ('+Request.statusText+')<br/>';
				message = message + 'Internal status: '+textStatus+'<br/>';
				message = message + 'XHR ReadyState: ' + Response.readyState + '<br/>';
				message = message + 'Raw server response:<br/>'+Request.responseText;
				if(errorCallback == null)
				{
					if(akeeba_error_callback != null)
					{
						akeeba_error_callback(message);
					}
				}
				else
				{
					errorCallback(message);
				}
			}
		};
		$.ajax( structure );
	}

	function onChangeProcengine(event)
	{
		if( $('#kickstart\\.procengine').val() == 'ftp' ) {
			$('#ftp-options').show('fast');
		} else {
			$('#ftp-options').hide('fast');
		}
	}

	function closeLightbox(event)
	{
		var closeMe = false;

		if( (event == null) || (event == undefined) ) {
			closeMe = true;
		} else if(event.keyCode == '27') {
			closeMe = true;
		}

		if(closeMe)
		{
			document.getElementById('preextraction').style.display='none';
			document.getElementById('genericerror').style.display='none';
			document.getElementById('fade').style.display='none';
			$(document).unbind('keyup', closeLightbox);
		}
	}

	function onGenericError(msg)
	{
		$('#genericerrorInner').html(msg);
		$('#genericerror').css('display','block');
		$('#fade').css('display','block');
		$(document).keyup(closeLightbox);
	}

	function setProgressBar(percent)
	{
		var newValue = 0;

		if(percent <= 1) {
			newValue = 100 * percent;
		} else {
			newValue = percent;
		}

		$('#progressbar-inner').css('width',percent+'%');
	}

	function oncheckFTPTempDirClick(event)
	{
		var data = {
			'task' : 'checkTempdir',
			'json': JSON.stringify({
				'kickstart.ftp.tempdir': $('#kickstart\\.ftp\\.tempdir').val()
			})
		};

		doAjax(data, function(ret){
			var key = ret.status ? 'FTP_TEMPDIR_WRITABLE' : 'FTP_TEMPDIR_UNWRITABLE';
			alert( trans(key) );
		});
	}

	function onTestFTPClick(event)
	{
		var data = {
			'task' : 'checkFTP',
			'json': JSON.stringify({
				'kickstart.ftp.host':		$('#kickstart\\.ftp\\.host').val(),
				'kickstart.ftp.port':		$('#kickstart\\.ftp\\.port').val(),
				'kickstart.ftp.ssl':		$('#kickstart\\.ftp\\.ssl').is(':checked'),
				'kickstart.ftp.passive':	$('#kickstart\\.ftp\\.passive').is(':checked'),
				'kickstart.ftp.user':		$('#kickstart\\.ftp\\.user').val(),
				'kickstart.ftp.pass':		$('#kickstart\\.ftp\\.pass').val(),
				'kickstart.ftp.dir':		$('#kickstart\\.ftp\\.dir').val(),
				'kickstart.ftp.tempdir':	$('#kickstart\\.ftp\\.tempdir').val()
			})
		};
		doAjax(data, function(ret){
			var key = ret.status ? 'FTP_CONNECTION_OK' : 'FTP_CONNECTION_FAILURE';
			alert( trans(key) + "\n\n" + (ret.status ? '' : ret.message) );
		});
	}

	function onStartExtraction()
	{
		$('#page1').hide('fast');
		$('#page2').show('fast');

		$('#currentFile').text( '' );

		akeeba_error_callback = errorHandler;

		var data = {
			'task' : 'startExtracting',
			'json': JSON.stringify({
<?php 
    if (!$automation->hasAutomation()) {
        ?>
				'kickstart.setup.sourcefile':		$('#kickstart\\.setup\\.sourcefile').val(),
				'kickstart.jps.password':			$('#kickstart\\.jps\\.password').val(),
				'kickstart.tuning.min_exec_time':	$('#kickstart\\.tuning\\.min_exec_time').val(),
				'kickstart.tuning.max_exec_time':	$('#kickstart\\.tuning\\.max_exec_time').val(),
				'kickstart.stealth.enable': 		$('#kickstart\\.stealth\\.enable').is(':checked'),
				'kickstart.stealth.url': 			$('#kickstart\\.stealth\\.url').val(),
				'kickstart.tuning.run_time_bias':	75,
				'kickstart.setup.restoreperms':		0,
				'kickstart.setup.dryrun':			0,
				'kickstart.setup.ignoreerrors':		$('#kickstart\\.setup\\.ignoreerrors').is(':checked'),
				'kickstart.enabled':				1,
				'kickstart.security.password':		'',
				'kickstart.procengine':				$('#kickstart\\.procengine').val(),
				'kickstart.ftp.host':				$('#kickstart\\.ftp\\.host').val(),
				'kickstart.ftp.port':				$('#kickstart\\.ftp\\.port').val(),
				'kickstart.ftp.ssl':				$('#kickstart\\.ftp\\.ssl').is(':checked'),
				'kickstart.ftp.passive':			$('#kickstart\\.ftp\\.passive').is(':checked'),
				'kickstart.ftp.user':				$('#kickstart\\.ftp\\.user').val(),
				'kickstart.ftp.pass':				$('#kickstart\\.ftp\\.pass').val(),
				'kickstart.ftp.dir':				$('#kickstart\\.ftp\\.dir').val(),
				'kickstart.ftp.tempdir':			$('#kickstart\\.ftp\\.tempdir').val()
<?php 
    } else {
        ?>
				'kickstart.setup.sourcefile':		<?php 
        echo autoVar('kickstart.setup.sourcefile');
        ?>
,
				'kickstart.jps.password':			<?php 
        echo autoVar('kickstart.jps.password');
        ?>
,
				'kickstart.tuning.min_exec_time':	<?php 
        echo autoVar('kickstart.tuning.min_exec_time', 1);
        ?>
,
				'kickstart.tuning.max_exec_time':	<?php 
        echo autoVar('kickstart.tuning.max_exec_time', 5);
        ?>
,
				'kickstart.stealth.enable': 		false,
				'kickstart.tuning.run_time_bias':	75,
				'kickstart.setup.restoreperms':		0,
				'kickstart.setup.dryrun':			0,
				'kickstart.setup.ignoreerrors':		<?php 
        echo autoVar('kickstart.setup.ignoreerrors', 0);
        ?>
,
				'kickstart.enabled':				1,
				'kickstart.security.password':		'',
				'kickstart.procengine':				<?php 
        echo autoVar('kickstart.procengine', 'direct');
        ?>
,
				'kickstart.ftp.host':				<?php 
        echo autoVar('kickstart.ftp.host', 'localhost');
        ?>
,
				'kickstart.ftp.port':				<?php 
        echo autoVar('kickstart.ftp.port', 22);
        ?>
,
				'kickstart.ftp.ssl':				<?php 
        echo autoVar('kickstart.ftp.ssl', 0);
        ?>
,
				'kickstart.ftp.passive':			<?php 
        echo autoVar('kickstart.ftp.passive', 1);
        ?>
,
				'kickstart.ftp.user':				<?php 
        echo autoVar('kickstart.ftp.user');
        ?>
,
				'kickstart.ftp.pass':				<?php 
        echo autoVar('kickstart.ftp.pass');
        ?>
,
				'kickstart.ftp.dir':				<?php 
        echo autoVar('kickstart.ftp.dir', '/');
        ?>
,
				'kickstart.ftp.tempdir':			<?php 
        echo autoVar('kickstart.ftp.tempdir', AKKickstartUtils::getPath() . 'kicktemp');
    }
    ?>
			})
		};
		doAjax(data, function(ret){
			processRestorationStep(ret);
		});
	}

	function processRestorationStep(data)
	{
		// Look for errors
		if(!data.status)
		{
			errorHandler(data.message);
			return;
		}

		// Propagate warnings to the GUI
		if( !empty(data.Warnings) )
		{
			$.each(data.Warnings, function(i, item){
				$('#warnings').append(
					$(document.createElement('div'))
					.html(item)
				);
				$('#warningsBox').show('fast');
			});
		}

		// Parse total size, if exists
		if(array_key_exists('totalsize', data))
		{
			if(is_array(data.filelist))
			{
				akeeba_restoration_stat_total = 0;
				$.each(data.filelist,function(i, item)
				{
					akeeba_restoration_stat_total += item[1];
				});
			}
			akeeba_restoration_stat_outbytes = 0;
			akeeba_restoration_stat_inbytes = 0;
			akeeba_restoration_stat_files = 0;
		}

		// Update GUI
		akeeba_restoration_stat_inbytes += data.bytesIn;
		akeeba_restoration_stat_outbytes += data.bytesOut;
		akeeba_restoration_stat_files += data.files;
		var percentage = 0;
		if( akeeba_restoration_stat_total > 0 )
		{
			percentage = 100 * akeeba_restoration_stat_inbytes / akeeba_restoration_stat_total;
			if(percentage < 0) {
				percentage = 0;
			} else if(percentage > 100) {
				percentage = 100;
			}
		}
		if(data.done) percentage = 100;
		setProgressBar(percentage);
		$('#currentFile').text( data.lastfile );

		if(!empty(data.factory)) akeeba_factory = data.factory;

		post = {
			'task'	: 'continueExtracting',
			'json'	: JSON.stringify({factory: akeeba_factory})
		};

		if(!data.done)
		{
			doAjax(post, function(ret){
				processRestorationStep(ret);
			});
		}
		else
		{
			$('#page2a').hide('fast');
			$('#extractionComplete').show('fast');

			$('#runInstaller').css('display','inline-block');
			if(akeeba_automation) $('#runInstaller').click();
		}
	}

	function onGotoStartClick(event)
	{
		$('#page2').hide('fast');
		$('#error').hide('fast');
		$('#page1').show('fast');
	}

	function onRunInstallerClick(event)
	{
		var windowReference = window.open('installation/index.php','installer');
		if(!windowReference.opener) {
			windowReference.opener = this.window;
		}
		$('#runCleanup').css('display','inline-block');
		$('#runInstaller').hide('fast');
	}

	function onRunCleanupClick(event)
	{
		post = {
			'task'	: 'cleanUp',
			// Passing the factory preserves the renamed files array
			'json'	: JSON.stringify({factory: akeeba_factory})
		};

		doAjax(post, function(ret){
			$('#runCleanup').hide('fast');
			$('#gotoSite').css('display','inline-block');
			$('#gotoAdministrator').css('display','inline-block');
			$('#gotoPostRestorationRroubleshooting').css('display','block');
		});
	}

	function errorHandler(msg)
	{
		$('#errorMessage').html(msg);
		$('#error').show('fast');
	}

	function onresetFTPTempDir(event)
	{
		$('#kickstart\\.ftp\\.tempdir').val('<?php 
    echo addcslashes(AKKickstartUtils::getPath(), '\\\'"');
    ?>
');
	}

	/**
	 * Akeeba Kickstart Update Check
	 */

	var akeeba_update = {version: '0'};
	var akeeba_version = '3.6.0';
	
	function version_compare (v1, v2, operator) {
		// BEGIN REDUNDANT
		this.php_js = this.php_js || {};
		this.php_js.ENV = this.php_js.ENV || {};
		// END REDUNDANT
		// Important: compare must be initialized at 0. 
		var i = 0,
			x = 0,
			compare = 0,
			// vm maps textual PHP versions to negatives so they're less than 0.
			// PHP currently defines these as CASE-SENSITIVE. It is important to
			// leave these as negatives so that they can come before numerical versions
			// and as if no letters were there to begin with.
			// (1alpha is < 1 and < 1.1 but > 1dev1)
			// If a non-numerical value can't be mapped to this table, it receives
			// -7 as its value.
			vm = {
				'dev': -6,
				'alpha': -5,
				'a': -5,
				'beta': -4,
				'b': -4,
				'RC': -3,
				'rc': -3,
				'#': -2,
				'p': -1,
				'pl': -1
			},
			// This function will be called to prepare each version argument.
			// It replaces every _, -, and + with a dot.
			// It surrounds any nonsequence of numbers/dots with dots.
			// It replaces sequences of dots with a single dot.
			//    version_compare('4..0', '4.0') == 0
			// Important: A string of 0 length needs to be converted into a value
			// even less than an unexisting value in vm (-7), hence [-8].
			// It's also important to not strip spaces because of this.
			//   version_compare('', ' ') == 1
			prepVersion = function (v) {
				v = ('' + v).replace(/[_\-+]/g, '.');
				v = v.replace(/([^.\d]+)/g, '.$1.').replace(/\.{2,}/g, '.');
				return (!v.length ? [-8] : v.split('.'));
			},
			// This converts a version component to a number.
			// Empty component becomes 0.
			// Non-numerical component becomes a negative number.
			// Numerical component becomes itself as an integer.
			numVersion = function (v) {
				return !v ? 0 : (isNaN(v) ? vm[v] || -7 : parseInt(v, 10));
			};
		v1 = prepVersion(v1);
		v2 = prepVersion(v2);
		x = Math.max(v1.length, v2.length);
		for (i = 0; i < x; i++) {
			if (v1[i] == v2[i]) {
				continue;
			}
			v1[i] = numVersion(v1[i]);
			v2[i] = numVersion(v2[i]);
			if (v1[i] < v2[i]) {
				compare = -1;
				break;
			} else if (v1[i] > v2[i]) {
				compare = 1;
				break;
			}
		}
		if (!operator) {
			return compare;
		}

		// Important: operator is CASE-SENSITIVE.
		// "No operator" seems to be treated as "<."
		// Any other values seem to make the function return null.
		switch (operator) {
		case '>':
		case 'gt':
			return (compare > 0);
		case '>=':
		case 'ge':
			return (compare >= 0);
		case '<=':
		case 'le':
			return (compare <= 0);
		case '==':
		case '=':
		case 'eq':
			return (compare === 0);
		case '<>':
		case '!=':
		case 'ne':
			return (compare !== 0);
		case '':
		case '<':
		case 'lt':
			return (compare < 0);
		default:
			return null;
		}
	}

	function checkUpdates()
	{
		var structure =
		{
			type: "GET",
			url: 'http://query.yahooapis.com/v1/public/yql',
			data: {
<?php 
    if (KICKSTARTPRO) {
        ?>
				q: 'SELECT * FROM xml WHERE url="http://nocdn.akeebabackup.com/updates/kickstart.xml"',
<?php 
    } else {
        ?>
				q: 'SELECT * FROM xml WHERE url="http://nocdn.akeebabackup.com/updates/kickstartpro.xml"',
<?php 
    }
    ?>
				format: 'json',
				callback: 'updatesCallback'
			},
			cache: true,
			crossDomain: true,
			jsonp: 'updatesCallback',
			timeout: 15000
		};
		$.ajax( structure );
	}
	
	function updatesCallback(msg)
	{
		$.each(msg.query.results.updates.update, function(i, el){
			var myUpdate = {
				'version'	: el.version,
				'infourl'	: el.infourl['content'],
				'dlurl'		: el.downloads.downloadurl.content
			}
			if(version_compare(myUpdate.version, akeeba_update.version, 'ge')) {
				akeeba_update = myUpdate;
			}
		});
		
		if(version_compare(akeeba_update.version, akeeba_version, 'gt')) {
			notifyAboutUpdates();
		}
	}
	
	function notifyAboutUpdates()
	{
		$('#update-version').text(akeeba_update.version);
		$('#update-dlnow').attr('href', akeeba_update.dlurl);
		$('#update-whatsnew').attr('href', akeeba_update.infourl);
		$('#update-notification').show('slow');
	}
	
	<?php 
    callExtraFeature('onExtraHeadJavascript');
    ?>
	</script>
</head>
<body>

<div id="automode" style="display:none;">
	AUTOMODEON
</div>

<div id="fade" class="black_overlay"></div>

<div id="page-container">

<div id="preextraction" class="white_content">
	<div id="ie7Warning" style="display:none;">
		<h2>Deprecated Internet Explorer version</h2>
		<p>This script is not guaranteed to work properly on Internet Explorer 7 or previous version,
		or on Internet Explorer 8 and higher running in compatibility mode.</p>
		<p>Please use Internet Explorer 8+ in native mode (the &quot;broken page&quot; icon next to the
		address bar should not be enabled). Alternatively, you may use the latest versions of Firefox,
		Safari, Google Chrome or SRWare Iron.</p>
	</div>

	<h2>THINGS_HEADER</h2>
	<ol>
		<li>THINGS_01</li>
		<li>THINGS_02</li>
		<li>THINGS_03</li>
		<li>THINGS_04</li>
		<li>THINGS_05</li>
		<li>THINGS_06</li>
		<li>THINGS_07</li>
		<li>THINGS_08</li>
		<li>THINGS_09</li>
	</ol>
	<a href="javascript:void(0)" onclick="closeLightbox();">CLOSE_LIGHTBOX</a>
</div>

<div id="genericerror" class="white_content">
	<pre id="genericerrorInner"></pre>
</div>

	<div id="header">
		<div class="title">Akeeba Kickstart <?php 
    echo $edition;
    ?>
 3.6.0</div>
	</div>
	
	<div id="update-notification" style="display: none">
		<p class="update-notify">UPDATE_HEADER</p>
		<p class="update-whyupdate">UPDATE_NOTICE</p>
		<p class="update-links">
			<a href="#" id="update-dlnow">UPDATE_DLNOW</a>
			<a href="#" id="update-whatsnew" target="_blank">UPDATE_MOREINFO</a> 
		</p>
	</div>

<div id="page1">
	<?php 
    callExtraFeature('onPage1');
    ?>
	
	<div id="page1-content">
		
	<div class="helpme">
		<span>NEEDSOMEHELPKS</span> <a href="https://www.akeebabackup.com/documentation/quick-start-guide/using-kickstart.html" target="_blank">QUICKSTART</a>
	</div>
	
	<div class="step1">
		<div class="circle">1</div>
		<h2>SELECT_ARCHIVE</h2>
		<div class="area-container">
			<?php 
    callExtraFeature('onPage1Step1');
    ?>
			<div class="clr"></div>
			
			<label for="kickstart.setup.sourcefile">ARCHIVE_FILE</label>
			<span class="field">
				<?php 
    $filelist = AKKickstartUtils::getArchivesAsOptions();
    if (!empty($filelist)) {
        ?>
					<select id="kickstart.setup.sourcefile">
					<?php 
        echo $filelist;
        ?>
					</select>
				<?php 
    } else {
        ?>
					<a href="https://www.akeebabackup.com/documentation/troubleshooter/ksnoarchives.html" target="_blank">NOARCHIVESCLICKHERE</a>
				<?php 
    }
    ?>
			</span>
			<br />
			<label for="kickstart.jps.password">JPS_PASSWORD</label>
			<span class="field"><input type="password" id="kickstart.jps.password" value="" /></span>
		</div>
	</div>

	<div class="clr"></div>

	<div class="step2">
		<div class="circle">2</div>
		<h2>SELECT_EXTRACTION</h2>
		<div class="area-container">
			<label for="kickstart.procengine">WRITE_TO_FILES</label>
			<span class="field">
				<select id="kickstart.procengine">
					<option value="direct">WRITE_DIRECTLY</option>
					<option value="ftp">WRITE_FTP</option>
				</select>
			</span><br/>
			
			<label for="kickstart.setup.ignoreerrors">IGNORE_MOST_ERRORS</label>
			<span class="field"><input type="checkbox" id="kickstart.setup.ignoreerrors" /></span>

			<div id="ftp-options">
				<label for="kickstart.ftp.host">FTP_HOST</label>
				<span class="field"><input type="text" id="kickstart.ftp.host" value="localhost" /></span><br />
				<label for="kickstart.ftp.port">FTP_PORT</label>
				<span class="field"><input type="text" id="kickstart.ftp.port" value="21" /></span><br />
				<label for="kickstart.ftp.ssl">FTP_FTPS</label>
				<span class="field"><input type="checkbox" id="kickstart.ftp.ssl" /></span><br />
				<label for="kickstart.ftp.passive">FTP_PASSIVE</label>
				<span class="field"><input type="checkbox" id="kickstart.ftp.passive" checked="checked" /></span><br />
				<label for="kickstart.ftp.user">FTP_USER</label>
				<span class="field"><input type="text" id="kickstart.ftp.user" value="" /></span><br />
				<label for="kickstart.ftp.pass">FTP_PASS</label>
				<span	class="field"><input type="password" id="kickstart.ftp.pass" value="" /></span><br />
				<label for="kickstart.ftp.dir">FTP_DIR</label>
				<span class="field"><input type="text" id="kickstart.ftp.dir" value="" /></span><br />

				<label for="kickstart.ftp.tempdir">FTP_TEMPDIR</label>
				<span class="field">
					<input type="text" id="kickstart.ftp.tempdir" value="<?php 
    echo htmlentities(AKKickstartUtils::getPath());
    ?>
" />
					<span class="button" id="checkFTPTempDir">BTN_CHECK</span>
					<span class="button" id="resetFTPTempDir">BTN_RESET</span>
				</span><br />
				<label></label>
				<span class="button" id="testFTP">BTN_TESTFTPCON</span>
				<a id="notWorking" class="button" href="https://www.akeebabackup.com/documentation/troubleshooter/kscantextract.html" target="_blank">CANTGETITTOWORK</a>
				<br />
			</div>

		</div>
	</div>

	<div class="clr"></div>

	<div class="step3">
		<div class="circle">3</div>
		<h2>FINE_TUNE</h2>
		<div class="area-container">
			<label for="kickstart.tuning.min_exec_time">MIN_EXEC_TIME</label>
			<span class="field"><input type="text" id="kickstart.tuning.min_exec_time" value="1" /></span> <span>SECONDS_PER_STEP</span><br />
			<label for="kickstart.tuning.max_exec_time">MAX_EXEC_TIME</label>
			<span class="field"><input type="text" id="kickstart.tuning.max_exec_time" value="5" /></span> <span>SECONDS_PER_STEP</span><br />

			<label for="kickstart.stealth.enable">STEALTH_MODE</label>
			<span class="field"><input type="checkbox" id="kickstart.stealth.enable" /></span><br />
			<label for="kickstart.stealth.url">STEALTH_URL</label>
			<span class="field"><input type="text" id="kickstart.stealth.url" value="" /></span><br />
		</div>
	</div>

	<div class="clr"></div>

	<div class="step4">
		<div class="circle">4</div>
		<h2>EXTRACT_FILES</h2>
		<div class="area-container">
			<span></span>
			<span id="gobutton" class="button">BTN_START</span>
		</div>
	</div>

	<div class="clr"></div>
	
	</div>
</div>

<div id="page2">
	<div id="page2a">
		<div class="circle">5</div>
		<h2>EXTRACTING</h2>
		<div class="area-container">
			<div id="warn-not-close">DO_NOT_CLOSE_EXTRACT</div>
			<div id="progressbar">
				<div id="progressbar-inner">&nbsp;</div>
			</div>
			<div id="currentFile"></div>
		</div>
	</div>

	<div id="extractionComplete" style="display: none">
		<div class="circle">6</div>
		<h2>RESTACLEANUP</h2>
		<div id="runInstaller" class="button">BTN_RUNINSTALLER</div>
		<div id="runCleanup" class="button" style="display:none">BTN_CLEANUP</div>
		<div id="gotoSite" class="button" style="display:none">BTN_SITEFE</div>
		<div id="gotoAdministrator" class="button" style="display:none">BTN_SITEBE</div>
		<div id="gotoPostRestorationRroubleshooting" style="display:none">
			<a href="https://www.akeebabackup.com/documentation/troubleshooter/post-restoration.html" target="_blank">POSTRESTORATIONTROUBLESHOOTING</a>
		</div>
	</div>

	<div id="warningsBox" style="display: none;">
		<div id="warningsHeader">
			<h2>WARNINGS</h2>
		</div>
		<div id="warningsContainer">
		<div id="warnings"></div>
		</div>
	</div>

	<div id="error" style="display: none;">
		<h3>ERROR_OCCURED</h3>
		<p id="errorMessage"></p>
		<div id="gotoStart" class="button">BTN_GOTOSTART</div>
		<div>
			<a href="https://www.akeebabackup.com/documentation/troubleshooter/kscantextract.html" target="_blank">CANTGETITTOWORK</a>
		</div>
	</div>
</div>

<div id="footer">
	<div class="copyright">Copyright &copy; 2008&ndash;2012 <a	href="http://www.akeebabackup.com">Nicholas K.
		Dionysopoulos / Akeeba Backup</a>. All legal rights reserved.<br />

		This program is free software: you can redistribute it and/or modify it under the terms of
		the <a href="http://www.gnu.org/gpl-3.htmlhttp://www.gnu.org/copyleft/gpl.html">GNU General
		Public License</a> as published by the Free Software Foundation, either version 3 of the License,
		or (at your option) any later version.<br />
		Design credits: <a href="http://internet-inspired.com/">Internet Inspired</a>, slightly modified by AkeebaBackup.com
	</div>
</div>

</div>

</body>
</html>
	<?php 
}
Exemple #2
0
function echoPage()
{
    $edition = KICKSTARTPRO ? 'Professional' : 'Core';
    $bestArchivePath = AKKickstartUtils::getBestArchivePath();
    $filelist = AKKickstartUtils::getArchivesAsOptions($bestArchivePath);
    ?>
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Akeeba Kickstart <?php 
    echo $edition;
    ?>
 <?php 
    echo VERSION;
    ?>
</title>
	<style type="text/css" media="all" rel="stylesheet">
		<?php 
    echoCSS();
    ?>
	</style>
	<?php 
    if (@file_exists('jquery.min.js')) {
        ?>
		<script type="text/javascript" src="jquery.min.js"></script>
	<?php 
    } else {
        ?>
		<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
	<?php 
    }
    ?>
	<?php 
    if (@file_exists('json2.min.js')) {
        ?>
		<script type="text/javascript" src="json2.min.js"></script>
	<?php 
    } else {
        ?>
		<script type="text/javascript" src="//yandex.st/json2/2011-10-19/json2.min.js"></script>
	<?php 
    }
    ?>
	<?php 
    if (@file_exists('jquery-ui.min.js')) {
        ?>
		<script type="text/javascript" src="jquery-ui.min.js"></script>
	<?php 
    } else {
        ?>
		<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
	<?php 
    }
    ?>
	<?php 
    echoHeadJavascript();
    ?>
	</head>
	<body>

	<div id="automode" style="display:none;">
		AUTOMODEON
	</div>

	<div id="fade" class="black_overlay"></div>

	<div id="page-container">

	<div id="preextraction" class="white_content">
		<div id="ie7Warning" style="display:none;">
			<h2>Deprecated Internet Explorer version</h2>
			<p>
				This script is not guaranteed to work properly on Internet Explorer 8
				or previous version, or on Internet Explorer 9 and higher running
				in compatibility mode.
			</p>
			<p>
				Please use Internet Explorer 9 or later in native mode (the
				&quot;broken page&quot; icon next to the address bar should not be
				enabled). Alternatively, you may use the latest versions of Firefox,
				Safari, Google Chrome or Opera.
			</p>
		</div>

		<h2>THINGS_HEADER</h2>
		<ol>
			<li>THINGS_01</li>
			<li>THINGS_02</li>
			<li>THINGS_03</li>
			<li>THINGS_04</li>
			<li>THINGS_05</li>
			<li>THINGS_06</li>
			<li>THINGS_07</li>
			<li>THINGS_08</li>
			<li>THINGS_09</li>
		</ol>
		<a href="javascript:void(0)" onclick="closeLightbox();">CLOSE_LIGHTBOX</a>
	</div>

	<div id="genericerror" class="white_content">
		<pre id="genericerrorInner"></pre>
	</div>

	<div id="header">
		<div class="title">Akeeba Kickstart <?php 
    echo $edition;
    ?>
 4.0.0</div>
	</div>

	<div id="update-notification" style="display: none">
		<p class="update-notify">UPDATE_HEADER</p>
		<p class="update-whyupdate">UPDATE_NOTICE</p>
		<p class="update-links">
			<a href="#" id="update-dlnow">UPDATE_DLNOW</a>
			<a href="#" id="update-whatsnew" target="_blank">UPDATE_MOREINFO</a>
		</p>
	</div>

	<div id="page1">
		<?php 
    callExtraFeature('onPage1');
    ?>

		<div id="page1-content">

			<div class="helpme">
				<span>NEEDSOMEHELPKS</span> <a href="https://www.akeebabackup.com/documentation/quick-start-guide/using-kickstart.html" target="_blank">QUICKSTART</a>
			</div>

			<div class="step1">
				<div class="circle">1</div>
				<h2>SELECT_ARCHIVE</h2>
				<div class="area-container">
					<?php 
    callExtraFeature('onPage1Step1');
    ?>
					<div class="clr"></div>

					<label for="kickstart.setup.sourcepath">ARCHIVE_DIRECTORY</label>
			<span class="field">
				<input type="text" id="kickstart.setup.sourcepath" value="<?php 
    echo htmlentities($bestArchivePath);
    ?>
" />
				<span class="button" id="reloadArchives" style="margin-top:0;margin-bottom:0">RELOAD_ARCHIVES</span>
			</span>
					<br/>

					<label for="kickstart.setup.sourcefile">ARCHIVE_FILE</label>
			<span class="field" id="sourcefileContainer">
				<?php 
    if (!empty($filelist)) {
        ?>
					<select id="kickstart.setup.sourcefile">
						<?php 
        echo $filelist;
        ?>
					</select>
				<?php 
    } else {
        ?>
					<a href="https://www.akeebabackup.com/documentation/troubleshooter/ksnoarchives.html" target="_blank">NOARCHIVESCLICKHERE</a>
				<?php 
    }
    ?>
			</span>
					<br />
					<label for="kickstart.jps.password">JPS_PASSWORD</label>
					<span class="field"><input type="password" id="kickstart.jps.password" value="" /></span>
				</div>
			</div>

			<div class="clr"></div>

			<div class="step2">
				<div class="circle">2</div>
				<h2>SELECT_EXTRACTION</h2>
				<div class="area-container">
					<label for="kickstart.procengine">WRITE_TO_FILES</label>
			<span class="field">
				<select id="kickstart.procengine">
					<option value="hybrid">WRITE_HYBRID</option>
					<option value="direct">WRITE_DIRECTLY</option>
					<option value="ftp">WRITE_FTP</option>
					<option value="sftp">WRITE_SFTP</option>
				</select>
			</span><br/>

					<label for="kickstart.setup.ignoreerrors">IGNORE_MOST_ERRORS</label>
					<span class="field"><input type="checkbox" id="kickstart.setup.ignoreerrors" /></span>

					<div id="ftp-options">
						<label for="kickstart.ftp.host">FTP_HOST</label>
						<span class="field"><input type="text" id="kickstart.ftp.host" value="localhost" /></span><br />
						<label for="kickstart.ftp.port">FTP_PORT</label>
						<span class="field"><input type="text" id="kickstart.ftp.port" value="21" /></span><br />
						<div id="ftp-ssl-passive">
							<label for="kickstart.ftp.ssl">FTP_FTPS</label>
							<span class="field"><input type="checkbox" id="kickstart.ftp.ssl" /></span><br />
							<label for="kickstart.ftp.passive">FTP_PASSIVE</label>
							<span class="field"><input type="checkbox" id="kickstart.ftp.passive" checked="checked" /></span><br />
						</div>
						<label for="kickstart.ftp.user">FTP_USER</label>
						<span class="field"><input type="text" id="kickstart.ftp.user" value="" /></span><br />
						<label for="kickstart.ftp.pass">FTP_PASS</label>
						<span	class="field"><input type="password" id="kickstart.ftp.pass" value="" /></span><br />
						<label for="kickstart.ftp.dir">FTP_DIR</label>
				<span class="field">
                    <input type="text" id="kickstart.ftp.dir" value="" />
                    <span class="button" id="browseFTP" style="margin-top:0;margin-bottom:0">FTP_BROWSE</span>
                </span><br />

						<label for="kickstart.ftp.tempdir">FTP_TEMPDIR</label>
				<span class="field">
					<input type="text" id="kickstart.ftp.tempdir" value="<?php 
    echo htmlentities(AKKickstartUtils::getPath());
    ?>
" />
					<span class="button" id="checkFTPTempDir">BTN_CHECK</span>
					<span class="button" id="resetFTPTempDir">BTN_RESET</span>
				</span><br />
						<label></label>
						<span class="button" id="testFTP">BTN_TESTFTPCON</span>
						<a id="notWorking" class="button" href="https://www.akeebabackup.com/documentation/troubleshooter/kscantextract.html" target="_blank">CANTGETITTOWORK</a>
						<br />
					</div>

				</div>
			</div>

			<div class="clr"></div>

			<div class="step3">
				<div class="circle">3</div>
				<h2>FINE_TUNE</h2>
				<div class="area-container">
					<label for="kickstart.tuning.min_exec_time">MIN_EXEC_TIME</label>
					<span class="field"><input type="text" id="kickstart.tuning.min_exec_time" value="1" /></span> <span>SECONDS_PER_STEP</span><br />
					<label for="kickstart.tuning.max_exec_time">MAX_EXEC_TIME</label>
					<span class="field"><input type="text" id="kickstart.tuning.max_exec_time" value="5" /></span> <span>SECONDS_PER_STEP</span><br />

					<label for="kickstart.stealth.enable">STEALTH_MODE</label>
					<span class="field"><input type="checkbox" id="kickstart.stealth.enable" /></span><br />
					<label for="kickstart.stealth.url">STEALTH_URL</label>
					<span class="field"><input type="text" id="kickstart.stealth.url" value="" /></span><br />
				</div>
			</div>

			<div class="clr"></div>

			<div class="step4">
				<div class="circle">4</div>
				<h2>EXTRACT_FILES</h2>
				<div class="area-container">
					<span></span>
					<span id="gobutton" class="button">BTN_START</span>
				</div>
			</div>

			<div class="clr"></div>

		</div>

		<div id="ftpdialog" style="display:none;">
			<p class="instructions alert alert-info">FTPBROWSER_LBL_INSTRUCTIONS</p>
			<div class="error alert alert-error" id="ftpBrowserErrorContainer">
				<h3>FTPBROWSER_LBL_ERROR</h3>
				<p id="ftpBrowserError"></p>
			</div>
			<ul id="ak_crumbs" class="breadcrumb"></ul>
			<div class="row-fluid">
				<div class="span12">
					<table id="ftpBrowserFolderList" class="table table-striped">
					</table>
				</div>
			</div>
		</div>
	</div>

	<div id="page2">
		<div id="page2a">
			<div class="circle">5</div>
			<h2>EXTRACTING</h2>
			<div class="area-container">
				<div id="warn-not-close">DO_NOT_CLOSE_EXTRACT</div>
				<div id="progressbar">
					<div id="progressbar-inner">&nbsp;</div>
				</div>
				<div id="currentFile"></div>
			</div>
		</div>

		<div id="extractionComplete" style="display: none">
			<div class="circle">6</div>
			<h2>RESTACLEANUP</h2>
			<div id="runInstaller" class="button">BTN_RUNINSTALLER</div>
			<div id="runCleanup" class="button" style="display:none">BTN_CLEANUP</div>
			<div id="gotoSite" class="button" style="display:none">BTN_SITEFE</div>
			<div id="gotoAdministrator" class="button" style="display:none">BTN_SITEBE</div>
			<div id="gotoPostRestorationRroubleshooting" style="display:none">
				<a href="https://www.akeebabackup.com/documentation/troubleshooter/post-restoration.html" target="_blank">POSTRESTORATIONTROUBLESHOOTING</a>
			</div>
		</div>

		<div id="warningsBox" style="display: none;">
			<div id="warningsHeader">
				<h2>WARNINGS</h2>
			</div>
			<div id="warningsContainer">
				<div id="warnings"></div>
			</div>
		</div>

		<div id="error" style="display: none;">
			<h3>ERROR_OCCURED</h3>
			<p id="errorMessage"></p>
			<div id="gotoStart" class="button">BTN_GOTOSTART</div>
			<div>
				<a href="https://www.akeebabackup.com/documentation/troubleshooter/kscantextract.html" target="_blank">CANTGETITTOWORK</a>
			</div>
		</div>
	</div>

	<div id="footer">
		<div class="copyright">Copyright &copy; 2008&ndash;2013 <a	href="http://www.akeebabackup.com">Nicholas K.
				Dionysopoulos / Akeeba Backup</a>. All legal rights reserved.<br />

			This program is free software: you can redistribute it and/or modify it under the terms of
			the <a href="http://www.gnu.org/gpl-3.htmlhttp://www.gnu.org/copyleft/gpl.html">GNU General
				Public License</a> as published by the Free Software Foundation, either version 3 of the License,
			or (at your option) any later version.<br />
			Design credits: <a href="http://internet-inspired.com/">Internet Inspired</a>, slightly modified by AkeebaBackup.com
		</div>
	</div>

	</div>

	</body>
	</html>
<?php 
}