Changeset 7546 for trunk/MagicSoft/Mars/datacenter/db
- Timestamp:
- 02/28/06 20:23:38 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/db
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/culminating.php
r7484 r7546 134 134 } 135 135 136 function PrintForm($_GET, $ db)136 function PrintForm($_GET, $host, $user, $pw, $db) 137 137 { 138 138 printf("<center>\n"); … … 155 155 printf(" <table>\n"); 156 156 printf(" <tr><td>\n"); 157 PrintPullDown($ db, "Source", "fSourceName", "fSourceKEY", "Source Name");157 PrintPullDown($host, $user, $pw, $db, "Source", "fSourceName", "fSourceKEY", "Source Name"); 158 158 printf(" </td></tr>\n"); 159 159 printf(" </table>\n"); … … 161 161 162 162 if (empty($_GET["fRunMin"])) 163 $min = GetMin("fSequenceFirst", "Sequences", $ db);163 $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 164 164 else 165 165 $min = $_GET["fRunMin"]; 166 166 167 167 if (empty($_GET["fRunMax"])) 168 $max = GetMax("fSequenceFirst", "Sequences", $ db);168 $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 169 169 else 170 170 $max = $_GET["fRunMax"]; … … 210 210 } 211 211 212 function PrintPage($html, $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)213 { 214 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");212 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup) 213 { 214 $db_id = mysql_connect($host, $user, $pw); 215 215 if ($db_id==FALSE) 216 216 { … … 251 251 header("Content-Disposition: attachment; filename=query-result.txt"); 252 252 253 PrintPage("0", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);253 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup); 254 254 } 255 255 else … … 260 260 261 261 InitGet($_GET); 262 PrintForm($_GET, $ db);262 PrintForm($_GET, $host, $user, $pw, $db); 263 263 264 264 if ($environment==0) 265 265 printf("No query submitted yet.<BR>"); 266 266 else 267 PrintPage("1", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);267 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup); 268 268 269 269 echo (file_get_contents("index-footer.html")); -
trunk/MagicSoft/Mars/datacenter/db/datacheck.php
r7527 r7546 271 271 } 272 272 273 function PrintForm($_GET, $ db)273 function PrintForm($_GET, $host, $user, $pw, $db) 274 274 { 275 275 printf("<center>\n"); … … 321 321 printf("</td><td>\n"); 322 322 323 PrintPullDown($ db, "RunType", "fRunTypeName", "fRunTypeKEY", "Run Type");323 PrintPullDown($host, $user, $pw, $db, "RunType", "fRunTypeName", "fRunTypeKEY", "Run Type"); 324 324 325 325 printf(" </td></tr>\n"); … … 328 328 329 329 if (empty($_GET["fRunMin"])) 330 $min = GetMin("fRunNumber", "RunData", $ db);330 $min = GetMin("fRunNumber", "RunData", $host, $user, $pw, $db); 331 331 else 332 332 $min = $_GET["fRunMin"]; 333 333 334 334 if (empty($_GET["fRunMax"])) 335 $max = GetMax("fRunNumber", "RunData", $ db);335 $max = GetMax("fRunNumber", "RunData", $host, $user, $pw, $db); 336 336 else 337 337 $max = $_GET["fRunMax"]; … … 380 380 } 381 381 382 function PrintPage($html, $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs)383 { 384 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");382 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs) 383 { 384 $db_id = mysql_connect($host, $user, $pw); 385 385 if ($db_id==FALSE) 386 386 { … … 421 421 header("Content-Disposition: attachment; filename=query-result.txt"); 422 422 423 PrintPage("0", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs);423 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs); 424 424 } 425 425 else … … 431 431 InitGet($_GET); 432 432 if (empty($_GET["fPrintTable"])) 433 PrintForm($_GET, $ db);433 PrintForm($_GET, $host, $user, $pw, $db); 434 434 435 435 if ($environment==0) … … 438 438 { 439 439 if (empty($_GET["fPrintTable"])) 440 PrintPage("1", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs);440 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs); 441 441 else 442 PrintPage("2", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs);442 PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs); 443 443 } 444 444 -
trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php
r7527 r7546 228 228 } 229 229 230 function PrintForm($_GET, $ db)230 function PrintForm($_GET, $host, $user, $pw, $db) 231 231 { 232 232 printf("<center>\n"); … … 269 269 printf(" </td></tr><tr><td>\n"); 270 270 271 PrintPullDown($ db, "Source", "fSourceName", "fSourceKEY", "Source Name");271 PrintPullDown($host, $user, $pw, $db, "Source", "fSourceName", "fSourceKEY", "Source Name"); 272 272 273 273 printf(" </td></tr>\n"); … … 276 276 277 277 if (empty($_GET["fRunMin"])) 278 $min = GetMin("fDataSetNumber", "DataSets", $ db);278 $min = GetMin("fDataSetNumber", "DataSets", $host, $user, $pw, $db); 279 279 else 280 280 $min = $_GET["fRunMin"]; 281 281 282 282 if (empty($_GET["fRunMax"])) 283 $max = GetMax("fDataSetNumber", "DataSets", $ db);283 $max = GetMax("fDataSetNumber", "DataSets", $host, $user, $pw, $db); 284 284 else 285 285 $max = $_GET["fRunMax"]; … … 333 333 } 334 334 335 function PrintPage($html, $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs)336 { 337 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");335 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs) 336 { 337 $db_id = mysql_connect($host, $user, $pw); 338 338 if ($db_id==FALSE) 339 339 { … … 374 374 header("Content-Disposition: attachment; filename=query-result.txt"); 375 375 376 PrintPage("0", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);376 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup); 377 377 } 378 378 else … … 384 384 InitGet($_GET); 385 385 if (empty($_GET["fPrintTable"])) 386 PrintForm($_GET, $ db);386 PrintForm($_GET, $host, $user, $pw, $db); 387 387 388 388 if ($environment==0) … … 391 391 { 392 392 if (empty($_GET["fPrintTable"])) 393 PrintPage("1", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);393 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs); 394 394 else 395 PrintPage("2", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);395 PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs); 396 396 } 397 397 -
trunk/MagicSoft/Mars/datacenter/db/db.php
r7484 r7546 1 1 <?php 2 3 $host="hercules.astro.uni-wuerzburg.de"; 4 $user="MAGIC"; 5 $pw="d99swMT!"; 2 6 3 7 $db="MyMagic"; -
trunk/MagicSoft/Mars/datacenter/db/dbstatus.php
r7527 r7546 222 222 223 223 if (empty($_GET["fAllFilesAvailStatus"])) 224 $_GET["fAllFilesAvailStatus"]=" 4";224 $_GET["fAllFilesAvailStatus"]="7"; 225 225 226 226 if (empty($_GET["fCallisto"])) … … 228 228 229 229 if (empty($_GET["fCallistoStatus"])) 230 $_GET["fCallistoStatus"]=" 4";230 $_GET["fCallistoStatus"]="7"; 231 231 232 232 if (empty($_GET["fFillCallisto"])) … … 240 240 241 241 if (empty($_GET["fStarStatus"])) 242 $_GET["fStarStatus"]=" 4";242 $_GET["fStarStatus"]="7"; 243 243 244 244 if (empty($_GET["fFillStar"])) … … 249 249 } 250 250 251 function PrintForm($_GET, $ db)251 function PrintForm($_GET, $host, $user, $pw, $db) 252 252 { 253 253 printf("<center>\n"); … … 272 272 printf(" <table>\n"); 273 273 printf(" <tr><td>\n"); 274 PrintPullDown($ db, "Source", "fSourceName", "fSourceKEY", "Source Name");274 PrintPullDown($host, $user, $pw, $db, "Source", "fSourceName", "fSourceKEY", "Source Name"); 275 275 printf(" </td><td>\n"); 276 276 … … 285 285 286 286 if (empty($_GET["fStartDate"])) 287 $timemin = GetMin("fRunStart", "Sequences", $ db);287 $timemin = GetMin("fRunStart", "Sequences", $host, $user, $pw, $db); 288 288 else 289 289 $timemin = $_GET["fStartDate"]; 290 290 291 291 if (empty($_GET["fStopDate"])) 292 $timemax = GetMax("fRunStart", "Sequences", $ db);292 $timemax = GetMax("fRunStart", "Sequences", $host, $user, $pw, $db); 293 293 else 294 294 $timemax = $_GET["fStopDate"]; … … 298 298 299 299 if (empty($_GET["fRunMin"])) 300 $min = GetMin("fSequenceFirst", "Sequences", $ db);300 $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 301 301 else 302 302 $min = $_GET["fRunMin"]; 303 303 304 304 if (empty($_GET["fRunMax"])) 305 $max = GetMax("fSequenceFirst", "Sequences", $ db);305 $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 306 306 else 307 307 $max = $_GET["fRunMax"]; … … 318 318 319 319 printf("<input class='Width' type='submit' value='Query Table'> \n"); 320 printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\" sequinfo.php\"'> \n");320 printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\"dbstatus.php\"'> \n"); 321 321 if (strchr($_SERVER["REQUEST_URI"], '?')!=FALSE) 322 322 printf("<input class='Width' type='button' value='Get .txt' onClick='self.location.href=\"%s&fSendTxt=1\"'> \n", $_SERVER["REQUEST_URI"]); … … 331 331 } 332 332 333 function PrintPage($html, $ db, $needs)334 { 335 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");333 function PrintPage($html, $host, $user, $pw, $db, $needs) 334 { 335 $db_id = mysql_connect($host, $user, $pw); 336 336 if ($db_id==FALSE) 337 337 { … … 375 375 include ("include.php"); 376 376 include ("db.php"); 377 include ("magicdefs.php"); 377 378 378 379 ini_set("display_errors", "On"); … … 384 385 header("Content-Disposition: attachment; filename=query-result.txt"); 385 386 386 PrintPage("0", $ db);387 PrintPage("0", $host, $user, $pw, $db); 387 388 } 388 389 else … … 394 395 InitGet($_GET); 395 396 if (empty($_GET["fPrintTable"])) 396 PrintForm($_GET, $ db);397 PrintForm($_GET, $host, $user, $pw, $db); 397 398 398 399 if ($environment==0) … … 401 402 { 402 403 if (empty($_GET["fPrintTable"])) 403 PrintPage("1", $ db, $needs);404 PrintPage("1", $host, $user, $pw, $db, $needs); 404 405 else 405 PrintPage("2", $ db, $needs);406 PrintPage("2", $host, $user, $pw, $db, $needs); 406 407 } 407 408 -
trunk/MagicSoft/Mars/datacenter/db/findoffdata.php
r7527 r7546 392 392 } 393 393 394 function PrintForm($_GET, $ db, $limits, $rms, $alias)394 function PrintForm($_GET, $host, $user, $pw, $db, $limits, $rms, $alias) 395 395 { 396 396 printf("<center>\n"); … … 478 478 printf(" <table><tr><td>\n"); 479 479 480 PrintPullDown($ db, "Source", "fSourceName", "fSourceKEY", "Source Name");480 PrintPullDown($host, $user, $pw, $db, "Source", "fSourceName", "fSourceKEY", "Source Name"); 481 481 printf(" </td><td>\n"); 482 PrintPullDown($ db, "LightConditions", "fLightConditionsName", "fLightConditionsKEY", "Light Conditions");482 PrintPullDown($host, $user, $pw, $db, "LightConditions", "fLightConditionsName", "fLightConditionsKEY", "Light Conditions"); 483 483 printf(" </td><td>\n"); 484 PrintPullDown($ db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");484 PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table"); 485 485 printf(" </td></tr><tr><td>\n"); 486 PrintPullDown($ db, "ManuallyChanged", "fManuallyChangedName", "fManuallyChangedKEY", "Manually changed");486 PrintPullDown($host, $user, $pw, $db, "ManuallyChanged", "fManuallyChangedName", "fManuallyChangedKEY", "Manually changed"); 487 487 printf(" </td><td>\n"); 488 488 PrintStatusMenu("fStar", "Star"); … … 507 507 508 508 if (empty($_GET["fStarStart"])) 509 $starmin = GetMin("fStar", "SequenceProcessStatus", $ db);509 $starmin = GetMin("fStar", "SequenceProcessStatus", $host, $user, $pw, $db); 510 510 else 511 511 $starmin = $_GET["fStarStart"]; 512 512 513 513 if (empty($_GET["fStarStop"])) 514 $starmax = GetMax("fStar", "SequenceProcessStatus", $ db);514 $starmax = GetMax("fStar", "SequenceProcessStatus", $host, $user, $pw, $db); 515 515 else 516 516 $starmax = $_GET["fStarStop"]; … … 528 528 529 529 if (empty($_GET["fStartDate"])) 530 $timemin = GetMin("fRunStart", "Sequences", $ db);530 $timemin = GetMin("fRunStart", "Sequences", $host, $user, $pw, $db); 531 531 else 532 532 $timemin = $_GET["fStartDate"]; 533 533 534 534 if (empty($_GET["fStopDate"])) 535 $timemax = GetMax("fRunStart", "Sequences", $ db);535 $timemax = GetMax("fRunStart", "Sequences", $host, $user, $pw, $db); 536 536 else 537 537 $timemax = $_GET["fStopDate"]; … … 541 541 542 542 if (empty($_GET["fRunMin"])) 543 $min = GetMin("fSequenceFirst", "Sequences", $ db);543 $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 544 544 else 545 545 $min = $_GET["fRunMin"]; 546 546 547 547 if (empty($_GET["fRunMax"])) 548 $max = GetMax("fSequenceFirst", "Sequences", $ db);548 $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 549 549 else 550 550 $max = $_GET["fRunMax"]; … … 604 604 } 605 605 606 function PrintPage($html, $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs)606 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs) 607 607 { 608 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");608 $db_id = mysql_connect($host, $user, $pw); 609 609 if ($db_id==FALSE) 610 610 { … … 645 645 header("Content-Disposition: attachment; filename=query-result.txt"); 646 646 647 PrintPage("0", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs);647 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs); 648 648 } 649 649 else … … 655 655 InitGet($_GET); 656 656 if (empty($_GET["fPrintTable"])) 657 PrintForm($_GET, $ db, $limits, $rms, $alias);657 PrintForm($_GET, $host, $user, $pw, $db, $limits, $rms, $alias); 658 658 659 659 if ($environment==0) … … 662 662 { 663 663 if (empty($_GET["fPrintTable"])) 664 PrintPage("1", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs);665 else 666 PrintPage("2", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs);664 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs); 665 else 666 PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs); 667 667 } 668 668 -
trunk/MagicSoft/Mars/datacenter/db/ganymed.php
r7520 r7546 42 42 } 43 43 44 function PrintForm($_GET, $ db)44 function PrintForm($_GET, $host, $user, $pw, $db) 45 45 { 46 46 printf("<center>\n"); … … 54 54 if (empty($_GET["fRunMin"])) 55 55 $min = "100"; 56 // $min = GetMin("fDataSetNumber", "DataSets", $ db);56 // $min = GetMin("fDataSetNumber", "DataSets", $host, $user, $pw, $db); 57 57 else 58 58 $min = $_GET["fRunMin"]; 59 59 60 60 if (empty($_GET["fRunMax"])) 61 $max = GetMax("fDataSetNumber", "DataSets", $ db);61 $max = GetMax("fDataSetNumber", "DataSets", $host, $user, $pw, $db); 62 62 else 63 63 $max = $_GET["fRunMax"]; … … 139 139 */ 140 140 141 function PrintDataSetInfo($result0 , $db_id, $db)141 function PrintDataSetInfo($result0) 142 142 { 143 143 $numres = mysql_num_rows($result0); … … 219 219 } 220 220 221 function PrintPage($html, $ db)222 { 223 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");221 function PrintPage($html, $host, $user, $pw, $db) 222 { 223 $db_id = mysql_connect($host, $user, $pw); 224 224 if ($db_id==FALSE) 225 225 { … … 236 236 { 237 237 if ($html=="1" || $html=="2") 238 PrintDataSetInfo($result0 , $db_id, $db);238 PrintDataSetInfo($result0); 239 239 else 240 240 PrintText($result0); … … 259 259 header("Content-Disposition: attachment; filename=query-result.txt"); 260 260 261 PrintPage("0", $ db);261 PrintPage("0", $host, $user, $pw, $db); 262 262 } 263 263 else … … 269 269 InitGet($_GET); 270 270 if (empty($_GET["fPrintTable"])) 271 PrintForm($_GET, $ db);271 PrintForm($_GET, $host, $user, $pw, $db); 272 272 273 273 if ($environment==0) … … 276 276 { 277 277 if (empty($_GET["fPrintTable"])) 278 PrintPage("1", $ db);278 PrintPage("1", $host, $user, $pw, $db); 279 279 else 280 PrintPage("2", $ db);280 PrintPage("2", $host, $user, $pw, $db); 281 281 } 282 282 -
trunk/MagicSoft/Mars/datacenter/db/include.php
r7527 r7546 1 1 <?php 2 /*3 function PrintTable($table)4 {5 $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");6 if ($db_id==FALSE)7 {8 printf("mysql_connect returned the following error:<br>");9 printf("%s<br>", mysql_error());10 die("");11 }12 printf("%s<br>", $table);13 printf("<table BORDER=\"1\">");14 15 $query = "EXPLAIN ";16 $query .= $table;17 18 $result = mysql_query($query);19 $numrows = mysql_num_rows($result);20 $numcols = mysql_num_fields($result);21 printf("%d x %d<br>", $numrows, $numcols);22 23 printf("<tr>");24 for ($i=0; $i<$numrows; $i++)25 {26 $row = mysql_fetch_row($result);27 printf("<th>%s</th> ", $row[0]);28 }29 printf("</tr>");30 31 $query = "SELECT * FROM ";32 $query .= $table;33 34 $result = mysql_query($query);35 36 $numrows = mysql_num_rows($result);37 $numcols = mysql_num_fields($result);38 printf("%d x %d<br>", $numrows, $numcols);39 40 while ($row = mysql_fetch_row($result))41 {42 printf("<tr>");43 foreach ($row as $entry)44 {45 printf("<td>%s</td> ", $entry);46 }47 printf("</tr>");48 }49 printf("</table>");50 51 mysql_free_result($result);52 53 mysql_close($db_id);54 }55 */56 2 57 3 function EnumQuery($name) … … 193 139 } 194 140 195 function PrintPullDown($ db, $table, $name, $index, $descr)196 { 197 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");141 function PrintPullDown($host, $user, $pw, $db, $table, $name, $index, $descr) 142 { 143 $db_id = mysql_connect($host, $user, $pw); 198 144 if ($db_id==FALSE) 199 145 { … … 250 196 } 251 197 252 function GetMin($field, $table, $ db)253 { 254 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");198 function GetMin($field, $table, $host, $user, $pw, $db) 199 { 200 $db_id = mysql_connect($host, $user, $pw); 255 201 if ($db_id==FALSE) 256 202 { … … 275 221 } 276 222 277 function GetMax($field, $table, $ db)278 { 279 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");223 function GetMax($field, $table, $host, $user, $pw, $db) 224 { 225 $db_id = mysql_connect($host, $user, $pw); 280 226 if ($db_id==FALSE) 281 227 { … … 299 245 return $max; 300 246 } 301 /*302 function GetMin()303 {304 $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");305 if ($db_id==FALSE)306 {307 printf("mysql_connect returned the following error:<br>");308 printf("%s<br>", mysql_error());309 die("");310 }311 312 $query = "SELECT MIN(fRunNumber) FROM MyMagic.RunData";313 $result = mysql_query($query);314 if (!$result)315 return "0";316 317 $row = mysql_fetch_row($result);318 319 $min = $row[0];320 321 mysql_free_result($result);322 mysql_close($db_id);323 324 return $min;325 }326 327 function GetMax()328 {329 $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");330 if ($db_id==FALSE)331 {332 printf("mysql_connect returned the following error:<br>");333 printf("%s<br>", mysql_error());334 die("");335 }336 337 $query = "SELECT MAX(fRunNumber) FROM MyMagic.RunData";338 $result = mysql_query($query);339 if (!$result)340 return "0";341 342 $row = mysql_fetch_row($result);343 344 $max = $row[0];345 346 mysql_free_result($result);347 mysql_close($db_id);348 349 return $max;350 }351 */352 247 353 248 function PrintText($result0) -
trunk/MagicSoft/Mars/datacenter/db/index.html
r7518 r7546 45 45 (<!--<A HREF="http://www.astro.uni-wuerzburg.de/~dorner/analysis/datasets.html">comments</A>, 46 46 --> 47 47 <A HREF="http://www.astro.uni-wuerzburg.de/datacenter/datasets/">dataset files</A>)</li> 48 48 <li><A HREF="ganymed.php">Results of the Automatic Analysis</A> 49 49 </ul> … … 63 63 <li><A HREF="statussps.php">Sequence Process Status</A>: querying only the information from the table SequenceProcessStatus </li> 64 64 <li><A HREF="printtable.php?fTable=MarsVersion">Mars Versions in the DC</A>: querying all information from the table MarsVersions </li> 65 <li><A HREF="dbstatus.php?fAllFilesAvailStatus=0&fCallisto=On&fCallistoStatus= 4&fStar=On&fStarStatus=4&fFillCallistoStatus=0&fFillStarStatus=0&fSourceName=On&fSourceKEY=0&fSourceN=&fStartDate=0000-00-00&fStopDate=2010-10-04&fRunMin=3340&fRunMax=64713&fNumResults=20">Processing status</A> (a simplified version of sequinfo.php)</li>65 <li><A HREF="dbstatus.php?fAllFilesAvailStatus=0&fCallisto=On&fCallistoStatus=7&fStar=On&fStarStatus=7&fFillCallistoStatus=0&fFillStarStatus=0&fSourceName=On&fSourceKEY=0&fSourceN=&fStartDate=0000-00-00&fStopDate=2010-10-04&fRunMin=3340&fRunMax=64713&fNumResults=20">Processing status</A> (a simplified version of sequinfo.php)</li> 66 66 </ul> 67 67 Some very simple queries:<p> -
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")); -
trunk/MagicSoft/Mars/datacenter/db/magicdefs.php
r7527 r7546 65 65 "fTestFlagName" => CheckWhere("fTestFlagKEY", $_GET), 66 66 "fLightConditionsName" => CheckWhere("fLightConditionsKEY", $_GET), 67 "fParticleTypeName" => CheckWhere("fParticleTypeKEY", $_GET), 67 68 ); 68 69 … … 83 84 "fTestFlagName" => CheckGroup("fTestFlagKEY", $_GET), 84 85 "fLightConditionsName" => CheckGroup("fLightConditionsKEY", $_GET), 86 "fParticleTypeName" => CheckGroup("fParticleTypeKEY", $_GET), 85 87 ); 86 88 … … 260 262 "fEMin" => "Emin", 261 263 "fEMax" => "Emax", 264 "fParticleTypeName" => "Particle", 262 265 "fStartTime" => "Process", 263 266 "fFailedTime" => "Failed", … … 369 372 "fTestFlagName" => $fromtable . ".fTestFlagKEY", 370 373 "fLightConditionsName" => $fromtable . ".fLightConditionsKEY", 374 "fParticleTypeName" => $fromtable . ".fParticleTypeKEY", 371 375 ); 372 376 … … 500 504 "Max(fZenithDistance)" => "'ZdMax'", 501 505 // "COUNT(*)" => "'Sequ'", 502 "fStartTime" => "fStartTime", 503 "fFailedTime" => "fFailedTime", 504 "fReturnCode" => "fReturnCode", 505 "fFailedCode" => "fFailedCode", 506 "fFailedCodeAdd" => "fFailedCodeAdd", 506 "fStartTime" => "fStartTime", 507 "fFailedTime" => "fFailedTime", 508 "fReturnCode" => "fReturnCode", 509 "fFailedCode" => "fFailedCode", 510 "fFailedCodeAdd" => "fFailedCodeAdd", 511 "fParticleTypeName" => "ParticleType.fParticleTypeName", 507 512 ); 508 513 … … 532 537 "fTestFlagName" => " LEFT JOIN TestFlag ON " . $fromtable . ".fTestFlagKEY=TestFlag.fTestFlagKEY", 533 538 "fLightConditionsName" => " LEFT JOIN LightConditions ON " . $fromtable . ".fLightConditionsKEY=LightConditions.fLightConditionsKEY", 539 "fParticleTypeName" => " LEFT JOIN ParticleType ON " . $fromtable . ".fParticleTypeKEY=ParticleType.fParticleTypeKEY ", 534 540 ); 535 541 -
trunk/MagicSoft/Mars/datacenter/db/printtable.php
r7484 r7546 10 10 } 11 11 12 function PrintPage($html, $ db, $limits, $rms)12 function PrintPage($html, $host, $user, $pw, $db, $limits, $rms) 13 13 { 14 14 if (empty($_GET["fTable"])) … … 19 19 } 20 20 21 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");21 $db_id = mysql_connect($host, $user, $pw); 22 22 if ($db_id==FALSE) 23 23 { … … 67 67 header("Content-Disposition: attachment; filename=query-result.txt"); 68 68 69 PrintPage("0", $ db, $limits, $rms);69 PrintPage("0", $host, $user, $pw, $db, $limits, $rms); 70 70 } 71 71 else … … 80 80 printf("No query submitted yet.<BR>"); 81 81 else 82 PrintPage("1", $ db, $limits, $rms);82 PrintPage("1", $host, $user, $pw, $db, $limits, $rms); 83 83 84 84 echo (file_get_contents("index-footer.html")); -
trunk/MagicSoft/Mars/datacenter/db/querycal.php
r7507 r7546 102 102 } 103 103 104 function PrintForm($_GET, $ db)104 function PrintForm($_GET, $host, $user, $pw, $db) 105 105 { 106 106 printf("<center>\n"); … … 138 138 139 139 if (empty($_GET["fRunMin"])) 140 $min = GetMin("fSequenceFirst", "Sequences", $ db);140 $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 141 141 else 142 142 $min = $_GET["fRunMin"]; 143 143 144 144 if (empty($_GET["fRunMax"])) 145 $max = GetMax("fSequenceFirst", "Sequences", $ db);145 $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 146 146 else 147 147 $max = $_GET["fRunMax"]; … … 182 182 } 183 183 184 function PrintPage($html, $ db, $alias, $rightalign, $checkwhere)185 { 186 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");184 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere) 185 { 186 $db_id = mysql_connect($host, $user, $pw); 187 187 if ($db_id==FALSE) 188 188 { … … 223 223 header("Content-Disposition: attachment; filename=query-result.txt"); 224 224 225 PrintPage("0", $ db, $alias, $rightalign, $checkwhere);225 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere); 226 226 } 227 227 else … … 232 232 233 233 InitGet($_GET); 234 PrintForm($_GET, $ db);234 PrintForm($_GET, $host, $user, $pw, $db); 235 235 236 236 if ($environment==0) 237 237 printf("No query submitted yet.<BR>"); 238 238 else 239 PrintPage("1", $ db, $alias, $rightalign, $checkwhere);239 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere); 240 240 241 241 echo (file_get_contents("index-footer.html")); -
trunk/MagicSoft/Mars/datacenter/db/querymc.php
r7521 r7546 131 131 132 132 if (empty($_GET["fParticleType"])) 133 $_GET["fP rojectName"]="Off";134 135 } 136 137 function PrintForm($_GET, $ db)133 $_GET["fParticleTypeName"]="Off"; 134 135 } 136 137 function PrintForm($_GET, $host, $user, $pw, $db) 138 138 { 139 139 printf("<center>\n"); … … 154 154 printf(" <table>\n"); 155 155 printf(" <tr><td>\n"); 156 PrintPullDown($ db, "ParticleType", "fParticleTypeName", "fParticleTypeKEY", "particle type");156 PrintPullDown($host, $user, $pw, $db, "ParticleType", "fParticleTypeName", "fParticleTypeKEY", "particle type"); 157 157 printf(" </td></tr></table>\n"); 158 158 printf(" <p>\n"); … … 160 160 /* 161 161 if (empty($_GET["fStartDate"])) 162 $timemin = GetMin("fRunStart", "RunData", $ db);162 $timemin = GetMin("fRunStart", "RunData", $host, $user, $pw, $db); 163 163 else 164 164 $timemin = $_GET["fStartDate"]; 165 165 166 166 if (empty($_GET["fStopDate"])) 167 $timemax = GetMax("fRunStart", "RunData", $ db);167 $timemax = GetMax("fRunStart", "RunData", $host, $user, $pw, $db); 168 168 else 169 169 $timemax = $_GET["fStopDate"]; … … 174 174 175 175 if (empty($_GET["fRunMin"])) 176 $min = GetMin("fRunNumber", "MCRunData", $ db);176 $min = GetMin("fRunNumber", "MCRunData", $host, $user, $pw, $db); 177 177 else 178 178 $min = $_GET["fRunMin"]; 179 179 180 180 if (empty($_GET["fRunMax"])) 181 $max = GetMax("fRunNumber", "MCRunData", $ db);181 $max = GetMax("fRunNumber", "MCRunData", $host, $user, $pw, $db); 182 182 else 183 183 $max = $_GET["fRunMax"]; … … 224 224 } 225 225 226 function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup) 227 { 228 // $db_id = mysql_connect("localhost", "hercules", "d99swMT!"); 229 $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!"); 226 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup) 227 { 228 $db_id = mysql_connect($host, $user, $pw); 230 229 if ($db_id==FALSE) 231 230 { … … 268 267 header("Content-Disposition: attachment; filename=query-result.txt"); 269 268 270 PrintPage("0", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);269 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup); 271 270 } 272 271 else … … 277 276 278 277 InitGet($_GET); 279 PrintForm($_GET, $ db);278 PrintForm($_GET, $host, $user, $pw, $db); 280 279 281 280 if ($environment==0) 282 281 printf("No query submitted yet.<BR>"); 283 282 else 284 PrintPage("1", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);283 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup); 285 284 286 285 echo (file_get_contents("index-footer.html")); -
trunk/MagicSoft/Mars/datacenter/db/queryrbk.php
r7484 r7546 32 32 } 33 33 34 function PrintPage($html, $ db)34 function PrintPage($html, $host, $user, $pw, $db) 35 35 { 36 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");36 $db_id = mysql_connect($host, $user, $pw); 37 37 if ($db_id==FALSE) 38 38 { … … 89 89 header("Content-Disposition: attachment; filename=query-result.txt"); 90 90 91 PrintPage("0", $ db);91 PrintPage("0", $host, $user, $pw, $db); 92 92 } 93 93 else … … 102 102 printf("No query submitted yet.<BR>"); 103 103 else 104 PrintPage("1", $ db);104 PrintPage("1", $host, $user, $pw, $db); 105 105 106 106 echo (file_get_contents("index-footer.html")); -
trunk/MagicSoft/Mars/datacenter/db/queryseq.php
r7484 r7546 190 190 } 191 191 192 function PrintForm($_GET, $ db)192 function PrintForm($_GET, $host, $user, $pw, $db) 193 193 { 194 194 printf("<center>\n"); … … 216 216 printf(" <table>\n"); 217 217 printf(" <tr><td>\n"); 218 PrintPullDown($ db, "Source", "fSourceName", "fSourceKEY", "Source Name");219 printf(" </td><td>\n"); 220 PrintPullDown($ db, "TriggerTable", "fTriggerTableName", "fTriggerTableKEY", "Trigger Table");221 printf(" </td><td>\n"); 222 PrintPullDown($ db, "TriggerDelayTable", "fTriggerDelayTableName", "fTriggerDelayTableKEY", "Trigger Delay Table");218 PrintPullDown($host, $user, $pw, $db, "Source", "fSourceName", "fSourceKEY", "Source Name"); 219 printf(" </td><td>\n"); 220 PrintPullDown($host, $user, $pw, $db, "TriggerTable", "fTriggerTableName", "fTriggerTableKEY", "Trigger Table"); 221 printf(" </td><td>\n"); 222 PrintPullDown($host, $user, $pw, $db, "TriggerDelayTable", "fTriggerDelayTableName", "fTriggerDelayTableKEY", "Trigger Delay Table"); 223 223 printf(" </td></tr><tr><td>\n"); 224 PrintPullDown($ db, "Project", "fProjectName", "fProjectKEY", "Project Name");225 printf(" </td><td>\n"); 226 PrintPullDown($ db, "HvSettings", "fHvSettingsName", "fHvSettingsKEY", "HV Settings");227 printf(" </td><td>\n"); 228 PrintPullDown($ db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");224 PrintPullDown($host, $user, $pw, $db, "Project", "fProjectName", "fProjectKEY", "Project Name"); 225 printf(" </td><td>\n"); 226 PrintPullDown($host, $user, $pw, $db, "HvSettings", "fHvSettingsName", "fHvSettingsKEY", "HV Settings"); 227 printf(" </td><td>\n"); 228 PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table"); 229 229 printf(" </td></tr><tr><td>\n"); 230 PrintPullDown($ db, "TestFlag", "fTestFlagName", "fTestFlagKEY", "Test Flag");231 printf(" </td><td>\n"); 232 PrintPullDown($ db, "LightConditions", "fLightConditionsName", "fLightConditionsKEY", "Light Conditions");233 printf(" </td><td>\n"); 234 PrintPullDown($ db, "ManuallyChanged", "fManuallyChangedName", "fManuallyChangedKEY", "Manually changed");230 PrintPullDown($host, $user, $pw, $db, "TestFlag", "fTestFlagName", "fTestFlagKEY", "Test Flag"); 231 printf(" </td><td>\n"); 232 PrintPullDown($host, $user, $pw, $db, "LightConditions", "fLightConditionsName", "fLightConditionsKEY", "Light Conditions"); 233 printf(" </td><td>\n"); 234 PrintPullDown($host, $user, $pw, $db, "ManuallyChanged", "fManuallyChangedName", "fManuallyChangedKEY", "Manually changed"); 235 235 printf(" </td></tr>\n"); 236 236 printf(" </table>\n"); … … 238 238 239 239 if (empty($_GET["fStartDate"])) 240 $timemin = GetMin("fRunStart", "RunData", $ db);240 $timemin = GetMin("fRunStart", "RunData", $host, $user, $pw, $db); 241 241 else 242 242 $timemin = $_GET["fStartDate"]; 243 243 244 244 if (empty($_GET["fStopDate"])) 245 $timemax = GetMax("fRunStart", "RunData", $ db);245 $timemax = GetMax("fRunStart", "RunData", $host, $user, $pw, $db); 246 246 else 247 247 $timemax = $_GET["fStopDate"]; … … 251 251 252 252 if (empty($_GET["fRunMin"])) 253 $min = GetMin("fSequenceFirst", "Sequences", $ db);253 $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 254 254 else 255 255 $min = $_GET["fRunMin"]; 256 256 257 257 if (empty($_GET["fRunMax"])) 258 $max = GetMax("fSequenceFirst", "Sequences", $ db);258 $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 259 259 else 260 260 $max = $_GET["fRunMax"]; … … 301 301 } 302 302 303 function PrintPage($html, $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)304 { 305 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");303 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup) 304 { 305 $db_id = mysql_connect($host, $user, $pw); 306 306 if ($db_id==FALSE) 307 307 { … … 342 342 header("Content-Disposition: attachment; filename=query-result.txt"); 343 343 344 PrintPage("0", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);344 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup); 345 345 } 346 346 else … … 351 351 352 352 InitGet($_GET); 353 PrintForm($_GET, $ db);353 PrintForm($_GET, $host, $user, $pw, $db); 354 354 355 355 if ($environment==0) 356 356 printf("No query submitted yet.<BR>"); 357 357 else 358 PrintPage("1", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);358 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup); 359 359 360 360 echo (file_get_contents("index-footer.html")); -
trunk/MagicSoft/Mars/datacenter/db/querystar.php
r7504 r7546 75 75 } 76 76 77 function PrintForm($_GET, $ db)77 function PrintForm($_GET, $host, $user, $pw, $db) 78 78 { 79 79 printf("<center>\n"); … … 103 103 104 104 if (empty($_GET["fRunMin"])) 105 $min = GetMin("fSequenceFirst", "Sequences", $ db);105 $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 106 106 else 107 107 $min = $_GET["fRunMin"]; 108 108 109 109 if (empty($_GET["fRunMax"])) 110 $max = GetMax("fSequenceFirst", "Sequences", $ db);110 $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 111 111 else 112 112 $max = $_GET["fRunMax"]; … … 147 147 } 148 148 149 function PrintPage($html, $ db, $alias, $rightalign, $checkwhere)150 { 151 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");149 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere) 150 { 151 $db_id = mysql_connect($host, $user, $pw); 152 152 if ($db_id==FALSE) 153 153 { … … 188 188 header("Content-Disposition: attachment; filename=query-result.txt"); 189 189 190 PrintPage("0", $ db, $alias, $rightalign, $checkwhere);190 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere); 191 191 } 192 192 else … … 197 197 198 198 InitGet($_GET); 199 PrintForm($_GET, $ db);199 PrintForm($_GET, $host, $user, $pw, $db); 200 200 201 201 if ($environment==0) 202 202 printf("No query submitted yet.<BR>"); 203 203 else 204 PrintPage("1", $ db, $alias, $rightalign, $checkwhere);204 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere); 205 205 206 206 echo (file_get_contents("index-footer.html")); -
trunk/MagicSoft/Mars/datacenter/db/runinfo.php
r7527 r7546 319 319 } 320 320 321 function PrintForm($_GET, $ db)321 function PrintForm($_GET, $host, $user, $pw, $db) 322 322 { 323 323 printf("<center>\n"); … … 372 372 printf(" <table>\n"); 373 373 printf(" <tr><td>\n"); 374 PrintPullDown($ db, "RunType", "fRunTypeName", "fRunTypeKEY", "Run type");375 printf(" </td><td>\n"); 376 PrintPullDown($ db, "Source", "fSourceName", "fSourceKEY", "Source Name");377 printf(" </td><td>\n"); 378 PrintPullDown($ db, "HvSettings", "fHvSettingsName", "fHvSettingsKEY", "HV Settings");379 printf(" </td><td>\n"); 380 PrintPullDown($ db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1 Trigger Table");374 PrintPullDown($host, $user, $pw, $db, "RunType", "fRunTypeName", "fRunTypeKEY", "Run type"); 375 printf(" </td><td>\n"); 376 PrintPullDown($host, $user, $pw, $db, "Source", "fSourceName", "fSourceKEY", "Source Name"); 377 printf(" </td><td>\n"); 378 PrintPullDown($host, $user, $pw, $db, "HvSettings", "fHvSettingsName", "fHvSettingsKEY", "HV Settings"); 379 printf(" </td><td>\n"); 380 PrintPullDown($host, $user, $pw, $db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1 Trigger Table"); 381 381 printf(" </td></tr><tr><td>\n"); 382 PrintPullDown($ db, "TestFlag", "fTestFlagName", "fTestFlagKEY", "Test Flag");383 printf(" </td><td>\n"); 384 PrintPullDown($ db, "Project", "fProjectName", "fProjectKEY", "Project Name");385 printf(" </td><td>\n"); 386 PrintPullDown($ db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");387 printf(" </td><td>\n"); 388 PrintPullDown($ db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2 Trigger Table");382 PrintPullDown($host, $user, $pw, $db, "TestFlag", "fTestFlagName", "fTestFlagKEY", "Test Flag"); 383 printf(" </td><td>\n"); 384 PrintPullDown($host, $user, $pw, $db, "Project", "fProjectName", "fProjectKEY", "Project Name"); 385 printf(" </td><td>\n"); 386 PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table"); 387 printf(" </td><td>\n"); 388 PrintPullDown($host, $user, $pw, $db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2 Trigger Table"); 389 389 printf(" </td></tr><tr><td>\n"); 390 PrintPullDown($ db, "ExcludedFDA", "fExcludedFDAName", "fExcludedFDAKEY", "Exclusions");391 printf(" </td><td>\n"); 392 PrintPullDown($ db, "LightConditions", "fLightConditionsName", "fLightConditionsKEY", "Light Conditions");393 printf(" </td><td>\n"); 394 PrintPullDown($ db, "CalibrationScript", "fCalibrationScriptName", "fCalibrationScriptKEY", "Cal Script");395 printf(" </td><td>\n"); 396 PrintPullDown($ db, "TriggerDelayTable", "fTriggerDelayTableName", "fTriggerDelayTableKEY", "Trigger Delay Table");390 PrintPullDown($host, $user, $pw, $db, "ExcludedFDA", "fExcludedFDAName", "fExcludedFDAKEY", "Exclusions"); 391 printf(" </td><td>\n"); 392 PrintPullDown($host, $user, $pw, $db, "LightConditions", "fLightConditionsName", "fLightConditionsKEY", "Light Conditions"); 393 printf(" </td><td>\n"); 394 PrintPullDown($host, $user, $pw, $db, "CalibrationScript", "fCalibrationScriptName", "fCalibrationScriptKEY", "Cal Script"); 395 printf(" </td><td>\n"); 396 PrintPullDown($host, $user, $pw, $db, "TriggerDelayTable", "fTriggerDelayTableName", "fTriggerDelayTableKEY", "Trigger Delay Table"); 397 397 printf(" </td></tr><tr><td>\n"); 398 PrintPullDown($ db, "MagicNumber", "fMagicNumberName", "fMagicNumberKEY", "Magic Number");398 PrintPullDown($host, $user, $pw, $db, "MagicNumber", "fMagicNumberName", "fMagicNumberKEY", "Magic Number"); 399 399 printf(" </td></tr></table>\n"); 400 400 … … 402 402 403 403 if (empty($_GET["fStartDate"])) 404 $timemin = GetMin("fRunStart", "RunData", $ db);404 $timemin = GetMin("fRunStart", "RunData", $host, $user, $pw, $db); 405 405 else 406 406 $timemin = $_GET["fStartDate"]; 407 407 408 408 if (empty($_GET["fStopDate"])) 409 $timemax = GetMax("fRunStart", "RunData", $ db);409 $timemax = GetMax("fRunStart", "RunData", $host, $user, $pw, $db); 410 410 else 411 411 $timemax = $_GET["fStopDate"]; … … 427 427 428 428 if (empty($_GET["fRunMin"])) 429 $min = GetMin("fRunNumber", "RunData", $ db);429 $min = GetMin("fRunNumber", "RunData", $host, $user, $pw, $db); 430 430 else 431 431 $min = $_GET["fRunMin"]; 432 432 433 433 if (empty($_GET["fRunMax"])) 434 $max = GetMax("fRunNumber", "RunData", $ db);434 $max = GetMax("fRunNumber", "RunData", $host, $user, $pw, $db); 435 435 else 436 436 $max = $_GET["fRunMax"]; … … 477 477 } 478 478 479 function PrintPage($html, $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs)479 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs) 480 480 { 481 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");481 $db_id = mysql_connect($host, $user, $pw); 482 482 if ($db_id==FALSE) 483 483 { … … 519 519 header("Content-Disposition: attachment; filename=query-result.txt"); 520 520 521 PrintPage("0", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);521 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs); 522 522 } 523 523 else … … 529 529 InitGet($_GET); 530 530 if (empty($_GET["fPrintTable"])) 531 PrintForm($_GET, $ db);531 PrintForm($_GET, $host, $user, $pw, $db); 532 532 533 533 if ($environment==0) … … 536 536 { 537 537 if (empty($_GET["fPrintTable"])) 538 PrintPage("1", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);538 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs); 539 539 else 540 PrintPage("2", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);540 PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs); 541 541 } 542 542 -
trunk/MagicSoft/Mars/datacenter/db/sequence.php
r7507 r7546 74 74 } 75 75 76 function PrintForm($_GET, $ db)76 function PrintForm($_GET, $host, $user, $pw, $db) 77 77 { 78 78 printf("<center>\n"); … … 86 86 87 87 if (empty($_GET["fRunMin"])) 88 $min = GetMin("fSequenceFirst", "Sequences", $ db);88 $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 89 89 else 90 90 $min = $_GET["fRunMin"]; 91 91 92 92 if (empty($_GET["fRunMax"])) 93 $max = GetMax("fSequenceFirst", "Sequences", $ db);93 $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 94 94 else 95 95 $max = $_GET["fRunMax"]; … … 510 510 } 511 511 512 function PrintPage($html, $ db)513 { 514 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");512 function PrintPage($html, $host, $user, $pw, $db) 513 { 514 $db_id = mysql_connect($host, $user, $pw); 515 515 if ($db_id==FALSE) 516 516 { … … 550 550 header("Content-Disposition: attachment; filename=query-result.txt"); 551 551 552 PrintPage("0", $ db);552 PrintPage("0", $host, $user, $pw, $db); 553 553 } 554 554 else … … 560 560 InitGet($_GET); 561 561 if (empty($_GET["fPrintTable"])) 562 PrintForm($_GET, $ db);562 PrintForm($_GET, $host, $user, $pw, $db); 563 563 564 564 if ($environment==0) … … 567 567 { 568 568 if (empty($_GET["fPrintTable"])) 569 PrintPage("1", $ db);569 PrintPage("1", $host, $user, $pw, $db); 570 570 else 571 PrintPage("2", $ db);571 PrintPage("2", $host, $user, $pw, $db); 572 572 } 573 573 -
trunk/MagicSoft/Mars/datacenter/db/sequinfo.php
r7527 r7546 403 403 } 404 404 405 function PrintForm($_GET, $ db)405 function PrintForm($_GET, $host, $user, $pw, $db) 406 406 { 407 407 printf("<center>\n"); … … 520 520 printf(" <table>\n"); 521 521 printf(" <tr><td>\n"); 522 PrintPullDown($ db, "Source", "fSourceName", "fSourceKEY", "Source Name");523 printf(" </td><td>\n"); 524 PrintPullDown($ db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1Trigger Table");525 printf(" </td><td>\n"); 526 PrintPullDown($ db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2Trigger Table");527 printf(" </td><td>\n"); 528 PrintPullDown($ db, "TriggerDelayTable", "fTriggerDelayTableName", "fTriggerDelayTableKEY", "Trigger Delay Table");522 PrintPullDown($host, $user, $pw, $db, "Source", "fSourceName", "fSourceKEY", "Source Name"); 523 printf(" </td><td>\n"); 524 PrintPullDown($host, $user, $pw, $db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1Trigger Table"); 525 printf(" </td><td>\n"); 526 PrintPullDown($host, $user, $pw, $db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2Trigger Table"); 527 printf(" </td><td>\n"); 528 PrintPullDown($host, $user, $pw, $db, "TriggerDelayTable", "fTriggerDelayTableName", "fTriggerDelayTableKEY", "Trigger Delay Table"); 529 529 printf(" </td></tr><tr><td>\n"); 530 PrintPullDown($ db, "LightConditions", "fLightConditionsName", "fLightConditionsKEY", "Light Conditions");531 printf(" </td><td>\n"); 532 PrintPullDown($ db, "Project", "fProjectName", "fProjectKEY", "Project Name");533 printf(" </td><td>\n"); 534 PrintPullDown($ db, "HvSettings", "fHvSettingsName", "fHvSettingsKEY", "HV Settings");535 printf(" </td><td>\n"); 536 PrintPullDown($ db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");530 PrintPullDown($host, $user, $pw, $db, "LightConditions", "fLightConditionsName", "fLightConditionsKEY", "Light Conditions"); 531 printf(" </td><td>\n"); 532 PrintPullDown($host, $user, $pw, $db, "Project", "fProjectName", "fProjectKEY", "Project Name"); 533 printf(" </td><td>\n"); 534 PrintPullDown($host, $user, $pw, $db, "HvSettings", "fHvSettingsName", "fHvSettingsKEY", "HV Settings"); 535 printf(" </td><td>\n"); 536 PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table"); 537 537 printf(" </td></tr><tr><td>\n"); 538 PrintPullDown($ db, "ManuallyChanged", "fManuallyChangedName", "fManuallyChangedKEY", "Manually changed");539 printf(" </td><td>\n"); 540 PrintPullDown($ db, "TestFlag", "fTestFlagName", "fTestFlagKEY", "Test Flag");538 PrintPullDown($host, $user, $pw, $db, "ManuallyChanged", "fManuallyChangedName", "fManuallyChangedKEY", "Manually changed"); 539 printf(" </td><td>\n"); 540 PrintPullDown($host, $user, $pw, $db, "TestFlag", "fTestFlagName", "fTestFlagKEY", "Test Flag"); 541 541 printf(" </td></tr>\n"); 542 542 printf(" </table>\n"); … … 544 544 545 545 if (empty($_GET["fStartDate"])) 546 $timemin = GetMin("fRunStart", "Sequences", $ db);546 $timemin = GetMin("fRunStart", "Sequences", $host, $user, $pw, $db); 547 547 else 548 548 $timemin = $_GET["fStartDate"]; 549 549 550 550 if (empty($_GET["fStopDate"])) 551 $timemax = GetMax("fRunStart", "Sequences", $ db);551 $timemax = GetMax("fRunStart", "Sequences", $host, $user, $pw, $db); 552 552 else 553 553 $timemax = $_GET["fStopDate"]; … … 557 557 558 558 if (empty($_GET["fRunMin"])) 559 $min = GetMin("fSequenceFirst", "Sequences", $ db);559 $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 560 560 else 561 561 $min = $_GET["fRunMin"]; 562 562 563 563 if (empty($_GET["fRunMax"])) 564 $max = GetMax("fSequenceFirst", "Sequences", $ db);564 $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db); 565 565 else 566 566 $max = $_GET["fRunMax"]; … … 614 614 } 615 615 616 function PrintPage($html, $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs)616 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs) 617 617 { 618 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");618 $db_id = mysql_connect($host, $user, $pw); 619 619 if ($db_id==FALSE) 620 620 { … … 655 655 header("Content-Disposition: attachment; filename=query-result.txt"); 656 656 657 PrintPage("0", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);657 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs); 658 658 } 659 659 else … … 665 665 InitGet($_GET); 666 666 if (empty($_GET["fPrintTable"])) 667 PrintForm($_GET, $ db);667 PrintForm($_GET, $host, $user, $pw, $db); 668 668 669 669 if ($environment==0) … … 672 672 { 673 673 if (empty($_GET["fPrintTable"])) 674 PrintPage("1", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);674 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs); 675 675 else 676 PrintPage("2", $ db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);676 PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs); 677 677 } 678 678 -
trunk/MagicSoft/Mars/datacenter/db/sources.php
r7484 r7546 87 87 } 88 88 89 function PrintPage($html, $ db, $alias, $rightalign)89 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign) 90 90 { 91 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");91 $db_id = mysql_connect($host, $user, $pw); 92 92 if ($db_id==FALSE) 93 93 { … … 128 128 header("Content-Disposition: attachment; filename=query-result.txt"); 129 129 130 PrintPage("0", $ db, $alias, $rightalign);130 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign); 131 131 } 132 132 else … … 142 142 printf("No query submitted yet.<BR>"); 143 143 else 144 PrintPage("1", $ db, $alias, $rightalign);144 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign); 145 145 146 146 echo (file_get_contents("index-footer.html")); -
trunk/MagicSoft/Mars/datacenter/db/statusrps.php
r7527 r7546 121 121 } 122 122 123 function PrintForm($_GET, $ db)123 function PrintForm($_GET, $host, $user, $pw, $db) 124 124 { 125 125 printf("<center>\n"); … … 146 146 147 147 if (empty($_GET["fRunMin"])) 148 $min = GetMin("fRunNumber", "RunProcessStatus", $ db);148 $min = GetMin("fRunNumber", "RunProcessStatus", $host, $user, $pw, $db); 149 149 else 150 150 $min = $_GET["fRunMin"]; 151 151 152 152 if (empty($_GET["fRunMax"])) 153 $max = GetMax("fRunNumber", "RunProcessStatus", $ db);153 $max = GetMax("fRunNumber", "RunProcessStatus", $host, $user, $pw, $db); 154 154 else 155 155 $max = $_GET["fRunMax"]; … … 190 190 } 191 191 192 function PrintPage($html, $ db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs)193 { 194 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");192 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs) 193 { 194 $db_id = mysql_connect($host, $user, $pw); 195 195 if ($db_id==FALSE) 196 196 { … … 231 231 header("Content-Disposition: attachment; filename=query-result.txt"); 232 232 233 PrintPage("0", $ db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);233 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs); 234 234 } 235 235 else … … 240 240 241 241 InitGet($_GET); 242 PrintForm($_GET, $ db);242 PrintForm($_GET, $host, $user, $pw, $db); 243 243 244 244 if ($environment==0) 245 245 printf("No query submitted yet.<BR>"); 246 246 else 247 PrintPage("1", $ db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);247 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs); 248 248 249 249 echo (file_get_contents("index-footer.html")); -
trunk/MagicSoft/Mars/datacenter/db/statussbs.php
r7527 r7546 100 100 } 101 101 102 function PrintForm($_GET, $ db)102 function PrintForm($_GET, $host, $user, $pw, $db) 103 103 { 104 104 printf("<center>\n"); … … 122 122 123 123 if (empty($_GET["fRunMin"])) 124 $min = GetMin("fDate", "SequenceBuildStatus", $ db);124 $min = GetMin("fDate", "SequenceBuildStatus", $host, $user, $pw, $db); 125 125 else 126 126 $min = $_GET["fRunMin"]; 127 127 128 128 if (empty($_GET["fRunMax"])) 129 $max = GetMax("fDate", "SequenceBuildStatus", $ db);129 $max = GetMax("fDate", "SequenceBuildStatus", $host, $user, $pw, $db); 130 130 else 131 131 $max = $_GET["fRunMax"]; … … 166 166 } 167 167 168 function PrintPage($html, $ db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs)169 { 170 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");168 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs) 169 { 170 $db_id = mysql_connect($host, $user, $pw); 171 171 if ($db_id==FALSE) 172 172 { … … 207 207 header("Content-Disposition: attachment; filename=query-result.txt"); 208 208 209 PrintPage("0", $ db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);209 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs); 210 210 } 211 211 else … … 216 216 217 217 InitGet($_GET); 218 PrintForm($_GET, $ db);218 PrintForm($_GET, $host, $user, $pw, $db); 219 219 220 220 if ($environment==0) 221 221 printf("No query submitted yet.<BR>"); 222 222 else 223 PrintPage("1", $ db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);223 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs); 224 224 225 225 echo (file_get_contents("index-footer.html")); -
trunk/MagicSoft/Mars/datacenter/db/statussps.php
r7527 r7546 110 110 } 111 111 112 function PrintForm($_GET, $ db)112 function PrintForm($_GET, $host, $user, $pw, $db) 113 113 { 114 114 printf("<center>\n"); … … 135 135 136 136 if (empty($_GET["fRunMin"])) 137 $min = GetMin("fSequenceFirst", "SequenceProcessStatus", $ db);137 $min = GetMin("fSequenceFirst", "SequenceProcessStatus", $host, $user, $pw, $db); 138 138 else 139 139 $min = $_GET["fRunMin"]; 140 140 141 141 if (empty($_GET["fRunMax"])) 142 $max = GetMax("fSequenceFirst", "SequenceProcessStatus", $ db);142 $max = GetMax("fSequenceFirst", "SequenceProcessStatus", $host, $user, $pw, $db); 143 143 else 144 144 $max = $_GET["fRunMax"]; … … 179 179 } 180 180 181 function PrintPage($html, $ db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs)182 { 183 $db_id = mysql_connect( "hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");181 function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs) 182 { 183 $db_id = mysql_connect($host, $user, $pw); 184 184 if ($db_id==FALSE) 185 185 { … … 220 220 header("Content-Disposition: attachment; filename=query-result.txt"); 221 221 222 PrintPage("0", $ db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);222 PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs); 223 223 } 224 224 else … … 229 229 230 230 InitGet($_GET); 231 PrintForm($_GET, $ db);231 PrintForm($_GET, $host, $user, $pw, $db); 232 232 233 233 if ($environment==0) 234 234 printf("No query submitted yet.<BR>"); 235 235 else 236 PrintPage("1", $ db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);236 PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs); 237 237 238 238 echo (file_get_contents("index-footer.html"));
Note:
See TracChangeset
for help on using the changeset viewer.