Changeset 7873
- Timestamp:
- 08/15/06 14:39:31 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 added
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7872 r7873 22 22 * datacenter/macros/filldotrun.C: 23 23 - implemented new arehucas version 24 25 * datacenter/db/culminating.php, datacenter/db/datacheck.php, 26 datacenter/db/datasetinfo.php, datacenter/db/dbstatus.php, 27 datacenter/db/index.php, datacenter/db/printtable.php, 28 datacenter/db/querycal.php, datacenter/db/queryrbk.php, 29 datacenter/db/queryseq.php, datacenter/db/querystar.php, 30 datacenter/db/runinfo.php, datacenter/db/sequence.php, 31 datacenter/db/sequinfo.php, datacenter/db/statusrps.php, 32 datacenter/db/statussbs.php, datacenter/db/statussps.php: 33 - moved some code to functions (mainly menu) 34 35 * datacenter/db/findoffdata.php: 36 - moved some code to functions (mainly menu) 37 - implemented zd-range fields 38 - improved limits functionality 39 - added some limit fields 40 - added new field for limits 41 42 * datacenter/db/include.php: 43 - implemented function to print or not print submitted query 44 (PrintSubmittedQuery(..)) 45 - removed not needed argument of function RemoveSortBy() 46 - implemented new algorithms for enhanced colour coding for limits 47 in PrintMagicTable() 48 49 * datacenter/db/index-header.html: 50 - shortened menu (removed old websites) 51 52 * datacenter/db/index.html: 53 - added new websites 54 - added link to error coding 55 56 * datacenter/db/magicdefs.php: 57 - changed limits arrays for enhanced algorithms 58 - added variables for starguider, new limit fields, zd range 59 60 * datacenter/db/sources.php: 61 - fixed bug (display of test sources) 62 - moved some code to functions (mainly menu) 63 64 * datacenter/db/sequinfo-aio.php, datacenter/db/runinfo-aio.php, 65 datacenter/db/datasetinfo-aio.php: 66 - added (website unifying other websites, so that only one website 67 for runs, one for sequences and one for datasets is needed) 68 69 * datacenter/db/menu.php: 70 - added (containing functions for parts of the menu) 71 72 * datacenter/db/menu.js: 73 - added (script for diplaying/hiding parts of the menu) 24 74 25 75 -
trunk/MagicSoft/Mars/datacenter/db/culminating.php
r7546 r7873 235 235 mysql_close($db_id); 236 236 237 if ($html=="1") 238 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 237 PrintSubmittedQuery($query0, $html, $db "old"); 239 238 } 240 239 -
trunk/MagicSoft/Mars/datacenter/db/datacheck.php
r7638 r7873 432 432 mysql_close($db_id); 433 433 434 if ($html=="1") 435 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 434 PrintSubmittedQuery($query0, $html, $db, "old"); 436 435 } 437 436 -
trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php
r7578 r7873 388 388 mysql_close($db_id); 389 389 390 if ($html=="1") 391 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 390 PrintSubmittedQuery($query0, $html, $db, "old"); 392 391 } 393 392 -
trunk/MagicSoft/Mars/datacenter/db/dbstatus.php
r7548 r7873 369 369 mysql_close($db_id); 370 370 371 if ($html=="1") 372 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 371 PrintSubmittedQuery($query0, $html, $db, "old"); 373 372 } 374 373 -
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 -
trunk/MagicSoft/Mars/datacenter/db/ganymed.php
r7620 r7873 303 303 mysql_close($db_id); 304 304 305 if ($html=="1") 306 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 305 PrintSubmittedQuery($query0, $html, $db, "old"); 307 306 } 308 307 -
trunk/MagicSoft/Mars/datacenter/db/include.php
r7546 r7873 118 118 } 119 119 120 function PrintLimitsMenu($limits, $rms, $alias)121 {122 foreach($limits as $key => $element)123 {124 printf("<tr><td>%s</td>\n", $alias[$key]);125 $mean=$key . "Mean";126 $limitmean=$_GET[$mean];127 printf("<td><input name=\"%sMean\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\"></td>\n", $key, $limitmean);128 if ($rms[$key]=="yes")129 {130 $rms2=$key . "Rms";131 $limitrms=$_GET[$rms2];132 printf("<td><input name=\"%sRms\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\"></td>\n", $key, $limitrms);133 }134 else135 printf("<td><br></td>\n");136 printf("</tr>\n");137 }138 139 }140 141 120 function PrintPullDown($host, $user, $pw, $db, $table, $name, $index, $descr) 142 121 { … … 257 236 printf("\n"); 258 237 } 238 } 239 240 function PrintSubmittedQuery($query0, $html, $db, $old) 241 { 242 //diplay query on old websites 243 if (empty($old)) 244 printf("<tr class='Block' id='showquery' style='display:none'><td>"); 245 else 246 printf("<tr class='Block' id='showquery' style='display:block'><td>"); 247 printf("<b>DB:</b> %s <br>", $db); 248 if ($html=="1") 249 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 250 printf("</td></tr>"); 259 251 } 260 252 … … 323 315 324 316 if ($_GET["fNumStart"]!=0) 317 { 318 $uri = htmlspecialchars($_SERVER["REQUEST_URI"]); 319 $pos = strpos($uri, "fNumStart"); 320 $amp3=FALSE; 321 if ($pos!=FALSE) 322 { 323 $amp1 = substr($uri, 0, $pos-1); 324 $amp2 = substr($uri, $pos); 325 $amp3 = strchr($amp2, "&"); 326 327 $uri = $amp1; 328 } 329 $pos = $_GET["fNumStart"]-$rows; 330 if ($pos<0) 331 $pos=0; 332 $uri .= "&fNumStart=" . $pos; 333 if ($amp3!=FALSE) 334 $uri .= $amp3; 335 336 $menu .= "<A HREF='" . $uri . "'><<< Prev</A>\n"; 337 } 338 339 $menu .= " --- <B>"; 340 $menu .= $_GET["fNumStart"]; 341 $menu .= "</B> --- \n"; 342 343 if ($rows==$_GET["fNumResults"]) 325 344 { 326 345 $uri = $_SERVER["REQUEST_URI"]; … … 335 354 $uri = $amp1; 336 355 } 337 $pos = $_GET["fNumStart"]-$rows;338 if ($pos<0)339 $pos=0;340 $uri .= "&fNumStart=" . $pos;341 if ($amp3!=FALSE)342 $uri .= $amp3;343 344 $menu .= "<A HREF='" . $uri . "'><<< Prev</A>\n";345 }346 347 $menu .= " --- <B>";348 $menu .= $_GET["fNumStart"];349 $menu .= "</B> --- \n";350 351 if ($rows==$_GET["fNumResults"])352 {353 $uri = $_SERVER["REQUEST_URI"];354 $pos = strpos($uri, "fNumStart");355 $amp3=FALSE;356 if ($pos!=FALSE)357 {358 $amp1 = substr($uri, 0, $pos-1);359 $amp2 = substr($uri, $pos);360 $amp3 = strchr($amp2, "&");361 362 $uri = $amp1;363 }364 356 $uri .= "&fNumStart=" . ($_GET["fNumStart"]+$rows); 365 357 if ($amp3!=FALSE) 366 358 $uri .= $amp3; 367 359 368 $menu .= "<A HREF='" . $uri. "'>Next >>></A>\n";360 $menu .= "<A HREF='" . htmlspecialchars($uri) . "'>Next >>></A>\n"; 369 361 } 370 362 return $menu; 371 363 } 372 364 373 function RemoveSortBy( $rows)365 function RemoveSortBy() 374 366 { 375 367 $menu = ""; … … 399 391 } 400 392 401 function PrintMagicTable($result0, $alias, $rightalign, $limits , $rms, $_GET)393 function PrintMagicTable($result0, $alias, $rightalign, $limitsmean, $limitsmin, $limitsmax, $_GET) 402 394 { 403 395 $col = FALSE; 404 396 $first = TRUE; 405 397 398 $sigma = array 399 ( 400 5 => "#FF9900", 401 3 => "#FFFF66", 402 2 => "#33CC00", 403 1 => "#006600", 404 ); 405 $offlimitcolour="#FF0000"; 406 407 408 406 409 $menu = CreateMenu(mysql_num_rows($result0)); 407 410 408 printf("\n<center>\n<p>%s<P>\n", $menu); 411 printf("\n<center>\n"); 412 if (empty($_GET["fPrintTable"])) 413 printf("<p>%s<P>\n", $menu); 409 414 printf("<table BORDER=\"0\">\n"); 410 415 while ($row0 = mysql_fetch_assoc($result0)) … … 430 435 $issort=" <IMG SRC='up.gif'>"; 431 436 } 432 printf(" <th> <A HREF='%s& fSortBy=%s%s'>%s</A>%s </th>\n",433 RemoveSortBy($_SERVER["REQUEST_URI"]), $col, $ord, $key, $issort);437 printf(" <th> <A HREF='%s&fSortBy=%s%s'>%s</A>%s </th>\n", 438 htmlspecialchars(RemoveSortBy()), $col, $ord, $key, $issort); 434 439 } 435 440 printf(" </tr>\n\n"); … … 449 454 printf(" <td align=\"right\">"); 450 455 451 if (!(empty($limits) && empty($rms))) 456 //determine color of text in cell 457 foreach($limitsmean as $key2 => $element2) 452 458 { 453 foreach($limits as $key2 => $element2) 459 $mean=$key2 . "Mean"; 460 $rms2=$key2 . "Rms"; 461 if ($key==$alias[$element2] && !empty($_GET[$mean])) 454 462 { 455 $mean=$key2 . "Mean"; 456 $rms2=$key2 . "Rms"; 457 if ($key==$alias[$element2] && !empty($_GET[$mean])) 463 if (!empty($_GET[$rms2])) 458 464 { 459 if ($rms[$key2]=="yes") 465 $colour=$offlimitcolour; 466 foreach ($sigma as $margin => $newcolour) 460 467 { 461 if (!empty($_GET[$rms2])) 462 { 463 $min=$_GET[$mean] - $_GET[$rms2]; 464 $max=$_GET[$mean] + $_GET[$rms2]; 465 if ($min < $element && $element < $max) 466 printf("<font color='green'>"); 467 else 468 printf("<font color='red'>"); 469 } 468 $min=$_GET[$mean] - ($margin * $_GET[$rms2]); 469 $max=$_GET[$mean] + ($margin * $_GET[$rms2]); 470 if ($min < $element && $element < $max) 471 $colour=$newcolour; 470 472 } 471 else 473 printf("<font color='%s' style='font-weight:bold'>", $colour); 474 } 475 } 476 } 477 478 foreach($limitsmin as $key2 => $element2) 479 { 480 $limit1=$key2 . "1"; 481 $limit2=$key2 . "2"; 482 if ($key==$alias[$element2] && !empty($_GET[$limit1])) 483 { 484 $colour=$offlimitcolour; 485 if ($_GET[$limit1] <= $element) 486 $colour=$sigma[1]; 487 else 488 { 489 if (!empty($_GET[$limit2])) 472 490 { 473 if ($rms[$key2]=="min") 474 { 475 if ($_GET[$mean] <= $element) 476 printf("<font color='green'>"); 477 else 478 printf("<font color='red'>"); 479 } 480 481 if ($rms[$key2]=="max") 482 { 483 if ($_GET[$mean] >= $element) 484 printf("<font color='green'>"); 485 else 486 printf("<font color='red'>"); 487 } 491 if ($_GET[$limit2] <= $element) 492 $colour=$sigma[5]; 488 493 } 489 494 } 490 495 printf("<font color='%s' style='font-weight:bold'>", $colour); 496 } 497 498 } 499 500 foreach($limitsmax as $key2 => $element2) 501 { 502 $limit1=$key2 . "1"; 503 $limit2=$key2 . "2"; 504 if ($key==$alias[$element2] && !empty($_GET[$limit1])) 505 { 506 $colour=$offlimitcolour; 507 if ($_GET[$limit1] >= $element) 508 $colour=$sigma[1]; 509 else 510 { 511 if (!empty($_GET[$limit2])) 512 { 513 if ($_GET[$limit2] >= $element) 514 $colour=$sigma[5]; 515 } 516 } 517 printf("<font color='%s' style='font-weight:bold'>", $colour); 491 518 } 492 519 } 493 520 521 //fill text in cell 494 522 printf(" %s </td>\n", str_replace("&ws;", " ", str_replace(" ", " ", $element))); 495 523 } … … 505 533 506 534 printf("<P><B>Number of displayed results: %d</B><P><P>\n", mysql_num_rows($result0)); 507 printf("%s\n", $menu); 535 if (empty($_GET["fPrintTable"])) 536 printf("%s\n", $menu); 508 537 printf("<P>\n"); 509 538 printf("</center>\n"); 510 printf("</tr><tr class='Block'><td>\n"); 539 printf("</td>\n"); 540 printf("</tr>\n"); 511 541 } 512 542 -
trunk/MagicSoft/Mars/datacenter/db/index-footer.html
r7484 r7873 1 </td>2 </tr>3 1 4 2 </table> -
trunk/MagicSoft/Mars/datacenter/db/index-header.html
r7549 r7873 15 15 --> 16 16 </style> 17 <script type="text/javascript" src="dhtml.js"></script> 18 <script type="text/javascript" src="menu.js"></script> 17 19 </head> 18 20 19 <body background="../background.gif" text="#000000" bgcolor="#000099" link="#1122FF" vlink="#8888FF" alink="#FF0000">21 <body onload="getdisplay();" background="../background.gif" text="#000000" bgcolor="#000099" link="#1122FF" vlink="#8888FF" alink="#FF0000"> 20 22 21 23 … … 25 27 <td class="Edge"><img SRC="../ecke.gif" ALT=""></td> 26 28 <td class="Header"> 27 <font size= +1><B>Magic Database</B></font><BR>29 <font size='+1'><B>Magic Database</B></font><BR> 28 30 <hr SIZE=1 NOSHADE WIDTH="80%"> 29 31 <A HREF="index.html">H</A> 30 32 <A HREF="http://www.astro.uni-wuerzburg.de/~dorner/datacenter/index.html#db">Docu</A> 31 33 Info: 32 <A HREF="runinfo.php">Run</A> 33 <A HREF="sequinfo.php">Sequ</A> 34 <A HREF="datasetinfo.php">DataSets</A> 35 Status: 36 <A HREF="statussbs.php">SequBuild</A> 37 <A HREF="statusrps.php">RunProc</A> 38 <A HREF="statussps.php">SequProc</A> 39 <A HREF="printtable.php?fTable=MarsVersion">Mars</A> 34 <A HREF="runinfo-aio.php">Run</A> 35 <A HREF="sequinfo-aio.php">Sequ</A> 36 <A HREF="datasetinfo-aio.php">DataSets</A> 37 <A HREF="queryrbk.php">Runbook</A> 40 38 <BR> 41 39 more: 42 <A HREF="culminating.php">Culm</A> 43 <A HREF="datacheck.php">DataCh</A> 44 40 <A HREF="ganymed.php">Results</A> 45 41 <A HREF="sequence.php">Sequ</A> 46 42 <A HREF="sources.php">Sources</A> 47 <A HREF="findoffdata.php">Off</A> 48 DB: 49 <A HREF="queryrbk.php">Runbook</A> 50 <A HREF="index.php">Run</A> 51 <A HREF="queryseq.php">Sequ</A> 52 <A HREF="querycal.php">Cal</A> 53 <A HREF="querystar.php">Star</A> 43 <A HREF="statussbs.php">SequBuildStatus</A> 44 <A HREF="printtable.php?fTable=MarsVersion">Mars</A> 54 45 <hr SIZE=1 NOSHADE WIDTH="80%"> 55 46 </td> … … 59 50 <td COLSPAN="2" BGCOLOR="#FFFFFF"> 60 51 52 61 53 <center><table class="Inner" CELLPADDING=15> 62 54 <tr class="Block"> -
trunk/MagicSoft/Mars/datacenter/db/index.html
r7548 r7873 32 32 <tr class="Block"> 33 33 <td> 34 <!-- 35 <b>Database Access:</b><p> 36 --> 37 <p><A HREF="http://www.astro.uni-wuerzburg.de/~dorner/datacenter/index.html#db"> 38 Documentation</A></b><p> 34 <p> 35 Some useful queries:<p> 36 <ul> 37 <li><A HREF="runinfo-aio.php">Run Information</A></li> 38 <li><A HREF="sequinfo-aio.php">Sequence Information</A> (including find-off-data functionalities)</li> 39 <li><A HREF="queryrbk.php">Runbook Database</A></li> 40 <li><A HREF="datasetinfo-aio.php">Dataset Information</A> 41 (<A HREF="http://www.astro.uni-wuerzburg.de/datacenter/datasets/">dataset files</A>)</li> 42 <li><A HREF="ganymed.php">Results of the Automatic Analysis</A> 43 <li><A HREF="sequence.php">Sequence(s)</A>: all information of one sequence in one table </li> 44 <li><A HREF="sources.php">Sources - list of sources</A> (possibility to ex/include test- and off-sources)</li> 45 <li><A HREF="statussbs.php">Sequence Build Status</A>: querying only the information from the table SequenceBuildStatus </li> 46 </ul> 47 <p> 48 Documentation: <br> 49 <a href="http://vela.astro.uni-wuerzburg.de/datacenter/instructions/intern/errorcoding.txt">error coding</a><br> 50 <A HREF="http://www.astro.uni-wuerzburg.de/~dorner/datacenter/index.html#db">old documentation</A> 51 <p> 52 <br> 53 <p> 54 <u>Old websites:</u> <p> 39 55 Some useful queries:<p> 40 56 <ul> -
trunk/MagicSoft/Mars/datacenter/db/index.php
r7546 r7873 384 384 mysql_close($db_id); 385 385 386 if ($html=="1") 387 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 386 PrintSubmittedQuery($query0, $html, $db, "old"); 388 387 } 389 388 -
trunk/MagicSoft/Mars/datacenter/db/magicdefs.php
r7547 r7873 25 25 26 26 27 $limits = array27 $limitsmean = array 28 28 ( 29 29 "fPedRmsInLimit" => "fMeanPedRmsInner", 30 "fArrTimeLimit" => "fArrTimeRmsInner",30 // "fArrTRmsLimit" => "fArrTimeRmsInner", 31 31 "fMuonRateLimit" => "fMuonRate", 32 "fMuonCalLimit" => "fRatio", 32 33 "fPSFLimit" => "fPSF", 34 "fInhomLimit" => "fInhomogeneity", 35 "fNumIslLimit" => "fMeanNumberIslands", 33 36 "fImgRateLimit" => "fDataRate", 37 "fSkyBrightLimit" => "fBrightnessMed", 38 ); 39 40 $limitsmin = array 41 ( 42 "fZdMinLimit" => "fZenithDistanceMin", 43 "fNumStarsLimit" => "fNumStarsMed", 44 "fNumStarsCorLimit" => "fNumStarsCorMed", 45 "fMuonNumLimit" => "fMuonNumber", 46 "fArrTimeLimit" => "fArrTimeInner", 47 "fPulsePosLimit" => "fMeanPulsePosInner", 48 ); 49 50 $limitsmax = array 51 ( 52 "fZdMaxLimit" => "fZenithDistanceMax", 34 53 "fUnsInLimit" => "fUnsuitableInner", 35 "fZdMinLimit" => "fZenithDistanceMin", 36 "fZdMaxLimit" => "fZenithDistanceMax", 37 ); 38 39 $rms = array 40 ( 41 "fPedRmsInLimit" => "yes", 42 "fArrTimeLimit" => "yes", 43 "fMuonRateLimit" => "yes", 44 "fUnsInLimit" => "max", 45 "fPSFLimit" => "yes", 46 "fImgRateLimit" => "yes", 47 "fZdMinLimit" => "min", 48 "fZdMaxLimit" => "max", 54 "fIsoInLimit" => "fIsolatedInner", 55 "fIMCLimit" => "fIsolatedMaxCluster", 56 "fMaxHumLimit" => "fMaxHumidity", 57 "fRelTimeLimit" => "fEffOnTime/fRunTime", 49 58 ); 50 59 … … 216 225 "fDataRate" => "Img.<br>Rate<br>[Hz]", 217 226 "fMaxHumidity" => "Max<br>Hum<br>[%]", 227 "fBrightnessMed" => "Sky<br>Brightness<br>Med", 228 "fBrightnessRMS" => "Sky<br>Brightness<br>RMS", 229 "fNumStarsMed" => "#<br>id.<br>stars", 230 "fNumStarsRMS" => "RMS<br>id.<br>stars", 231 "fNumStarsCorMed" => "#<br>cor.<br>stars", 232 "fNumStarsCorRMS" => "RMS<br>cor.<br>stars", 218 233 "fEvents" => "DataEvents", 219 234 "fPositionSignal" => "ArrTime", … … 253 268 "Max(fZenithDistance)" => "ZdMax", 254 269 "COUNT(*)" => "Sequence", 255 "fArrTimeLimit" => "ArrTRms", 270 // "fArrTimeLimit" => "ArrTRms", 271 "fArrTimeLimit" => "ArrTime", 272 "fPulsePosLimit" => "PulsePos", 256 273 "fPedRmsInLimit" => "PedRms", 257 274 "fMuonRateLimit" => "MuonRate", 275 "fMuonNumLimit" => "# Muons", 276 "fMuonCalLimit" => "MuonCal", 258 277 "fPSFLimit" => "PSF", 278 "fInhomLimit" => "Inhom.", 279 "fNumIslLimit" => "# Islands", 259 280 "fImgRateLimit" => "ImgRate", 281 "fSkyBrightLimit" => "SkyBrightness", 282 "fNumStarsLimit" => "# id. Stars", 283 "fNumStarsCorLimit" => "# cor. Stars", 260 284 "fUnsInLimit" => "Unsuit.In", 285 "fIsoInLimit" => "Isol.In", 286 "fIMCLimit" => "IMC", 287 "fMaxHumLimit" => "Humidity", 261 288 "fZdMinLimit" => "ZdMin", 262 289 "fZdMaxLimit" => "ZdMax", 290 "fRelTimeLimit" => "Rel.Ontime", 263 291 "fEMin" => "Emin", 264 292 "fEMax" => "Emax", … … 321 349 $alias["fDataRate"] => "1", 322 350 $alias["fMaxHumidity"] => "1", 351 $alias["fBrightnessMed"] => "1", 352 $alias["fBrightnessRMS"] => "1", 353 $alias["fNumStarsMed"] => "1", 354 $alias["fNumStarsRMS"] => "1", 355 $alias["fNumStarsCorMed"] => "1", 356 $alias["fNumStarsCorRMS"] => "1", 323 357 $alias["fDate"] => "1", 324 358 $alias["fCaCoFileFound"] => "1", … … 466 500 "fDataRate" => "Star.fDataRate", 467 501 "fMaxHumidity" => "Star.fMaxHumidity", 502 "fBrightnessMed" => "Star.fBrightnessMed", 503 "fBrightnessRMS" => "Star.fBrightnessRMS", 504 "fNumStarsMed" => "Star.fNumStarsMed", 505 "fNumStarsRMS" => "Star.fNumStarsRMS", 506 "fNumStarsCorMed" => "Star.fNumStarsCorMed", 507 "fNumStarsCorRMS" => "Star.fNumStarsCorRMS", 468 508 "fDataSetNumber" => $fromtable . ".fDataSetNumber", 469 509 "fDataSetInserted" => "DataSetProcessStatus.fDataSetInserted", … … 506 546 "Min(fZenithDistance)" => "'ZdMin'", 507 547 "Max(fZenithDistance)" => "'ZdMax'", 508 // "COUNT(*)" => "'Sequ'",548 "COUNT(*)" => "'Sequence'", 509 549 "fStartTime" => "fStartTime", 510 550 "fFailedTime" => "fFailedTime", -
trunk/MagicSoft/Mars/datacenter/db/printtable.php
r7546 r7873 51 51 mysql_close($db_id); 52 52 53 if ($html=="1") 54 printf("<U><B>submitted query:</B></U><BR>%s<BR>", $query0); 53 PrintSubmittedQuery($query0, $html, $db, "old"); 55 54 } 56 55 -
trunk/MagicSoft/Mars/datacenter/db/querycal.php
r7546 r7873 207 207 mysql_close($db_id); 208 208 209 if ($html=="1") 210 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 209 PrintSubmittedQuery($query0, $html, $db, "old"); 211 210 } 212 211 -
trunk/MagicSoft/Mars/datacenter/db/queryrbk.php
r7548 r7873 80 80 mysql_close($db_id); 81 81 82 if ($html=="1") 83 printf("<U><B>submitted query:</B></U><BR>%s<BR>", $query0); 82 PrintSubmittedQuery($query0, $html, $db, "old"); 84 83 } 85 84 -
trunk/MagicSoft/Mars/datacenter/db/queryseq.php
r7546 r7873 326 326 mysql_close($db_id); 327 327 328 if ($html=="1") 329 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 328 PrintSubmittedQuery($query0, $html, $db, "old"); 330 329 } 331 330 -
trunk/MagicSoft/Mars/datacenter/db/querystar.php
r7546 r7873 172 172 mysql_close($db_id); 173 173 174 if ($html=="1") 175 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 174 PrintSubmittedQuery($query0, $html, $db, "old"); 176 175 } 177 176 -
trunk/MagicSoft/Mars/datacenter/db/runinfo.php
r7638 r7873 530 530 mysql_close($db_id); 531 531 532 if ($html=="1") 533 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 532 PrintSubmittedQuery($query0, $html, $db, "old"); 534 533 } 535 534 -
trunk/MagicSoft/Mars/datacenter/db/sequence.php
r7621 r7873 580 580 mysql_close($db_id); 581 581 582 if ($html=="1") 583 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 582 PrintSubmittedQuery($query0, $html, $db, "old"); 584 583 } 585 584 -
trunk/MagicSoft/Mars/datacenter/db/sequinfo.php
r7578 r7873 644 644 mysql_close($db_id); 645 645 646 if ($html=="1") 647 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 646 PrintSubmittedQuery($query0, $html, $db, "old"); 648 647 } 649 648 -
trunk/MagicSoft/Mars/datacenter/db/sources.php
r7546 r7873 19 19 $query0 .= " FROM Source "; 20 20 21 if ( $_GET["fTest"]=="Off")21 if (!$_GET["fTest"]=="On") 22 22 $query0 .= " WHERE fTest='no'"; 23 23 … … 112 112 mysql_close($db_id); 113 113 114 if ($html=="1") 115 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 114 PrintSubmittedQuery($query0, $html, $db, "old"); 116 115 } 117 116 -
trunk/MagicSoft/Mars/datacenter/db/statusrps.php
r7546 r7873 215 215 mysql_close($db_id); 216 216 217 if ($html=="1") 218 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 217 PrintSubmittedQuery($query0, $html, $db, "old"); 219 218 } 220 219 -
trunk/MagicSoft/Mars/datacenter/db/statussbs.php
r7546 r7873 191 191 mysql_close($db_id); 192 192 193 if ($html=="1") 194 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 193 PrintSubmittedQuery($query0, $html, $db, "old"); 195 194 } 196 195 -
trunk/MagicSoft/Mars/datacenter/db/statussps.php
r7546 r7873 204 204 mysql_close($db_id); 205 205 206 if ($html=="1") 207 printf("<U><B>submitted query:</B></U><BR>%s<BR>", htmlspecialchars($query0)); 206 PrintSubmittedQuery($query0, $html, $db, "old"); 208 207 } 209 208
Note:
See TracChangeset
for help on using the changeset viewer.