"; } if ($showthumb) { viewthumb($name); exit; } ### Check for User defined html.inc ### If it does not exist, we generate some defaults. if(my_exists("html.inc")) { include("html.inc"); } if (!$customheader) { my_header(); } ### Ad rotation check if ($showads){ include("adrot.inc"); } ### user defined text if(my_exists("my_text.html")) { include("my_text.html"); } else { if(my_exists("my_text.html")) { include("my_text.html"); }} echo "
"; ## ### Image Viewer section if($showpic) { viewpic($dir,$prev,$name,$showname,$srow); } else { ### Thumbnail Gallery generator ## First thing lets do is acquire the directorys for later printing if(!isset($dir)){ $dir=$defaultdir; } if(!isset($prev)){ $prev=$defaultdir; } $dir=checkdir($dir); $prev=checkdir($prev); $dirlist=getdirlist($dir); $nlist=explode("\n", $dirlist); $i=0; $f1=$nlist[$i]; ## Now generate the Navigation Table Entry echo "
"; if("$dir"!=".") { echo ""; } echo "
"; while(my_exists("$dir/$f1")) { if(($f1!="banners") and ($f1!="agimages")) { if($f1!="") { $newfile=str_replace(" ","%20","$dir/$f1"); $imglink=""; if(my_exists("$dir/$f1/dir-thumbnail.thm")){ $imglink="src=autogallery.php?showthumb=1&name=$newfile/dir-thumbnail.thm width=50 border=0"; } elseif($autothumbs) { $x=getdirthumb("$dir/$f1"); $x=str_replace(" ","%20",$x); $imglink="src=autogallery.php?showthumb=1&name=$x width=50 border=0"; } if ($countfiles) { $numfiles= countfiles("$dir/$f1"); } if(my_exists("$dir/$f1/brief.txt")){ echo "
"; include("$dir/$f1/brief.txt"); } else { echo "
$f1
"; } if (($countfiles) and ($numfiles!="")) { echo "($numfiles)"; } elseif ( $countfiles and ($numfiles=="")) { echo "(Keine Bilder gefunden)
"; } } } $i++; $f1=$nlist[$i]; if("$dir/$f1"=="$dir/") { break; } } echo "
 
"; echo "
 
"; echo "
"; echo "
"; ## Now grab the thumbnails for this page $list=getthumbnails($dir); $nlist=explode("\n", $list); ## Now generate the thumbnails for this page echo ""; $ccol=1; $crow=1; if (!isset($srow)){ $srow=1; } $simage=($cols*$srow)-($cols); $i=$simage; $f1=$nlist[$i]; while(my_exists("$f1")) { if($ccol>$cols) { $ccol=1; } if($f1=="") {break;} $name="$f1"; $thname="$name"."-"."thumbnail.thm"; if(!my_exists($thname)) { makethumb($name,$thname); } $newdir=str_replace(" ","%20",$dir); $newprev=str_replace(" ","%20",$prev); $newname=str_replace(" ","%20",$name); $newthname=str_replace(" ","%20",$thname); if (my_exists("$name.dsc")) { $fp=fopen("$name.dsc","r"); $altname=fgetss($fp,80); fclose($fp); } else { $altname=str_replace("%20"," ",basename($newname)); } if($showname>0) { $sname=str_replace("%20"," ",basename($newname)); if ($showname==2) { $sname=substr($sname,0,$truncatechars); } echo ""; } else { echo ""; } $ccol++; $i++; $f1=$nlist[$i]; if($ccol>$cols) { echo ""; $crow++; } if("$dir/$f1"=="$dir/") {break;} if($crow>$rows) { echo "

$sname
"; echo "
"; break; } } echo ""; $prow=$srow-$rows; if($prow>=0) { echo "
"; } if($ccol>=$cols) { $startat=$srow+$rows; echo "
"; } echo "
"; echo "
"; } if(my_exists("bothtml.inc")) { include("bothtml.inc"); } ?>