Changeset 7546 for trunk/MagicSoft/Mars/datacenter/db/index.php
- Timestamp:
- 02/28/06 20:23:38 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/index.php
r7484 r7546 226 226 } 227 227 228 function PrintForm($_GET, $ db)228 function PrintForm($_GET, $host, $user, $pw, $db) 229 229 { 230 230 printf("<center>\n"); … … 260 260 printf(" <table>\n"); 261 261 printf(" <tr><td>\n"); 262 PrintPullDown($ db, "RunType", "fRunTypeName", "fRunTypeKEY", "Run type");263 printf(" </td><td>\n"); 264 PrintPullDown($ db, "Source", "fSourceName", "fSourceKEY", "Source Name");265 printf(" </td><td>\n"); 266 PrintPullDown($ db, "HvSettings", "fHvSettingsName", "fHvSettingsKEY", "HV Settings");267 printf(" </td><td>\n"); 268 PrintPullDown($ db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1 Trigger Table");262 PrintPullDown($host, $user, $pw, $db, "RunType", "fRunTypeName", "fRunTypeKEY", "Run type"); 263 printf(" </td><td>\n"); 264 PrintPullDown($host, $user, $pw, $db, "Source", "fSourceName", "fSourceKEY", "Source Name"); 265 printf(" </td><td>\n"); 266 PrintPullDown($host, $user, $pw, $db, "HvSettings", "fHvSettingsName", "fHvSettingsKEY", "HV Settings"); 267 printf(" </td><td>\n"); 268 PrintPullDown($host, $user, $pw, $db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1 Trigger Table"); 269 269 printf(" </td></tr><tr><td>\n"); 270 PrintPullDown($ db, "TestFlag", "fTestFlagName", "fTestFlagKEY", "Test Flag");271 printf(" </td><td>\n"); 272 PrintPullDown($ db, "Project", "fProjectName", "fProjectKEY", "Project Name");273 printf(" </td><td>\n"); 274 PrintPullDown($ db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");275 printf(" </td><td>\n"); 276 PrintPullDown($ db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2 Trigger Table");270 PrintPullDown($host, $user, $pw, $db, "TestFlag", "fTestFlagName", "fTestFlagKEY", "Test Flag"); 271 printf(" </td><td>\n"); 272 PrintPullDown($host, $user, $pw, $db, "Project", "fProjectName", "fProjectKEY", "Project Name"); 273 printf(" </td><td>\n"); 274 PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table"); 275 printf(" </td><td>\n"); 276 PrintPullDown($host, $user, $pw, $db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2 Trigger Table"); 277 277 printf(" </td></tr><tr><td>\n"); 278 PrintPullDown($ db, "ExcludedFDA", "fExcludedFDAName", "fExcludedFDAKEY", "Exclusions");279 printf(" </td><td>\n"); 280 PrintPullDown($ db, "LightConditions", "fLightConditionsName", "fLightConditionsKEY", "Light Conditions");281 printf(" </td><td>\n"); 282 PrintPullDown($ db, "CalibrationScript", "fCalibrationScriptName", "fCalibrationScriptKEY", "Cal Script");283 printf(" </td><td>\n"); 284 PrintPullDown($ db, "TriggerDelayTable", "fTriggerDelayTableName", "fTriggerDelayTableKEY", "Trigger Delay Table");278 PrintPullDown($host, $user, $pw, $db, "ExcludedFDA", "fExcludedFDAName", "fExcludedFDAKEY", "Exclusions"); 279 printf(" </td><td>\n"); 280 PrintPullDown($host, $user, $pw, $db, "LightConditions", "fLightConditionsName", "fLightConditionsKEY", "Light Conditions"); 281 printf(" </td><td>\n"); 282 PrintPullDown($host, $user, $pw, $db, "CalibrationScript", "fCalibrationScriptName", "fCalibrationScriptKEY", "Cal Script"); 283 printf(" </td><td>\n"); 284 PrintPullDown($host, $user, $pw, $db, "TriggerDelayTable", "fTriggerDelayTableName", "fTriggerDelayTableKEY", "Trigger Delay Table"); 285 285 printf(" </td></tr><tr><td>\n"); 286 PrintPullDown($ db, "MagicNumber", "fMagicNumberName", "fMagicNumberKEY", "Magic Number");286 PrintPullDown($host, $user, $pw, $db, "MagicNumber", "fMagicNumberName", "fMagicNumberKEY", "Magic Number"); 287 287 printf(" </td></tr></table>\n"); 288 288 printf(" <p>\n"); 289 289 290 290 if (empty($_GET["fStartDate"])) 291 $timemin = GetMin("fRunStart", "RunData", $ db);291 $timemin = GetMin("fRunStart", "RunData", $host, $user, $pw, $db); 292 292 else 293 293 $timemin = $_GET["fStartDate"]; 294 294 295 295 if (empty($_GET["fStopDate"])) 296 $timemax = GetMax("fRunStart", "RunData", $ db);296 $timemax = GetMax("fRunStart", "RunData", $host, $user, $pw, $db); 297 297 else 298 298 $timemax = $_GET["fStopDate"]; … … 309 309 310 310 if (empty($_GET["fRunMin"])) 311 $min = GetMin("fRunNumber", "RunData", $ db);311 $min = GetMin("fRunNumber", "RunData", $host, $user, $pw, $db); 312 312 else 313 313 $min = $_GET["fRunMin"]; 314 314 315 315 if (empty($_GET["fRunMax"])) 316 $max = GetMax("fRunNumber", "RunData", $ db);316 $max = GetMax("fRunNumber", "RunData", $host, $user, $pw, $db); 317 317 else 318 318 $max = $_GET["fRunMax"]; … … 357 357 } 358 358 359 function PrintPage($html, $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)360 { 361 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");359 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup) 360 { 361 $db_id = mysql_connect($host, $user, $pw); 362 362 if ($db_id==FALSE) 363 363 { … … 400 400 header("Content-Disposition: attachment; filename=query-result.txt"); 401 401 402 PrintPage("0", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);402 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup); 403 403 } 404 404 else … … 409 409 410 410 InitGet($_GET); 411 PrintForm($_GET, $ db);411 PrintForm($_GET, $host, $user, $pw, $db); 412 412 413 413 if ($environment==0) 414 414 printf("No query submitted yet.<BR>"); 415 415 else 416 PrintPage("1", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);416 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup); 417 417 418 418 echo (file_get_contents("index-footer.html"));
Note:
See TracChangeset
for help on using the changeset viewer.