Ignore:
Timestamp:
02/24/06 19:12:49 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/db/include.php

    r7484 r7527  
    104104}
    105105
    106 function StatusQuery($name)
     106function StatusQuery($name, $needs)
    107107{
    108108    $var  = $name . "Status";
     
    112112    case 0: $txt .= ""; break;
    113113    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;
    115115    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;
    117121    }
    118122    return $txt;
     
    138142          2 => "not done",
    139143          3 => "not to be done",
    140           4 => "group by"
     144          4 => "running",
     145          5 => "failed",
     146          6 => "crashed",
     147          7 => "group by",
    141148        );
    142149
    143150    $stat=$_GET[$var];
    144     for ($i=0; $i<5; $i++)
     151    for ($i=0; $i<8; $i++)
    145152    {
    146153        if ($stat==$i)
     
    399406    foreach ($_GET as $key => $element)
    400407        if ($key==$column)
    401             if ($element==4)
     408            if ($element==7)
    402409                return -1;
    403410    return 0;
Note: See TracChangeset for help on using the changeset viewer.