<html>
<head>
<title>安装向导 - 海洋CMS</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link href="images/style.css"rel="stylesheet" type="text/css"  />
<script src="images/jquery.js" type="text/javascript"></script>
</head>

<body scroll="no">
<div class="b">
	<div class="main">
		<div class="head">
			<div class="h_right"><a href="//www.seacms.net" target="_blank">官方网站</a><span>|</span><a href="//www.seacms.net" target="_blank">交流论坛</a></div>
			<img src="images/logo.png" />
		</div>
		<div class="cont">
			<div class="c_top"></div>
			<div class="c_c">
				<div class="c_c_left">
					<ul>
						<li class="">1、欢迎界面</li>
						<li class="">2、阅读协议</li>
						<li class="on">3、环境检测</li>
						<li class="">4、参数配置</li>
						<li class="">5、安装完成</li>
					</ul>
				</div>
				<div class="c_c_right">

<div class="content">
	<h2>检测服务器运行环境和文件权限</h2>
		<table class="tb">
			<tr>
				<th width="170"><strong>需开启的配置</strong></th>
				<th width="80" ><strong>要求</strong></th>
				<th width="400"><strong>实际状态及建议</strong></th>
			</tr>
			<tr>
					<td>PHP 版本</td>
					<td>5.x</td>
					<td><?php if($phpv>5.9 OR $phpv<5.1){$nondirect=1;echo'<font color=red>[×]Off</font>';}else{echo'<font color=green>[√]On</font>';} ?> <small> (本程序仅支持PHP5.x，不支持PHP7，当前版本为<?php echo $phpv ?>)</small></td>
			</tr>
			<tr>
					<td>fsockopen</td>
					<td >On </td>
					<td><?php echo $sp_fsockopen;if($sp_fsockopen=='<font color=red>[×]Off</font>'){$nondirect=1;} ?> <small>(不符合要求将导致采集、远程资料本地化等功能无法应用)</small></td>
			</tr>
			<tr>
					<td>iconv</td>
					<td >On </td>
					<td><?php echo $sp_iconv; if($sp_iconv=='<font color=red>[×]Off</font>'){$nondirect=1;} ?> <small>(不符合要求将导致部分编码问题)</small></td>
			</tr>
			<tr>
					<td>allow_url_fopen</td>
					<td >On </td>
					<td><?php echo $sp_allow_url_fopen;if($sp_allow_url_fopen=='<font color=red>[×]Off</font>'){$nondirect=1;} ?> <small>(不符合要求将导致采集、远程资料本地化等功能无法应用)</small></td>
			</tr>
			<tr>
					<td>safe_mode</td>
					<td >Off</td>
					<td><?php echo $sp_safe_mode;if($sp_safe_mode=='<font color=red>[×]On</font>'){$nondirect=1;} ?> <small>(本系统不支持在<span class="STYLE2">非win主机的安全模式</span>下运行)</small></td>
			</tr>
			
			<tr>
					<td>GD 支持 </td>
					<td >On</td>
					<td><?php echo $sp_gd;if($sp_gd=='<font color=red>[×]Off</font>'){$nondirect=1;} ?> <small>(不支持将导致与图片相关的大多数功能无法使用或引发警告)</small></td>
			</tr>

			<tr>
					<td>Curl 支持 </td>
					<td >On</td>
					<td><?php echo $sp_curl;?> <small>(不支持将无法进行百度推送和图片同步等操作)</small></td>
			</tr>

			<tr>
					<td>MySQL 支持</td>
					<td >On</td>
					<td><?php echo $sp_mysql; if($sp_mysql=='<font color=red>[×]Off</font>'){$nondirect=1;} ?> <small>(不支持无法使用本系统)</small></td>
			</tr>
			<tr>
					<td>短标签 支持</td>
					<td >On</td>
					<td>
					<?php 
					$ini = ini_get_all();
$short_open_tag=$ini['short_open_tag']['global_value'];
if($short_open_tag !=1){echo '<font color=#B8860B>[×]Off</font>';}else{echo '<font color=green>[√]On</font>';} ?> <small>(数据备份使用帝国备份王核心，要求开启short_open_tag)</small></td>
			</tr>
			<tr>
					<td>SSL 支持</td>
					<td >On</td>
					<td>
					<?php 
					if (!function_exists('openssl_open')) {echo '<font color=#B8860B>[×]Off</font>';}else{echo '<font color=green>[√]On</font>';}
					?> <small>(邮件SMTP发信服务要求开启SSL支持)</small></td>
			</tr>
		</table>
		
	<table class="tb">
			<tr>
				<th width="300" ><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 = sea_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";
                if(!TestWrite($fulld)||!is_readable($fulld)) $nondirect=1;
      ?>
			</tr>
			<?php
			}
			?>
		</table>
		

</div>
<div class="button"><?php if($nondirect==1) echo '<font color=red>&nbsp;&nbsp;&nbsp;错误：请先修复红色 [×] 错误后刷新本页继续！</font>'; ?>
<a class="<?php if($nondirect==1) echo 'but grey'; ?>" href="<?php if($nondirect==1){echo '#';}else{echo 'index.php?step=3';} ?>">下一步</a> 
<a href="index.php?step=1">上一步</a></div>
				</div>
			</div>
			<div class="c_btm"></div>
		</div>
	</div>
</div>

<script src="./images/install.js" type="text/javascript"></script>
<div style="display:none;">
<script language="JavaScript" type="text/javascript" charset="utf-8" src="//www.seacms.net/api/install.js"></script>
</div>	
</body>
</html>
