Changeset 8235 for trunk/MagicSoft/Mars
- Timestamp:
- 12/14/06 15:44:46 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/db
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/magicdefs.php
r8200 r8235 81 81 "fObjectName" => CheckWhere("fObjectKEY", $_GET), 82 82 "fStatusName" => CheckWhere("fStatusKEY", $_GET), 83 "fTelescopeName" => CheckWhere("fTelescopeKEY", $_GET), 84 "fBandName" => CheckWhere("fBandKEY", $_GET), 83 85 ); 84 86 … … 104 106 "fObjectName" => CheckGroup("fObjectKEY", $_GET), 105 107 "fStatusName" => CheckGroup("fStatusKEY", $_GET), 108 "fBandName" => CheckGroup("fBandKEY", $_GET), 109 "fTelescopeName" => CheckGroup("fTelescopeKEY", $_GET), 106 110 ); 107 111 … … 318 322 "fInstrumentalMagErr" => "Instr.Mag.Err.", 319 323 "fStatusName" => "StatusCode", 324 "fTelescopeName" => "Telescope", 325 "fBandName" => "Band", 320 326 // "COUNT(*)" => "# Runs", 321 327 // "COUNT(*)" => "Sequence", … … 625 631 "fObjectName" => " LEFT JOIN Object ON " . $fromtable . ".fObjectKEY=Object.fObjectKEY ", 626 632 "fStatusName" => " LEFT JOIN Status ON " . $fromtable . ".fStatusKEY=Status.fStatusKEY ", 633 "fBandName" => " LEFT JOIN Band ON " . $fromtable . ".fBandKEY=Band.fBandKEY ", 634 "fTelescopeName" => " LEFT JOIN Telescope ON " . $fromtable . ".fTelescopeKEY=Telescope.fTelescopeKEY ", 627 635 ); 628 636 -
trunk/MagicSoft/Mars/datacenter/db/opticaldata.php
r8180 r8235 133 133 134 134 if (empty($_GET["fFitsFileName"])) 135 $_GET["fFitsFileName"]= $first?"On":"";135 $_GET["fFitsFileName"]="Off"; 136 136 137 137 if (empty($_GET["fObjectName"])) … … 139 139 140 140 if (empty($_GET["fStatusName"])) 141 $_GET["fStatusName"]=$first?"On":""; 141 $_GET["fStatusName"]="Off"; 142 143 if (empty($_GET["fBandName"])) 144 $_GET["fBandName"]=$first?"On":""; 145 146 if (empty($_GET["fTelescopeName"])) 147 $_GET["fTelescopeName"]=$first?"On":""; 142 148 143 149 // if (empty($_GET["fRunStop"])) … … 166 172 printf(" </tr>\n"); 167 173 printf(" </table>\n"); 168 174 printf(" <p>\n"); 169 175 170 176 // pull down boxes … … 172 178 printf(" <table>\n"); 173 179 printf(" <tr><td>\n"); 174 PrintPullDown($host, $user, $pw, $db, " FitsFile", "fFitsFileName", "fFitsFileKEY", "Fits File");180 PrintPullDown($host, $user, $pw, $db, "Telescope", "fTelescopeName", "fTelescopeKEY", "Telescope"); 175 181 printf(" </td><td>\n"); 176 182 PrintPullDown($host, $user, $pw, $db, "Object", "fObjectName", "fObjectKEY", "Object Name"); 183 printf(" </td><td>\n"); 184 PrintPullDown($host, $user, $pw, $db, "Band", "fBandName", "fBandKEY", "Band"); 185 printf(" </td></tr><tr><td>\n"); 186 PrintPullDown($host, $user, $pw, $db, "FitsFile", "fFitsFileName", "fFitsFileKEY", "Fits File"); 177 187 printf(" </td><td>\n"); 178 188 PrintPullDown($host, $user, $pw, $db, "Status", "fStatusName", "fStatusKEY", "Status Code"); … … 259 269 ini_set("mysql.trace_mode", "On"); 260 270 271 $sitepw="\$1\$jfBkkHx1\$WmxNVaOWPCBC8asfKDfBZ/"; 272 $siteuser="optical"; 273 274 if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER']!=$siteuser) 275 { 276 header('WWW-Authenticate: Basic realm="Optical Data - Tuorla Observatory"'); 277 header('HTTP/1.0 401 Unauthorized'); 278 echo 'Action cancelled.'; 279 return; 280 } 281 else 282 { 283 // echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>"; 284 // echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your password.</p>"; 285 // printf("pw: %s", crypt($_SERVER['PHP_AUTH_PW'])); 286 if (crypt($_SERVER['PHP_AUTH_PW'], $sitepw)!=$sitepw || $_SERVER['PHP_AUTH_USER']!=$siteuser) 287 { 288 printf("<br>pw or user incorrect<br>"); 289 return; 290 } 291 } 292 261 293 if (!empty($_GET["fSendTxt"])) 262 294 {
Note:
See TracChangeset
for help on using the changeset viewer.