';
$picdir = "Pics/" . $code . "/";
$meddir = "Docs/" . $code . "/Med/" . doc_path($plantspecies_corrected);
$Uploadimageform=0;
mysql_disc();
$titlepic ="";
$picfiles = array();
// $picfiles = scandir($picdir);
$dirhandler = opendir($picdir);
while (false !== ($filename = readdir($dirhandler))) {
$picfiles[] = $filename;
}
sort($picfiles);
$filecount = count($picfiles)-1;
$piccount=0;
$p1 = array(); $px=array(); $py=array();
for ($i=2; $i<=$filecount; $i++) // 2 = Assumed 2 directories and ignored
{
$pic = $picdir . basename($picfiles[$i]) ;
$pic2 = basename($picfiles[$i]) ;
//print $pic. " - ";
if (filetype($pic) == "file") // REF A
{
$flen = strlen($pic2);
if (strtolower(substr($pic2, ($flen-5)))==".jpeg" OR strtolower(substr($pic2, ($flen-4)))==".jpg") // REF B
{ // print "jpg found. ($pic2)
";
$imgarr = getimagesize ($pic);
if ($imgarr[2] !=0) // REF C is really an image?
{
if (substr_count($pic2, '_t.')==1) // if pic filename has "_t.", assign it as titlepic.
{$titlepic = $pic2; /* Print "
_t. found" . $titlepic . "
"; */ }
elseif (substr_count($pic2, '_t2.')==0 and substr_count($pic2, '_t3.')==0 ) // if pic filename has "_t2." or "_t3." exclude from photogallery.
{ $piccount++;
array_push($p1, $pic2);
array_push($px, $imgarr[0]);
array_push($py, $imgarr[1]);
}
} // REF C - is really an image?
else {/* print "Fake image file - discarded!
"; */}
} // REF B extension check
else {/* print "not a jpg ext.
"; */}
} // REF A if filename is a file
else {/* print "filename do not correspond to a TRUE file.
"; */}
} // Fot loop
$titlepic = "Pics/".$code."/" . $titlepic;
?>
| ($piccount images) " ?> |
=900) {$width ="900";} else {$width = $px[$i];}
$pic = $picdir . $p1[$i];
if ($px[$i] >=900) {$width ="900";} else {$width = $px[$i];}
$pic = $picdir . $p1[$i];
print ' ' . $plantspecies .
' - Image Code: ' . $code . '-' . $i . '.
| ';
}
?>
No images of $plantspecies_corrected are available. " ; break;
case 1: $Uploadimageform=1; $uploadtext=" Only 1 image of $plantspecies_corrected is available. "; break;
case 2: $Uploadimageform=1; $uploadtext=" Only 2 images of $plantspecies_corrected are available. " ; break;
// case 3: $Uploadimageform=1; $uploadtext=" Only 3 images of $plantspecies_corrected are available. "; break;
}
$uploadtext2 = "If you can share your own images of this species to this website, please do so by using the image upload form below. Credits are given to the authors. ";
if ($Uploadimageform ==1)
{ print "$uploadtext $uploadtext2";
require ("../!incl/uploadimageform.php");
;
}
?>
|
|
|
|
| | |
Html to php update (Matthiola_tricuspidata)
MaltaWildPlants.com
This old html page is outdated
( Matthiola_tricuspidata )
Many old html pages have been updated and replaced by an advanced php-format webpage. You will be directed to the corresponding new page within few seconds. Please update your links to the new php address.
If your browser does not re-direct you, please click on this link
|
|