<?php $this->displayTemplate('header') ?>

<script type="text/javascript">
<!--
var install_is_done = '<?php echo addslashes($this->l('Done!')) ?>';
var process_steps = <?php echo Tools::jsonEncode($this->process_steps) ?>;
var admin = '<?php echo(file_exists('../admin-dev') ? '../admin-dev' : '../admin') ?>';
-->
</script>

<div id="install_process_form">
	<div id="progress_bar">
		<div class="installing"></div>

		<div class="total">
			<div class="progress"></div>
			<span>0%</span>
		</div>

		<ol class="process_list">
			<?php foreach ($this->process_steps as $item): ?>
				<li id="process_step_<?php echo $item['key'] ?>" class="process_step">
					<?php echo $item['lang'] ?>
					<div class="error_log"></div>
				</li>
			<?php endforeach; ?>
		</ol>

		<div id="error_process">
			<h3><?php echo $this->l('An error occurred during installation...') ?></h3>
			<p><?php echo $this->l('You can use the links on the left column to go back to the previous steps, or restart the installation process by <a href="%s">clicking here</a>.', 'index.php?restart=true') ?></p>
		</div>
	</div>
</div>

<div id="install_process_success">
	<div class="clearfix">
		<h2><?php echo $this->l('Your installation is finished!'); ?></h2>
		<p><?php echo $this->l('You have just finished installing your shop. Thank you for using PrestaShop!'); ?></p>
		<p><?php echo $this->l('Please remember your login information:') ?></p>
		<table cellpadding="0" cellspacing="0" border="0" id="resultInstall" width="620">
			<tr class="odd">
				<td class="label"><?php echo $this->l('E-mail') ?></td>
				<td class="resultEnd"><?php echo htmlspecialchars($this->session->admin_email) ?></td>
				<td rowspan="2" class="print" onclick="$('#password_content').html('<?php echo htmlspecialchars(addslashes($this->session->admin_password)) ?>'); $('#password_display').hide(); window.print();">
					<img src="theme/img/print.png" alt="" style="vertical-align:top">
					<?php echo $this->l('Print my login information') ?>
				</td>
			</tr>
			<tr>
				<td class="label"><?php echo $this->l('Password') ?></td>
				<td class="resultEnd">
					<span id="password_content"><?php echo preg_replace('#.#', '*', $this->session->admin_password) ?></span>
					<span id="password_display">
						(<a href="#" onclick="$('#password_content').html('<?php echo htmlspecialchars(addslashes($this->session->admin_password)) ?>'); $('#password_display').hide(); return false"><?php echo $this->l('Display') ?></a>)
					</span>
				</td>
			</tr>
		</table>

		<h3 class="infosBlock">
			<?php echo $this->l('For security purposes, you must delete the "install" folder.') ?>
			<a href="<?php echo $this->l('http://doc.prestashop.com/display/PS16/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation') ?>" target="_blank"><img src="theme/img/help.png" /></a>
		</h3>

		<div id="boBlock" class="blockInfoEnd clearfix" onclick="window.open(admin)">
			<img src="theme/img/visu_boBlock.png" alt="" />
			<h3><?php echo $this->l('Back Office'); ?></h3>
			<p class="description"><?php echo $this->l('Manage your store using your Back Office. Manage your orders and customers, add modules, change themes, etc.') ?></p>
			<a class="BO" target="_blank"><span><?php echo $this->l('Manage your store') ?></span></a>
		</div>
		<div id="foBlock" class="blockInfoEnd last clearfix" onclick="window.open('../')" />
			<img src="theme/img/visu_foBlock.png" alt="" />
			<h3><?php echo $this->l('Front Office'); ?></h3>
			<p class="description"><?php echo $this->l('Discover your store as your future customers will see it!') ?></p>
			<a class="FO" target="_blank"><span><?php echo $this->l('Discover your store') ?></span></a>
		</div>
	</div>
</div>

<div class="sharing">
	<p><?php echo $this->l('Share your experience with your friends!'); ?></p>
	<button type="button" class="btn-twitter" onclick="psinstall_twitter_click('<?php echo $this->l('I just built an online store with PrestaShop!'); ?> <?php echo $this->l('Watch this exhilarating experience: http://vimeo.com/89298199'); ?>');">
		<i></i> <?php echo $this->l('Tweet'); ?>
	</button>
	<button type="button" class="btn-facebook" onclick="psinstall_facebook_click();">
		<i></i> <?php echo $this->l('Share'); ?>
	</button>
	<button type="button" class="btn-google-plus" onclick="psinstall_google_click();">
		<i></i> <?php echo $this->l('Google+'); ?>
	</button>
	<button type="button" class="btn-pinterest" onclick="psinstall_pinterest_click();">
		<i></i> <?php echo $this->l('Pinterest'); ?>
	</button>
	<button type="button" class="btn-linkedin" onclick="psinstall_linkedin_click();">
		<i></i> <?php echo $this->l('LinkedIn'); ?>
	</button>
</div>

<?php if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3)): ?>
	<iframe src="https://addons.prestashop.com/psinstall1541.php?version=2&lang=<?php echo $this->language->getLanguageIso() ?>&email=<?php echo $this->session->admin_email ?>&activity=<?php echo $this->session->shop_activity ?>&country=<?php echo $this->session->shop_country ?>" scrolling="no" id="prestastore">
		<p><a href="http://addons.prestashop.com/" target="_blank"><?php echo $this->l('Check out PrestaShop Addons to add that little something extra to your store!'); ?></a></p>
	</iframe>
<?php endif; ?>

<?php $this->displayTemplate('footer') ?>
