Changeset 9599 for trunk/MagicSoft/Mars/datacenter/db/include.php
- Timestamp:
- 06/28/10 17:47:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/include.php
r9548 r9599 50 50 } 51 51 52 function StatusQuery($name, $ needs, $timelimits)52 function StatusQuery($name, $timelimits) 53 53 { 54 54 if (empty($timelimits[$name])) … … 60 60 switch ($_GET[$var]) 61 61 { 62 case 0: $txt .= ""; break; 63 case 1: $txt .= "NOT (IsNull(" . $name . ") OR " . $name . "='1970-01-01 00:00:00') AND "; break; 64 // case 2: $txt .= "IsNull(" . $name . ") AND IsNull(fStartTime) AND IsNull(fFailedTime) AND NOT IsNull(" . $needs[$name] . ") AND "; break; //not done but step before is done 65 case 2: $txt .= "IsNull(" . $name . ") AND "; break; //not done no matter what status of previous step is 66 case 3: $txt .= $name ."='1970-01-01 00:00:00' AND "; break; 67 case 4: $txt .= " (IsNull(" . $name . ") AND IsNull(fFailedTime) AND NOT IsNull(fStartTime) AND date_sub(Now(),interval " . $timelimit . " hour) < fStartTime AND NOT IsNull(" . $needs[$name] . ")) AND "; break; 68 case 5: $txt .= " (IsNull(" . $name . ") AND NOT IsNull(fFailedTime) AND NOT IsNull(fStartTime) AND NOT IsNull(" . $needs[$name] . ")) AND "; break; 69 case 6: $txt .= " (IsNull(" . $name . ") AND IsNull(fFailedTime) AND NOT IsNull(fStartTime) AND date_sub(Now(),interval " . $timelimit . " hour) > fStartTime AND NOT IsNull(" . $needs[$name] . ")) AND "; break; 70 // case 6: $txt .= "crashed"; break; 71 case 7: $txt .= ""; break; 62 case 0://all 63 $txt .= " "; 64 break; 65 case 1://done 66 $txt .= " NOT ISNULL(" . $name . "Status.fStartTime) AND " 67 ." NOT ISNULL(" . $name . "Status.fStopTime) AND " 68 ." ISNULL(" . $name . "Status.fReturnCode) AND "; 69 break; 70 case 2://not done 71 $txt .= " ISNULL(" . $name . "Status.fStartTime) AND " 72 ." ISNULL(" . $name . "Status.fStopTime) AND " 73 ." ISNULL(" . $name . "Status.fReturnCode) AND "; 74 break; 75 case 3://not to be done 76 $txt .= $name ."Status.fStartTime='1970-01-01 00:00:00' AND " 77 . $name ."Status.fStopTime='1970-01-01 00:00:00' AND "; 78 break; 79 case 4://running 80 $txt .= " NOT ISNULL(" . $name . "Status.fStartTime) AND " 81 ." DATE_SUB(Now(),INTERVAL " . $timelimit . " HOUR) < " . $name . "Status.fStartTime AND " 82 ." ISNULL(" . $name . "Status.fStopTime) AND " 83 ." ISNULL(" . $name . "Status.fReturnCode) AND "; 84 break; 85 case 5://failed 86 $txt .= " NOT ISNULL(" . $name . "Status.fStartTime) AND " 87 ." NOT ISNULL(" . $name . "Status.fStopTime) AND " 88 ." NOT ISNULL(" . $name . "Status.fReturnCode) AND "; 89 break; 90 case 6://crashed 91 $txt .= " NOT ISNULL(" . $name . "Status.fStartTime) AND " 92 ." DATE_SUB(Now(),INTERVAL " . $timelimit . " HOUR) > " . $name . "Status.fStartTime AND " 93 ." ISNULL(" . $name . "Status.fStopTime) AND " 94 ." ISNULL(" . $name . "Status.fReturnCode) AND "; 95 break; 96 case 7://group by 97 $txt .= ""; 98 break; 72 99 } 73 100 return $txt; … … 108 135 } 109 136 110 /*111 $status = array("all", "done", "not done", "not to be done");112 $counter = 0;113 foreach ($status as $element)114 {115 if ($counter==$_GET[$var])116 printf("<option value=\"%d\" selected>%3s</option>\n", $counter++, $element);117 else118 printf("<option value=\"%d\">%3s</option>\n", $counter++, $element);119 }*/120 137 printf(" </select>\n"); 121 138 printf(" \n"); … … 329 346 { 330 347 foreach ($_GET as $key => $element) 331 if ($key==$column )348 if ($key==$column."Status") 332 349 if ($element==7) 333 350 return -1;
Note:
See TracChangeset
for help on using the changeset viewer.