## Copyright (C) 2000 Ash Bowers
## Email: ashbowers@yahoo.com
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
### Check for the config and functions files. They must exist!
if(file_exists("config.inc")) {
include("config.inc");
} else {
echo "Config file not found. Exiting.";
exit;
}
if(file_exists("functions.inc")) {
include("functions.inc");
} else {
echo "Functions file not found. Exiting.";
exit;
}
### Referring Page Checker
if($checkref) {
refpage();
} else {
#echo "HTTP Referrer check disabled
";
}
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 "
| ";
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 "";
}
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 " |
$sname | ";
} else {
echo ""; } $ccol++; $i++; $f1=$nlist[$i]; if($ccol>$cols) { echo " |