$uzivatel="host";
$heslo ="lukavec";
if(!($_SERVER['PHP_AUTH_USER']==$uzivatel&&$_SERVER['PHP_AUTH_PW']==$heslo)||$action=="logout") {
header('WWW-Authenticate: Basic realm="Galerie.Hermel.cz"');
header('HTTP/1.0 401 Unauthorized'); exit;
}
?>
tomas.hermel.cz
include "/webroot/html/hermel.cz/menu.body" ?>
$dh = opendir("./data/"); $files = array();
while(($file=readdir($dh))!==false) if(file_exists("./data/$file/index.info")) $files[]=$file; closedir($dh);
rsort($files);
function GetFotos($dir) {
$dh = opendir("./data/$dir/"); $files = array(); while (($file = readdir($dh)) !== false) if (ereg("jpg",strtolower($file))) $files[] = $dir."/".$file; closedir($dh); sort($files);
for($i=0;$i";
$s.="";
$s.="";
$s.=" "; }
return $s;
}
if($dir!="") echo "".GetFotos($dir)."";
else { echo ""; }
?>
logout