} if (!$from || !$to) { $to = $cur; $from = $to - $to % 86400; } $filter = array("setup" => $ADEI_SETUP); foreach (array("setup", "session", "source", "pid", "client") as $prop) { if (isset($_REQUEST[$prop])) { if ($_REQUEST[$prop] === "") { unset($filter[$prop]); } else { $filter[$prop] = $_REQUEST[$prop]; } } } $logs = adeiGetLogs($from, $to, $priority, $filter); } catch (ADEIException $ex) { $ex->logInfo(NULL, $req); $error = xml_escape($ex->getInfo()); } break; default: if (isset($_GET['target'])) { $error = translate("Unknown info target (%s) is specified", $_GET['target']); } else { $error = translate("The info target is not specified"); } } function OutputCacheInfo($out, &$item) { global $fix_time;
} function Filter(&$log, $add, $value=false) { global $interval; global $filter; $nfilter = $filter; if ($value !== false) $nfilter[$add] = $value; else $nfilter[$add] = $log[$add]; return "index.php?page=logview.php&interval=" . $interval . "&filter=" . urlencode(json_encode($nfilter)); } echo translate("ADEI Logs for: ") . date("c", $from) . " - " . date("c", $to) . "<br/><br/>"; $logs = adeiGetLogs($from, $to, $priority, $filter?$filter:false); ?><table class="logtable"><tr> <th><?echo translate("Time");?></th> <th><?echo translate("Setup");?></th> <th><?echo translate("Server");?></th> <th><?echo translate("Source");?></th> <th><?echo translate("Session");?></th> <th><?echo translate("PID");?></th> <th><?echo translate("Client");?></th> <th><?echo translate("Priority");?></th> </tr></th><? foreach($logs as $log) { $info = adeiGetLogInfo($log['logfile'], $log['filepos']); if ($filter) { if (($filter["db_server"])&&($info['GET']['db_server'] != $filter["db_server"])) continue;