Skip to main content

Proud to be part of LJMU,
in partnership with the Faulkes Telescope Project

 

 

0) { $numShow = $_n; } } if(array_key_exists('srt', $_REQUEST) && ($_REQUEST['srt'] != "")) { $orderBy = urldecode($_REQUEST['srt']); } if(array_key_exists('selusr', $_REQUEST) && ($_REQUEST['selusr'] != "")) { $selUser = urldecode($_REQUEST['selusr']); } if(array_key_exists('selobj', $_REQUEST) && ($_REQUEST['selobj'] != "")) { $selObj = urldecode($_REQUEST['selobj']); } if(array_key_exists('selprg', $_REQUEST) && ($_REQUEST['selprg'] != "")) { $selProg = urldecode($_REQUEST['selprg']); } if(array_key_exists('selstt', $_REQUEST) && ($_REQUEST['selstt'] != "")) { $selStat = urldecode($_REQUEST['selstt']); } // ==== Build the basic GOS MySQL query to get the list of results $q = "SELECT * FROM gos LEFT JOIN gosuser ON gos.id=gosuser.gos LEFT JOIN op_object ON op_object.objname = CONCAT(gos.id, '00') WHERE (1=1)"; if($selUser != '') $q = $q . " && (gosuser.username='".$selUser."')"; if($selObj != '') $q = $q . " && (op_object.object='".$selObj."')"; if($selProg != '') $q = $q . " && (gos.obsprogid='".$selProg."')"; if($selStat != '') $q = $q . " && (gos.status LIKE('%".$selStat."%'))"; if($orderBy != '') $q = $q . " ORDER BY ".$orderBy; if($numShow != '') $q = $q . " LIMIT ".$numShow; // ==== Run the Query and count the number of results $res = mysqli_query($link, $q); $nres = mysqli_num_rows($res); // ==== Print out and summary of the select criteria etc print "

"; print "Showing up to ".$numShow." observing programmes ordered by ".$orderBy."."; if($selUser != '') print "
Selecting for Username ".$selUser."."; if($selObj != '') print "
Selecting for Object ".$selObj."."; if($selProg != '') print "
Selecting for Observing Programme ".$selProg."."; if($selStat != '') print "
Selecting for Status ".$selStat."."; // ---- If no results found, say so and provide a link to the default page if($nres == 0) { print "

No Results Found. You may want to try the default list."; } else { // ---- Otherwise, prepare a large table... $url = "/manage/obs?n=".$numShow."&selusr=".urlencode($selUser)."&selobj=".urlencode($selObj)."&selprg=".urlencode($selProg)."&selstt=".urlencode($selStat); print "

\n"; // And populate it $url = "/manage/obs?n=".$numShow; while($gos = mysqli_fetch_assoc($res)) { print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; } print "\n
Go Obs ID User Name Status Programme Object Submitted Start Time Try For Observed
".$gos['id']."".$gos['username']."".$gos['status']."".$gos['obsprogid']."".$gos['object']."".$gos['tsubmit']."".$gos['tstart'].""; switch($gos['tlen']) { case 1: print "A Day"; break; case 2: print "A Week"; break; case 3: print "A Month"; break; case 4: print "A Term"; break; case 5: print "A Year"; break; case 0: default: print "Unknown"; break; } print "".$gos['lastmod']."
\n"; print "

Notes

  • A maximum of ".$numShow." results will be shown. If this is too few, let Andy know.
  • Links within the table can be used to select a new list for just that thing (e.g. just a single user or object etc)
  • The various columns are:
    • GOS ID: The ID of the observations of set of observation (GOS stands for Go Observing Selection)
    • Username: The username who requested the GOS.
    • Status: The current status of the GOS.
      • UNDEFINED : Not started yet or being filled-in
      • SUBMIT : Ready for (or being submitted)
      • VALID : The submission has been validated
      • VALIDFAIL : The submission failed its validation
      • REQUESTED: Everything is ready, but the observation has not yet been scheduled as the 'Start Time' has not been reached
      • SCHEDULE : Observations have been scheduled but not observed
      • PARTOBS : One or more (but not all) observations have been carried out
      • TIMEOUT : The selected 'Try For' has finished before all (or any) of the observations were completed
      • OBSERVED : All observations have been carried out
      • DOWNLOAD : All observations ready for download
      • ERROR : A Major error has occured
    • Programme.: The ID of the Observing Programme selected
    • Object: The ID of the object to be observed. Where a programme has more than one object, only the first is given
    • Submitted: The date and time when the user actually submitted
    • Start Time: The nominal date/time when the observations will be scheduled. This can be in the future if the user chooses it to be.
    • 'Try For': Roughly how long to leave the observations in the telescope schedule before giving up.
    • Last Modified: When there was last a change to the GOS.
\n"; } ?>
Default Page