<div id="contain">
 <div id="left">
   <div class="title">安装步骤</div>
   <ul class="step">
     <li class="succed">许可协议</li>
     <li class="select">环境检测</li>
     <li>参数配置</li>
     <li>正在安装</li>
     <li>安装完成</li>
   </ul>
 </div>
 <div id="right">
   <div class="r_title">服务器信息</div>
   <table width="726" border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
			<tr>
				<th width="300" align="center"><strong>参数</strong></th>
				<th width="424"><strong>值</strong></th>
			</tr>
			<tr align="center">
					<td><strong>服务器名</strong></td>
					<td><?php echo $sp_name; ?></td>
			</tr>
			<tr align="center">
					<td><strong>服务器操作系统</strong></td>
					<td><?php echo $sp_os; ?></td>
			</tr>
			<tr align="center">
					<td><strong>服务器解译引擎</strong></td>
					<td><?php echo $sp_server; ?></td>
			</tr>
			<tr align="center">
					<td><strong>PHP版本</strong></td>
					<td><?php echo $phpv; ?></td>
			</tr>
			<tr align="center">
					<td><strong>系统安装目录</strong></td>
					<td><?php echo ROOT_5W; ?></td>
			</tr>
	</table>
         <div class="r_title">系统环境检测</div>
<div style="padding:2px 8px 0px; line-height:33px; height:23px; overflow:hidden; color:#666;">
			系统环境要求必须满足下列所有条件/组件，否则系统或系统部份功能将无法使用。
	</div>
		<table width="726" border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
			<tr>
				<th width="446" align="center"><strong>需开启的变量或函数</strong></th>
				<th width="80"><div align="center"><strong>要求</strong></div></th>
				<th width="200"><strong>实际状态及建议</strong></th>
			</tr>
<!--			<tr>
					<td>allow_url_fopen</td>
					<td align="center"><div align="center"><img src="images/ico_ok.gif" width="16" height="16" /></div></td>
					<td><div align="center"><?php echo $sp_allow_url_fopen; ?></div></td>
			</tr>
-->
			<tr>
					<td>fwrite</td>
					<td align="center"><div align="center"><img src="images/ico_ok.gif" width="16" height="16" /></div></td>
					<td><div align="center"><?php echo $allow_fwrite; ?></div></td>
			</tr>
			<tr>
					<td>iconv 支持</td>
					<td align="center"><div align="center"><img src="images/ico_ok.gif" width="16" height="16" /></div></td>
					<td><div align="center"><?php echo $sp_iconv; ?></div></td>
			</tr>
			<tr>
					<td>MySQL 支持</td>
					<td align="center"><div align="center"><img src="images/ico_ok.gif" width="16" height="16" /></div></td>
					<td><div align="center"><?php echo $sp_mysql; ?></div></td>
			</tr>
		</table>

<div class="r_title">目录权限检测</div>
<div style="padding:2px 8px 0px; line-height:33px; height:23px; overflow:hidden; color:#666;">
			系统要求必须满足下列所有的目录权限全部可读写的需求才能使用，其它应用目录可安装后在管理后台检测。
	</div>
		<table width="706" border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
			<tr>
				<th width="446" align="center"><strong>目录名</strong></th>
				<th width="130"><div align="center"><strong>读取权限</strong></div></th>
				<th width="130"><div align="center"><strong>写入权限</strong></div></th>
			</tr>
			<?php
			foreach($sp_testdirs as $d)
			{
			?>
			<tr>
					<td><?php echo $d; ?></td>
					<?php
      		$fulld = ROOT_5W.str_replace('./','/',$d);
      		$rsta = (is_readable($fulld) ? '<font color=green>[√]读</font>' : '<font color=red>[×]读</font>');
	    		$wsta = (is_writeable($fulld) ? '<font color=green>[√]写</font>' : '<font color=red>[×]写</font>');
	    		if(!is_readable($fulld) || !is_writeable($fulld))
	    			$pass_check = false;
	    		echo "<td align=\"center\">$rsta</td><td align=\"center\">$wsta</td>\r\n";
      ?>
			</tr>
			<?php
			}
			?>
		</table>
        <div class="btn-box">
			<input type="button" class="btn-pre" value="后退" onclick="window.location.href='index.php?step=1'" />
			<?php
			if($pass_check){
			?>
			<input type="button" class="btn-next" value="继续" onclick="window.location.href='index.php?step=3'" />
			<?php
			}else{
			?>
			您的系统环境不满足安装条件，无法继续安装。
			<?php
			}
			?>
		</div>


 </div>
</div>
