Changeset 8235 for trunk/MagicSoft/Mars/datacenter/db/opticaldata.php
- Timestamp:
- 12/14/06 15:44:46 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.