<!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=utf-8" />
<meta name="robots" content="noindex,nofollow" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<TITLE>数据库相关操作-工具-duomicms后台管理</TITLE>
<link href="skin/css/admin.css" rel="stylesheet" type="text/css" />
<script src="skin/js/common.js" type="text/javascript"></script>
<script src="skin/js/main.js" type="text/javascript"></script>
<style type="text/css">
.btn {
	border:1px solid;
	border-color:#fff #999 #999 #fff;
}
</style>
</head>
<body>
<div class="container" id="cpcontainer">
  <?php 
	if($action=="checkfileperms")
    {
?>
  <table class="tb">
    <tr class="thead">
      <td colspan="3">目录权限检测</td>
    </tr>
    <tr>
      <td >系统要求必须满足下列所有的目录权限全部可读写的需求才能使用</td>
    </tr>
    <tr>
      <td><table class="tb">
          <tr class="thead">
            <td>目录名</td>
            <td>读取权限</td>
            <td>写入权限</td>
          </tr>
          <?php
			foreach($sp_testdirs as $d)
			{
			?>
          <tr>
            <td><?php echo $d; ?></td>
            <?php
                    $fulld = duomi_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></td>
    </tr>
  </table>
  <?php
	}else
    {
?>
  <form  method="post" action="?action=checkfileperms">
    <table class="tb">
      <tr class="thead">
        <td align='center'>主要检查文件及文件夹的写入权限，点击下面按钮开始进行检查</td>
      </tr>
      <tr>
        <td align='center'><input type="submit" name="submit" class="btn"  value="开始"></td>
      </tr>
    </table>
  </form>
  <?php
	}
?>
</div>
<?php
	viewFoot();
?>
</body>
</html>
