require("index.ini"); require($basedir."comcode.php"); $navstr=GetNavStr($basedir); $catalog = $navstr[1]; require($basedir."header.php"); if (file_exists("list.txt") && file_exists("abc/index.php")) { echo '
";
################# body #################
$dsc[0] = '';
$dsc[1] = '';
if (file_exists("list.txt")) {$dsc=file("list.txt"); $mode="dsc_file";}
// find description and maintain names
$i=1;
$d=dir($mydir);
while($entry=$d->read())
{
if (!ereg("th_", $entry)) continue;
$records[$i][0] = $entry;
$records[$i][1] = 0; // place
$i++;
}
array_qsort ($records, 0, SORT_ASC);
$thecount=$i-1;
for ($i=0; $i<=$thecount; $i++) { $records[$i][1] = $i; }
#########################################
if ($pic) {
$x=0;
foreach ($records as $oneline) {
if (ereg($pic, $oneline[0])) {
$page = '/'.$oneline[1].'/';
continue;
}
$x++;
}
}
if (!$page) { $page="?page=/1-$N/"; }
$path=$page;
#########################################
$thecount=$i-1;
for ($i=0; $i<=$thecount; $i++) { $records[$i][1] = $i; }
$temppath=substr ("$path", 0 ,strlen($path)-1);
for ($i=0 ; $i<=strlen($temppath); $i++) {
if ($temppath[$i]=="/") { $j=$i; break;}; }
$dir = substr ( $temppath, 0 , $j+1 ); // get working directory
$info = $dir."descript.ion"; // get description file name
$number = substr($temppath,$j+1,strlen($temppath));
$mn=0; $mx=0;
if (strstr($number,'-')) { // pictures RANGE to show
$mn=substr($number,0,strpos($number,'-'));
$mx=substr($number,strpos($number,'-')+1,strlen($number));
$number=0;
};
if ($number==0) $N = $mx-$mn+1; // quantity of pics to preview
// here we start to calculate the contents of the first table ------------->
?>
echo '
"; ################# /body ################ echo $btmtext; require($basedir."bottom.php"); ?> |