\n";
//co ukazat (podle exif_show
if ($exif_show) {
while(list($k,$v)=each($exif_array)) {
while ($x = current($exif_show)) {
if ($x==$k) {
echo "
";
echo "$k : | ";
echo "$v | ";
echo "
\n";
}
next($exif_show);
}
}
} else {
//ukaze vsechno
while(list($k,$v)=each($exif_array)) {
echo "";
echo "$k : | ";
echo "$v | ";
echo "
\n";
}
}
echo "\n";
echo " | ";
# only show if EXIF header exists
if ($exif_array["Make"]) {
echo "";
echo "display line | \n";
}
echo "
\n";
echo "\n";
echo "";
} else {
// in one line
if ($exif_show) {
while(list($k,$v)=each($exif_array)) {
while ($x = current($exif_show)) {
if ($x==$k) {
echo "$v | ";
}
next($exif_show);
}
}
} else {
while(list($k,$v)=each($exif_array)) {
echo "$v | ";
}
}
# only show if EXIF header exists
if ($exif_array["Make"]) {
echo "";
echo "display table\n";
echo "\n";
}
}
} else {
// the old code, handles e.g. metacam and jhead as EXIF extractors
// loading lq means it won't work if the convertor doesn't copy EXIF data
// (newer ImageMagick can)
exec("$exif_prog \"$gallery_dir/$galerie/lq/img-$snimek.jpg\"", $exif_data, $exif_status);
if ($exif_status!="2") {
if ($exif_style=="descriptive") {
// fancy table look
echo "\n";
while ($x = current($exif_data)) {
eregi("^ *([^:]*): *(.*)", $x, $y);
//filter according to $exif_show array
if (!$exif_show) { //all fields shown
echo "";
echo "$y[1] : | ";
echo "$y[2] | ";
echo "
\n";
} else {
reset($exif_show);
while ($z = current($exif_show)) {
//echo ".$z. ::: .$y[1].
";
if (trim($z) == trim($y[1])) {
echo "";
echo "$y[1] : | ";
echo "$y[2] | ";
echo "
\n";
}
next($exif_show);
}
}
next($exif_data);
}
echo "\n";
echo " | ";
# only show if EXIF header exists
if ($y[1]!="File") { // don't show when no EXIF
echo "";
echo "display line | \n";
}
echo "
\n";
echo "
\n";
} else {
//simple plaintext look
echo "";
while ($x = current($exif_data)) {
eregi("^ *([^:]*): *(.*)", $x, $y);
if (!$exif_show) { //all fields shown
echo "$y[2] |";
} else {
reset($exif_show);
while ($z = current($exif_show)) {
if (trim($z) == trim($y[1])) {
echo "$y[2] | ";
}
next($exif_show);
}
}
next($exif_data);
}
# only show if EXIF header exists
if ($y[1]!="File") {
echo "";
echo "display table\n";
echo "
\n";
}
}
}
}
?>