<?php
include dirname(__FILE__) . '/elements/progress.php';
$STORAGE = &$_SESSION[$controller->defaultInstaller];
?>
<div class="i-wrap">
	<?php
	if (isset($_GET['err']) && !empty($_GET['err']) && isset($_SESSION[$controller->defaultErrors][$_GET['err']]))
	{
		?>
		<div class="i-status i-status-error">
			<div class="i-status-icon"><abbr></abbr></div>
			<div class="i-status-txt">
				<h2>Installation error!</h2>
				<p class="t10"><?php echo @$_SESSION[$controller->defaultErrors][$_GET['err']]; ?></p>
			</div>
		</div>
		<?php
	}
	if (isset($tpl['warning']))
	{
		?>
		<div class="i-status i-status-error">
			<div class="i-status-icon"><abbr></abbr></div>
			<div class="i-status-txt">
				<h2>警告！</h2>
				<p class="t10">继续安装将清空该数据库中所有数据</p>
			</div>
		</div>
		<?php
	}
	?>
	<p>以下为系统自动检测到的安装目录，如有错误请人工修改</p>
	
	<form action="index.php?controller=pjInstaller&amp;action=pjActionStep4&amp;install=1" method="post" id="frmStep3" class="i-form">
		<input type="hidden" name="step3" value="1" />
		<table cellpadding="0" cellspacing="0" class="i-table t20">
			<thead>
				<tr>
					<th>安装环境</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>
						<p>
							<label class="i-title">相对目录<span class="i-red">*</span></label>
							<input type="text" tabindex="1" name="install_folder" class="pj-form-field w400 required" value="<?php echo isset($tpl['paths']) ? $tpl['paths']['install_folder'] : htmlspecialchars(@$STORAGE['install_folder']); ?>" /></p>
						<p>
							<label class="i-title">网站URL <span class="i-red">*</span></label>
							<input type="text" tabindex="2" name="install_url" class="pj-form-field w400 required" value="<?php echo isset($tpl['paths']) ? $tpl['paths']['install_url'] : htmlspecialchars(@$STORAGE['install_url']); ?>" />
						</p>
						<p>
							<label class="i-title">绝对路径<span class="i-red">*</span></label>
							<input type="text" tabindex="3" name="install_path" class="pj-form-field w400 required" value="<?php echo isset($tpl['paths']) ? $tpl['paths']['install_path'] : htmlspecialchars(@$STORAGE['install_path']); ?>" />
						</p>
					</td>
				</tr>
			</tbody>
		</table>
		
		<div class="t20">
			<p class="float_left pt5">如需帮助请联系客服<a href="http://www.rivuai.com/" target="_blank">QQ 32557246</a></p>
			<input type="submit" tabindex="4" value="下一步 &raquo;" class="pj-button float_right l5" />
			<input type="button" tabindex="5" value="&laquo; 上一步" class="pj-button float_right" onclick="window.location='index.php?controller=pjInstaller&amp;action=pjActionStep2'" />
			<br class="clear_both" />
		</div>
	</form>
	
	<div class="i-status i-status-notice">
		<div class="i-status-icon"><span class="bold block t15 l15">说明：</span></div>
		<div class="i-status-txt">
			<p class="float_left"># 如果程序上传到 http://www.website.com/script/ <br />相对目录需填写： /script/<br />网站URL须填写：http://website.com/script/</p>
			<p class="float_right"># 如果程序上传到 http://website.com/folder/script/ <br />相对目录需填写： /folder/script/<br />网站URL须填写： http://website.com/folder/script/</p>
		</div>
	</div>
</div>