View file katrinka.ru/admin/photos_check.php

File size: 873B
<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/pictures/Photos/";
$bdir[1] = "/pictures/Photos/";

for ($i=1; $i<2; $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 photos where path='$path';");
				if (!pg_numrows($res)) { 
					print $path." <a href=\"photos.php?path=".$path."\">ЧОЕУФЙ</a><br>\n";
				}
			}
        }
        closedir($dh);
    }
}
}
pg_close($conn);
?>
</body>
</html>