View file katrinka.ru/admin/midi_check.php

File size: 1.47Kb
<html>
<head><title>нЙДЙЙ, ОЕ ЧОЕУЈООЩЕ Ч ВБЪХ</title></head>
<body>
<?php
  include '../wap/config.php';

  if (!($conn=pg_connect("host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpass"))) {
    echo ("пЫЙВЛБ РПДЛМАЮЕОЙС Л вд!\n");
  };
  pg_query($conn,"SET CLIENT_ENCODING TO 'KOI8';");

$dir[1] = "/home/katrinka/WWW/midi/Rus/";
$bdir[1] = "/midi/Rus/";
$dir[2] = "/home/katrinka/WWW/midi/Eng/";
$bdir[2] = "/midi/Eng/";
$dir[3] = "/home/katrinka/WWW/pictures/Abstractions/";
$bdir[3] = "/pictures/Abstractions/";
$dir[4] = "/home/katrinka/WWW/pictures/Fun/";
$bdir[4] = "/pictures/Fun/";
$dir[5] = "/home/katrinka/WWW/pictures/Nature/";
$bdir[5] = "/pictures/Nature/";
$dir[6] = "/home/katrinka/WWW/pictures/Symbols/";
$bdir[6] = "/pictures/Symbols/";
$dir[7] = "/home/katrinka/WWW/pictures/Other/";
$bdir[7] = "/pictures/Other/";
$dir[8] = "/home/katrinka/WWW/pictures/animating/";
$bdir[8] = "/pictures/animating/";
$dir[9] = "/home/katrinka/WWW/pictures/erotika/";
$bdir[9] = "/pictures/erotika/";

for ($i=1; $i<=9; $i++) {
if (is_dir($dir[$i])) {
    if ($dh = opendir($dir[$i])) {
        while (($file = readdir($dh)) !== false) {
			if (($file!=".")&&($file!="..")) {
				$path=sprintf("%s%s",$bdir[$i],$file);
				$res=pg_query($conn,"select id from midi where path='$path';");
				if (!pg_numrows($res)) { 
					print $path." <a href=\"files.php?path=".$path."\">ЧОЕУФЙ</a><br>\n";
				}
			}
        }
        closedir($dh);
    }
}
}
pg_close($conn);
?>
</body>
</html>