From 7bb54f3173f90316276824a8752a05758148d720 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Fri, 25 Apr 2008 14:29:59 +0200 Subject: [PATCH] Added detail page, which is linked from the list view. The detail page contains all available details from a syslog message. Also paging is possible in the detail view. Minor fixes had to be done to make the detail page possible. Added german translation to phplogcon. Fixed a few notice bugs in the function_db.php, which isn't really used at the moment. But will later when the user-ui is added. --- src/details.php | 358 ++++++++++++++++++++++++++++ src/include/constants_logstream.php | 14 +- src/include/functions_common.php | 18 +- src/include/functions_db.php | 36 ++- src/index.php | 10 + src/lang/de/main.php | 136 ++++++----- src/lang/en/main.php | 6 +- src/templates/details.html | 103 ++++++++ src/templates/index.html | 12 +- 9 files changed, 594 insertions(+), 99 deletions(-) create mode 100644 src/details.php create mode 100644 src/templates/details.html diff --git a/src/details.php b/src/details.php new file mode 100644 index 0000000..e51a45b --- /dev/null +++ b/src/details.php @@ -0,0 +1,358 @@ + 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 . + * + * 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'] = '' . "\r\n"; +//$content['EXTRA_STYLESHEET'] .= ''; +// --- + +// --- 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(); +// --- + +?> \ No newline at end of file diff --git a/src/include/constants_logstream.php b/src/include/constants_logstream.php index 0567171..1232c69 100644 --- a/src/include/constants_logstream.php +++ b/src/include/constants_logstream.php @@ -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! diff --git a/src/include/functions_common.php b/src/include/functions_common.php index 082972b..630e896 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -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++) diff --git a/src/include/functions_db.php b/src/include/functions_db.php index 6da14b0..ce89485 100644 --- a/src/include/functions_db.php +++ b/src/include/functions_db.php @@ -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; // --- diff --git a/src/index.php b/src/index.php index b806d36..24e08a9 100644 --- a/src/index.php +++ b/src/index.php @@ -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']) ) diff --git a/src/lang/de/main.php b/src/lang/de/main.php index 23bf461..f76ccd2 100644 --- a/src/lang/de/main.php +++ b/src/lang/de/main.php @@ -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ählen"; +$content['LN_GEN_LANGUAGE'] = "Sprache auswählen"; +$content['LN_GEN_SELECTSOURCE'] = "Quelle auswälen"; +$content['LN_GEN_MOREPAGES'] = "Mehr als eine Seite verfügbar"; +$content['LN_GEN_FIRSTPAGE'] = "Erste Seite"; +$content['LN_GEN_LASTPAGE'] = "Letzte Seite"; +$content['LN_GEN_NEXTPAGE'] = "Nächste Seite"; +$content['LN_GEN_PREVIOUSPAGE'] = "Vorherige Seite"; +$content['LN_GEN_RECORDCOUNT'] = "Alle gefundenen Einträge"; +$content['LN_GEN_PAGERSIZE'] = "Einträ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ü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ü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örter durch ein Komma voneinander trennen"; -$content['LN_ERROR_NORECORDS'] = "No syslog records found."; +$content['LN_ERROR_NORECORDS'] = "Es wurden keine syslog-Einträ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ählen"; +$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ü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äfix"; +$content['LN_CFG_DBUSER'] = "Datenbank Benutzer"; +$content['LN_CFG_DBPASSWORD'] = "Datenbank Passwort"; +$content['LN_CFG_PARAMMISSING'] = "Die folgenden Parameter kö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"; -?> \ No newline at end of file +// Details page +$content['LN_DETAILS_FORSYSLOGMSG'] = "Details for the syslog messages with id"; +$content['LN_DETAILS_DETAILSFORMSG'] = "Details for message id"; + +?> diff --git a/src/lang/en/main.php b/src/lang/en/main.php index 1009878..eeca194 100644 --- a/src/lang/en/main.php +++ b/src/lang/en/main.php @@ -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"; + ?> \ No newline at end of file diff --git a/src/templates/details.html b/src/templates/details.html new file mode 100644 index 0000000..e3d1b65 --- /dev/null +++ b/src/templates/details.html @@ -0,0 +1,103 @@ + + + + + + + +
{LN_DETAILS_FORSYSLOGMSG} '{uid_current}'
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + {LN_GEN_PAGE} {main_currentpagenumber} + + {LN_GEN_RECORDCOUNT}:{main_recordcount}Pager:   + + + + + + + + + + + + + + {mypagenumber}  + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ {FieldCaption} + + + + {fieldvalue} +
+ + + +
+ +
+

{LN_ERROR_NORECORDS} (code {error_code} ) - Error Details:

+ {detailederror} +
+
+
+
+ + + + + + + + diff --git a/src/templates/index.html b/src/templates/index.html index 93f77ef..2636778 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -181,10 +181,18 @@ - {fieldvalue} + + + + + {fieldvalue} + + + + - {fieldvalue} + {fieldvalue}
{popupcaption}