Index: trunk/MagicSoft/Mars/datacenter/db/plotinclude.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/plotinclude.php	(revision 9150)
+++ trunk/MagicSoft/Mars/datacenter/db/plotinclude.php	(revision 9458)
@@ -73,4 +73,8 @@
     $stop1=$_GET["Stop"];
 
+    if (empty($_GET["fSourceN"]))
+        $_GET["fSourceN"]="";
+    $source=$_GET["fSourceN"];
+
     $query="SELECT " . $table . "." . $primary . ", ";
     if ($column==$primary)
@@ -99,4 +103,7 @@
     $query.=$joins[$primary];
 
+    if (!empty($source))
+        $query.= " LEFT JOIN Source USING(fSourceKEY) ";
+
     if (!empty($primstart))
         $query.= " WHERE " . $table . "." . $primary . " > " . $primstart;
@@ -155,4 +162,7 @@
         $query.= CheckQuery($query) . GetTable($table, $column4) . " < " . $stop4;
 
+    if (!empty($source))
+        $query.= CheckQuery($query) . " fSourceName REGEXP \"^" . $_GET["fSourceN"] . "\" ";
+
     return $query;
 }
