<?php $succeed=1; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>星光贴吧安装向导 Powered by xgcms.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="images/style.css" rel="stylesheet" type="text/css" />
</head><body>
<div id='content'>
<div id='pageheader'>
	<div id="logo" style="margin-top:10px; margin-left:15px;"><img src="../view/images/logo.png" border="0" alt="星光贴吧" /></div>
	<div id="version" class="rightheader">星光贴吧V3.1正式版</div>
</div>
<div id='innercontent'>
	<h1>星光贴吧V2.0正式版安装向导</h1>
	<div>环境检测</div>
    <div class="botBorder">
	<table align="center" class="table">
			<tr class="header">
				<td>检测环境</td>
				<td>要求</td>
				<td>当前</td>
				<td style="text-align: center;">检测结果</td>
			</tr>
			
			<?php foreach($env as $v) { ?>
			<tr>
				<td><?php echo $v['name'];?></td>
				<td><?php echo $v['need'];?></td>
				<td><b><?php echo $v['current'];?></b></td>
				<td>
					<?php if($v['status'] == 1) { ?><div class="ok">✔通过</div>
					<?php } elseif($v['status'] == 2) { ?><span class="warn">！通过</span>
					<?php } elseif($v['status'] == 0) { $succeed = 0; ?><span class="error">✘未通过</span><?php }?>
				</td>
			</tr>
			<?php } ?>
            <?php if(!IN_SAE) {?>
			<tr class="header">
				<td colspan="4">检测目录文件可写</td>
			</tr>
			<?php foreach($write as $k=>$v) { ?>
			<tr>
				<td><?php echo $k;?></td>
				<td></td>
				<td></td>
				<td>
					<?php if($v) { ?><div class="ok">✔可写</div><?php }?>
					<?php if(!$v) { $succeed = 0;?><div class="error">✘不可写</div><?php }?>
				</td>
			</tr>
			<?php } ?>
           <? }else {?>
			<tr class="header">
				<td colspan="4">SAE 检测目录文件可写</td>
			</tr>
		
			<tr>
				<td>saekv://tmp/</td>
				<td>可读写</td>
				<td><b><?php echo $saewrite['tmp_path'] ? '可写' : '不可写';?></b></td>
				<td>
					<?php if($saewrite['tmp_path']) { ?><div class="ok">✔通过</div>
					<?php } else { $succeed = 0; ?><div class="error">✘未通过</div><?php }?>
				</td>
			</tr>
			<tr>
				<td>saestor://upload/</td>
				<td>可读写</td>
				<td><b><?php echo $saewrite['upload_path'] ? '可写' : '不可写';?></b></td>
				<td width="33%">
					<?php if($saewrite['upload_path']) { ?><div class="ok">✔通过</div>
					<?php } else { $succeed = 0; ?><div class="error">✘未通过</div>（请在SAE创建 upload 域，<a href="http://www.xiuno.com/thread-index-fid-3-tid-806.htm" target="_blank">查看帮助</a>）<?php }?>
				</td>
			</tr>
		<?php } ?>
			
		</table>
	</div>
	<?php if (!$succeed) { ?>
		<div class="error" style="text-align: center;">✘ 未通过检测！请检测红色字体项目。</div>
		<p style="text-align: center;">
			<input type="button" value=" 上一步" onClick="history.back();"/>
		</p>
	<?php } else { ?>
		<div class="ok" style="text-align: center;">✔ 通过检测，星光贴吧 可以正常运行在该环境下。 </div>
		<p style="text-align: center;">
			<input type="button" value=" 上一步" onClick="history.back();"/>
			<input type="button" value=" 下一步" onClick="window.location='?step=4';"/>
		</p>
	<?php } ?>
</div>
</div>
<div class='copyright'>Powered by <a href="http://www.xgcms.com" target="_blank">xgcms.com</a></div>
</div>
<div style="display:none;">
</div>
</body>
</html>