Index: trunk/ippMonitor/raw/getimage.php
===================================================================
--- trunk/ippMonitor/raw/getimage.php	(revision 10963)
+++ trunk/ippMonitor/raw/getimage.php	(revision 11490)
@@ -13,10 +13,31 @@
 }
 
-$basename = escapeshellarg($_GET[name]);
-$basename = str_replace ('..','',$basename);
-
 putenv("PERL5LIB=$PERLLIB:");
 $PATH = getenv("PATH");
 putenv("PATH=$BINDIR:$PATH");
+
+# echo "args: $args<br>";
+
+# $basename may contain filename@filerule
+$basename = strtok($_GET[name],"@");
+$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";
+  }
+}
+
+$basename = escapeshellarg($basename);
+$basename = str_replace ('..','',$basename);
 
 exec ("ipp_datapath.pl --site=$SITE $basename", $output, $status);
