Changeset 7527 for trunk/MagicSoft/Mars/datacenter/db/include.php
- Timestamp:
- 02/24/06 19:12:49 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/include.php
r7484 r7527 104 104 } 105 105 106 function StatusQuery($name )106 function StatusQuery($name, $needs) 107 107 { 108 108 $var = $name . "Status"; … … 112 112 case 0: $txt .= ""; break; 113 113 case 1: $txt .= "NOT (IsNull(" . $name . ") OR " . $name . "='1970-01-01 00:00:00') AND "; break; 114 case 2: $txt .= "IsNull(" . $name . ") AND "; break;114 case 2: $txt .= "IsNull(" . $name . ") AND IsNull(fStartTime) AND IsNull(fFailedTime) AND NOT IsNull(" . $needs[$name] . ") AND "; break; 115 115 case 3: $txt .= $name ."='1970-01-01 00:00:00' AND "; break; 116 case 4: $txt .= ""; break; 116 case 4: $txt .= " (IsNull(" . $name . ") AND IsNull(fFailedTime) AND NOT IsNull(fStartTime) AND date_sub(Now(),interval 12 hour) < fStartTime AND NOT IsNull(" . $needs[$name] . ")) AND "; break; 117 case 5: $txt .= " (IsNull(" . $name . ") AND NOT IsNull(fFailedTime) AND NOT IsNull(fStartTime) AND NOT IsNull(" . $needs[$name] . ")) AND "; break; 118 case 6: $txt .= " (IsNull(" . $name . ") AND IsNull(fFailedTime) AND NOT IsNull(fStartTime) AND date_sub(Now(),interval 12 hour) > fStartTime AND NOT IsNull(" . $needs[$name] . ")) AND "; break; 119 // case 6: $txt .= "crashed"; break; 120 case 7: $txt .= ""; break; 117 121 } 118 122 return $txt; … … 138 142 2 => "not done", 139 143 3 => "not to be done", 140 4 => "group by" 144 4 => "running", 145 5 => "failed", 146 6 => "crashed", 147 7 => "group by", 141 148 ); 142 149 143 150 $stat=$_GET[$var]; 144 for ($i=0; $i< 5; $i++)151 for ($i=0; $i<8; $i++) 145 152 { 146 153 if ($stat==$i) … … 399 406 foreach ($_GET as $key => $element) 400 407 if ($key==$column) 401 if ($element== 4)408 if ($element==7) 402 409 return -1; 403 410 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.