Index: trunk/MagicSoft/Mars/datacenter/db/plotdb.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/plotdb.php	(revision 9457)
+++ trunk/MagicSoft/Mars/datacenter/db/plotdb.php	(revision 9458)
@@ -187,5 +187,10 @@
         printf("<div id='set2' style='display:none'>Set2: <input name='Set2' type='text' size='20' maxlength='150' value='%s'>\n</div>\n<br>\n", $_GET["Set2"]);
 
-    printf("<br>Plot format: &nbsp; x = <select name='x' size='1'>\n");
+    printf("<br>\nSource&nbsp;(<A HREF=\"regexp.html\">regexp</A>)&nbsp;<input name=\"fSourceN\" type=\"text\" size=\"15\" maxlength=\"15\" value=\"");
+    if (!empty($_GET["fSourceN"]))
+        printf("%s", $_GET["fSourceN"]);
+    printf("\">\n<br>\n");
+
+    printf("<br>\nPlot format: &nbsp; x = <select name='x' size='1'>\n");
     $x = array( 740, 640, 540, 440);
     foreach($x as $key => $el)
Index: trunk/MagicSoft/Mars/datacenter/db/plotinclude.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/plotinclude.php	(revision 9457)
+++ 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;
 }
