<!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>文件权限检测 - dircms安装第<?php echo $step;?>步 </title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link href="template/images/installcss.css" rel="stylesheet" type="text/css" />
</head>
<script language="JavaScript" src="template/images/jquery.min.js"></script>
<body>
<div class="Conten">
<div class="box ">
<div class="instop"><span><a href="http://www.dircms.net" target="_blank">官方网站</a>　|　<a href="http://bbs.dircms.net" target="_blank">官方论坛</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><strong>开始安装易创CMS-Dircms<?php echo DIRCMS_VERSION;?></strong></div>
</div>
  <div class="box">
  <div class="insdirbg">
  <div class="insjd05"></div>
  <div class="insdir_l">
  <div class="t1 by"></div> <div class="t2 by"></div>
  <div class="insdir_lbh">
  <ul>
    <li>1、安装须知</li>
    <li>2、软件许可协议</li>
    <li>3、运行环境检测</li>
    <li class="dir">4、文件权限检测</li>
    <li>5、帐号设置</li>
    <li>6、安装完成</li>
    </ul></div>
    <div class="t2 by"></div> <div class="t1 by"></div>
  </div>
  <div class="insdir_r">
  <div class="t1 bs"></div> <div class="t2 bs"></div>
  <div class="insdir_rbh">
  <div id="introducetd">
   <p><strong><span><?php echo $step;?>：</span>文件权限检测</strong></p>	
         <p> 开始文件权限检测...
	  <?php
	  	usleep(200000);
		echo '<br />';
		echo is_writeable(DIRCMS_ROOT)&&is_readable(DIRCMS_ROOT)?' 根目录通过检测...':' <font color="#ff0000">根目录未通过检测...</font>';
		foreach ($patharray as $path)
		{
			ob_flush();
			str_pad(' ',256);
			$dirname=basename($path);
			if(@is_writeable($path)&&is_readable($path)&file_put_contents($path.'/install.tmp','Install files'))
			{
				echo file_exists($path.'/install.tmp')?'<br />目录 '.($dirname?$dirname:'根目录').' 通过检测...':'<br />目录 '.($dirname?$dirname:'根目录').' <font color="#ff0000">未通过检测，请将该目录设为0777后继续安装！</font>';
				@unlink($path.'/install.tmp');
			}
			else
			{
				echo '<br />目录 '.($dirname?$dirname:'根目录').' <font color="#ff0000">未通过检测，请将该目录设为0777后继续安装！</font>';
			}
			flush();
			usleep(200000);	
		}
	  ?>
      </p>
	 <p>提示：检测完成，如果有检测未成功的目录，请将该目录设为0777再继续安装.</p>
  </div>
</div>
    <div class="t2 bs"></div> <div class="t1 bs"></div>
  </div>
  </div>

      <div class="ins_rin" align="center">
     <form id="install" action="install.php?" method="post">
	<input type="hidden" name="step" value="5">
    <span><input onClick="javascript:history.back(-1);" type="button" name="step" value="返回上一步"style='background:url(template/images/bgbtn.gif);width:108px;height:27px;max-height:27px; line-height:27px;border:0px;cursor:pointer;font-size:13px;margin-top:1px; text-align:center; color:#FFF;'/></span> <span><input onClick="$('#install').submit();" type="button" name="step" value="同意安装继续"style='background:url(template/images/bgbtn.gif);width:108px;height:27px;max-height:27px; line-height:27px;border:0px;cursor:pointer;font-size:13px;margin-top:1px; text-align:center; color:#FFF;'/></span>
    </form>
      </div>
  </div>
</div>
</body>
</html>