source: trunk/htdocs/index.php @ 214

Last change on this file since 214 was 214, checked in by MatthewWhiting, 16 years ago

Updated the users guide.

File size: 23.1 KB
Line 
1<?php   session_start(); ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html>
3<?php
4 // index.php
5 // Matthew Whiting Nov 2007
6 // From the original by Albert Teoh
7 //
8 // The opening page for the ATNF Pulsar Data Archive
9 // system. Used to search for observation archive
10 // files.
11 
12 // BEGIN Javascript for expansion blocks
13 // Thanks to:
14 // http://assn9.blogspot.com/
15 // Douglas Bowman
16 // URL:      www.stopdesign.com
17 // Used in: http://www.bloggerforum.com/modules/newbb/viewtopic.php?topic_id=8725&forum=6
18 // Date:     26 Feb 2004
19 //
20
21?>
22<head>
23<link rel="stylesheet" type="text/css" href="styles/opal.css" />
24<link rel="stylesheet" type="text/css" href="styles/style.css" />
25<link rel="stylesheet" type="text/css" href="styles/query.css" />
26<link rel="stylesheet" type="text/css" href="styles/results.css" />
27<link rel="stylesheet" type="text/css" href="styles/atnf.css" />
28<meta http-equiv="Content-Type" content="text/html; charset=iso-8759-1" />
29<meta name="DC.Creator" lang="en" content="personalName=Teoh,Albert" />
30<meta name="ATNF.Maintainer" content="contactName=Webmaster,the" />
31<meta name="DC.Title.alt" lang="en" content="" />
32<meta name="DC.Subject" lang="en" content="pulsar" />
33<meta name="DC.Description" lang="en" content="Searches the data archives at the ATNF" />
34<meta name="DC.Date.created" scheme="ISO8601" content="2002-12-12" />
35<meta name="ATNF.Site" content="Marsfield" />
36<meta name="ATNF.AccessPermission" content="Public" />
37    <meta name="ATNF.MetaVersion" content="1.0" />
38   
39    <script type="text/javascript" src="scripts/atnf-oo-utils.js"></script>
40    <script type="text/javascript" src="scripts/atnf-string-utils.js"></script>
41    <script type="text/javascript" src="scripts/atnf-dom-utils.js"></script>
42    <script type="text/javascript" src="scripts/atnf-validation.js"></script>
43    <script type="text/javascript" src="scripts/atoa-query.js"></script>
44
45<!--
46   <script type="text/javascript" src="scripts/atnf-dom-utils.js"></script>
47   <script type="text/javascript" src="scripts/atoa-query.js"></script>
48   <script type="text/javascript" src="scripts/process.js"></script>
49-->
50
51
52<script type="text/javascript" language="javascript1.2">
53
54function toggleInstructions()
55{
56  var div = document.getElementById( "divInstructions" ) ;
57  if ( div.style.display == 'none' || div.style.display == '' )
58    div.style.display = "block" ;
59  else div.style.display = "none" ;
60}
61
62function togglecomments (id1,id2) {
63
64                var obj1 = document.getElementById(id1);
65                var obj2 = document.getElementById(id2);
66                (obj1.className=="commentshown") ? obj1.className="commenthidden" : obj1.className="commentshown";
67                (obj1.className=="commentshown") ? obj2.innerHTML="<< Hide" : obj2.innerHTML="Show all >>";
68
69}
70
71function checkAll(objName, FormName, FieldName ) {
72
73        var obj = document.getElementsByName(objName);
74        var CheckValue = obj[0].checked;
75
76        if(!document.forms[FormName])
77                return;
78        var objCheckBoxes = document.forms[FormName].elements[FieldName];
79        if(!objCheckBoxes)
80                return;
81        var countCheckBoxes = objCheckBoxes.length;
82        if(!countCheckBoxes)
83                objCheckBoxes.checked = CheckValue;
84        else
85                // set the check value for all check boxes
86                for(var i = 0; i < countCheckBoxes; i++)
87                        objCheckBoxes[i].checked = CheckValue;
88}
89
90function updateSelectAll(objId, allId) {
91        var obj = document.getElementById(objId);
92        var allCheckbox = document.getElementById(allId);       
93       
94        if (!objId.checked && allCheckbox.checked) {
95                allCheckbox.checked = false;
96        }
97               
98               
99}
100</script>
101
102</head>
103
104<title>ATNF Pulsar Data Archive Home</title>
105
106<!-- Start Content -->
107<?php
108       
109include_once("constants.php");
110include_once("security.php");
111include_once("database.php");
112include_once("date.php");
113
114$now_day = date("j");
115$now_month = date("n");
116$now_year = date("Y");
117
118$all_params_id = "all_params";
119$all_others_id = "all_others";
120
121$link = db_connect();
122
123if(!$link){
124  include_once("header.html");
125
126  echo"<body class=\"atoa\">\n\n";
127 
128  echo "<h1>ATNF Pulsar Data Archive</h1>\n\n";
129
130  echo "<b>\n The Archive is currently down for maintenance. <br>\n Please call again soon!. <br>\n</b>\n\n";
131
132  include_once("footer.html");
133 
134  echo "\n</body>\n</html>\n";
135 
136  exit;
137 }
138
139//$link = db_connect_admin();
140//loadNewTables();
141//////////////////////////////
142// Initialise error messages
143//
144
145$date_error = "";
146
147///////////////////////////////////
148// Find out the first and last dates
149//$query = "select min(mjd), max(mjd) from ".OBSERVATIONS_TABLE;
150$query = "select min(t.mjd), max(t.mjd) from ((select mjd from ".S70_TABLE.") union (select mjd from ".OBSERVATIONS_TABLE.")) as t";
151$result = mysql_query($query) or die('Query 1 failed: ' . mysql_error());
152
153$row = mysql_fetch_array($result);
154
155$min_mjd = $row[0];
156$max_mjd = $row[1];
157
158// Convert from MJD to JD
159$min_jd = $min_mjd + 2400000.5;
160$max_jd = $max_mjd + 2400000.5;
161
162// convert the mjd to a date
163$min_jd = floor($min_jd);
164$max_jd = ceil($max_jd);
165
166$min_unix = jdtounix($min_jd);
167$max_unix = jdtounix($max_jd);
168$min_date_text = date("j F Y", $min_unix);
169$max_date_text = date("j F Y", $max_unix);
170$minDay   = date("j",$min_unix);
171$minMonth = date("n",$min_unix);
172$minYear  = date("Y",$min_unix);
173$maxDay   = date("j",$max_unix);
174$maxMonth = date("n",$max_unix);
175$maxYear  = date("Y",$max_unix);
176
177// proprietry date limit
178$today_mjd = cal_to_jd ( CAL_GREGORIAN, date("n"), date("j"), date("Y") ) - 2400000.5;
179$prop_mjd = $today_mjd - PROPRIETRY_PERIOD_DAY;
180$prop_unix = jdtounix($prop_mjd+2400000.5);
181$prop_date_text = date("j F Y", $prop_unix);
182
183
184// Free resultset
185mysql_free_result($result);
186
187// Clear any old form inputs in session cache
188init($link);
189
190//////////////////////////////////////////////
191// Get the field names to fill form checkboxes
192
193$query = "SHOW COLUMNS FROM ".OBSERVATIONS_TABLE;
194$result = mysql_query($query) or die ('Query 2 failed: ' . mysql_error());
195
196$fields = array();
197if (mysql_num_rows($result)) {
198        while($row = mysql_fetch_assoc($result)) {
199          if(($row['Field'] != "data_loc") && ($row['Field'] != "file_size_bytes"))
200            array_push($fields, $row);
201        }
202}
203
204$field_names = Array("filename" => "Filename",
205                     "src_name" => "Source Name",
206                     "project_id" => "Project ID",
207                     "raj" => "RA (J2000, hh:mm:ss)",
208                     "decj" => "Dec (J2000, dd:mm:ss)",
209                     "data_type" => "Data Type",
210                     "obsfreq" => "Frequency",
211                     "bw" => "Bandwidth",
212                     "scanlen" => "Scan Length",
213                     "date" => "UT Date",
214                     "ut" => "UT Time",
215                     "MJD" => "MJD",
216                     "rajd" => "RA (J2000, degs)",
217                     "decjd" => "Dec (J2000, degs)",
218                     "gl" => "Gal. Long. (degs)",
219                     "gb" => "Gal. Lat. (degs)",
220                     "BMAJ" => "Beamsize: BMAJ",
221                     "BMIN" => "Beamsize: BMIN",
222                     "BPA" => "Beam: BPA",
223                     "dm" => "D.M.",
224                     "period" => "Period",
225                     "nchan" => "# channels",
226                     "npol" => "# polarisations",
227                     "nbin" => "# bins",
228                     "nsub" => "# subintegrations",
229                     "tsamp" => "Sample time",
230                     "nbits" => "# bits per sample",
231                     "nbeam" => "# beams",
232                     "cnfg" => "Configuration",
233                     "inst" => "Instrument",
234                     "rcvr" => "Receiver",
235                     "hdrver" => "PSRFITS version",
236                     "survey" => "Survey name",
237                     "telescope" => "Telescope",
238                     "site" => "Site ID",
239                     "obsrvr" => "Observer ID" );
240
241///////////////////////////////////////////////
242// Get the data types available in the database
243//
244
245//$query = "select distinct data_type from " . OBSERVATIONS_TABLE . " order by data_type";
246$query = "(select distinct data_type from ".OBSERVATIONS_TABLE.") union (select distinct data_type from ".S70_TABLE.")";
247$result = mysql_query($query) or die ('Query 3 failed: ' . mysql_error());
248
249$data_types = array();
250
251if (mysql_num_rows($result)) {
252        while($row = mysql_fetch_array($result, MYSQL_NUM)) {
253                array_push($data_types, $row[0]);
254        }
255}
256
257///////////////////////////////////////////////
258// If the user clicked on the logout button
259if (isset($HTTP_GET_VARS['command'])) {
260        $command = $HTTP_GET_VARS['command'];
261        if ($command == 'logout') {
262                //unset($_SESSION['auth_code']);
263                //unset($_SESSION['username']);
264                $_SESSION = array();
265        }
266}
267
268// If the user hasn't logged in before or if the previous
269// session's authentication wasn't successful
270// Then use the submitted username and password
271if (!isset($_SESSION['auth_code']) || $_SESSION['auth_code'] != OK) {
272  //    $username = $HTTP_POST_VARS["username"];
273//      $password = $HTTP_POST_VARS["password"];
274  $username = $HTTP_POST_VARS["opalEmail"];
275  $password = $HTTP_POST_VARS["opalPassword"];
276  $type = $HTTP_POST_VARS['authenticateType'];
277  if($type == "anon"){
278    $username = $HTTP_POST_VARS["email"];
279    $auth_code = OK;
280  }
281  else{
282    $auth_code = authenticate($username, $password);
283    //$auth_code = newAuthenticate();
284  }
285}
286else {
287        $auth_code = $_SESSION['auth_code'];
288        $username = $_SESSION['username'];
289}
290
291//echo "auth_code = $auth_code<br>\n";
292
293///////////////////////////////////////////////////////////////
294// Set the new maximum search range if not an atnf staff member
295//
296
297// if (!atnf_staff($username)) {
298//      $max_cal_assoc['day'] = date("j");
299//      $max_cal_assoc['month'] = date("n");
300//      $max_cal_assoc['year'] = date("Y")-2;
301       
302//      echo "$username not atnf<br>\n";
303// }
304
305include_once("header.html");
306
307
308// Initial state where no username or password supplied OR bad login state
309if ($auth_code != OK) { ?>
310        <body class="front_page">
311
312
313<div class="bodycontents">
314
315<h1>The ATNF Pulsar Data Archive</h1>
316
317<p>The ATNF Pulsar Data Archive provides access to pulsar observations
318made with the Parkes radio Telescope. Data older than <b>
319<?php echo PROPRIETRY_PERIOD_MONTH ?> months</b> is
320publicly available, and can be accessed by simply providing your email
321address. More recent data is proprietry, and can only be accessed by
322those who were involved in the proposal. We plan to do this via the
323<a href="http://opal.atnf.csiro.au">OPAL system</a>, but this is
324currently not enabled. In the interim, those who have previously
325obtained a login for the Data Archive can use that option below
326(making sure to check the "Data Archive login" button!). </p>
327
328<p>A <a href="pulsar_archive_guide.html">Users Guide</a> to the archive is available.</p>
329
330<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
331<table width="700" style="border: 0px;">
332
333  <tr>
334    <td><input type="radio" name="authenticateType" checked value="anon">Non-proprietry access<br>
335      <table class="login" width="500" style="border: 0px;">
336        <tr>
337          <td class="form_field">Email: </td>
338          <td><input type="text" name="email"></td>
339        </tr>
340      </table>
341      <br>
342    </td>
343  </tr>
344 
345  <tr>
346    <td><input type="radio" name="authenticateType" value="opal">Data Archive login<br>
347      <table class="login" width="500" style="border: 0px;">
348        <tr><td class="form_field">Email: </td><td><input type="text" name="opalEmail"></td></tr>
349        <tr><td class="form_field">Password: </td><td><input type="password" name="opalPassword"></td></tr>
350      </table>
351      <br>
352    </td>
353  </tr>
354 
355  <tr>
356    <td><input type="submit" value="Login"><input type="reset" value="Reset"></td>
357  </tr>
358</table>
359
360</form>
361
362
363<?php } else {
364        $_SESSION['username'] = $username;
365        $_SESSION['auth_code'] = $auth_code;
366        $_SESSION['logintype'] = $HTTP_POST_VARS['authenticateType'];
367
368        $actions = $HTTP_GET_VARS['actions'];
369       
370        if ($actions == "new_query") {
371                init();
372        }
373        else if ($actions == "error") {
374          //            $date_error = "You are only authorised to access data > 18 months old";
375        }
376?>
377<body class="atoa">
378    <div class="bodycontents">
379
380    <h1>ATNF Pulsar Data Archive</h1>
381
382    <p>This archive provides access to pulsar observations taken at the Parkes radio telescope between the dates of <b><?php echo $min_date_text."</b> and <b>".$max_date_text?></b>.</p>
383   <?php
384   if (!atnf_staff($_SESSION['username'])) {
385     //if($_SESSION['logintype']=="anon") {
386     echo "<p>Note that you do not have access to data more recent than <b>".$prop_date_text."</b>.</p>\n";
387   }?>
388<p>See the Users Guide link for more details. </p>
389   
390    <table width="700" style="border: 0px;">
391    <tr align="center">
392    <td>
393    <a class="top_menu" href="<?php echo $PHP_SELF; ?>?command=logout">Logout</a>
394    <!--a href="login?_action=logout">Logout</a-->
395
396    </td>
397        <td>
398        <a class="top_menu" href="change_password.html?prev_page=<?php echo urlencode("index.php"); ?>">Change Password</a>
399        </td>
400        <td size="30">
401        &nbsp;
402    </td>
403        <td>
404        <a href="#" onClick="toggleInstructions();return false;">Instructions</a>
405        </td>
406        <td size="30">
407        &nbsp;
408    </td>
409        <td>
410        <a href="pulsar_archive_guide.html">Users Guide</a>
411        </td>
412        </tr>
413
414        </table>
415
416        <div id="divInstructions" style="display:none" >
417          <dl class="top">
418            <h2>Instructions</h2>
419        <i>To hide, click "Instructions" again. </i>
420              <dt> Display Parameters </dt>
421                <dd> Check the fields you want shown in the results table. Suggested columns are checked by default</dd>
422                <dd> The results can be ordered by one of the parameters in the "Order By" drop-down list</dd>
423              <dt> Coordinates </dt>
424                <dd> The sky position can be specified by a Pulsar name or a RA/Dec position.
425                      The pulsar name takes precedence. The search radius must be given. </dd>
426              <dt> Filter Options </dt>
427                <dd> Results can be limited to observations just from a particular project - use the Project ID box</dd>
428                <dd> The date range can be specified - the defaults are the range of dates in the archive.</dd>
429                <dd> Either timing data (particular pulsar) or survey data can be specified. Or both! </dd>
430                <dd> The type of instrument can be specified. Default is any type.</dd>
431                <dd> More than one frequency band can be specified.
432              <dt> Display Other </dt>
433        <dd> Calibraton observations taken within a given time period of the queried observations can also be shown and downloaded. Check the box to do so, and specify the time interval. </dd>
434            </dl>
435        </div>
436
437
438
439<!--<table class="noborder">
440<tr><td><a class="top_menu" href="<?php echo $PHP_SELF; ?>?command=logout">Logout</a> | <a class="top_menu" href="change_password.html?prev_page=<?php echo urlencode("index.php"); ?>">Change Password</a></td>
441</tr>
442</table>-->
443
444
445<form action="query.php" method="GET" name="data_archive_form" id="data_archive_form">
446<input type="hidden" name="state" value="results">
447   
448
449   
450   
451<table class="noborder" cellpadding=0>
452
453    <tr><td colspan=3>
454        <br>
455        <center><input type="submit" value="submit" name="submit_button" style="float: center;"> &nbsp;
456        <input type="reset" value="reset" name="reset_button" style="float: center;"></center>
457        <br>
458    </td></tr>
459   
460    <tr>
461       
462<!-- **************************** -->
463    <td valign="top" class="form_field" rowspan="1">
464
465    <fieldset>
466                <legend>DISPLAY PARAMETERS</legend>
467                <input type="checkbox" name="<?php echo $all_params_id; ?>" id="<?php echo $all_params_id; ?>" onClick="checkAll('<?php echo $all_params_id; ?>', 'data_archive_form', 'params[]')" >Select all<br>
468                        <!--font size="-1"><a href="javascript:togglecomments('params', 'toggler1')" id="toggler1">Show all >></a></font--><br>
469                        <!span class="commenthidden" id="params">
470                        <div id="list">
471                                <?php
472                                $def_fields = Array( "filename", "src_name", "project_id", "raj", "decj",
473                                                     "data_type", "obsfreq", "bw", "scanlen", "date", "ut" );
474
475                                foreach ($fields as $field) {
476                                  echo "<input
477onClick=\"updateSelectAll('".$field['Field']."', '$all_params_id')\" type=\"checkbox\" name=\"params[]\" value=\"".$field['Field']."\" id=\"".$field['Field']."\"";
478                                  if( in_array( $field['Field'], $def_fields ) )
479                                    echo ' checked="true"';
480                                  echo " >".$field_names[$field['Field']]."<br>\n";
481                                }
482                                ?>
483                        </div>
484                        </span>
485        </fieldset>
486                       
487        </td>
488
489<!-- **************************** -->
490
491        <td class="form_field" height="10%" rowspan="1">
492        <!-- Position Options -->
493
494        <table cellspacing=0 cellpadding=0 style="border: 0px;">
495        <tr><td>
496        <fieldset id="flsPosition">
497                <legend>POSITION REQUIREMENTS</legend>
498               
499                <!-- Pulsar Name -->
500                <fieldset>
501                <legend>Pulsar Name</legend>
502                <input type="text" name="pulsar_name" size="20">
503                <br>
504                <p>Note that search-by-name takes precedence over search-by-RA/Dec.</p>
505                </fieldset>
506
507                <br>
508               
509                <fieldset>
510                <legend>Right Ascension (J2000)</legend>
511               
512                <input type="text" id="txtRAHour" name="rahour" size="3" tabindex="1" />
513                <label for="txtRAHour" class="coordinate"><abbr title="hours"><sup>h</sup></abbr></label>
514                                             
515                <input type="text" id="txtRAMinute" name="ramin" size="3" tabindex="1" />
516                <label for="txtRAMinute" class="coordinate"><abbr title="minutes"><sup>m</sup></abbr></label>
517               
518                <input type="text" id="txtRASecond" name="rasec" size="6" tabindex="1" />
519                <label for="txtRASecond" class="coordinate"><abbr title="seconds"><sup>s</sup></abbr></label>
520                </fieldset>
521       
522                <fieldset>
523                <legend>Declination (J2000)</legend>
524               
525                <input type="text" id="txtDecDegree" name="decdeg" size="3" tabindex="1" />
526                <label for="txtDecDegree" class="coordinate"><abbr title="degrees">&deg;</abbr></label>
527               
528                <input type="text" id="txtDecMinute" name="decmin" size="3" tabindex="1" />
529                <label for="txtDecMinute" class="coordinate"><abbr title="minutes">&prime;</abbr></label>
530               
531                <input type="text" id="txtDecSecond" name="decsec" size="6" tabindex="1" />
532                <label for="txtDecSecond" class="coordinate"><abbr title="seconds">&Prime;</abbr></label>
533                </fieldset>
534
535                <br>
536                <br>
537        </fieldset>
538
539        <fieldset id="flsSearchRadius">
540        <legend>SEARCH WINDOW [arcmin]</legend>
541        <input type="text" id="txtSearchWindow" name="radius" size="20" tabindex="1" value="60"/>
542        </fieldset>
543
544<br>
545        <fieldset id="flsProjectID">
546        <legend>PROJECT ID</legend>
547        <input type="text" id="txtSearchWindow" name="projID" size="20" tabindex="1" value=""/>
548        </fieldset>
549
550        </td></tr>
551</table>
552</td>
553
554<!-- **************************** -->
555
556        <td class="form_field" height="10%">
557        <!-- Filter Options -->
558        <table cellspacing=0 cellpadding=0 style="border: 0px;">
559        <tr><td>
560        <fieldset id="flsObsDate">
561                               
562                <legend>FILTER OPTIONS</legend>
563<br>
564
565                <!-- Date range -->
566                <fieldset>
567                        <legend>Date Range</legend>
568                       
569                          From:                                                                       
570                            <select name="from_day">
571                            <?php
572                            for ($i = 1; $i <= 31; $i++) {
573                              echo "\t\t\t<option";
574                              if ($i == $minDay) { echo " selected"; }
575                              echo " value=\"$i\">$i</option>\n";
576                            }
577                                ?>
578                            </select>
579                        <select name="from_month">
580                                <?php
581                                $monthlist = cal_info(0);
582                                for ($i = 1; $i <= 12; $i++) {
583                                  echo "\t\t\t<option";
584                                  $month = $monthlist[abbrevmonths][$i];
585                                  if ($i == $minMonth) { echo " selected"; }
586                                  echo " value=\"$i\">$month</option>\n";
587                                }
588                                ?>
589                                  </select>
590<!-- <input type="text" size="4" name="from_year" value="<?php echo $min_cal_assoc['year']; ?>"> -->
591                      <select name="from_year">
592                                      <?php
593                                      for ($i = $minYear; $i <= $maxYear; $i++) {
594                                        echo "\t\t\t<option";
595                                        if ($i == $minYear) { echo " selected"; }
596                                  echo " value=\"$i\">$i</option>\n";
597                                }
598                                ?>
599                            </select>
600                        <?php echo "<font size=\"-1\" color=\"red\">$date_error</font>" ?>
601                                &nbsp To:
602                        <select name="to_day">
603                                <?php
604                                        for ($i = 1; $i <= 31; $i++) {
605                                          echo "\t\t\t<option";
606                                          if ($i == $maxDay) { echo " selected"; }
607                                          echo " value=\"$i\">$i</option>\n";
608                                        }
609                                ?>
610                        </select>
611                        <select name="to_month">
612                                <?php
613                            for ($i = 1; $i <= 12; $i++) {
614                              echo "\t\t\t<option";
615                              $month = $monthlist[abbrevmonths][$i];
616                              if ($i == $maxMonth) { echo " selected"; }
617                              echo " value=\"$i\">$month</option>\n";
618                            }
619                                ?>
620                        </select>
621<!-- <input type="text" size="4" name="to_year" value="<?php echo $max_cal_assoc['year']; ?>"> -->
622                      <select name="to_year">
623                                      <?php
624                                      for ($i = $minYear; $i <= $maxYear; $i++) {
625                                        echo "\t\t\t<option";
626                                        if ($i == $maxYear) { echo " selected"; }
627                                  echo " value=\"$i\">$i</option>\n";
628                                }
629                                ?>
630                            </select>
631                </fieldset>
632 
633<br>
634                <!-- Obs Mode -->
635                <fieldset>
636                        <legend>Obs Mode</legend>
637
638                        <select name="obs_mode" onchange="ObsModeChanged()" id="ObsModeList">
639                                <option value="any"> Any </option>
640                                <option value="timing"> Only timing data </option>
641                                <option value="search"> Only search data </option>
642                        </select>
643                </fieldset>
644
645                <!-- Data Type -->
646                <fieldset>
647                        <legend>Data Type</legend>
648
649                        <select name="data_type">
650                                <option value="" selected> Any </option>
651                                <?php
652                                foreach ($data_types as $data_type) {
653                                        echo "
654                                        <option value=\"$data_type\"> $data_type </option>";
655                                }
656                                ?>
657                        </select>
658                </fieldset>     
659
660                <!-- Frequency band -->
661                <fieldset>
662                        <legend>Band Name</legend>
663                            <select id="selBand" name="bandname[]" multiple="multiple" size="5">
664                            <option value="anyBand" selected="selected">Any</option>
665                            <option value="70cm"   >70cm (~0.44 GHz)</option>     
666                            <option value="50cm"   >50cm (~0.66 GHz)</option>     
667                            <option value="20cm">20/18cm (1.2-1.8 GHz)</option>     
668                            <option value="13cm"   >13cm (2.0-2.5 GHz)</option>     
669                            <option value="10cm"   >10cm (2.6-3.6 GHz)</option>     
670                            <option value="6cm"    >6cm (4.5-5.1 GHz)</option>     
671                            <option value="5cm"    >5cm (5.9-6.8 GHz)</option>     
672                            <option value="3cm"    >3cm (8.1-8.6 GHz)</option>     
673                            <option value="1.3cm"  >1.3cm (21.-24. GHz)</option>     
674          </select>
675     </fieldset>
676
677       </fieldset>
678        </td></tr>
679        <tr><td>
680                <fieldset>
681                    <legend>ORDER RESULTS BY</legend>
682                            <table cellspacing="0px" cellpadding="0px" style="border: 0px;">
683                            <tr><td>
684                      <select name="orderBy" id="OrderByList">
685                            <option selected value="distance">Distance
686                            <option value="date">Date
687                            <option value="obsfreq">Frequency
688                            <option value="filename">Filename
689                      </select>
690                            </td><td>
691                            &nbsp;<input type="radio" name="orderDir" id="orderDirectionSel" checked value="asc">Ascending
692                            <br>
693                            &nbsp;<input type="radio" name="orderDir" id="orderDirectionSel" value="desc">Descending
694                            </td></tr>
695                            </table>
696                    <br>
697                </fieldset>
698        </td></tr>
699        <tr><td>
700                <fieldset>
701                    <legend>DISPLAY OTHER DATA</legend>
702                               
703                    <input type="checkbox" name="cals" value="cals" id="cals" checked="true" />
704                                Display Cals taken within
705                    <input type="text" name="cals_within_mins" value="30" maxlength="5" size="3"/>
706                                mins of Observations
707                    <br>
708                                               
709                </fieldset>
710        </td></tr>
711        </table>
712        <br>
713        </td>
714        </tr>   
715</table>
716
717
718</form>
719<div style="min-height: 20px; max-height: 1000px;"> </div>
720<?php
721}?>
722</div>
723
724<div id=\"footer\">
725<?php   include "footer.html"; ?>
726</div>
727
728</body>
729
730</html>
731
732
733<?php //////////// Function definitions ///////////////
734
735
736// Initialise the input form variables. If the "New query" button is clicked
737// no argument is passed to init(), hence the need for a default NULL value
738// because there is no need for updating user access statistics
739function init($link=NULL) {
740
741        if ($link) {
742                // Update the users table
743                updateUsersTable($link);
744        }
745       
746        unset($_SESSION['cals']); // The result set of cals
747        unset($_SESSION['obs']); // The result set of observations
748        //unset($_SESSION['cart_items']); // The result set of observations
749}
750
751mysql_close($link);
752
753?>
Note: See TracBrowser for help on using the repository browser.