<?php
$file = "<font color='#FFFFFF'>=</font>"; 
// папка "html"
$orig[2][1] = "html"; $info [2][1] = "+";
$orig[2][2] = "1.jpg"; $info [2][2] = $file;
$orig[2][3] = "2.jpg"; $info [2][3] = $file; 
$orig[2][4] = "3.jpg"; $info [2][4] = $file;
$orig[2][5] = "4.jpg"; $info [2][5] = $file;
$orig[2][6] = "5.jpg"; $info [2][6] = $file;
$orig[2][7] = "6.jpg"; $info [2][7] = $file;
$orig[2][8] = "7.jpg"; $info [2][8] = $file;
$orig[2][9] = "8.jpg"; $info [2][9] = $file;
$orig[2][10] = "dop"; $info [2][10] = $file."+";
$orig[2][11] = "index_frame.html"; $info [2][11] = $file;
$orig[2][12] = "index_frame1.html"; $info [2][12] = $file;
$orig[2][13] = "index_frame2.html"; $info [2][13] = $file;
$orig[2][14] = "index_frame3.html"; $info [2][14] = $file;
$orig[2][15] = "page_1.html"; $info [2][15] = $file;
$orig[2][16] = "page_2.html"; $info [2][16] = $file;
$orig[2][17] = "page_3.html"; $info [2][17] = $file;
$orig[2][18] = "page_4.html"; $info [2][18] = $file;
// папка "my_func"
$orig[4][1] = "my_func"; $info [4][1] = "+";
$orig[4][2] = "filelist.php"; $info [4][2] = $file;
$orig[4][3] ="filesize.php"; $info [4][3] = $file;
$orig[4][4] = "func.php"; $info [4][4] = $file;
$orig[4][5] = "index.php"; $info [4][5] = $file;
$orig[4][6] = "ip.php"; $info [4][6] = $file;
$orig[4][7] = "ipuser.php"; $info [4][7] = $file;
$orig[4][8] = "komment.php"; $info [4][8] = $file;
$orig[4][9] = "par.php"; $info [4][9] = $file;
$orig[4][10] = "perem.php"; $info [4][10] = $file;
$orig[4][11] = "perem1.php"; $info [4][11] = $file;
$orig[4][12] = "perem2.php"; $info [4][12] = $file;
$orig[4][13] = "perem3.php"; $info [4][13] = $file;
$orig[4][14] = "phpinfo.php"; $info [4][14] = $file;
$orig[4][15] = "rand.php"; $info [4][15] = $file;
$orig[4][16] = "scripttime.php"; $info [4][16] = $file;
$orig[4][17] = "servertime.php"; $info [4][17] = $file;
// папка "php"
$orig[5][1] = "php"; $info [5][1] = "+"; 
$orig[5][2] = "case.php"; $info [5][2] = $file; 
$orig[5][3] = "ifelse_1.php"; $info [5][3] = $file; 
$orig[5][4] = "ifelse_2.php"; $info [5][4] = $file; 
$orig[5][5] = "ifelse_3.php"; $info [5][5] = $file; 
$orig[5][6] = "kpp.php"; $info [5][6] = $file; 
$orig[5][7] = "reg.php"; $info [5][7] = $file; 
$orig[5][8] = "script_calc_1.php"; $info [5][8] = $file; 
$orig[5][9] = "script_calc_2.php"; $info [5][9] = $file; 
$orig[5][10] = "script_calc_3.php"; $info [5][10] = $file; 
$orig[5][11] = "switch.php"; $info [5][11] = $file; 
$orig[5][12] = "test.cals.php"; $info [5][12] = $file;
$orig[5][13] = "zadacha_1.php"; $info [5][13] = $file;
$orig[5][14] = "zadacha_2.php"; $info [5][14] = $file;
$orig[5][15] = "zadacha_3.php"; $info [5][15] = $file;
$orig[5][16] = "zapros.php"; $info [5][16] = $file;

$maindir = scandir('.');
foreach ($maindir as $k => $v) 
{	
if ($v == "." or $v == ".." or $v == "index.php") 
{echo "";} 
elseif (is_dir ($v)) 
 {	   
   $subdir = scandir($v);
   echo "+ ".$v."<br />";
   $real[$k][1] = $v; 
   foreach ($subdir as $subk => $subv)  
     {
	if ($subv == "." or $subv == "..") {echo "";}
	else {
	echo "<font color='#FFFFFF'>==</font><font color='#BBB'>".$subv."</font><br />";
	$real[$k][$subk] = $subv;
	    }
      }
   }
else { 
        echo $v."<br />"; 
        $real[$k][1] = $v; 
	  }
}
echo "<p>Проверка файлов</p>";
foreach($orig as $kk => $vv){
   if (is_array($vv)){
      
      foreach($vv as $kkk => $vvv) 
	{
	  if ($real[$kk][$kkk] == $orig [$kk][$kkk]) 
	     {
	       echo "<font color='green'>[ОК]</font> ".$info[$kk][$kkk]." ".$orig[$kk][$kkk]."<br />";
	     }
	else   {echo "<font color='red'>[нет]</font> ".$info[$kk][$kkk]." ".$orig[$kk][$kkk]."<br />";}
	       }
		 	  
    }
  }
  
echo "<pre>";
print_r ($real);
echo "<pre>";
?>

 

0