\n";
echo "\n";
# Kopf
echo "\n";
# inner Geruest
echo "\n";
echo "| zurück | \n";
echo "\n";
echo "\n";
# Haupt
echo "\n";
echo "\n";
echo "| \n";
if($sort=="asc"){
$styleasc="aascdecu";
$styledsc="aascdec";
$bolda1="";
$bolda2="";
$boldd1="";
$boldd2="";
}elseif($sort=="dsc"){
$styleasc="aascdec";
$styledsc="aascdecu";
$bolda1="";
$bolda2="";
$boldd1="";
$boldd2="";
}else{
$styleasc="aascdecu";
$styledsc="aascdec";
$bolda1="";
$bolda2="";
$boldd1="";
$boldd2="";
}
echo "$cam ( ";
echo "".$bolda1."aufsteigend".$bolda2." / ";
echo "".$boldd1."absteigend".$boldd2." )";
echo " | \n";
echo " \n";
echo "\n";
echo "| Alle $bilder_gefunden Bilder vom $datum $bild: | \n";
echo " \n";
echo " \n";
$lastjpg="";
$lasthhmm="";
$arg="";
$array_streifenbilder = array();
$g=1;
$td=0;
$reihen=1;
$muster_datum = "/[0-9]{4}-[0-9]{2}-[0-9]{2}/";
$muster_uhrzeit = "/[0-9]{2}-[0-9]{2}-[0-9]{2}-/";
$ratio = $bilder_gefunden / $inc_alle_bilder_pro_zeile;
$ratio_recommend = 500;
if( $ratio > 2*$ratio_recommend ){
$ratio_multiplier = $ratio / $ratio_recommend;
$inc_alle_bilder_pro_zeile = round($inc_alle_bilder_pro_zeile * $ratio_multiplier);
if( $inc_alle_bilder_pro_zeile > 60 ) $inc_alle_bilder_pro_zeile = 30;
}
#echo " ratio: ".$ratio;
#echo " ratio_recommend: ".$ratio_recommend;
#echo " ratio_multiplier: ".$ratio_multiplier;
#echo " bilder die zeile: ".$inc_alle_bilder_pro_zeile;
foreach($bilder_array AS $bilddateiname) {
#$bilddateiname = str_replace('/mini/','/',$bilddateiname);
preg_match($muster_datum, $bilddateiname, $array_datum_bild);
preg_match($muster_uhrzeit, $bilddateiname, $array_uhrzeit_bild);
$datum_bild = $array_datum_bild[0];
$uhrzeit_bild = str_replace('-',':',rtrim($array_uhrzeit_bild[0],'-'));
$teil=explode($inc_pfad_www.$datum."/".$cam."/", $bilddateiname);
$newjpg=$teil[1];
$newhhmm=substr($newjpg,0,5);
if($g==1) {
#$lasthhmm=$newhhmm;
#$lastjpg=$newjpg;
}
#echo "$lastjpg $newjpg";
#$arg.="&bilder[]=" . $datum . "/" . $cam . "/mini/" . $lastjpg;
#$array_streifenbilder[] = $datum . "/" . $cam . "/mini/" . $newjpg;
#$array_datum[] = $datum_bild;
#$array_uhrzeit[] = $uhrzeit_bild;
#aenderung -> neue tabelle
#if($lastjpg != $newjpg or $td>=$inc_alle_bilder_pro_zeile or $g==count($bilder_array) ) {
if( ($lasthhmm != $newhhmm or $td>=$inc_alle_bilder_pro_zeile) and $g>1 ) {
echo "\n";
echo "\n";
unset($array_streifenbilder);
unset($array_datum);
unset($array_uhrzeit);
$arg="";
$reihen++;
$td=0;
}
$arg.="&bilder[]=" . $datum . "/" . $cam . "/" . $newjpg;
$array_streifenbilder[] = $datum . "/" . $cam . "/" . $newjpg;
$array_datum[] = $datum_bild;
$array_uhrzeit[] = $uhrzeit_bild;
# letzte reihe nicht vergessen und ausgeben
if( $g==count($bilder_array) ) {
#echo "letzte zeile";
echo "\n";
echo "\n";
unset($array_streifenbilder);
unset($array_datum);
unset($array_uhrzeit);
}
#$arg.="&bilder[]=" . $datum . "/" . $cam . "/mini/" . $lastjpg;
$g++;
$td++;
$lastjpg=$newjpg;
$lasthhmm=$newhhmm;
}
# Ende Geruest
echo " | \n";
echo " \n";
echo " \n";
# Ende Geruest
echo " | \n";
echo "
\n";
echo "