Changeset 8333 for trunk/MagicSoft/Mars
- Timestamp:
- 02/26/07 12:59:57 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/db
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/builddatasets.php
r8273 r8333 451 451 printf("<p>"); 452 452 PrintSourceMenu($host,$user,$pw,$db); 453 PrintNightRangeMenu($host,$user,$pw,$db );453 PrintNightRangeMenu($host,$user,$pw,$db, "Sequences"); 454 454 PrintStarRangeMenu($host,$user,$pw,$db); 455 455 printf("<p>"); … … 930 930 $siteuser="dcdb"; 931 931 932 932 933 if (!isset($_SERVER['PHP_AUTH_USER']) || crypt($_SERVER['PHP_AUTH_PW'], $sitepw)!=$sitepw || $_SERVER['PHP_AUTH_USER']!=$siteuser) 933 934 { -
trunk/MagicSoft/Mars/datacenter/db/findoffdata.php
r8249 r8333 349 349 PrintSourceMenu($host,$user,$pw,$db); 350 350 printf("<p>\n"); 351 PrintNightRangeMenu($host,$user,$pw,$db );351 PrintNightRangeMenu($host,$user,$pw,$db, "Sequences"); 352 352 printf("<p>\n"); 353 353 -
trunk/MagicSoft/Mars/datacenter/db/include.php
r8199 r8333 223 223 224 224 return $max; 225 } 226 227 function GetMaxDate($field, $table, $host, $user, $pw, $db) 228 { 229 $db_id = mysql_connect($host, $user, $pw); 230 if ($db_id==FALSE) 231 { 232 printf("mysql_connect returned the following error:<br>"); 233 printf("%s<br>", mysql_error()); 234 die(""); 235 } 236 237 $query = "SELECT DATE_FORMAT(if(MAX(" . $field . ")<'13:00:00', MAX(" . $field . "), ADDDATE(MAX(" . $field . "), INTERVAL +1 DAY)), '%Y-%m-%d') FROM " . $db . "." . $table; 238 $result = mysql_query($query); 239 if (!$result) 240 return "0"; 241 242 $row = mysql_fetch_row($result); 243 244 $maxdate = $row[0]; 245 246 mysql_free_result($result); 247 mysql_close($db_id); 248 249 return $maxdate; 225 250 } 226 251 -
trunk/MagicSoft/Mars/datacenter/db/menu.php
r8252 r8333 483 483 } 484 484 485 function PrintNightRangeMenu($host,$user,$pw,$db )485 function PrintNightRangeMenu($host,$user,$pw,$db, $table) 486 486 { 487 487 if (empty($_GET["fStartDate"])) 488 $timemin = GetMin("fRunStart", "Sequences", $host, $user, $pw, $db);488 $timemin = GetMin("fRunStart", $table, $host, $user, $pw, $db); 489 489 else 490 490 $timemin = $_GET["fStartDate"]; 491 491 492 492 if (empty($_GET["fStopDate"])) 493 $timemax = GetMax ("fRunStart", "Sequences", $host, $user, $pw, $db);493 $timemax = GetMaxDate("fRunStart", $table, $host, $user, $pw, $db); 494 494 else 495 495 $timemax = $_GET["fStopDate"]; 496 496 497 497 printf("Night (yyyy-mm-dd) from <input name=\"fStartDate\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"%s\">\n", $timemin); -
trunk/MagicSoft/Mars/datacenter/db/runinfo-aio.php
r8249 r8333 248 248 printf(" <div id='ranges' style='display:none'>"); 249 249 PrintSequMenu($host,$user,$pw,$db); 250 PrintNightRangeMenu($host,$user,$pw,$db );250 PrintNightRangeMenu($host,$user,$pw,$db, "RunData"); 251 251 printf("<p>"); 252 252 PrintZdRangeMenu($host,$user,$pw,$db); -
trunk/MagicSoft/Mars/datacenter/db/sequinfo-aio.php
r8249 r8333 308 308 printf("<p>"); 309 309 PrintSourceMenu($host,$user,$pw,$db); 310 PrintNightRangeMenu($host,$user,$pw,$db );310 PrintNightRangeMenu($host,$user,$pw,$db, "Sequences"); 311 311 printf("<p>"); 312 312 printf("</div>");
Note:
See TracChangeset
for help on using the changeset viewer.