Changeset 7873 for trunk/MagicSoft/Mars/datacenter/db/findoffdata.php
- Timestamp:
- 08/15/06 14:39:31 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/findoffdata.php
r7637 r7873 127 127 $query0 = substr($query0, 0, -4); 128 128 129 /* 130 if (!empty($_GET["fDate"])) 131 $query0 .= " AND fRunStart REGEXP \"^" . $_GET["fDate"] . "\" "; 132 */ 129 if (!empty($_GET["fZDMin"]) && !empty($_GET["fZDMax"])) 130 $query0 .= "AND (fZenithDistanceMin > " . $_GET["fZDMin"] . " AND fZenithDistanceMax < " . $_GET["fZDMax"] . ") "; 133 131 134 132 if (!empty($_GET["fSourceN"])) … … 228 226 $_GET["fNumResults"]="50"; 229 227 230 if (empty($_GET["fLastUpdate"]))231 $_GET["fLastUpdate"]="Off";232 233 if (empty($_GET["fNumEvents"]))234 $_GET["fNumEvents"]="Off";235 236 228 if (empty($_GET["fRunStart"])) 237 229 $_GET["fRunStart"]=$first?"On":""; … … 240 232 $_GET["fRunTime/60"]=$first?"On":""; 241 233 242 if (empty($_GET["fSequenceLast"]))243 $_GET["fSequenceLast"]="Off";244 245 234 if (empty($_GET["fLinks"])) 246 235 $_GET["fLinks"]=$first?"On":""; 247 236 248 237 if (empty($_GET["fOff"])) 249 $_GET["fOff"]=$first?"On":" Off";238 $_GET["fOff"]=$first?"On":""; 250 239 251 240 if (empty($_GET["fOnlyOff"])) 252 241 $_GET["fOnlyOff"]=$first?"Off":""; 253 242 254 if (empty($_GET["fArrTimeLimitMean"]))255 $_GET["fArrTimeLimitMean"]="";256 257 if (empty($_GET["fArrTimeLimitRms"]))258 $_GET["fArrTimeLimitRms"]="";259 260 if (empty($_GET["fPedRmsInLimitMean"]))261 $_GET["fPedRmsInLimitMean"]="";262 263 if (empty($_GET["fPedRmsInLimitRms"]))264 $_GET["fPedRmsInLimitRms"]="";265 266 if (empty($_GET["fMuonRateLimitMean"]))267 $_GET["fMuonRateLimitMean"]="";268 269 if (empty($_GET["fMuonRateLimitRms"]))270 $_GET["fMuonRateLimitRms"]="";271 272 if (empty($_GET["fImgRateLimitMean"]))273 $_GET["fImgRateLimitMean"]="";274 275 if (empty($_GET["fImgRateLimitRms"]))276 $_GET["fImgRateLimitRms"]="";277 278 if (empty($_GET["fPSFLimitMean"]))279 $_GET["fPSFLimitMean"]="";280 281 if (empty($_GET["fPSFLimitRms"]))282 $_GET["fPSFLimitRms"]="";283 284 if (empty($_GET["fUnsInLimitMean"]))285 $_GET["fUnsInLimitMean"]="";286 287 if (empty($_GET["fZdMinLimitMean"]))288 $_GET["fZdMinLimitMean"]="";289 290 if (empty($_GET["fZdMaxLimitMean"]))291 $_GET["fZdMaxLimitMean"]="";292 293 if (empty($_GET["fAzimuthMin"]))294 $_GET["fAzimuthMin"]="Off";295 296 if (empty($_GET["fAzimuthMax"]))297 $_GET["fAzimuthMax"]="Off";298 299 243 if (empty($_GET["fZenithDistanceMin"])) 300 244 $_GET["fZenithDistanceMin"]=$first?"On":""; … … 306 250 $_GET["fSourceName"]="On"; 307 251 308 if (empty($_GET["fManuallyChangedName"]))309 $_GET["fManuallyChangedName"]="Off";310 311 252 if (empty($_GET["fLightConditionsName"])) 312 253 $_GET["fLightConditionsName"]=$first?"On":""; 313 254 314 if (empty($_GET["fDiscriminatorThresholdTableName"]))315 $_GET["fDiscriminatorThresholdTableName"]="Off";316 317 if (empty($_GET["fStar"]))318 $_GET["fStar"]="Off";319 320 255 if (empty($_GET["fStarStatus"])) 321 256 $_GET["fStarStatus"]=$first?"1":""; 322 257 323 if (empty($_GET["fUnreliableInner"]))324 $_GET["fUnreliableInner"]="Off";325 326 if (empty($_GET["fUnsuitableOuter"]))327 $_GET["fUnsuitableOuter"]="Off";328 329 if (empty($_GET["fUnreliableOuter"]))330 $_GET["fUnreliableOuter"]="Off";331 332 258 if (empty($_GET["fUnsuitableInner"])) 333 259 $_GET["fUnsuitableInner"]=$first?"On":""; 334 260 335 if (empty($_GET["fIsolatedInner"]))336 $_GET["fIsolatedInner"]="Off";337 338 if (empty($_GET["fIsolatedOuter"]))339 $_GET["fIsolatedOuter"]="Off";340 341 261 if (empty($_GET["fMeanPedRmsInner"])) 342 262 $_GET["fMeanPedRmsInner"]=$first?"On":""; 343 263 344 if (empty($_GET["fMeanPedRmsOuter"]))345 $_GET["fMeanPedRmsOuter"]="Off";346 347 if (empty($_GET["fIsolatedMaxCluster"]))348 $_GET["fIsolatedMaxCluster"]="Off";349 350 if (empty($_GET["fArrTimeMeanInner"]))351 $_GET["fArrTimeMeanInner"]="Off";352 353 if (empty($_GET["fArrTimeMeanOuter"]))354 $_GET["fArrTimeMeanOuter"]="Off";355 356 264 if (empty($_GET["fArrTimeRmsInner"])) 357 265 $_GET["fArrTimeRmsInner"]=$first?"On":""; 358 266 359 if (empty($_GET["fArrTimeRmsOuter"]))360 $_GET["fArrTimeRmsOuter"]="Off";361 362 267 if (empty($_GET["fConvFactorInner"])) 363 268 $_GET["fConvFactorInner"]=$first?"On":""; 364 269 365 if (empty($_GET["fConvFactorOuter"]))366 $_GET["fConvFactorOuter"]="Off";367 368 if (empty($_GET["fMeanNumberIslands"]))369 $_GET["fMeanNumberIslands"]="Off";370 371 270 if (empty($_GET["fPSF"])) 372 271 $_GET["fPSF"]=$first?"On":""; 373 272 374 if (empty($_GET["fRatio"]))375 $_GET["fRatio"]="Off";376 377 if (empty($_GET["fMuonNumber"]))378 $_GET["fMuonNumber"]="Off";379 380 273 if (empty($_GET["fEffOnTime"])) 381 274 $_GET["fEffOnTime"]=$first?"On":""; … … 388 281 389 282 if (empty($_GET["fInhomogeneity"])) 390 $_GET["fInhomogeneity"]="O ff";283 $_GET["fInhomogeneity"]="On"; 391 284 392 285 if (empty($_GET["fDataRate"])) 393 286 $_GET["fDataRate"]=$first?"On":""; 394 287 395 if (empty($_GET["fMaxHumidity"])) 396 $_GET["fMaxHumidity"]="Off"; 397 398 } 399 400 function PrintForm($_GET, $host, $user, $pw, $db, $limits, $rms, $alias) 288 InitFindOffData($_GET); 289 } 290 291 function PrintForm($_GET, $host, $user, $pw, $db, $limitsmean, $limitsmin, $limitsmax, $alias) 401 292 { 402 293 printf("<center>\n"); … … 404 295 405 296 printf(" <table>\n"); 406 printf(" <tr><td align='center'>\n"); 407 408 409 printf(" <table>\n"); 410 printf(" <tr>\n"); 411 412 CheckBox("fRunStart", "Start time"); 413 CheckBox("fSequenceLast", "Last run"); 414 CheckBox("fZenithDistanceMin", "Zd min"); 415 CheckBox("fZenithDistanceMax", "Zd max"); 416 417 printf(" </tr><tr>\n"); 418 419 CheckBox("fNumEvents", "Num of events"); 420 CheckBox("fRunTime/60", "Duration"); 421 CheckBox("fAzimuthMin", "Azimuth min"); 422 CheckBox("fAzimuthMax", "Azimuth max"); 423 // CheckBox("fLinks", "Links"); 424 /* 425 printf(" </tr></table>\n"); 297 printf(" <tr><td align='center' valign='top'>\n"); 298 299 PrintSequInfoMenu(); 426 300 printf(" <p>\n"); 427 printf(" <table>\n"); 428 printf(" <tr>\n"); 429 */ 430 431 printf(" </tr><tr>\n"); 432 433 CheckBox("fUnsuitableInner", "Unsuitable inner"); 434 CheckBox("fUnsuitableOuter", "Unsuitable outer"); 435 CheckBox("fUnreliableInner", "Unreliable inner"); 436 CheckBox("fUnreliableOuter", "Unreliable outer"); 437 438 printf(" </tr><tr>\n"); 439 440 CheckBox("fIsolatedInner", "Isolated inner"); 441 CheckBox("fIsolatedOuter", "Isolated outer"); 442 CheckBox("fIsolatedMaxCluster", "IsolatedMaxCl."); 443 CheckBox("fMaxHumidity", "MaxHumidity"); 444 445 printf(" </tr><tr>\n"); 446 447 CheckBox("fArrTimeMeanInner", "ArrTimeMean in"); 448 CheckBox("fArrTimeMeanOuter", "ArrTimeMean out"); 449 CheckBox("fArrTimeRmsInner", "ArrTimeRms in"); 450 CheckBox("fArrTimeRmsOuter", "ArrTimeRms out"); 451 452 printf(" </tr><tr>\n"); 453 454 CheckBox("fConvFactorInner", "Conv inner "); 455 CheckBox("fConvFactorOuter", "Conv outer "); 456 CheckBox("fMeanPedRmsInner", "MeanPedRms in"); 457 CheckBox("fMeanPedRmsOuter", "MeanPedRms out"); 458 459 /* 460 printf(" </tr></table>\n"); 301 PrintCalMenu(); 461 302 printf(" <p>\n"); 462 463 printf(" <table>\n"); 464 printf(" <tr>\n"); 465 */ 466 467 printf(" </tr><tr>\n"); 468 469 CheckBox("fMeanNumberIslands", "MeanNumIslands"); 470 CheckBox("fPSF", "PSF"); 471 CheckBox("fRatio", "Ratio"); 472 CheckBox("fMuonRate", "MuonRate"); 473 474 printf(" </tr><tr>\n"); 475 476 CheckBox("fMuonNumber", "MuonNumber"); 477 CheckBox("fEffOnTime", "EffOnTime"); 478 CheckBox("fEffOnTime/fRunTime", "RelOnTime"); 479 CheckBox("fDataRate", "CleanedEvtRate"); 480 481 printf(" </tr><tr>\n"); 482 483 CheckBox("fInhomogeneity", "Inhomogeneity"); 484 485 printf(" </tr>\n"); 486 printf(" </table>\n"); 303 PrintStarMenu(); 487 304 printf(" <p>\n"); 488 305 489 306 printf(" <table><tr><td>\n"); 490 491 307 PrintPullDown($host, $user, $pw, $db, "Source", "fSourceName", "fSourceKEY", "Source Name"); 492 308 printf(" </td><td>\n"); … … 498 314 printf(" </td><td>\n"); 499 315 PrintStatusMenu("fStar", "Star"); 500 501 316 printf("</td></tr> </table>\n"); 502 317 printf(" <p>\n"); 503 318 504 printf(" </td><td valign='top'>\n");505 506 printf(" <table>\n");507 printf(" <tr><th colspan='3'>Limits</th><tr>\n");508 printf(" <tr><td>Name </td><td> Mean </td><td> Rms </td></tr>\n");509 PrintLimitsMenu($limits, $rms, $alias);510 printf(" </td></tr></table>\n");511 512 printf(" </td></tr><tr><td colspan='2' align='center'>\n");513 514 printf(" <p>\n");515 516 319 printf(" <table>\n"); 517 printf(" <tr><td >\n");320 printf(" <tr><td colspan='3'>\n"); 518 321 519 322 if (empty($_GET["fStarStart"])) … … 529 332 printf("StarDone (yyyy-mm-dd) from <input name=\"fStarStart\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"%s\">\n", $starmin); 530 333 printf("to <input name=\"fStarStop\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"%s\"> \n", $starmax); 531 printf(" </td>\n"); 334 printf(" </td></tr><tr><td><br></td></tr><tr>\n"); 335 532 336 CheckBox("fLinks", "Links"); 533 337 CheckBox("fOff", "incl. offsources"); … … 536 340 printf(" </tr>\n"); 537 341 printf(" </table>\n"); 342 538 343 printf(" <p>\n"); 539 344 540 if (empty($_GET["fStartDate"])) 541 $timemin = GetMin("fRunStart", "Sequences", $host, $user, $pw, $db); 542 else 543 $timemin = $_GET["fStartDate"]; 544 545 if (empty($_GET["fStopDate"])) 546 $timemax = GetMax("fRunStart", "Sequences", $host, $user, $pw, $db); 547 else 548 $timemax = $_GET["fStopDate"]; 549 550 printf("Night (yyyy-mm-dd) from <input name=\"fStartDate\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"%s\">\n", $timemin); 551 printf("to <input name=\"fStopDate\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"%s\"> \n", $timemax); 552 553 if (empty($_GET["fRunMin"])) 554 $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 555 else 556 $min = $_GET["fRunMin"]; 557 558 if (empty($_GET["fRunMax"])) 559 $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 560 else 561 $max = $_GET["fRunMax"]; 562 563 /* 564 printf("Date (yyyy-mm-dd) <input name=\"fDate\" type=\"text\" size=\"10\" maxlength=\"10\" value=\""); 565 if (!empty($_GET["fDate"])) 566 printf("%s", $_GET["fDate"]); 567 printf("\"> \n"); 568 */ 569 570 printf("Sequences from <input name=\"fRunMin\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">\n", $min); 571 printf("to <input name=\"fRunMax\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\"> \n", $max); 572 573 printf(" <P>\n"); 574 575 printf("Source (<A HREF=\"regexp.html\">regexp</A>) <input name=\"fSourceN\" type=\"text\" size=\"15\" maxlength=\"15\" value=\""); 576 if (!empty($_GET["fSourceN"])) 577 printf("%s", $_GET["fSourceN"]); 578 printf("\"> \n"); 345 PrintZdRangeMenu($host,$user,$pw,$db); 346 printf("<p>\n"); 347 PrintSequRangeMenu($host,$user,$pw,$db); 348 printf("<p>\n"); 349 PrintSourceMenu($host,$user,$pw,$db); 350 printf("<p>\n"); 351 PrintNightRangeMenu($host,$user,$pw,$db); 352 printf("<p>\n"); 579 353 580 354 printf(" Results:\n"); … … 591 365 printf(" </select>\n"); 592 366 printf(" \n"); 593 594 ini_set("mysql.trace_mode", "Off");595 ini_set("display_errors", "Off");596 367 597 368 printf("<input class='Width' type='submit' value='Query Table'> \n"); … … 601 372 if (strchr($_SERVER["REQUEST_URI"], '?')!=FALSE) 602 373 printf("<input class='Width' type='button' value='Print' onClick='self.location.href=\"%s&fPrintTable=1\"'> \n", $_SERVER["REQUEST_URI"]); 374 375 printf(" </td><td valign='top'>\n"); 376 377 PrintLimitsMenu($limitsmean, $limitsmin, $limitsmax, $alias, "yes"); 378 379 printf(" </td></tr>\n"); 380 printf(" </table>\n"); 381 603 382 printf("</form>\n"); 604 383 printf("</center>\n"); 605 384 606 385 607 printf(" </td></tr> </table>\n"); 386 ini_set("mysql.trace_mode", "Off"); 387 ini_set("display_errors", "Off"); 388 608 389 609 390 printf("</td>\n"); … … 615 396 } 616 397 617 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits , $rms, $needs)398 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limitsmean, $limitsmin, $limitsmax, $needs) 618 399 { 619 400 $db_id = mysql_connect($host, $user, $pw); … … 632 413 { 633 414 if ($html=="1" || $html=="2") 634 PrintMagicTable($result0, $alias, $rightalign, $limits , $rms, $_GET);415 PrintMagicTable($result0, $alias, $rightalign, $limitsmean, $limitsmin, $limitsmax, $_GET); 635 416 else 636 417 PrintText($result0); … … 640 421 mysql_close($db_id); 641 422 642 if ($html=="1") 643 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 423 PrintSubmittedQuery($query0, $html, $db, "old"); 644 424 } 645 425 646 426 include ("include.php"); 427 include ("menu.php"); 647 428 include ("db.php"); 648 429 include ("magicdefs.php"); … … 656 437 header("Content-Disposition: attachment; filename=query-result.txt"); 657 438 658 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits , $rms, $needs);439 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limitsmean, $limitsmin, $limitsmax, $needs); 659 440 } 660 441 else … … 666 447 InitGet($_GET); 667 448 if (empty($_GET["fPrintTable"])) 668 PrintForm($_GET, $host, $user, $pw, $db, $limits , $rms, $alias);449 PrintForm($_GET, $host, $user, $pw, $db, $limitsmean, $limitsmin, $limitsmax, $alias); 669 450 670 451 if ($environment==0) … … 673 454 { 674 455 if (empty($_GET["fPrintTable"])) 675 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits , $rms, $needs);676 else 677 PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits , $rms, $needs);456 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limitsmean, $limitsmin, $limitsmax, $needs); 457 else 458 PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limitsmean, $limitsmin, $limitsmax, $needs); 678 459 } 679 460
Note:
See TracChangeset
for help on using the changeset viewer.