Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 8245)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 8246)
@@ -89,4 +89,8 @@
        his/her username now)
      - fixed password query in case user inserted something wrong
+     - implemented check, if on-sequences have different observations 
+       modes 
+     - implemented check, if user has chosen one sequences as on and off
+     - adapted text of password prompt
 
    * datacenter/db/builddatasets.php, datasetinfo-aio.php, 
Index: /trunk/MagicSoft/Mars/datacenter/db/builddatasets.php
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/db/builddatasets.php	(revision 8245)
+++ /trunk/MagicSoft/Mars/datacenter/db/builddatasets.php	(revision 8246)
@@ -511,4 +511,5 @@
                             $sequoff.=str_replace("Off", " ", $key);
                     }
+
                 printf("<input type='submit' value='Get Dataset'><br><br>\n");
                 printf("<input name='submit' type='hidden' value='post'>\n");
@@ -614,4 +615,11 @@
 //                printf("found %s keys", $numrealkeys);
 
+                //check observationmode for on-sequences
+                $query="SELECT fObservationModeKEY FROM Sequences where fSequenceFirst IN ('" . $sequences . "') GROUP BY fObservationModeKEY";
+//                printf("q: %s <br>", $query);
+                $result = mysql_query($query, $db_id);
+                $numobskeys=mysql_num_rows($result);
+                mysql_free_result($result);
+
 
                 $runtimelimit=5;
@@ -680,8 +688,28 @@
                                $color["WARN"], "WARN", str_word_count($sourceson));
                     */
+                    $doubleseq=0;
+//                    printf("finding: %s<br>", $sequon);
+                    foreach(explode(" ", $sequon) as $n => $s)
+                    {
+//                        printf("finding %s in %s <br>", $s, $sequoff);
+                        if (ereg($s, $sequoff))
+                        $doubleseq++;
+                    }
+                    if ($doubleseq>0)
+                    {
+                        printf("<li style='color:%s'>%s: You have selected sequences (%s) as On AND Off",
+                               $color["ERROR"], "ERROR", $doubleseq);
+                        $numerr=$numerr+1;
+                    }
                     if ($numrealkeys>1)
                     {
                         printf("<li style='color:%s'>%s: You have selected more than one (%s) on source",
-                               $color["ERROR"], "ERROR", $numrealkeays);
+                               $color["ERROR"], "ERROR", $numrealkeys);
+                        $numerr=$numerr+1;
+                    }
+                    if ($numobskeys>1)
+                    {
+                        printf("<li style='color:%s'>%s: You have selected more than one (%s) different observation modes for your on sequences",
+                               $color["ERROR"], "ERROR", $numobskeys);
                         $numerr=$numerr+1;
                     }
@@ -893,7 +921,7 @@
     if (!isset($_SERVER['PHP_AUTH_USER']) || crypt($_SERVER['PHP_AUTH_PW'], $sitepw)!=$sitepw || $_SERVER['PHP_AUTH_USER']!=$siteuser)
     {
-        header('WWW-Authenticate: Basic realm="My Realm"');
+        header('WWW-Authenticate: Basic realm="Build Datasets"');
         header('HTTP/1.0 401 Unauthorized');
-        echo 'Text to send if user hits Cancel button';
+        echo 'Cancelled.';
         return;
     }
