header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"'); session_start(); if(!isset($_SESSION["rechte"]))$_SESSION["rechte"]=0; ?>
$htmltext=""; if(!isset($_GET["galerie"]))$galerie="";else $galerie=$_GET["galerie"]; $ord=""; if(isset($_POST["ordner"]))$ordner=$_POST["ordner"]; if(!isset($ordner)) { $k=0; $handle=opendir('galerie'); while($file=readdir($handle)) { if($file!="." && $file !="..") { $ex=explode("_",$file); if($ex[0]=="X") { if($_SESSION["rechte"]>0) { $x[$k]="X_"; $pos[$k]=$ex[1]; $name[$k]=$ex[2]; if(strcmp($name[$k],$galerie)==0)$ord="X_".$pos[$k]."_".$name[$k]; $k++; } } else { $x[$k]=""; $pos[$k]=$ex[0]; $name[$k]=$ex[1]; if(strcmp($name[$k],$galerie)==0)$ord=$pos[$k]."_".$name[$k]; $k++; } } } closedir($handle); if(count($pos)>1)array_multisort($pos,SORT_DESC,$name,$x); $ordner=$x[0].$pos[0]."_".$name[0]; if(strlen($ord)>0)$ordner=$ord; } $ex=explode("_",$ordner); if($ex[0]=="X") { $pos=$ex[1]; $nam="galerie/X_$pos"."_".$ex[2]; $name="galerieklein/".$ex[2]; } else { $pos=$ex[0]; $nam="galerie/$pos"."_".$ex[1]; $name="galerieklein/".$ex[1]; } $k=0; $handle=opendir($name); while($file=readdir($handle)) { if($file!="." && $file!="..") { $b[$k]=$file; $expl=explode("_",$b[$k]); $z=4+strlen($expl[0])+strlen($expl[1])+strlen($expl[2])+strlen($expl[3]); $g[$k]=substr($b[$k],$z); $k++; } } $arrays=""; $n=0; closedir($handle); if(count($b)>1)array_multisort($g,SORT_ASC,$b); $cb=floor(count($b)/5)*5; if(count($b)%5>0)$cb+=5; for($k=0;$k<$cb;$k++) { if($k