if(($pFile = fopen("bilder/txt/beschr.txt","r")) == FALSE){
die;
}
else{
// Auslesen der Partei
while($str = fgets($pFile)){
if(($str == -1) || ($str == 255)){
break;
}
else{
$str = str_replace("\n","",$str);
$txt .= $str;
}
}
fclose($pFile);
$TxtArr = explode("~",$txt);
//print_r($TxtArr);
$pDir = opendir("bilder");
$i = 0;
while($str = readdir($pDir)){
if(($str != ".") && ($str != "..") && ($str != "txt")){
$BildArr[$i] = $str;
$i++;
}
}
closedir($pDir);
$anz = count($BildArr);
if(!isset($_GET["nr"])){
$Bild = "
";
$Beschriftung = $TxtArr[0];
//$Bild_zurueck = "< zurück";
$Bild_vorwaerts = "vor >";
}
else{
if(is_numeric($_GET["nr"] == FALSE)){
$item = 0;
$fwd = $anz;
$next = 2;
$Bild_vorwaerts = "vor >";
}
else{
if(($_GET["nr"] <= 1) || ($_GET["nr"] > $anz)){
$item = 0;
$fwd = $anz;
$next = 2;
$Bild_vorwaerts = "vor >";
}
else{
if($_GET["nr"] >= $anz){
$item = $_GET["nr"]-1;
$fwd = $_GET["nr"]-1;
$next = $_GET["nr"];
}
else{
$item = $_GET["nr"]-1;
$fwd = $_GET["nr"]-1;
$next = $_GET["nr"]+1;
$Bild_vorwaerts = "vor >";
}
$tag3 = "|<<";
$Bild_zurueck = "< zurück";
}
}
//echo $item;
$Bild= "
";
$Beschriftung=$TxtArr[$item];
}
}
?>
|
|
echo $Bild;?>
|
|
echo $Beschriftung;?>
|
|
echo $tag3; ?>
|
echo $Bild_zurueck; ?>
|
echo $Bild_vorwaerts; ?>
|
echo $tag6; ?>
|