<table cellspacing="2" cellpadding="1" width="670" align="center" border="0">
  <tbody>
    <tr>
      <td height="74"> <span class="heading">PHPStat Counter 检查目录属性</span>
        <hr align="left" size="1" width="100%"/>
        <form id="form1" name="form1" method="get" action="">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="28%" rowspan="3"><table width="90%" height="200" border="0" cellpadding="5" cellspacing="3" style="border-right:2px solid #cccccc;">
                <tr>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td><span class="heading">1.检查目录属性</span></td>
                </tr>
                <tr>
                  <td>2.检查参数设置</td>
                </tr>
                <tr>
                  <td>3.安装数据库</td>
                </tr>
                <tr>
                  <td>4.安装完成</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                </tr>
              </table></td>
              <td></td>
            </tr>
            
            <tr>
              <td height="59">
			  <?
			  if(@get_cfg_var("session.cookie_path") != '/')
				{
					echo "<br>请将配置文件中的 '<FONT COLOR=\"#FF0000\">session.cookie_path</font>' 选项设置为 \" /  \" ，即：session.cookie_path = / <br>强烈建议您修改此选项，否则影响正常登录&nbsp;&nbsp;&nbsp;<br>\n";
					$error = true;
					fputs($fp,"\n######".date('Y-m-d H:s')." 请将PHP.INI配置文件中的 session.cookie_path 选项设置为 / 即：session.cookie_path = /");
				}
				
				echo "<br><br><br>现在开始检查目录可写性.<br>\n";
				
				if( !is_writable( WEB_HOME . '/files'   ) )
				{
					$error = true;
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">".WEB_HOME . '/files' ."</FONT><br>\n";
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">该目录不可写,请将目录权限设置为可写!</FONT><br>\n";
				}
				if( !is_writable( WEB_HOME . '/' . COUNT_DIRNAME  ) )
				{
					$error = true;
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">".WEB_HOME . '/' . COUNT_DIRNAME ."</FONT><br>\n";
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">该目录不可写,请将目录权限设置为可写!</FONT><br>\n";
				}			
				if( !is_writable( WEB_HOME . '/' . COUNT_DIRNAME .'/bot' ) )
				{
					$error = true;
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">".WEB_HOME . '/' . COUNT_DIRNAME .'/bot'."</FONT><br>\n";
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">该目录不可写,请将目录权限设置为可写!</FONT><br>\n";
				}
				if( !is_writable( WEB_HOME . '/' . COUNT_DIRNAME .'/count' ) )
				{
					$error = true;
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">".WEB_HOME . '/' . COUNT_DIRNAME .'/count'."</FONT><br>\n";
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">该目录不可写,请将目录权限设置为可写!</FONT><br>\n";
				}
				if( !is_writable( WEB_HOME . '/' . COUNT_DIRNAME .'/errors'  ) )
				{
					$error = true;
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">".WEB_HOME . '/' . COUNT_DIRNAME .'/errors'."</FONT><br>\n";
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">该目录不可写,请将目录权限设置为可写!</FONT><br>\n";
				}
				if( !is_writable( WEB_HOME . '/' . COUNT_DIRNAME .'/exclusion'  ) )
				{
					$error = true;
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">".WEB_HOME . '/' . COUNT_DIRNAME .'/exclusion'."</FONT><br>\n";
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">该目录不可写,请将目录权限设置为可写!</FONT><br>\n";
				}	
				if( !is_writable( WEB_HOME . '/' . COUNT_DIRNAME .'/js'  ) )
				{
					$error = true;
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">".WEB_HOME . '/' . COUNT_DIRNAME .'/js'."</FONT><br>\n";
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">该目录不可写,请将目录权限设置为可写!</FONT><br>\n";
				}
				if( !is_writable( WEB_HOME . '/' . COUNT_DIRNAME .'/pagerank'  ) )
				{
					$error = true;
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">".WEB_HOME . '/' . COUNT_DIRNAME .'/pagerank'."</FONT><br>\n";
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">该目录不可写,请将目录权限设置为可写!</FONT><br>\n";
				}if( !is_writable( WEB_HOME . '/include.inc'  ) )
				{
					$error = true;
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">".WEB_HOME . '/' . COUNT_DIRNAME .'/include.inc'."</FONT><br>\n";
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">该目录不可写,请将目录权限设置为可写!</FONT><br>\n";
				}
				if( !is_writable( WEB_HOME . '/install'  ) )
				{
					$error = true;
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">".WEB_HOME . '/' . COUNT_DIRNAME .'/install'."</FONT><br>\n";
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">该目录不可写,请将目录权限设置为可写!</FONT><br>\n";
				}
				if( !is_writable( $Tpl->compile_dir ) )				
				{
					$error = true;
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">".$Tpl->compile_dir."</FONT><br>\n";
					echo "&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=\"#FF0000\">该目录不可写,请将目录权限设置为可写!</FONT><br>\n";
				}
				
						
				if( $error )
				{
					echo "<br><br><FONT COLOR=\"#FF0000\">请更正以上错误后重新安装!</FONT><br><br>";
				}		
				else
				{
					echo "<br><br><FONT COLOR=\"#FF0000\">目录检查通过,请继续进行安装</FONT><br><br>";
					echo "<br><br><input name=\"Submit\" type=\"button\" class=\"button\" onclick=\"window.location='install.php?step=2'\" value=\"继　续　安　装\">";
				}
			  ?></td>
            </tr>
            <tr>
              <td height="59">&nbsp;</td>
            </tr>
          </table>
        </form>
        <p>&nbsp;</p></td>
    </tr>
    <tr>
      <td height="18">&nbsp;</td>
    </tr>
  </tbody>
</table>
