<!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" />
<title>《GV32开源企业建站系统》安装系统 - 环境检测</title>
<link rel="stylesheet" type="text/css" href="./install.css" />
</head>
<body>

<div style="height:30px;"></div>
<div class="setuplogo"><img src="./setuplogo2.png" width="465" height="62" scr="" ></div>
<div class="setuptable">
<ul>
<?php


			//查看目录是不存在 重要文件是否完整
			$isdirAraay = array(1=>'application', 2=>'_tmp',  3=>'includes', 4=>'js',5=>'system',6=>'uploads',7=>'templates',8=>'adminsys',9=>'compiles',10=>'flash',11=>'images',12=>'user',13=>'xml');
			$isinstall = true; //初始可以安装
			foreach($isdirAraay as $isidirkey => $isdirval )
			{
				if(!is_dir(ROOT_PATH.$isdirval))
				{ 
					$isinstall = false;
				}
			}

		if($isinstall)
			{
				echo '<li><font color="#0000FF">重要文件是否完整:完整！</font></li>';
			}else{
				echo '<li><font color="#FF0000">重要文件是否完整:不完整！</font></li>';
			}
			
			
			echo '<li>系统环境：'.getenv('SERVER_SOFTWARE').'</li>';
			//查看文件是否可读写
			$dirArray = array( 1=>'system/config/config.ini.php', 2=>'system/config', 3=>'_tmp',  4=>'uploads/files',5=>'uploads/flash',6=>'uploads/ad',7=>'uploads/images',8=>'uploads/sys',9=>'uploads',10=>'xml/bcastr.xml');
			
			foreach($dirArray as $idirkey => $dirval )
			{
				@chmod(ROOT_PATH.$dirval, 0777);
				if (!is_writable(ROOT_PATH.$dirval))
				{
					echo  '<li><font color="#FF0000">请将'.ROOT_PATH.$dirval.'的属性设置为: 777 （可读写）</font></li>';
					$isinstall = false;
				}else{
					echo  '<li><font color="#0000FF">'.$dirval.'的属性设置正确，可写</font></li>';
				}
			}
			if($isinstall)
			{ 
				echo '<li><br><a href="./index.php?act=step4" class="nextbutton">下一步配置..</a><br></li>';
			}else{ 
				echo '<li>请修改红色设置再试，<a href="./index.php?act=step3" >刷新</a></li>'; 
			}
			
 

?>

</ul>
</div>
</body>
</html>
