.
See AUTHORS to learn who helped make it become a reality.
*/#### #### #### #### #### #### #### #### #### ####
include 'include.php';
if( !isset($_GET['slt']) )
{
header("Location: syslog-index.php");
exit;
}
WriteStandardHeader(_MSGShwSLog);
//classes
include _CLASSES . 'eventsnavigation.php';
include _CLASSES . 'eventfilter.php';
//the splitted sql statement
$cmdSQLfirst_part = 'SELECT ';
$cmdSQLmain_part = 'ID, '._DATE.', Facility, Priority, FromHost, Message FROM '._DBTABLENAME;
$cmdSQLlast_part = " WHERE InfoUnitID=1 AND SysLogTag LIKE '" . $_GET['slt'] . "' AND ";
// define the last part of the sql statment, e.g. the where part, ordery by, etc.
$myFilter = New EventFilter;
$cmdSQLlast_part .= $myFilter->GetSQLWherePart(1);
$cmdSQLlast_part .= $myFilter->GetSQLSort();
// how much data records should be displayed on one page
if($_SESSION['epp'] < 1 || $_SESSION['epp'] > 100)
$myEventsNavigation = new EventsNavigation(20);
else
$myEventsNavigation = new EventsNavigation($_SESSION['epp']);
$myEventsNavigation->SetEventCount($global_Con, $cmdSQLlast_part);
$num = $myEventsNavigation->GetEventCount();
// show (include) quick filters
include "quick-filter.php";
?>
<<
';
//SQL statement to get result with limitation
$res = db_exec_limit($global_Con, $cmdSQLfirst_part, $cmdSQLmain_part, $cmdSQLlast_part, $myEventsNavigation->GetLimitLower(), $myEventsNavigation->GetPageSize(), $myFilter->OrderBy);
echo '';
echo _MSGEvn, ' ', $myEventsNavigation->GetLimitLower(), ' ', _MSGTo, ' ', $myEventsNavigation->GetLimitUpper(), ' ', _MSGFrm, ' ', $myEventsNavigation->GetEventCount();
echo ' | ';
$myEventsNavigation->ShowNavigation();
?>
|
';
echo '' . $_GET['slt'] . ' | '; //date
echo '' . $row[_DATE] . ' | '; //date
echo '' . $row['FromHost'] . ' | '; //host
echo '' . $row['Facility'] . ' | '; //facility
// get the description of priority (and get the the right color, if enabled)
$pricol = 'TD' . $tc;
$priword = FormatPriority($row['Priority'], $pricol);
echo '', $priword, ' | ';
$message = htmlspecialchars($message);
if(isset($_SESSION['regexp']) && $_SESSION['regexp'] != "")
{
$_SESSION['regexp'] = trim($_SESSION['regexp']);
$messageUp = strtoupper($message);
$regexpUp = strtoupper($_SESSION['regexp']);
$search_pos = strpos($messageUp, $regexpUp);
if($search_pos !== FALSE)
{
$regexpLng = strlen($_SESSION['regexp']);
$strCount = substr_count($messageUp, $regexpUp);
$strTmp = $message;
$message = "";
for($i = 0; $i < $strCount; $i++)
{
$messageUp = strtoupper($strTmp);
$search_pos = strpos($messageUp, $regexpUp);
$subStrSt = substr($strTmp, 0 , $search_pos);
$subStrExp = substr($strTmp, $search_pos, $regexpLng);
$subStrEnd = substr($strTmp, ($search_pos + $regexpLng));
$message .= $subStrSt . '' . $subStrExp . '';
if($i == ($strCount - 1))
$message .= $subStrEnd;
$strTmp = $subStrEnd;
}
}
}
//Replace the words that had been read out from the ini file
if($file != FALSE)
{
for($i = 0; $i < $numarraywords; $i++)
{
$repstr = '';
$words[$i] = trim($words[$i]);
for($j = 0; $j < strlen($words[$i]); $j++) $repstr .= '*';
if($words[$i] != '')
$message = eregi_replace($words[$i], $repstr, $message);
}
}
echo '', $message, ' | '; //message
//for changing colors
if($tc == 1) $tc = 2;
else $tc = 1;
/*
echo "".$row['Priority']." | ";
*/
echo '';
}
echo "
";
WriteFooter();
?>