=100) { $out = eval("return ${x[0]}/${x[1]};"); $out .= "s"; return $out; } else { return "1/".(1.0/($x[0]/$x[1]))."s"; } break; case "Flash"; if ($v=="0") { return "No Flash"; } else { return $v; } break; case "ISOSpeedRatings": return "ISO" . $v; break; case "GainControl"; return "EV" . $v; break; case "FocalLengthIn35mmFilm": return $v . "mm"; break; case "DateTime": //return date("M d Y H:i:s", $v); ereg("^([0-9]{4}):([0-9]{1,2}):([0-9]{1,2}) (.*)",$v,$x); return $x[1] . "/" . $x[2] . "/" . $x[3] . " " . $x[4]; break; default: return $v; } } if ($exif_prog=="php4") { // php internal handling // $file is LQ image $exif_array = exif_read_data("$file"); reset($exif_array); if ($exif_show) reset($exif_show); if ($exif_array["Make"]) { // only render all this // if there is EXIF header // fancy table look echo "
"; echo $x; echo ": | "; echo ""; echo formatEXIF($k,$v); echo " | "; echo "
"; echo $k; echo ": | "; echo ""; echo formatEXIF($k,$v); echo " | "; echo "
"; echo " | " . __("Less info"); echo " | "; echo "
"; reset($exif_array); if ($exif_show) reset($exif_show); if ($exif_show) { while (list($kx,$x) = each($exif_show)) { while(list($k,$v)=each($exif_array)) { if ($kx==$k) { echo ""; echo formatEXIF($k,$v); echo " | "; } } reset($exif_array); } } else { /* vsechny exif headers inline */ while(list($k,$v)=each($exif_array)) { echo ""; echo formatEXIF($k,$v); echo " | "; } } echo "" . __("More info"); echo "
\n"; echo "$y[1] : | "; echo "$y[2] | "; echo "
$y[1] : | "; echo "$y[2] | "; echo "
"; # only show if EXIF header exists if ($y[1]!="File") { // don't show when no EXIF echo " | "; echo "display in-line | \n"; } 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"; } } } } ?>