Merge branch 'detailview'

This commit is contained in:
Andre Lorbach 2008-04-25 14:35:26 +02:00
commit 51c8c2abca
9 changed files with 594 additions and 99 deletions

358
src/details.php Normal file
View File

@ -0,0 +1,358 @@
<?php
/*
*********************************************************************
* phpLogCon - http://www.phplogcon.org
* -----------------------------------------------------------------
* Details File
*
* -> Shows all possible details of a syslog message
*
* All directives are explained within this file
*
* Copyright (C) 2008 Adiscon GmbH.
*
* This file is part of phpLogCon.
*
* PhpLogCon is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PhpLogCon is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with phpLogCon. If not, see <http://www.gnu.org/licenses/>.
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution
*********************************************************************
*/
// *** Default includes and procedures *** //
define('IN_PHPLOGCON', true);
$gl_root_path = './';
// Now include necessary include files!
include($gl_root_path . 'include/functions_common.php');
include($gl_root_path . 'include/functions_frontendhelpers.php');
include($gl_root_path . 'include/functions_filters.php');
// Include LogStream facility
include($gl_root_path . 'classes/logstream.class.php');
InitPhpLogCon();
InitSourceConfigs();
InitFrontEndDefaults(); // Only in WebFrontEnd
InitFilterHelpers(); // Helpers for frontend filtering!
// ---
// --- Define Extra Stylesheet!
//$content['EXTRA_STYLESHEET'] = '<link rel="stylesheet" href="css/highlight.css" type="text/css">' . "\r\n";
//$content['EXTRA_STYLESHEET'] .= '<link rel="stylesheet" href="css/menu.css" type="text/css">';
// ---
// --- CONTENT Vars
if ( isset($_GET['uid']) )
$content['uid_current'] = intval($_GET['uid']);
else
$content['uid_current'] = UID_UNKNOWN;
// Copy UID for later use ...
$content['uid_fromgetrequest'] = $content['uid_current'];
// Init Pager variables
$content['uid_first'] = UID_UNKNOWN;
$content['uid_last'] = UID_UNKNOWN;
$content['main_pagerenabled'] = false;
$content['main_pager_first_found'] = false;
$content['main_pager_previous_found'] = false;
$content['main_pager_next_found'] = false;
$content['main_pager_last_found'] = false;
// Set Default reading direction
$content['read_direction'] = EnumReadDirection::Backward;
// If set read direction property!
if ( isset($_GET['direction']) )
{
if ( $_GET['direction'] == "next" )
{
$content['skiprecords'] = 1;
$content['read_direction'] = EnumReadDirection::Backward;
}
else if ( $_GET['direction'] == "previous" )
{
$content['skiprecords'] = 1;
$content['read_direction'] = EnumReadDirection::Forward;
}
}
// Init Sorting variables
$content['sorting'] = "";
$content['searchstr'] = "";
$content['highlightstr'] = "";
$content['EXPAND_HIGHLIGHT'] = "false";
// Set Page title
$content['TITLE'] = "phpLogCon :: Details";
// --- BEGIN Custom Code
if ( isset($content['Sources'][$currentSourceID]) ) // && $content['uid_current'] != UID_UNKNOWN ) // && $content['Sources'][$currentSourceID]['SourceType'] == SOURCE_DISK )
{
// Obtain and get the Config Object
$stream_config = $content['Sources'][$currentSourceID]['ObjRef'];
// Create LogStream Object
$stream = $stream_config->LogStreamFactory($stream_config);
// $stream->SetFilter($content['searchstr']);
// --- Init the fields we need
foreach($fields as $mycolkey => $myfield)
{
$content['fields'][$mycolkey]['FieldID'] = $mycolkey;
$content['fields'][$mycolkey]['FieldCaption'] = $content[ $myfield['FieldCaptionID'] ];
$content['fields'][$mycolkey]['FieldType'] = $myfield['FieldType'];
$content['fields'][$mycolkey]['DefaultWidth'] = $myfield['DefaultWidth'];
// Append to columns array
$content['AllColumns'][] = $mycolkey;
}
// ---
$res = $stream->Open( $content['AllColumns'], true );
if ( $res == SUCCESS )
{
// TODO Implement ORDER
$stream->SetReadDirection($content['read_direction']);
// Set current ID and init Counter
$uID = $content['uid_current'];
if ( $uID != UID_UNKNOWN ) // We know the UID, so read from where we know
$ret = $stream->Read($uID, $logArray);
else // Unknown UID, so we start from first!
$ret = $stream->ReadNext($uID, $logArray);
// --- If set we move forward / backward!
if ( isset($content['skiprecords']) && $content['skiprecords'] >= 1 )
{
$counter = 0;
while( $counter < $content['skiprecords'] && ($ret = $stream->ReadNext($uID, $logArray)) == SUCCESS)
{
// Increment Counter
$counter++;
}
}
// ---
// Set new current uid!
if ( isset($uID) && $uID != UID_UNKNOWN )
$content['uid_current'] = $uID;
// now we know enough to set the page title!
$content['TITLE'] = "phpLogCon :: " . $content['LN_DETAILS_DETAILSFORMSG'] . " '" . $uID . "'";
// We found matching records, so continue
if ( $ret == SUCCESS )
{
// --- PreChecks to be done
// Set Record Count
$content['main_recordcount'] = $stream->GetMessageCount();
if ( $content['main_recordcount'] != -1 )
$content['main_recordcount_found'] = true;
else
$content['main_recordcount_found'] = false;
// ---
// Loop through fields - Copy value into fields list! We are going to use this list here
$counter = 0;
foreach($content['fields'] as $mycolkey => $myfield)
{
// // Default copy value into array!
// $content['fields'][$mycolkey]['FieldValue'] = $logArray[$mycolkey];
// --- Set CSS Class
if ( $counter % 2 == 0 )
$content['fields'][$mycolkey]['cssclass'] = "line1";
else
$content['fields'][$mycolkey]['cssclass'] = "line2";
// ---
// Set defaults
$content['fields'][$mycolkey]['fieldbgcolor'] = "";
$content['fields'][$mycolkey]['hasdetails'] = "false";
if ( $content['fields'][$mycolkey]['FieldType'] == FILTER_TYPE_DATE )
{
$content['fields'][$mycolkey]['fieldvalue'] = GetFormatedDate($logArray[$mycolkey]);
// TODO: Show more!
}
else if ( $content['fields'][$mycolkey]['FieldType'] == FILTER_TYPE_NUMBER )
{
$content['fields'][$mycolkey]['fieldvalue'] = $logArray[$mycolkey];
// Special style classes and colours for SYSLOG_FACILITY
if ( $mycolkey == SYSLOG_FACILITY )
{
if ( isset($logArray[$mycolkey][SYSLOG_FACILITY]) && strlen($logArray[$mycolkey][SYSLOG_FACILITY]) > 0)
{
$content['fields'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $facility_colors[ $logArray[SYSLOG_FACILITY] ] . '" ';
$content['fields'][$mycolkey]['cssclass'] = "lineColouredBlack";
// Set Human readable Facility!
$content['fields'][$mycolkey]['fieldvalue'] = GetFacilityDisplayName( $logArray[$mycolkey] );
}
else
{
// Use default colour!
$content['fields'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $facility_colors[SYSLOG_LOCAL0] . '" ';
}
}
else if ( $mycolkey == SYSLOG_SEVERITY )
{
if ( isset($logArray[$mycolkey][SYSLOG_SEVERITY]) && strlen($logArray[$mycolkey][SYSLOG_SEVERITY]) > 0)
{
$content['fields'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $severity_colors[ $logArray[SYSLOG_SEVERITY] ] . '" ';
$content['fields'][$mycolkey]['cssclass'] = "lineColouredWhite";
// Set Human readable Facility!
$content['fields'][$mycolkey]['fieldvalue'] = GetSeverityDisplayName( $logArray[$mycolkey] );
}
else
{
// Use default colour!
$content['fields'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $severity_colors[SYSLOG_INFO] . '" ';
}
}
else if ( $mycolkey == SYSLOG_MESSAGETYPE )
{
if ( isset($logArray[$mycolkey][SYSLOG_MESSAGETYPE]) )
{
$content['fields'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $msgtype_colors[ $logArray[SYSLOG_MESSAGETYPE] ] . '" ';
$content['fields'][$mycolkey]['cssclass'] = "lineColouredBlack";
// Set Human readable Facility!
$content['fields'][$mycolkey]['fieldvalue'] = GetMessageTypeDisplayName( $logArray[$mycolkey] );
}
else
{
// Use default colour!
$content['fields'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $msgtype_colors[IUT_Unknown] . '" ';
}
}
}
else if ( $content['fields'][$mycolkey]['FieldType'] == FILTER_TYPE_STRING )
{
// kindly copy!
$content['fields'][$mycolkey]['fieldvalue'] = $logArray[$mycolkey];
}
// Increment helpcounter
$counter++;
}
//print_r ( $content['fields'] );
//exit;
// Enable pager if the count is above 1 or we don't know the record count!
if ( $content['main_recordcount'] > 1 || $content['main_recordcount'] == -1 )
{
// Enable Pager in any case here!
$content['main_pagerenabled'] = true;
// --- Handle uid_first page button
if ( $content['uid_fromgetrequest'] == $content['uid_first'] )
$content['main_pager_first_found'] = false;
else
{
// Probe next item !
$ret = $stream->ReadNext($uID, $tmpArray);
if ( $ret == SUCCESS )
$content['main_pager_first_found'] = true;
else
$content['main_pager_first_found'] = false;
}
// ---
// --- Handle uid_last page button
// Option the last UID from the stream!
$content['uid_last'] = $stream->GetLastPageUID();
// if we found a last uid, and if it is not the current one (which means we already are on the last page ;)!
if ( $content['uid_last'] != -1 && $content['uid_last'] != $content['uid_current'])
$content['main_pager_last_found'] = true;
else
$content['main_pager_last_found'] = false;
// ---
// --- Handle uid_next page button
if ( $content['uid_current'] != $content['uid_last'] )
$content['main_pager_next_found'] = true;
else
$content['main_pager_next_found'] = false;
// ---
// --- Handle uid_previous page button
if ( $content['main_pager_first_found'] == true && $content['uid_current'] != $content['uid_first'] )
$content['main_pager_previous_found'] = true;
else
$content['main_pager_previous_found'] = false;
// ---
}
else // Disable pager in this case!
$content['main_pagerenabled'] = false;
// This will enable to Main SyslogView
$content['messageenabled'] = "true";
}
else
{
// Disable view and print error state!
$content['messageenabled'] = "false";
// Set error code
$content['error_code'] = $ret;
if ( $ret == ERROR_UNDEFINED )
$content['detailederror'] = "Undefined error happened within the logstream.";
// else if ( $ret == ERROR_FILE_NOT_READABLE )
// $content['detailederror'] = "Syslog file is not readable, read access may be denied. ";
else
$content['detailederror'] = "Unknown or unhandeled error occured.";
}
}
else
{
// This will disable to Main SyslogView and show an error message
$content['messageenabled'] = "false";
// Set error code
$content['error_code'] = $ret;
if ( $ret == ERROR_FILE_NOT_FOUND )
$content['detailederror'] = "Syslog file could not be found.";
else if ( $ret == ERROR_FILE_NOT_READABLE )
$content['detailederror'] = "Syslog file is not readable, read access may be denied. ";
else
$content['detailederror'] = "Unknown or unhandeled error occured.";
}
// Close file!
$stream->Close();
}
// ---
// --- Parsen and Output
InitTemplateParser();
$page -> parser($content, "details.html");
$page -> output();
// ---
?>

View File

@ -96,12 +96,6 @@ $fields[SYSLOG_MESSAGETYPE]['FieldType'] = FILTER_TYPE_NUMBER;
$fields[SYSLOG_MESSAGETYPE]['Sortable'] = true;
$fields[SYSLOG_MESSAGETYPE]['DefaultWidth'] = "90";
$fields[SYSLOG_MESSAGETYPE]['FieldAlign'] = "center";
$fields[SYSLOG_MESSAGE]['FieldID'] = SYSLOG_MESSAGE;
$fields[SYSLOG_MESSAGE]['FieldCaptionID'] = 'LN_FIELDS_MESSAGE';
$fields[SYSLOG_MESSAGE]['FieldType'] = FILTER_TYPE_STRING;
$fields[SYSLOG_MESSAGE]['Sortable'] = false;
$fields[SYSLOG_MESSAGE]['DefaultWidth'] = "100%";
$fields[SYSLOG_MESSAGE]['FieldAlign'] = "left";
// Syslog specific
$fields[SYSLOG_FACILITY]['FieldID'] = SYSLOG_FACILITY;
@ -131,6 +125,14 @@ $fields[SYSLOG_PROCESSID]['FieldAlign'] = "center";
// TODO! EventLog specific
// Message is the last element, this order is important for the Detail page for now!
$fields[SYSLOG_MESSAGE]['FieldID'] = SYSLOG_MESSAGE;
$fields[SYSLOG_MESSAGE]['FieldCaptionID'] = 'LN_FIELDS_MESSAGE';
$fields[SYSLOG_MESSAGE]['FieldType'] = FILTER_TYPE_STRING;
$fields[SYSLOG_MESSAGE]['Sortable'] = false;
$fields[SYSLOG_MESSAGE]['DefaultWidth'] = "100%";
$fields[SYSLOG_MESSAGE]['FieldAlign'] = "left";
// ---
// --- Define default Database field mappings!

View File

@ -271,17 +271,13 @@ function CreatePredefinedSearches()
function InitPhpDebugMode()
{
global $content;
global $content, $CFG;
// --- Set Global DEBUG Level!
// HARDCODED !!!
$content['gen_phpdebug'] = "yes";
if ( $content['gen_phpdebug'] == "yes" )
if ( $CFG['MiscShowDebugMsg'] == 1 )
ini_set( "error_reporting", E_ALL ); // ALL PHP MESSAGES!
else
ini_set( "error_reporting", E_ERROR ); // ONLY PHP ERROR'S!
// else
// ini_set( "error_reporting", E_ERROR ); // ONLY PHP ERROR'S!
// ---
}
@ -368,12 +364,12 @@ function InitConfigurationValues()
{
global $content, $CFG, $LANG, $gl_root_path;
$result = DB_Query("SELECT * FROM " . STATS_CONFIG);
$rows = DB_GetAllRows($result, true, true);
// If Database is enabled, try to read from database!
if ( $CFG['UserDBEnabled'] )
{
$result = DB_Query("SELECT * FROM " . DB_CONFIG);
$rows = DB_GetAllRows($result, true, true);
if ( isset($rows ) )
{
for($i = 0; $i < count($rows); $i++)

View File

@ -93,7 +93,8 @@ function DB_Disconnect()
function DB_Query($query_string, $bProcessError = true, $bCritical = false)
{
// --- Abort in this case!
if ( $CFG['UseDB'] == false )
global $CFG;
if ( $CFG['UserDBEnabled'] == false )
return;
// ---
@ -111,7 +112,8 @@ function DB_Query($query_string, $bProcessError = true, $bCritical = false)
function DB_FreeQuery($query_id)
{
// --- Abort in this case!
if ( $CFG['UseDB'] == false )
global $CFG;
if ( $CFG['UserDBEnabled'] == false )
return;
// ---
@ -122,7 +124,8 @@ function DB_FreeQuery($query_id)
function DB_GetRow($query_id)
{
// --- Abort in this case!
if ( $CFG['UseDB'] == false )
global $CFG;
if ( $CFG['UserDBEnabled'] == false )
return;
// ---
@ -134,7 +137,8 @@ function DB_GetRow($query_id)
function DB_GetSingleRow($query_id, $bClose)
{
// --- Abort in this case!
if ( $CFG['UseDB'] == false )
global $CFG;
if ( $CFG['UserDBEnabled'] == false )
return;
// ---
@ -158,7 +162,8 @@ function DB_GetSingleRow($query_id, $bClose)
function DB_GetAllRows($query_id, $bClose)
{
// --- Abort in this case!
if ( $CFG['UseDB'] == false )
global $CFG;
if ( $CFG['UserDBEnabled'] == false )
return;
// ---
@ -183,7 +188,8 @@ function DB_GetAllRows($query_id, $bClose)
function DB_GetMysqlStats()
{
// --- Abort in this case!
if ( $CFG['UseDB'] == false )
global $CFG;
if ( $CFG['UserDBEnabled'] == false )
return;
// ---
@ -235,7 +241,8 @@ function DB_RemoveBadChars($myString)
function DB_GetRowCount($query)
{
// --- Abort in this case!
if ( $CFG['UseDB'] == false )
global $CFG;
if ( $CFG['UserDBEnabled'] == false )
return;
// ---
@ -250,7 +257,8 @@ function DB_GetRowCount($query)
function DB_GetRowCountByResult($myresult)
{
// --- Abort in this case!
if ( $CFG['UseDB'] == false )
global $CFG;
if ( $CFG['UserDBEnabled'] == false )
return;
// ---
@ -261,7 +269,8 @@ function DB_GetRowCountByResult($myresult)
function DB_Exec($query)
{
// --- Abort in this case!
if ( $CFG['UseDB'] == false )
global $CFG;
if ( $CFG['UserDBEnabled'] == false )
return;
// ---
@ -274,7 +283,8 @@ function DB_Exec($query)
function WriteConfigValue($szValue)
{
// --- Abort in this case!
if ( $CFG['UseDB'] == false )
global $CFG;
if ( $CFG['UserDBEnabled'] == false )
return;
// ---
@ -299,7 +309,8 @@ function WriteConfigValue($szValue)
function GetSingleDBEntryOnly( $myqry )
{
// --- Abort in this case!
if ( $CFG['UseDB'] == false )
global $CFG;
if ( $CFG['UserDBEnabled'] == false )
return;
// ---
@ -316,7 +327,8 @@ function GetSingleDBEntryOnly( $myqry )
function GetRowsAffected()
{
// --- Abort in this case!
if ( $CFG['UseDB'] == false )
global $CFG;
if ( $CFG['UserDBEnabled'] == false )
return;
// ---

View File

@ -267,6 +267,10 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldbgcolor'] = "";
$content['syslogmessages'][$counter]['values'][$mycolkey]['hasdetails'] = "false";
// Set default link
$content['syslogmessages'][$counter]['values'][$mycolkey]['detaillink'] = "#";
// Now handle fields types differently
if ( $content['fields'][$mycolkey]['FieldType'] == FILTER_TYPE_DATE )
{
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldvalue'] = GetFormatedDate($logArray[$mycolkey]);
@ -338,9 +342,15 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c
if ( isset($logArray[SYSLOG_MESSAGE]) )
{
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldvalue'] = GetStringWithHTMLCodes(strlen($logArray[SYSLOG_MESSAGE]) > $CFG['ViewMessageCharacterLimit'] ? substr($logArray[SYSLOG_MESSAGE], 0, $CFG['ViewMessageCharacterLimit'] ) . " ..." : $logArray[SYSLOG_MESSAGE]);
// Enable LINK property! for this field
$content['syslogmessages'][$counter]['values'][$mycolkey]['haslink'] = true;
$content['syslogmessages'][$counter]['values'][$mycolkey]['detaillink'] = "details.php?uid=" . $uID;
}
else
{
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldvalue'] = "";
}
// If we need to highlight some words ^^!
if ( isset($content['highlightwords']) )

View File

@ -29,90 +29,94 @@ global $content;
// Global Stuff
$content['LN_MAINTITLE'] = "Main PhpLogCon";
$content['LN_MAIN_SELECTSTYLE'] = "Style auswählen";
$content['LN_GEN_LANGUAGE'] = "Sprache auswählen";
$content['LN_GEN_SELECTSOURCE'] = "Select Source";
$content['LN_GEN_MOREPAGES'] = "More than one Page available";
$content['LN_GEN_FIRSTPAGE'] = "First Page";
$content['LN_GEN_LASTPAGE'] = "Last Page";
$content['LN_GEN_NEXTPAGE'] = "Next Page";
$content['LN_GEN_PREVIOUSPAGE'] = "Previous Page";
$content['LN_GEN_RECORDCOUNT'] = "Total records found";
$content['LN_GEN_PAGERSIZE'] = "Records per page";
$content['LN_GEN_PAGE'] = "Page";
$content['LN_GEN_PREDEFINEDSEARCHES'] = "Predefined Searches";
$content['LN_GEN_SOURCE_DISK'] = "Diskfile";
$content['LN_GEN_SOURCE_DB'] = "Database";
$content['LN_MAIN_SELECTSTYLE'] = "Style ausw&auml;hlen";
$content['LN_GEN_LANGUAGE'] = "Sprache ausw&auml;hlen";
$content['LN_GEN_SELECTSOURCE'] = "Quelle ausw&auml;len";
$content['LN_GEN_MOREPAGES'] = "Mehr als eine Seite verf&uuml;gbar";
$content['LN_GEN_FIRSTPAGE'] = "Erste Seite";
$content['LN_GEN_LASTPAGE'] = "Letzte Seite";
$content['LN_GEN_NEXTPAGE'] = "N&auml;chste Seite";
$content['LN_GEN_PREVIOUSPAGE'] = "Vorherige Seite";
$content['LN_GEN_RECORDCOUNT'] = "Alle gefundenen Eintr&auml;ge";
$content['LN_GEN_PAGERSIZE'] = "Eintr&auml;ge pro Seite";
$content['LN_GEN_PAGE'] = "Seite";
$content['LN_GEN_PREDEFINEDSEARCHES'] = "Vordefinierte Suchkriterien";
$content['LN_GEN_SOURCE_DISK'] = "Datei";
$content['LN_GEN_SOURCE_DB'] = "Datenbank";
// Index Site
$content['LN_ERROR_INSTALLFILEREMINDER'] = "Warnung! Du hast das Installationsscript 'install.php' noch nicht aus dem phpLogCon Hauptordner entfernt!";
$content['LN_TOP_NUM'] = "No.";
$content['LN_TOP_UID'] = "uID";
$content['LN_GRID_POPUPDETAILS'] = "Details for Syslogmessage with ID '%1'";
$content['LN_GRID_POPUPDETAILS'] = "Details f&uulm;r die Syslog-Meldung mit der ID '%1'";
$content['LN_SEARCH_USETHISBLA'] = "Use the form below and your advanced search will appear here";
$content['LN_SEARCH_FILTER'] = "Search (filter):";
$content['LN_SEARCH_ADVANCED'] = "Advanced Search";
$content['LN_SEARCH'] = "Search";
$content['LN_SEARCH_RESET'] = "Reset search";
$content['LN_SEARCH_PERFORMADVANCED'] = "Perform Advanced Search";
$content['LN_SEARCH_USETHISBLA'] = "Bitte ber&uuml;cksichtigen Sie bei Ihrer Suche folgenden Kriterien";
$content['LN_SEARCH_FILTER'] = "Suche (Filter):";
$content['LN_SEARCH_ADVANCED'] = "Erweiterte Suche";
$content['LN_SEARCH'] = "Suche";
$content['LN_SEARCH_RESET'] = "Suche zur&uuml;cksetzen";
$content['LN_SEARCH_PERFORMADVANCED'] = "Erweiterte Suche starten";
$content['LN_HIGHLIGHT'] = "Hightlight >>";
$content['LN_HIGHLIGHT_OFF'] = "Hightlight <<";
$content['LN_HIGHLIGHT_WORDS'] = "Hightlight words comma separated";
$content['LN_HIGHLIGHT_WORDS'] = "Hightlight-W&ouml;rter durch ein Komma voneinander trennen";
$content['LN_ERROR_NORECORDS'] = "No syslog records found.";
$content['LN_ERROR_NORECORDS'] = "Es wurden keine syslog-Eintr&auml;ge gefunden.";
// Filter Options
$content['LN_FILTER_DATE'] = "Datetime Range";
$content['LN_FILTER_DATEMODE'] = "Select mode";
$content['LN_DATEMODE_ALL'] = "All time";
$content['LN_DATEMODE_RANGE'] = "Time range";
$content['LN_DATEMODE_LASTX'] = "Time x since today";
$content['LN_FILTER_DATEFROM'] = "Date range from";
$content['LN_FILTER_DATETO'] = "Date range to";
$content['LN_FILTER_DATELASTX'] = "Time since";
$content['LN_FILTER_ADD2SEARCH'] = "Add to search";
$content['LN_DATE_LASTX_HOUR'] = "Last hour";
$content['LN_DATE_LASTX_12HOURS'] = "Last 12 hours";
$content['LN_DATE_LASTX_24HOURS'] = "Last 24 hours";
$content['LN_DATE_LASTX_7DAYS'] = "Last 7 days";
$content['LN_DATE_LASTX_31DAYS'] = "Last 31 days";
$content['LN_FILTER_FACILITY'] = "Syslog Facility";
$content['LN_FILTER_SEVERITY'] = "Syslog Severity";
$content['LN_FILTER_OTHERS'] = "Other Filters";
$content['LN_FILTER_MESSAGE'] = "Syslog Message";
$content['LN_FILTER_SYSLOGTAG'] = "Syslogtag";
$content['LN_FILTER_SOURCE'] = "Source (Hostname)";
$content['LN_FILTER_DATE'] = "Zeitliche Abgrenzung";
$content['LN_FILTER_DATEMODE'] = "Zeitraum ausw&aumlhlen";
$content['LN_DATEMODE_ALL'] = "Kompletter Zeitraum";
$content['LN_DATEMODE_RANGE'] = "Zeitspanne";
$content['LN_DATEMODE_LASTX'] = "Seit heute, x Uhr";
$content['LN_FILTER_DATEFROM'] = "Zeitraum seit x";
$content['LN_FILTER_DATETO'] = "Zeitraum bis x";
$content['LN_FILTER_DATELASTX'] = "Zeit seit";
$content['LN_FILTER_ADD2SEARCH'] = "Zur Suche hinzuf&uuml;gen";
$content['LN_DATE_LASTX_HOUR'] = "in der letzten Stunde";
$content['LN_DATE_LASTX_12HOURS'] = "in den letzten 12 Stunden";
$content['LN_DATE_LASTX_24HOURS'] = "in den letzten 24 Stunden";
$content['LN_DATE_LASTX_7DAYS'] = "in den letzten 7 Tagen";
$content['LN_DATE_LASTX_31DAYS'] = "in den letzten 31 Tagen";
$content['LN_FILTER_FACILITY'] = "Syslog Kategorie/Facility";
$content['LN_FILTER_SEVERITY'] = "Syslog Dringlichkeit/Severity";
$content['LN_FILTER_OTHERS'] = "Andere Filter";
$content['LN_FILTER_MESSAGE'] = "Syslog Meldungen";
$content['LN_FILTER_SYSLOGTAG'] = "Syslog Kennzeichen";
$content['LN_FILTER_SOURCE'] = "Quelle (Hostname)";
// Field Captions
$content['LN_FIELDS_DATE'] = "Date";
$content['LN_FIELDS_FACILITY'] = "Facility";
$content['LN_FIELDS_SEVERITY'] = "Severity";
$content['LN_FIELDS_DATE'] = "Datum";
$content['LN_FIELDS_FACILITY'] = "Kategorie/Facility";
$content['LN_FIELDS_SEVERITY'] = "Dringlichkeit/Severity";
$content['LN_FIELDS_HOST'] = "Host";
$content['LN_FIELDS_SYSLOGTAG'] = "Syslogtag";
$content['LN_FIELDS_PROCESSID'] = "ProcessID";
$content['LN_FIELDS_MESSAGETYPE'] = "Messagetype";
$content['LN_FIELDS_UID'] = "uID";
$content['LN_FIELDS_MESSAGE'] = "Message";
$content['LN_FIELDS_SYSLOGTAG'] = "Syslog Kennzeichen";
$content['LN_FIELDS_PROCESSID'] = "Prozess ID";
$content['LN_FIELDS_MESSAGETYPE'] = "Meldungstyp";
$content['LN_FIELDS_UID'] = "Benutzer ID";
$content['LN_FIELDS_MESSAGE'] = "Meldung";
// Install Page
$content['LN_CFG_DBSERVER'] = "Database Host";
$content['LN_CFG_DBPORT'] = "Database Port";
$content['LN_CFG_DBNAME'] = "Database Name";
$content['LN_CFG_DBPREF'] = "Table prefix";
$content['LN_CFG_DBUSER'] = "Database User";
$content['LN_CFG_DBPASSWORD'] = "Database Password";
$content['LN_CFG_PARAMMISSING'] = "The following parameter were missing: ";
$content['LN_CFG_DBSERVER'] = "Datenbank Host";
$content['LN_CFG_DBPORT'] = "Datenbank Port";
$content['LN_CFG_DBNAME'] = "Datenbank Name";
$content['LN_CFG_DBPREF'] = "Tabellen Pr&auml;fix";
$content['LN_CFG_DBUSER'] = "Datenbank Benutzer";
$content['LN_CFG_DBPASSWORD'] = "Datenbank Passwort";
$content['LN_CFG_PARAMMISSING'] = "Die folgenden Parameter k&ouml;nnen nicht gefunden werden: ";
$content['LN_CFG_SOURCETYPE'] = "Source Type";
$content['LN_CFG_DISKTYPEOPTIONS'] = "Disk Type Options";
$content['LN_CFG_LOGLINETYPE'] = "Logline type";
$content['LN_CFG_SYSLOGFILE'] = "Syslog file";
$content['LN_CFG_DATABASETYPEOPTIONS'] = "Database Type Options";
$content['LN_CFG_DBTABLETYPE'] = "Table type";
$content['LN_CFG_DBSTORAGEENGINE'] = "Database Storage Engine";
$content['LN_CFG_DBTABLENAME'] = "Database Tablename";
$content['LN_CFG_NAMEOFTHESOURCE'] = "Name of the Source";
$content['LN_CFG_FIRSTSYSLOGSOURCE'] = "First Syslog Source";
$content['LN_CFG_SYSLOGFILE'] = "Syslog Datei";
$content['LN_CFG_DATABASETYPEOPTIONS'] = "Datenbank Typ Optionen";
$content['LN_CFG_DBTABLETYPE'] = "Tabellen Typ";
$content['LN_CFG_DBSTORAGEENGINE'] = "Datenbank Typ";
$content['LN_CFG_DBTABLENAME'] = "Datenbank Tabellenname";
$content['LN_CFG_NAMEOFTHESOURCE'] = "Name der Quelle";
$content['LN_CFG_FIRSTSYSLOGSOURCE'] = "Erste Syslog Quelle";
// Details page
$content['LN_DETAILS_FORSYSLOGMSG'] = "Details for the syslog messages with id";
$content['LN_DETAILS_DETAILSFORMSG'] = "Details for message id";
?>

View File

@ -44,8 +44,6 @@ $content['LN_GEN_PREDEFINEDSEARCHES'] = "Predefined Searches";
$content['LN_GEN_SOURCE_DISK'] = "Diskfile";
$content['LN_GEN_SOURCE_DB'] = "Database";
// Main Index Site
$content['LN_ERROR_INSTALLFILEREMINDER'] = "Warning! You still have NOT removed the 'install.php' from your phpLogCon main directory!";
$content['LN_TOP_NUM'] = "No.";
@ -117,4 +115,8 @@ $content['LN_CFG_DBTABLENAME'] = "Database Tablename";
$content['LN_CFG_NAMEOFTHESOURCE'] = "Name of the Source";
$content['LN_CFG_FIRSTSYSLOGSOURCE'] = "First Syslog Source";
// Details page
$content['LN_DETAILS_FORSYSLOGMSG'] = "Details for the syslog messages with id";
$content['LN_DETAILS_DETAILSFORMSG'] = "Details for message id";
?>

103
src/templates/details.html Normal file
View File

@ -0,0 +1,103 @@
<!-- INCLUDE include_header.html -->
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="with_border">
<tr>
<td colspan="3" class="title" nowrap><B>{LN_DETAILS_FORSYSLOGMSG} '{uid_current}'</B></td>
</tr>
<table width="100%" align="center" border="0" cellpadding="1" cellspacing="1" class="with_border">
<tr>
<td nowrap width="100%"class="line2" align="left">
<!-- IF main_currentpagenumber_found="true" -->
{LN_GEN_PAGE} {main_currentpagenumber}
<!-- ENDIF main_currentpagenumber_found="true" -->
</td>
<!-- IF main_recordcount_found="true" -->
<td nowrap width="125" class="cellmenu2">{LN_GEN_RECORDCOUNT}:</td>
<td nowrap width="50" class="line2"><B>{main_recordcount}</B></td>
<!-- ENDIF main_recordcount_found="true" -->
<!-- IF main_pagerenabled="true" -->
<td class="cellmenu2" nowrap><B>Pager: &nbsp; </B></td>
<td class="line0" width="20" nowrap>
<!-- IF main_pager_first_found="true" -->
<a href="?{additional_url_sortingonly}&uid={uid_first}" target="_top"><img src="{MENU_PAGER_BEGIN}" width="16" height="16" title="{LN_GEN_FIRSTPAGE}"></a>
<!-- ENDIF main_pager_first_found="true" -->
<!-- IF main_pager_first_found!="true" -->
<img src="{MENU_PAGER_BEGIN_GREY}" width="16" height="16">
<!-- ENDIF main_pager_first_found!="true" -->
</td>
<td class="line1" width="20" nowrap>
<!-- IF main_pager_previous_found="true" -->
<a href="?{additional_url_sortingonly}&uid={uid_current}&direction=previous" target="_top"><img src="{MENU_PAGER_PREVIOUS}" width="16" title="{LN_GEN_PREVIOUSPAGE}"></a>
<!-- ENDIF main_pager_previous_found="true" -->
<!-- IF main_pager_previous_found!="true" -->
<img src="{MENU_PAGER_PREVIOUS_GREY}" width="16" height="16">
<!-- ENDIF main_pager_previous_found!="true" -->
</td>
<!-- BEGIN syslogpages -->
<td class="{cssclass}" nowrap><a href="?{additional_url_sortingonly}&uid={mypagebegin}{additional_url}" target="_top">{mypagenumber}</a>&nbsp;</td>
<!-- END syslogpages -->
<td class="line0" width="20" nowrap>
<!-- IF main_pager_next_found="true" -->
<a href="?{additional_url_sortingonly}&uid={uid_current}&direction=next" target="_top"><img src="{MENU_PAGER_NEXT}" width="16" title="{LN_GEN_NEXTPAGE}"></a>
<!-- ENDIF main_pager_next_found="true" -->
<!-- IF main_pager_next_found!="true" -->
<img src="{MENU_PAGER_NEXT_GREY}" width="16" height="16">
<!-- ENDIF main_pager_next_found!="true" -->
</td>
<td class="line1" width="20" nowrap>
<!-- IF main_pager_last_found="true" -->
<a href="?{additional_url_sortingonly}&uid={uid_last}" target="_top"><img src="{MENU_PAGER_END}" width="16" title="{LN_GEN_LASTPAGE}"></a>
<!-- ENDIF main_pager_last_found="true" -->
<!-- IF main_pager_last_found!="true" -->
<img src="{MENU_PAGER_END_GREY}" width="16" height="16">
<!-- ENDIF main_pager_last_found!="true" -->
</td>
<!-- <td nowrap width="200" class="line2"><I>&nbsp;{LN_GEN_MOREPAGES}</I></td> -->
<!-- ENDIF main_pagerenabled="true" -->
</tr>
</table>
<tr>
<td width="100%" valign="top">
<!-- IF messageenabled="true" -->
<table width="100%" cellpadding="0" cellspacing="1" border="0" align="center" class="with_border_alternate">
<!-- BEGIN fields -->
<tr>
<td width="200" class="cellmenu1" align="left" nowrap>
<B>{FieldCaption}</B>
</td>
<td width="100%" align="{FieldAlign}" class="{cssclass}" {fieldbgcolor} valign="top">
<B>
</B>
{fieldvalue}
</td>
</tr>
<!-- END fields -->
</table>
<!-- ENDIF messageenabled="true" -->
<!-- IF messageenabled="false" -->
<center>
<font color="red">
<br>
<h3>{LN_ERROR_NORECORDS} (code {error_code} ) - Error Details: </h3>
{detailederror}
<br>
<br>
</font>
</center>
<!-- ENDIF messageenabled="false" -->
</td>
</tr>
</table>
<!-- INCLUDE include_footer.html -->

View File

@ -181,10 +181,18 @@
<!-- BEGIN values -->
<td align="{FieldAlign}" class="{fieldcssclass}" {fieldbgcolor} valign="top">
<!-- IF hasdetails="false" -->
<B>{fieldvalue}</B>
<!-- IF haslink="true" -->
<a href="{detaillink}" class="syslogdetails" target="_top">
<!-- ENDIF haslink="true" -->
<!-- IF haslink!="true" --><B><!-- ENDIF haslink!="true" -->
{fieldvalue}
<!-- IF haslink!="true" --></B><!-- ENDIF haslink!="true" -->
<!-- IF haslink="true" -->
</a>
<!-- ENDIF haslink="true" -->
<!-- ENDIF hasdetails="false" -->
<!-- IF hasdetails="true" -->
<a href="#" class="syslogdetails">{fieldvalue}
<a href="{detaillink}" class="syslogdetails">{fieldvalue}
<span>
<table cellpadding="0" cellspacing="1" border="0" width="500" align="left" class="with_border_alternate">
<tr><td colspan="2" class="cellmenu1" align="center"><B>{popupcaption}</B></td></tr>