<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>安装程序 - XDcms企业网站管理系统<?php echo $ver; ?></title>
<meta http-equiv="x-ua-compatible" content="ie=7" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main">
	<div class="pmain">
		<dl class="setpbox t1">
			<dt>XDcms企业网站管理系统<?php echo $ver; ?> 安装程序</dt>
			<dd>
				<ul>
					<li class="succeed">许可协议</li>
					<li class="now">环境检测</li>
					<li>参数配置</li>
					<li>完成安装</li>
				</ul>
			</dd>
		</dl>
	</div>
	<div class="pmain">
		<div class="title"><h3>服务器信息</h3></div>
		<table width="900" border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
			<tr>
				<th width="300" align="center"><strong>参数</strong></th>
				<th><strong>值</strong></th>
			</tr>
			<tr>
					<td><strong>服务器域名</strong></td>
					<td><?php echo $sp_name; ?></td>
			</tr>
			<tr>
					<td><strong>服务器操作系统</strong></td>
					<td><?php echo $sp_os; ?></td>
			</tr>
			<tr>
					<td><strong>服务器解译引擎</strong></td>
					<td><?php echo $sp_server; ?></td>
			</tr>
			<tr>
					<td><strong>PHP版本</strong></td>
					<td><?php echo $phpv; ?></td>
			</tr>
			<tr>
					<td><strong>系统安装目录</strong></td>
					<td><?php echo CMS_ROOT; ?></td>
			</tr>
		</table>
    <div class="title"><h3>系统环境检测</h3></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="200" align="center"><strong>需开启的变量或函数</strong></th>
				<th width="80"><strong>要求</strong></th>
				<th width="400"><strong>实际状态</strong></th>
			</tr>
			<tr>
					<td>allow_url_fopen</td>
					<td align="center">On </td>
					<td><?php echo $sp_allow_url_fopen; ?></td>
			</tr>
			<tr>
					<td>GD 支持 </td>
					<td align="center">On</td>
					<td><?php echo $sp_gd; ?></td>
			</tr>
			<tr>
					<td>MySQL 支持</td>
					<td align="center">On</td>
					<td><?php echo $sp_mysql; ?></td>
			</tr>
		</table>
		
		
		<div class="title"><h3>目录权限检测</h3></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="300" align="center"><strong>目录名</strong></th>
				<th width="212"><strong>读取权限</strong></th>
				<th width="212"><strong>写入权限</strong></th>
			</tr>
			<?php
			foreach($sp_testdirs as $d)
			{
			?>
			<tr>
					<td><?php echo $d; ?></td>
					<?php
      		$fulld = CMS_ROOT.str_replace('/*','',$d);
      		$rsta = (is_readable($fulld) ? '<font color=green>[√]读</font>' : '<font color=red>[×]读</font>');
	    		$wsta = (TestWrite($fulld) ? '<font color=green>[√]写</font>' : '<font color=red>[×]写</font>');
	    		echo "<td>$rsta</td><td>$wsta</td>\r\n";
      ?>
			</tr>
			<?php
			}
			?>
		</table>
		
		<div class="btn-box">
			<input type="button" class="btn-back" value="上一步" onclick="window.location.href='index.php';" />
			<input type="button" class="btn-next" value="下一步" onclick="window.location.href='index.php?step=3';" />
		</div>
	</div>
</div>
</body>
</html>
