<?php include PS_PATH.'install/step/header.tpl.php';?>
	<div class="body_box">
        <div class="main_box">
            <div class="hd">
            	<div class="bz a2"><div class="jj_bg"></div></div>
            </div>
            <div class="ct">
            	<div class="bg_t"></div>
                <div class="clr">
                    <div class="l"></div>
                    <div class="ct_box nobrd i6v">
                    <div class="nr">
	 <table cellpadding="0" cellspacing="0" class="table_list">
                  <tr>
                    <th class="col1">检查项目</th>
                    <th class="col2">当前环境</th>
                    <th class="col3">XTCMS 建议</th>
                    <th class="col4">功能影响</th>
                  </tr>
                  <tr>
                    <td>操作系统</td>
                    <td><?php echo php_uname();?></td>
                    <td>Windows_NT/Linux/Freebsd</td>
                    <td><span><img src="images/correct.png" /></span></td>
                  </tr>
                  <tr>
                    <td>WEB 服务器</td>
                    <td><?php echo $_SERVER['SERVER_SOFTWARE'];?></td>
                    <td>Apache/Nginx/IIS</td>
                    <td><span><img src="images/correct.png" /></span></td>
                  </tr>
                  <tr>
                    <td>PHP 版本</td>
                    <td>PHP <?php echo phpversion();?></td>
                    <td>PHP 5.2.0 及以上</td>
                    <td><?php if(phpversion() >= '5.2.0'){ ?><span><img src="images/correct.png" /></span><?php }else{ ?><font class="red"><img src="images/error.png" />&nbsp;无法安装</font><?php }?></font></td>
                  </tr>
                  <tr>
                    <td>MYSQL 扩展</td>
                    <td><?php if(extension_loaded('mysql')){ ?>√<?php }else{ ?>×<?php }?></td>
                    <td>必须开启</td>
                    <td><?php if(extension_loaded('mysql')){ ?><span><img src="images/correct.png" /></span><?php }else{ ?><font class="red"><img src="images/error.png" />&nbsp;无法安装</font><?php }?></td>
                  </tr>

                  <tr>
                    <td>ICONV/MB_STRING 扩展</td>
                    <td><?php if(extension_loaded('iconv') || extension_loaded('mbstring')){ ?>√<?php }else{ ?>×<?php }?></td>
                    <td>必须开启</td>
                    <td><?php if(extension_loaded('iconv') || extension_loaded('mbstring')){ ?><span><img src="images/correct.png" /></span><?php }else{ ?><font class="red"><img src="images/error.png" />&nbsp;字符集转换效率低</font><?php }?></td>
                  </tr>

                  <tr>
                    <td>JSON扩展</td>
                    <td><?php if($PHP_JSON){ ?>√<?php }else{ ?>×<?php }?></td>
                    <td>必须开启</td>
                    <td><?php if($PHP_JSON){ ?><span><img src="images/correct.png" /></span><?php }else{ ?><font class="red"><img src="images/error.png" />&nbsp;不只持json,<a href="http://pecl.php.net/package/json" target="_blank">安装 PECL扩展</a></font><?php }?></td>
                  </tr>
                  <tr>
                    <td>GD 扩展</td>
                    <td><?php if($PHP_GD){ ?>√ （支持 <?php echo $PHP_GD;?>）<?php }else{ ?>×<?php }?></td>
                    <td>建议开启</td>
                    <td><?php if($PHP_GD){ ?><span><img src="images/correct.png" /></span><?php }else{ ?><font class="red"><img src="images/error.png" />&nbsp;不支持缩略图和水印</font><?php }?></td>
                  </tr>
                  <tr>
                    <td>ZLIB 扩展</td>
                    <td><?php if(extension_loaded('zlib')){ ?>√<?php }else{ ?>×<?php }?></td>
                    <td>建议开启</td>
                    <td><?php if(extension_loaded('zlib')){ ?><span><img src="images/correct.png" /></span><?php }else{ ?><font class="red"><img src="images/error.png" />&nbsp;不支持Gzip功能</font><?php }?></td>
                  </tr>
                  <tr>
                    <td>FTP 扩展</td>
                    <td><?php if(extension_loaded('ftp')){ ?>√<?php }else{ ?>×<?php }?></td>
                    <td>建议开启</td>
                    <td><?php if(extension_loaded('ftp')){ ?><span><img src="images/correct.png" /></span><?php }elseif(ISUNIX){ ?><font class="red"><img src="images/error.png" />&nbsp;不支持在线升级</font><?php }?></td>
                  </tr>

                  <tr>
                    <td>allow_url_fopen</td>
                    <td><?php if(ini_get('allow_url_fopen')){ ?>√<?php }else{ ?>×<?php }?></td>
                    <td>建议打开</td>
                    <td><?php if(ini_get('allow_url_fopen')){ ?><span><img src="images/correct.png" /></span><?php }else{ ?><font class="red"><img src="images/error.png" />&nbsp;不支持保存远程图片</font><?php }?></td>
                  </tr>
                  <tr>
                    <td>DNS解析</td>
                    <td><?php if($PHP_DNS){ ?>√<?php }else{ ?>×<?php }?></td>
                    <td>建议设置正确</td>
                    <td><?php if($PHP_DNS){ ?><span><img src="images/correct.png" /></span><?php }else{ ?><font class="red"><img src="images/error.png" />&nbsp;不支持采集和保存远程图片</font><?php }?></td>
                  </tr>
                </table>
				<br/>
	 			<table cellpadding="0" cellspacing="0" class="table_list">
                  <tr>
                    <th class="col1">目录文件</th>
                    <th class="col2">所需状态</th>
                    <th class="col3">当前状态</th>
                  </tr>
                  <?php foreach ($filesmod as $filemod) {?>
                  <tr>
                    <td><?php echo $filemod['file']?></td>
                    <td><span><img src="images/correct.png" />&nbsp;可写</span></td>
                    <td><?php echo $filemod['is_writable'] ? '<span><img src="images/correct.png" />&nbsp;可写</span>' : '<font class="red"><img src="images/error.png" />&nbsp;不可写</font>'?></td>
                  </tr>
					<?php } ?>
                </table>
 					</div>
                    </div>
                </div>
                <div class="bg_b"></div>
            </div>
            <div class="btn_box"><a href="javascript:history.go(-1);" class="s_btn pre">上一步</a>
           	<?php if($is_right && !isset($no_writablefile)) { ?>
            <a href="javascript:void(0);"  onClick="$('#install').submit();" class="x_btn">下一步</a></div>
            <?php }else{ ?>
			<a onClick="alert('当前配置不满足XTlove安装需求，无法继续安装！');" class="x_btn pre">检测不通过</a>
 			<?php }?>
			<form id="install" action="install.php?" method="get">
			<input type="hidden" name="step" value="3">
			</form>
        </div>
    </div>
</body>
</html>
