$value)
{ ++$cnt; }
//$imgpath="/~edgock/travel/pics/imgent.php?key=";
$imgpath="/travel/pics/imgent.php?key=";
//$hostname = $_SERVER['SERVER_NAME'];
//$hostname = "www.freeshell.org";
$hostname = "edgock.chaosnet.org";
$str = "";
if ($cnt > 0)
{
$str = "../";
}
$endidx = 1;
$fpre="images";
$fsuf=".csv";
$fid=41;
$fname=$fpre.$fid.$fsuf;
$fp = fopen ($fname,"r");
$pre=true;
$linecnt=0;
while (file_exists($fname))
{
$fp = fopen ($fname,"r");
while (($data = fgetcsv ($fp, 1000, ","))) {
if (strlen($data[10]) > 0)
{
print $fname." is false
";
$pre=false;
print $data[10];
}
$cpos = strpos($data[4],",");
$prename=substr($data[4],0,$cpos);
list($day,$month,$year) = explode("/",$data[6],3);
$predate="".gmdate("d M Y",strtotime("$month/$day/$year"))."
";
//$predate="".day." ".$month." ".$year."
";
$endidx = $data[8];
}
if ($pre)
{
$htmlstr=$predate."";
$htmlstr=$htmlstr. $prename . "
\n";
inspage($pglist,$data[8]);
$linecnt++;
$htmllist[$endidx] = $htmlstr;
print $data[8];
}
$pre = true;
$fid=$endidx +1;
fclose ($fp);
$fname=$fpre.$fid.$fsuf;
}
$totcnt =0;
$fp = @fopen("imgpre.php","w");
$str ="\n";
$str.="
Previews
\n";
for ($v=$endidx ; $v >= 1; $v--)
{
$str.=$htmllist[$v];
}
print $linecnt;
if ($linecnt==0)
{
$str .= "None available";
}
$str .= "