Index: trunk/ippMonitor/raw/getimage.php
===================================================================
--- trunk/ippMonitor/raw/getimage.php	(revision 11490)
+++ trunk/ippMonitor/raw/getimage.php	(revision 13241)
@@ -20,26 +20,30 @@
 
 # $basename may contain filename@filerule
-$basename = strtok($_GET[name],"@");
-$filerule = strtok("@");
+$basename = $_GET[name];
+$filerule = $_GET[rule];
+$camera   = $_GET[camera];
+$class_id = $_GET[class_id];
 
+# $filerule = strtok("@");
 # echo "basename: $basename<br>";
 # echo "filerule: $filerule<br>";
 
 # need to supply the camera as well...
-# exec ("ipp_filerule.pl --site=$SITE $basename", $output, $status);
 
-if ($filerule) {
-  if ($filerule == "PPIMAGE.JPEG1") {
-    $basename = "$basename.b1.jpg";
-  }
-  if ($filerule == "PPIMAGE.JPEG2") {
-    $basename = "$basename.b2.jpg";
-  }
-}
+# if ($filerule) {
+#   if ($filerule == "PPIMAGE.JPEG1") {
+#     $basename = "$basename.b1.jpg";
+#   }
+#   if ($filerule == "PPIMAGE.JPEG2") {
+#     $basename = "$basename.b2.jpg";
+#   }
+# }
+# exec ("ipp_datapath.pl --site=$SITE $basename", $output, $status);
 
+# do I need to do this to the output result as well?
 $basename = escapeshellarg($basename);
 $basename = str_replace ('..','',$basename);
 
-exec ("ipp_datapath.pl --site=$SITE $basename", $output, $status);
+exec ("ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id", $output, $status);
 
 $filename = $output[0];
@@ -50,5 +54,4 @@
 if (0) {
   echo "basename: $basename<br>";
-  echo "result:   $result<br>";
   echo "output:   $output[0]<br>";
   echo "status:   $status<br>";
@@ -59,4 +62,5 @@
 $file = fopen ($filename, "r");
 if ($file) {
+  # do I need to use image/jpg? can I modify this to image/png, etc, based on the type?
   header ('Content-Type: image/jpg');
   fpassthru ($file);
