mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 03:09:21 +02:00
Merge branch 'beta' into devel
Conflicts: src/include/functions_common.php
This commit is contained in:
commit
4ca645842b
@ -1,5 +1,12 @@
|
||||
---------------------------------------------------------------------------
|
||||
Version 2.5.17 (beta), 2008-11-03
|
||||
- Added logstream statistic and maintenance option which are accessable
|
||||
in the sources admin panel. You can view overall stats of database
|
||||
logstreams, and cleanup data based on the date field.
|
||||
- Added option to use a custom phpLogCon logo in the header.
|
||||
The logo url can be configured in the admin panel
|
||||
---------------------------------------------------------------------------
|
||||
Version 2.5.17 (beta), 2008-11-03
|
||||
- Fixed default database template, updates for DB Version 6 and 7 were
|
||||
missing.
|
||||
- Added expandable submenu for help into the top menu. Also fixed some
|
||||
|
@ -153,6 +153,7 @@ if ( isset($_POST['op']) )
|
||||
if ( isset ($_POST['InjectHtmlHeader']) ) { $content['InjectHtmlHeader'] = $_POST['InjectHtmlHeader']; }
|
||||
if ( isset ($_POST['InjectBodyHeader']) ) { $content['InjectBodyHeader'] = $_POST['InjectBodyHeader']; }
|
||||
if ( isset ($_POST['InjectBodyFooter']) ) { $content['InjectBodyFooter'] = $_POST['InjectBodyFooter']; }
|
||||
if ( isset ($_POST['PhplogconLogoUrl']) ) { $content['PhplogconLogoUrl'] = $_POST['PhplogconLogoUrl']; }
|
||||
|
||||
// Save configuration variables now
|
||||
SaveGeneralSettingsIntoDB();
|
||||
|
@ -238,7 +238,7 @@ if ( isset($_GET['op']) )
|
||||
//PreInit these values
|
||||
$content['SOURCEID'] = DB_RemoveBadChars($_GET['id']);
|
||||
|
||||
// Get UserInfo
|
||||
// Get SourceInfo
|
||||
$result = DB_Query("SELECT Name FROM " . DB_SOURCES . " WHERE ID = " . $content['SOURCEID'] );
|
||||
$myrow = DB_GetSingleRow($result, true);
|
||||
if ( !isset($myrow['Name']) )
|
||||
@ -274,6 +274,208 @@ if ( isset($_GET['op']) )
|
||||
$content['ERROR_MSG'] = $content['LN_SOURCES_ERROR_INVALIDORNOTFOUNDID'];
|
||||
}
|
||||
}
|
||||
else if ($_GET['op'] == "cleardata")
|
||||
{
|
||||
if ( isset($_GET['id']) )
|
||||
{
|
||||
//PreInit these values
|
||||
$content['SOURCEID'] = DB_RemoveBadChars($_GET['id']);
|
||||
}
|
||||
|
||||
// Check If source is available
|
||||
if ( !isset($content['Sources'][ $content['SOURCEID'] ]) )
|
||||
{
|
||||
$content['ISERROR'] = true;
|
||||
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_IDNOTFOUND'], $content['SOURCEID'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Include LogStream facility
|
||||
include($gl_root_path . 'classes/logstream.class.php');
|
||||
|
||||
// --- Init the source
|
||||
$tmpSource = $content['Sources'][ $content['SOURCEID'] ];
|
||||
|
||||
// Copy some default properties
|
||||
$content['DisplayName'] = $tmpSource['Name'];
|
||||
$content['SourceType'] = $tmpSource['SourceType'];
|
||||
CreateSourceTypesList($content['SourceType']);
|
||||
$content['SourceTypeName'] = $content['SOURCETYPES'][ $content['SourceType'] ]['DisplayName'];
|
||||
|
||||
// Fix Filename manually for FILE LOGSTREAM!
|
||||
if ( $content['SourceType'] == SOURCE_DB || $content['SourceType'] == SOURCE_PDO )
|
||||
{
|
||||
// Create LogStream Object
|
||||
$stream = $tmpSource['ObjRef']->LogStreamFactory($tmpSource['ObjRef']);
|
||||
$res = $stream->Verify();
|
||||
if ( $res != SUCCESS )
|
||||
{
|
||||
$content['ISERROR'] = true;
|
||||
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_WITHINSOURCE'], $tmpSource['Name'], GetErrorMessage($res) );
|
||||
if ( isset($extraErrorDescription) )
|
||||
$content['ERROR_MSG'] .= "<br><br>" . GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_EXTRAMSG'], $extraErrorDescription);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Display Stats
|
||||
$content['ISCLEARDATA'] = true;
|
||||
|
||||
// Gather Database Stats
|
||||
$content['ROWCOUNT'] = $stream->GetLogStreamTotalRowCount();
|
||||
if ( isset($content['ROWCOUNT']) )
|
||||
{
|
||||
// Check for suboperations
|
||||
if ( isset($_POST['subop']) )
|
||||
{
|
||||
if ( $_POST['subop'] == "all" )
|
||||
{
|
||||
$timestamp = 0;
|
||||
}
|
||||
else if ( $_POST['subop'] == "since" && isset($_POST['olderthan']) )
|
||||
{
|
||||
// Take current time and subtract Seconds
|
||||
$nSecondsSubtract = $_POST['olderthan'];
|
||||
$timestamp = time() - $nSecondsSubtract;
|
||||
}
|
||||
else if ( $_POST['subop'] == "date" && isset($_POST['olderdate_year']) && isset($_POST['olderdate_month']) && isset($_POST['olderdate_day']) )
|
||||
{
|
||||
// Generate Timestamp
|
||||
$timestamp = mktime( 0, 0, 0, intval($_POST['olderdate_month']), intval($_POST['olderdate_day']), intval($_POST['olderdate_year']) );
|
||||
}
|
||||
// Continue with delete only inif wherequery is set!
|
||||
if ( isset($timestamp) )
|
||||
{
|
||||
// --- Ask for deletion first!
|
||||
if ( (!isset($_GET['verify']) || $_GET['verify'] != "yes") )
|
||||
{
|
||||
// This will print an additional secure check which the user needs to confirm and exit the script execution.
|
||||
PrintSecureUserCheck( GetAndReplaceLangStr( $content['LN_SOURCES_WARNDELETEDATA'], $content['DisplayName'] ), $content['LN_DELETEYES'], $content['LN_DELETENO'] );
|
||||
}
|
||||
// ---
|
||||
|
||||
// Now perform the data cleanup!
|
||||
$content['affectedrows'] = $stream->CleanupLogdataByDate($timestamp);
|
||||
|
||||
if ( !isset($content['affectedrows']) )
|
||||
{
|
||||
$content['ISERROR'] = true;
|
||||
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_DELDATA'], $content['SOURCEID'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Do the final redirect
|
||||
RedirectResult( GetAndReplaceLangStr( $content['LN_SOURCES_HASBEENDELDATA'], $content['DisplayName'], $content['affectedrows'] ) , "sources.php" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['ISERROR'] = true;
|
||||
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_INVALIDCLEANUP'], $content['DisplayName'] );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Allow Deleting by Date
|
||||
$content['DELETE_ALLOWDETAIL'] = true;
|
||||
|
||||
// Create Lists
|
||||
CreateOlderThanList( 3600 );
|
||||
CreateOlderDateFields();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
$content['ROWCOUNT'] = "Unknown";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['ISERROR'] = true;
|
||||
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_NOCLEARSUPPORT'], $content['SOURCEID'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ($_GET['op'] == "dbstats")
|
||||
{
|
||||
if ( isset($_GET['id']) )
|
||||
{
|
||||
//PreInit these values
|
||||
$content['SOURCEID'] = DB_RemoveBadChars($_GET['id']);
|
||||
}
|
||||
|
||||
// Check If source is available
|
||||
if ( !isset($content['Sources'][ $content['SOURCEID'] ]) )
|
||||
{
|
||||
$content['ISERROR'] = true;
|
||||
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_IDNOTFOUND'], $content['SOURCEID'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Include LogStream facility
|
||||
include($gl_root_path . 'classes/logstream.class.php');
|
||||
|
||||
// --- Init the source
|
||||
$tmpSource = $content['Sources'][ $content['SOURCEID'] ];
|
||||
|
||||
// Copy some default properties
|
||||
$content['DisplayName'] = $tmpSource['Name'];
|
||||
$content['Description'] = $tmpSource['Description'];
|
||||
$content['SourceType'] = $tmpSource['SourceType'];
|
||||
CreateSourceTypesList($content['SourceType']);
|
||||
$content['SourceTypeName'] = $content['SOURCETYPES'][ $content['SourceType'] ]['DisplayName'];
|
||||
|
||||
// Fix Filename manually for FILE LOGSTREAM!
|
||||
if ( $content['SourceType'] == SOURCE_DISK )
|
||||
{
|
||||
$tmpSource['DiskFile'] = CheckAndPrependRootPath(DB_StripSlahes($tmpSource['DiskFile']));
|
||||
$tmpSource['ObjRef']->FileName = $tmpSource['DiskFile'];
|
||||
}
|
||||
|
||||
// Create LogStream Object
|
||||
$stream = $tmpSource['ObjRef']->LogStreamFactory($tmpSource['ObjRef']);
|
||||
$res = $stream->Verify();
|
||||
if ( $res != SUCCESS )
|
||||
{
|
||||
$content['ISERROR'] = true;
|
||||
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_WITHINSOURCE'], $tmpSource['Name'], GetErrorMessage($res) );
|
||||
if ( isset($extraErrorDescription) )
|
||||
$content['ERROR_MSG'] .= "<br><br>" . GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_EXTRAMSG'], $extraErrorDescription);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Gather Database Stats
|
||||
$content['STATS'] = $stream->GetLogStreamStats();
|
||||
if ( isset($content['STATS']) )
|
||||
{
|
||||
// Display Stats
|
||||
$content['ISSTATS'] = true;
|
||||
|
||||
foreach( $content['STATS'] as &$myStats )
|
||||
{
|
||||
$i = 0;
|
||||
foreach( $myStats['STATSDATA'] as &$myStatsData )
|
||||
{
|
||||
// --- Set CSS Class
|
||||
if ( $i % 2 == 0 )
|
||||
$myStatsData['cssclass'] = "line1";
|
||||
else
|
||||
$myStatsData['cssclass'] = "line2";
|
||||
$i++;
|
||||
// ---
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['ISERROR'] = true;
|
||||
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_NOSTATSDATA'], $content['SOURCEID'] );
|
||||
}
|
||||
// print_r ( $content['STATS'] );
|
||||
}
|
||||
// ---
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset($_POST['op']) )
|
||||
@ -364,8 +566,8 @@ if ( isset($_POST['op']) )
|
||||
else
|
||||
{
|
||||
// Get plain filename for testing!
|
||||
$content['SourceDiskFileTesting'] = DB_StripSlahes($content['SourceDiskFile']);
|
||||
|
||||
$content['SourceDiskFileTesting'] = CheckAndPrependRootPath(DB_StripSlahes($content['SourceDiskFile']));
|
||||
/*
|
||||
// Take as it is if rootpath!
|
||||
if (
|
||||
( ($pos = strpos($content['SourceDiskFileTesting'], "/")) !== FALSE && $pos == 0) ||
|
||||
@ -379,13 +581,7 @@ if ( isset($_POST['op']) )
|
||||
}
|
||||
else // prepend basepath!
|
||||
$content['SourceDiskFileTesting'] = $gl_root_path . $content['SourceDiskFileTesting'];
|
||||
/*
|
||||
if ( !is_file($content['SourceDiskFileTesting']) )
|
||||
{
|
||||
$content['ISERROR'] = true;
|
||||
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_NOTAVALIDFILE'], $szFileName );
|
||||
}
|
||||
*/
|
||||
*/
|
||||
}
|
||||
}
|
||||
// DB Params
|
||||
@ -663,11 +859,17 @@ if ( !isset($_POST['op']) && !isset($_GET['op']) )
|
||||
{
|
||||
$mySource['SourcesTypeImage'] = $content["MENU_SOURCE_DB"];
|
||||
$mySource['SourcesTypeText'] = $content["LN_SOURCES_DB"];
|
||||
|
||||
// Enabled Database Maintenance functions
|
||||
$mySource['IsDatabaseSource'] = true;
|
||||
}
|
||||
else if ( $mySource['SourceType'] == SOURCE_PDO )
|
||||
{
|
||||
$mySource['SourcesTypeImage'] = $content["MENU_SOURCE_PDO"];
|
||||
$mySource['SourcesTypeText'] = $content["LN_SOURCES_PDO"];
|
||||
|
||||
// Enabled Database Maintenance functions
|
||||
$mySource['IsDatabaseSource'] = true;
|
||||
}
|
||||
// ---
|
||||
|
||||
@ -690,6 +892,65 @@ function ReadMsgParserList()
|
||||
{
|
||||
global $gl_root_path, $content;
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper function to create a OlderThan Listbox
|
||||
*/
|
||||
function CreateOlderThanList( $nDefaultSeconds )
|
||||
{
|
||||
global $content;
|
||||
|
||||
$content['OLDERTHAN'][] = array( 'OlderThanDisplayName' => "1 minute", 'OlderThanSeconds' => 60 );
|
||||
$content['OLDERTHAN'][] = array( 'OlderThanDisplayName' => "5 minutes", 'OlderThanSeconds' => 300 );
|
||||
$content['OLDERTHAN'][] = array( 'OlderThanDisplayName' => "15 minutes", 'OlderThanSeconds' => 900 );
|
||||
$content['OLDERTHAN'][] = array( 'OlderThanDisplayName' => "30 minutes", 'OlderThanSeconds' => 1800 );
|
||||
$content['OLDERTHAN'][] = array( 'OlderThanDisplayName' => "1 hour", 'OlderThanSeconds' => 3600 );
|
||||
$content['OLDERTHAN'][] = array( 'OlderThanDisplayName' => "12 hours", 'OlderThanSeconds' => 43200 );
|
||||
$content['OLDERTHAN'][] = array( 'OlderThanDisplayName' => "1 day", 'OlderThanSeconds' => 86400 );
|
||||
$content['OLDERTHAN'][] = array( 'OlderThanDisplayName' => "7 days", 'OlderThanSeconds' => 604800 );
|
||||
$content['OLDERTHAN'][] = array( 'OlderThanDisplayName' => "31 days", 'OlderThanSeconds' => 2678400 );
|
||||
|
||||
foreach ( $content['OLDERTHAN'] as &$myTime )
|
||||
{
|
||||
if ( $nDefaultSeconds == $myTime['OlderThanSeconds'] )
|
||||
$myTime['selected'] = "selected";
|
||||
else
|
||||
$myTime['selected'] = "";
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper function to create a OlderThan Listbox
|
||||
*/
|
||||
function CreateOlderDateFields()
|
||||
{
|
||||
global $content;
|
||||
|
||||
$currentTime = time();
|
||||
$currentDay = date("d", $currentTime);
|
||||
$currentMonth = date("m", $currentTime);
|
||||
$currentYear = date("Y", $currentTime);
|
||||
|
||||
// Init Year, month and day array!
|
||||
for ( $i = $currentYear-5; $i <= $currentYear+5; $i++ )
|
||||
{
|
||||
$content['olderdate_years'][$i]['value'] = $i;
|
||||
if ( $i == $currentYear ) { $content['olderdate_years'][$i]['selected'] = "selected"; } else { $content['olderdate_years'][$i]['selected'] = ""; }
|
||||
}
|
||||
for ( $i = 1; $i <= 12; $i++ )
|
||||
{
|
||||
$content['olderdate_months'][$i]['value'] = $i;
|
||||
if ( $i == $currentMonth ) { $content['olderdate_months'][$i]['selected'] = "selected"; } else { $content['olderdate_months'][$i]['selected'] = ""; }
|
||||
}
|
||||
for ( $i = 1; $i <= 31; $i++ )
|
||||
{
|
||||
$content['olderdate_days'][$i]['value'] = $i;
|
||||
if ( $i == $currentDay ) { $content['olderdate_days'][$i]['selected'] = "selected"; } else { $content['olderdate_days'][$i]['selected'] = ""; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// --- END Custom Code
|
||||
|
||||
// --- BEGIN CREATE TITLE
|
||||
|
@ -212,6 +212,25 @@ abstract class LogStream {
|
||||
*/
|
||||
public abstract function IsPropertySortable($myProperty);
|
||||
|
||||
|
||||
/**
|
||||
* This returns an Array of useful statsdata for this logstream source
|
||||
*/
|
||||
public abstract function GetLogStreamStats();
|
||||
|
||||
|
||||
/**
|
||||
* This returns just the count of records of the main data source
|
||||
*/
|
||||
public abstract function GetLogStreamTotalRowCount();
|
||||
|
||||
|
||||
/**
|
||||
* Helper function to cleanup all logdata which is older then the nDateTimeStamp!
|
||||
*/
|
||||
public abstract function CleanupLogdataByDate( $nDateTimeStamp );
|
||||
|
||||
|
||||
/*
|
||||
* Helper functino to trigger initialisation of MsgParsers
|
||||
*/
|
||||
|
@ -538,6 +538,142 @@ class LogStreamDB extends LogStream {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of GetLogStreamStats
|
||||
*
|
||||
* Returns an Array og logstream statsdata
|
||||
* Count of Data Items
|
||||
* Total Filesize
|
||||
*/
|
||||
public function GetLogStreamStats()
|
||||
{
|
||||
global $querycount, $dbmapping;
|
||||
$szTableType = $this->_logStreamConfigObj->DBTableType;
|
||||
|
||||
// Perform if Connection is true!
|
||||
if ( $this->_dbhandle != null )
|
||||
{
|
||||
// Obtain Stats data for this table!
|
||||
$szSql = "SHOW TABLE STATUS FROM " . $this->_logStreamConfigObj->DBName;
|
||||
$myQuery = mysql_query($szSql, $this->_dbhandle);
|
||||
if ($myQuery)
|
||||
{
|
||||
// Loop through results
|
||||
while ($myRow = mysql_fetch_array($myQuery, MYSQL_ASSOC))
|
||||
{
|
||||
// Set tablename!
|
||||
$tableName = $myRow['Name'];
|
||||
$myStats = null;
|
||||
$myStats[] = array( 'StatsDisplayName' => 'Table name', 'StatsValue' => $tableName );
|
||||
|
||||
// copy usefull statsdata
|
||||
if ( isset($myRow['Engine']) )
|
||||
$myStats[] = array( 'StatsDisplayName' => 'Table engine', 'StatsValue' => $myRow['Engine'] );
|
||||
if ( isset($myRow['Rows']) )
|
||||
$myStats[] = array( 'StatsDisplayName' => 'Rowcount', 'StatsValue' => $myRow['Rows'] );
|
||||
|
||||
if ( isset($myRow['Data_length']) )
|
||||
$myStats[] = array( 'StatsDisplayName' => 'Table filesize (bytes)', 'StatsValue' => $myRow['Data_length'] );
|
||||
if ( isset($myRow['Collation']) )
|
||||
$myStats[] = array( 'StatsDisplayName' => 'Collation', 'StatsValue' => $myRow['Collation'] );
|
||||
if ( isset($myRow['Comment']) )
|
||||
$myStats[] = array( 'StatsDisplayName' => 'Comment', 'StatsValue' => $myRow['Comment'] );
|
||||
|
||||
$stats[]['STATSDATA'] = $myStats;
|
||||
}
|
||||
|
||||
// Free query now
|
||||
mysql_free_result ($myQuery);
|
||||
|
||||
// Increment for the Footer Stats
|
||||
$querycount++;
|
||||
}
|
||||
|
||||
// return results!
|
||||
return $stats;
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of GetLogStreamTotalRowCount
|
||||
*
|
||||
* Returns the total amount of rows in the main datatable
|
||||
*/
|
||||
public function GetLogStreamTotalRowCount()
|
||||
{
|
||||
global $querycount, $dbmapping;
|
||||
$szTableType = $this->_logStreamConfigObj->DBTableType;
|
||||
|
||||
// Set default rowcount
|
||||
$rowcount = null;
|
||||
|
||||
// Perform if Connection is true!
|
||||
if ( $this->_dbhandle != null )
|
||||
{
|
||||
// SHOW TABLE STATUS FROM
|
||||
$szSql = "SELECT count(" . $dbmapping[$szTableType][SYSLOG_UID] . ") as Counter FROM " . $this->_logStreamConfigObj->DBTableName;
|
||||
$myQuery = mysql_query($szSql, $this->_dbhandle);
|
||||
if ($myQuery)
|
||||
{
|
||||
// Obtain RowCount!
|
||||
$myRow = mysql_fetch_row($myQuery);
|
||||
$rowcount = $myRow[0];
|
||||
|
||||
// Free query now
|
||||
mysql_free_result ($myQuery);
|
||||
|
||||
// Increment for the Footer Stats
|
||||
$querycount++;
|
||||
}
|
||||
}
|
||||
|
||||
//return result
|
||||
return $rowcount;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of the CleanupLogdataByDate function! Returns affected rows!
|
||||
*/
|
||||
public function CleanupLogdataByDate( $nDateTimeStamp )
|
||||
{
|
||||
global $querycount, $dbmapping;
|
||||
$szTableType = $this->_logStreamConfigObj->DBTableType;
|
||||
|
||||
// Set default rowcount
|
||||
$rowcount = null;
|
||||
|
||||
|
||||
// Perform if Connection is true!
|
||||
if ( $this->_dbhandle != null )
|
||||
{
|
||||
// Create WHERE attachment
|
||||
if ( $nDateTimeStamp > 0 )
|
||||
$szWhere = " WHERE UNIX_TIMESTAMP(" . $dbmapping[$szTableType][SYSLOG_DATE] . ") < " . $nDateTimeStamp;
|
||||
else
|
||||
$szWhere = "";
|
||||
|
||||
// DELETE DATA NOW!
|
||||
$szSql = "DELETE FROM " . $this->_logStreamConfigObj->DBTableName . $szWhere;
|
||||
$myQuery = mysql_query($szSql, $this->_dbhandle);
|
||||
if ($myQuery)
|
||||
{
|
||||
// Get affected rows and return!
|
||||
$rowcount = mysql_affected_rows();
|
||||
|
||||
// Free query now
|
||||
mysql_free_result ($myQuery);
|
||||
}
|
||||
}
|
||||
|
||||
//return affected rows
|
||||
return $rowcount;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of GetCountSortedByField
|
||||
*
|
||||
|
@ -598,6 +598,52 @@ class LogStreamDisk extends LogStream {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of GetLogStreamStats
|
||||
*
|
||||
* Returns an Array og logstream statsdata
|
||||
* Count of Data Items
|
||||
* Total Filesize
|
||||
*/
|
||||
public function GetLogStreamStats()
|
||||
{
|
||||
// Get some file data!
|
||||
|
||||
/*
|
||||
// return results!
|
||||
return $stats;
|
||||
}
|
||||
else
|
||||
*/
|
||||
// NOT IMPLEMENTED YET!
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of GetLogStreamTotalRowCount
|
||||
*
|
||||
* not implemented yet!
|
||||
*/
|
||||
public function GetLogStreamTotalRowCount()
|
||||
{
|
||||
//not implemented
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of the CleanupLogdataByDate
|
||||
*
|
||||
* not implemented yet!
|
||||
*/
|
||||
public function CleanupLogdataByDate( $nDateTimeStamp )
|
||||
{
|
||||
//not implemented
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of GetCountSortedByField
|
||||
*
|
||||
|
@ -534,6 +534,129 @@ class LogStreamPDO extends LogStream {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of GetLogStreamStats
|
||||
*
|
||||
* Returns an Array og logstream statsdata
|
||||
* Count of Data Items
|
||||
* Total Filesize
|
||||
*/
|
||||
public function GetLogStreamStats()
|
||||
{
|
||||
global $querycount, $dbmapping;
|
||||
$szTableType = $this->_logStreamConfigObj->DBTableType;
|
||||
|
||||
// Perform if Connection is true!
|
||||
if ( $this->_dbhandle != null )
|
||||
{
|
||||
$tableName = $this->_logStreamConfigObj->DBTableName;
|
||||
|
||||
// SHOW TABLE STATUS FROM
|
||||
$stats = NULL;
|
||||
$szSql = "SELECT count(" . $dbmapping[$szTableType][SYSLOG_UID] . ") as Counter FROM " . $this->_logStreamConfigObj->DBTableName;
|
||||
$myQuery = $this->_dbhandle->query($szSql);
|
||||
if ( $myQuery )
|
||||
{
|
||||
// Set tablename!
|
||||
$tableName = $this->_logStreamConfigObj->DBTableName;
|
||||
$myStats[] = array( 'StatsDisplayName' => 'TableName', 'StatsValue' => $tableName );
|
||||
|
||||
// obtain first and only row
|
||||
$myRow = $myQuery->fetchColumn();
|
||||
$myStats[] = array( 'StatsDisplayName' => 'Rows', 'StatsValue' => $myRow );
|
||||
$stats[]['STATSDATA'] = $myStats;
|
||||
|
||||
// Free query now
|
||||
$myQuery->closeCursor();
|
||||
|
||||
// Increment for the Footer Stats
|
||||
$querycount++;
|
||||
}
|
||||
|
||||
// return results!
|
||||
return $stats;
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of GetLogStreamTotalRowCount
|
||||
*
|
||||
* Returns the total amount of rows in the main datatable
|
||||
*/
|
||||
public function GetLogStreamTotalRowCount()
|
||||
{
|
||||
global $querycount, $dbmapping;
|
||||
$szTableType = $this->_logStreamConfigObj->DBTableType;
|
||||
|
||||
// Set default rowcount
|
||||
$rowcount = null;
|
||||
|
||||
// Perform if Connection is true!
|
||||
if ( $this->_dbhandle != null )
|
||||
{
|
||||
// Get Total Rowcount
|
||||
$szSql = "SELECT count(" . $dbmapping[$szTableType][SYSLOG_UID] . ") as Counter FROM " . $this->_logStreamConfigObj->DBTableName;
|
||||
$myQuery = $this->_dbhandle->query($szSql);
|
||||
if ( $myQuery )
|
||||
{
|
||||
// Obtain RowCount!
|
||||
$myRow = $myQuery->fetchColumn();
|
||||
$rowcount = $myRow;
|
||||
|
||||
// Free query now
|
||||
$myQuery->closeCursor();
|
||||
|
||||
// Increment for the Footer Stats
|
||||
$querycount++;
|
||||
}
|
||||
}
|
||||
|
||||
//return result
|
||||
return $rowcount;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of the CleanupLogdataByDate function! Returns affected rows!
|
||||
*/
|
||||
public function CleanupLogdataByDate( $nDateTimeStamp )
|
||||
{
|
||||
global $querycount, $dbmapping;
|
||||
$szTableType = $this->_logStreamConfigObj->DBTableType;
|
||||
|
||||
// Set default rowcount
|
||||
$rowcount = null;
|
||||
|
||||
// Perform if Connection is true!
|
||||
if ( $this->_dbhandle != null )
|
||||
{
|
||||
// Create WHERE attachment
|
||||
if ( $nDateTimeStamp > 0 )
|
||||
$szWhere = " WHERE " . $dbmapping[$szTableType][SYSLOG_DATE] . " < '" . date('Y-m-d H:i:s', $nDateTimeStamp) . "'";
|
||||
else
|
||||
$szWhere = "";
|
||||
|
||||
// DELETE DATA NOW!
|
||||
$szSql = "DELETE FROM " . $this->_logStreamConfigObj->DBTableName . $szWhere;
|
||||
$myQuery = $this->_dbhandle->query($szSql);
|
||||
if ( $myQuery )
|
||||
{
|
||||
// Get affected rows and return!
|
||||
$rowcount = $myQuery->rowCount();
|
||||
|
||||
// Free query now
|
||||
$myQuery->closeCursor();
|
||||
}
|
||||
}
|
||||
|
||||
//return affected rows
|
||||
return $rowcount;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of GetCountSortedByField
|
||||
*
|
||||
|
@ -83,6 +83,7 @@ $CFG['EnableIPAddressResolve'] = 1; // If enabled, IP Addresses inline message
|
||||
$CFG['SuppressDuplicatedMessages'] = 0; // If enabled, duplicated messages will be suppressed in the main display.
|
||||
$CFG['TreatNotFoundFiltersAsTrue'] = 0; // If you filter / search for messages, and the fields you are filtering for is not found, the filter result is treaten as TRUE!
|
||||
$CFG['PopupMenuTimeout'] = 3000; // This variable defines the default timeout value for popup menus in milliseconds. (those menus which popup when you click on the value of a field.
|
||||
$CFG['PhplogconLogoUrl'] = ""; // Put an Url to a custom toplogo you want to use.
|
||||
// ---
|
||||
|
||||
// --- Custom HTML Code
|
||||
|
@ -72,6 +72,7 @@ $content['BASEPATH'] = $gl_root_path;
|
||||
$content['SHOW_DONATEBUTTON'] = true; // Default = true!
|
||||
|
||||
// PreInit overall user variables
|
||||
$content['EXTRA_PHPLOGCON_LOGO'] = $content['BASEPATH'] . "images/main/Header-Logo.png";
|
||||
$content['EXTRA_METATAGS'] = "";
|
||||
$content['EXTRA_JAVASCRIPT'] = "";
|
||||
$content['EXTRA_STYLESHEET'] = "";
|
||||
@ -627,6 +628,8 @@ function InitFrontEndVariables()
|
||||
$content['MENU_INFORMATION'] = $content['BASEPATH'] . "images/icons/information2.png";
|
||||
$content['MENU_PARSER_DELETE'] = $content['BASEPATH'] . "images/icons/gear_delete.png";
|
||||
$content['MENU_PARSER_INIT'] = $content['BASEPATH'] . "images/icons/gear_new.png";
|
||||
$content['MENU_RECYCLE'] = $content['BASEPATH'] . "images/icons/recycle.png";
|
||||
$content['MENU_TRASH'] = $content['BASEPATH'] . "images/icons/garbage_empty.png";
|
||||
|
||||
$content['MENU_PAGER_BEGIN'] = $content['BASEPATH'] . "images/icons/media_beginning.png";
|
||||
$content['MENU_PAGER_PREVIOUS'] = $content['BASEPATH'] . "images/icons/media_rewind.png";
|
||||
@ -812,6 +815,13 @@ function InitConfigurationValues()
|
||||
$content['InjectBodyFooter'] = ""; // Init Option
|
||||
// ---
|
||||
|
||||
// --- Handle Optional Logo URL!
|
||||
if ( strlen(GetConfigSetting("PhplogconLogoUrl", false)) > 0 )
|
||||
$content['EXTRA_PHPLOGCON_LOGO'] = $CFG['PhplogconLogoUrl'];
|
||||
else
|
||||
$content['PhplogconLogoUrl'] = ""; // Init Option
|
||||
// ---
|
||||
|
||||
// Init main langauge file now!
|
||||
IncludeLanguageFile( $gl_root_path . '/lang/' . $LANG . '/main.php' );
|
||||
|
||||
@ -1385,6 +1395,7 @@ function SaveGeneralSettingsIntoDB($bForceStripSlahes = false)
|
||||
WriteConfigValue( "InjectHtmlHeader", true, null, null,$bForceStripSlahes );
|
||||
WriteConfigValue( "InjectBodyHeader", true, null, null,$bForceStripSlahes );
|
||||
WriteConfigValue( "InjectBodyFooter", true, null, null ,$bForceStripSlahes );
|
||||
WriteConfigValue( "PhplogconLogoUrl", true, null, null ,$bForceStripSlahes );
|
||||
}
|
||||
|
||||
function SaveUserGeneralSettingsIntoDB()
|
||||
@ -1513,6 +1524,36 @@ function list_files($directory, $failOnError = true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Helper function to prepend the current global root path if necessary!
|
||||
*/
|
||||
function CheckAndPrependRootPath( $szFileName)
|
||||
{
|
||||
global $gl_root_path;
|
||||
|
||||
// Get plain filename for testing!
|
||||
$szNewFileName = $szFileName;
|
||||
|
||||
// Take as it is if rootpath!
|
||||
if (
|
||||
( ($pos = strpos($szFileName, "/")) !== FALSE && $pos == 0) ||
|
||||
( ($pos = strpos($szFileName, "\\\\")) !== FALSE && $pos == 0) ||
|
||||
( ($pos = strpos($szFileName, ":\\")) !== FALSE ) ||
|
||||
( ($pos = strpos($szFileName, ":/")) !== FALSE )
|
||||
)
|
||||
{
|
||||
// Nothing really todo
|
||||
true;
|
||||
}
|
||||
else // prepend basepath!
|
||||
$szNewFileName = $gl_root_path . $szFileName;
|
||||
|
||||
// return result
|
||||
return $szNewFileName;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Helper function to flush html output to avoid redirects if errors happen!
|
||||
*/
|
||||
|
@ -362,10 +362,35 @@ function HoverPopup( myObjRef, myPopupTitle, HoverContent, OptionalImage )
|
||||
obj.innerHTML = HoverContent;
|
||||
}
|
||||
|
||||
function HoverPopupHelp( myEvent, parentObj, myPopupTitle, HoverContent )
|
||||
{
|
||||
// Change CSS Class
|
||||
var objPopup = document.getElementById('popupdetails');
|
||||
objPopup.className='popupdetails_popup with_border';
|
||||
|
||||
// Set title
|
||||
var obj = document.getElementById("popuptitle");
|
||||
obj.innerHTML = myPopupTitle;
|
||||
|
||||
// Set Content
|
||||
obj = document.getElementById("popupcontent");
|
||||
obj.innerHTML = HoverContent;
|
||||
|
||||
// var PopupContentWidth = 0;
|
||||
/// var middle = PopupContentWidth / 2;
|
||||
var middle = -5;
|
||||
|
||||
if (myPopupHovering == false && parentObj != null)
|
||||
{
|
||||
// Different mouse position capturing in IE!
|
||||
objPopup.style.top = (event.y+document.body.scrollTop + 24) + 'px';
|
||||
objPopup.style.left = (myEvent.clientX - middle) + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
function HoverPopupMenuHelp( myEvent, parentObj, myPopupTitle, HoverContent )
|
||||
{
|
||||
if (szBrowserApp !== "IEXPLORER")
|
||||
if (szBrowserApp !== "IEXPLORER" )
|
||||
{
|
||||
// Don't need helper here!
|
||||
return;
|
||||
|
@ -51,7 +51,9 @@ $content['LN_GEN_GLOBAL'] = "Global";
|
||||
$content['LN_GEN_USERONLY_LONG'] = "For me only <br>(Only available to your user)";
|
||||
$content['LN_GEN_GROUPONLY_LONG'] = "For this group <br>(Only available to the selected group)";
|
||||
$content['LN_GEN_GROUPONLYNAME'] = "Group '%1'";
|
||||
|
||||
$content['LN_ADMIN_POPUPHELP'] = "Details on this function";
|
||||
$content['LN_ADMIN_DBSTATS'] = "Show database statistics.";
|
||||
$content['LN_ADMIN_CLEARDATA'] = "If you need to remove old data records, use this function.";
|
||||
|
||||
// General Options
|
||||
$content['LN_ADMIN_GLOBFRONTEND'] = "Global frontend options";
|
||||
@ -91,6 +93,10 @@ $content['LN_ADMIN_GLOBALONLY'] = "Global Options Only";
|
||||
$content['LN_GEN_DEBUGTOSYSLOG'] = "Send Debug to local syslog server";
|
||||
$content['LN_GEN_POPUPMENUTIMEOUT'] = "Popupmenu Timeout in milli seconds";
|
||||
$content['LN_ADMIN_SCRIPTTIMEOUT'] = "PHP Script Timeout in seconds";
|
||||
$content['LN_GEN_INJECTHTMLHEADER'] = "Inject this html code into the <head> area.";
|
||||
$content['LN_GEN_INJECTBODYHEADER'] = "Inject this html code at the beginning of the <body> area.";
|
||||
$content['LN_GEN_INJECTBODYFOOTER'] = "Inject this html code at the end <body> area.";
|
||||
$content['LN_ADMIN_PHPLOGCON_LOGOURL'] = "Optional phpLogCon Logo URL. Leave empty to use the default one.";
|
||||
|
||||
// User Center
|
||||
$content['LN_USER_CENTER'] = "User Options";
|
||||
@ -224,6 +230,21 @@ $content['LN_SOURCES_ERROR_DELSOURCE'] = "Deleting of the Source with id '%1' fa
|
||||
$content['LN_SOURCES_ERROR_HASBEENDEL'] = "The Source '%1' has been successfully deleted!";
|
||||
$content['LN_SOURCES_DESCRIPTION'] = "Source Description (Optional)";
|
||||
$content['LN_SOURCES_ERROR_INVALIDVALUE'] = "Invalid value for the paramater '%1'.";
|
||||
$content['LN_SOURCES_STATSNAME'] = "Name";
|
||||
$content['LN_SOURCES_STATSVALUE'] = "Value";
|
||||
$content['LN_SOURCES_DETAILS'] = "Details for this logstream source";
|
||||
$content['LN_SOURCES_STATSDETAILS'] = "Statistic details for this logstream source";
|
||||
$content['LN_SOURCES_ERROR_NOSTATSDATA'] = "Could not find or obtain any stats related information for this logstream source.";
|
||||
$content['LN_SOURCES_ERROR_NOCLEARSUPPORT'] = "This logstream source does not support deleting data.";
|
||||
$content['LN_SOURCES_ROWCOUNT'] = "Total Rowcount";
|
||||
$content['LN_SOURCES_CLEAR_HELPTEXT'] = "Attention! Be carefull with deleting data, any action performed here can not be undone!";
|
||||
$content['LN_SOURCES_CLEARSINCE'] = "Clear all data older than ... ";
|
||||
$content['LN_SOURCES_CLEARDATE'] = "Clear all data which is older than ... ";
|
||||
$content['LN_SOURCES_CLEARDATA_SEND'] = "Clear selected data range";
|
||||
$content['LN_SOURCES_ERROR_INVALIDCLEANUP'] = "Invalid Data Cleanup type";
|
||||
$content['LN_SOURCES_WARNDELETEDATA'] = "Are you sure that you want to clear logdata in the '%1' source? This cannot be undone!";
|
||||
$content['LN_SOURCES_ERROR_DELDATA'] = "Could not delete data in the '%1' source";
|
||||
$content['LN_SOURCES_HASBEENDELDATA'] = "Successfully deleted data from the '%1' source, '%2' rows were affected. ";
|
||||
|
||||
// Database Upgrade
|
||||
$content['LN_DBUPGRADE_TITLE'] = "phpLogCon Database Update";
|
||||
|
@ -51,6 +51,9 @@ $content['LN_GEN_GLOBAL'] = "Global";
|
||||
$content['LN_GEN_USERONLY_LONG'] = "For me only <br>(Only available to your user)";
|
||||
$content['LN_GEN_GROUPONLY_LONG'] = "For this group <br>(Only available to the selected group)";
|
||||
$content['LN_GEN_GROUPONLYNAME'] = "Group '%1'";
|
||||
$content['LN_ADMIN_POPUPHELP'] = "Details on this function";
|
||||
$content['LN_ADMIN_DBSTATS'] = "Show database statistics.";
|
||||
$content['LN_ADMIN_CLEARDATA'] = "If you need to remove old data records, use this function.";
|
||||
|
||||
// General Options
|
||||
$content['LN_ADMIN_GLOBFRONTEND'] = "Global frontend options";
|
||||
@ -95,6 +98,7 @@ $content['LN_ADMIN_SCRIPTTIMEOUT'] = "PHP Script Timeout in seconds";
|
||||
$content['LN_GEN_INJECTHTMLHEADER'] = "Inject this html code into the <head> area.";
|
||||
$content['LN_GEN_INJECTBODYHEADER'] = "Inject this html code at the beginning of the <body> area.";
|
||||
$content['LN_GEN_INJECTBODYFOOTER'] = "Inject this html code at the end <body> area.";
|
||||
$content['LN_ADMIN_PHPLOGCON_LOGOURL'] = "Optional phpLogCon Logo URL. Leave empty to use the default one.";
|
||||
|
||||
// User Center
|
||||
$content['LN_USER_CENTER'] = "User Options";
|
||||
@ -228,6 +232,24 @@ $content['LN_SOURCES_ERROR_DELSOURCE'] = "Deleting of the Source with id '%1' fa
|
||||
$content['LN_SOURCES_ERROR_HASBEENDEL'] = "The Source '%1' has been successfully deleted!";
|
||||
$content['LN_SOURCES_DESCRIPTION'] = "Source Description (Optional)";
|
||||
$content['LN_SOURCES_ERROR_INVALIDVALUE'] = "Invalid value for the paramater '%1'.";
|
||||
$content['LN_SOURCES_STATSNAME'] = "Name";
|
||||
$content['LN_SOURCES_STATSVALUE'] = "Value";
|
||||
$content['LN_SOURCES_DETAILS'] = "Details for this logstream source";
|
||||
$content['LN_SOURCES_STATSDETAILS'] = "Statistic details for this logstream source";
|
||||
$content['LN_SOURCES_ERROR_NOSTATSDATA'] = "Could not find or obtain any stats related information for this logstream source.";
|
||||
$content['LN_SOURCES_ERROR_NOCLEARSUPPORT'] = "This logstream source does not support deleting data.";
|
||||
$content['LN_SOURCES_ROWCOUNT'] = "Total Rowcount";
|
||||
$content['LN_SOURCES_CLEARDATA'] = "The following database maintenance Options are available";
|
||||
$content['LN_SOURCES_CLEAROPTIONS'] = "Select how you want to clear data.";
|
||||
$content['LN_SOURCES_CLEARALL'] = "Clear (Delete) all data.";
|
||||
$content['LN_SOURCES_CLEAR_HELPTEXT'] = "Attention! Be carefull with deleting data, any action performed here can not be undone!";
|
||||
$content['LN_SOURCES_CLEARSINCE'] = "Clear all data older than ... ";
|
||||
$content['LN_SOURCES_CLEARDATE'] = "Clear all data which is older than ... ";
|
||||
$content['LN_SOURCES_CLEARDATA_SEND'] = "Clear selected data range";
|
||||
$content['LN_SOURCES_ERROR_INVALIDCLEANUP'] = "Invalid Data Cleanup type";
|
||||
$content['LN_SOURCES_WARNDELETEDATA'] = "Are you sure that you want to clear logdata in the '%1' source? This cannot be undone!";
|
||||
$content['LN_SOURCES_ERROR_DELDATA'] = "Could not delete data in the '%1' source";
|
||||
$content['LN_SOURCES_HASBEENDELDATA'] = "Successfully deleted data from the '%1' source, '%2' rows were affected. ";
|
||||
|
||||
// Database Upgrade
|
||||
$content['LN_DBUPGRADE_TITLE'] = "phpLogCon Database Update";
|
||||
|
@ -51,7 +51,9 @@ $content['LN_GEN_GLOBAL'] = "Global";
|
||||
$content['LN_GEN_USERONLY_LONG'] = "For me only <br>(Only available to your user)";
|
||||
$content['LN_GEN_GROUPONLY_LONG'] = "For this group <br>(Only available to the selected group)";
|
||||
$content['LN_GEN_GROUPONLYNAME'] = "Group '%1'";
|
||||
|
||||
$content['LN_ADMIN_POPUPHELP'] = "Details on this function";
|
||||
$content['LN_ADMIN_DBSTATS'] = "Show database statistics.";
|
||||
$content['LN_ADMIN_CLEARDATA'] = "If you need to remove old data records, use this function.";
|
||||
|
||||
// General Options
|
||||
$content['LN_ADMIN_GLOBFRONTEND'] = "Global frontend options";
|
||||
@ -91,6 +93,10 @@ $content['LN_ADMIN_GLOBALONLY'] = "Global Options Only";
|
||||
$content['LN_GEN_DEBUGTOSYSLOG'] = "Send Debug to local syslog server";
|
||||
$content['LN_GEN_POPUPMENUTIMEOUT'] = "Popupmenu Timeout in milli seconds";
|
||||
$content['LN_ADMIN_SCRIPTTIMEOUT'] = "PHP Script Timeout in seconds";
|
||||
$content['LN_GEN_INJECTHTMLHEADER'] = "Inject this html code into the <head> area.";
|
||||
$content['LN_GEN_INJECTBODYHEADER'] = "Inject this html code at the beginning of the <body> area.";
|
||||
$content['LN_GEN_INJECTBODYFOOTER'] = "Inject this html code at the end <body> area.";
|
||||
$content['LN_ADMIN_PHPLOGCON_LOGOURL'] = "Optional phpLogCon Logo URL. Leave empty to use the default one.";
|
||||
|
||||
// User Center
|
||||
$content['LN_USER_CENTER'] = "User Options";
|
||||
@ -224,6 +230,21 @@ $content['LN_SOURCES_ERROR_DELSOURCE'] = "Deleting of the Source with id '%1' fa
|
||||
$content['LN_SOURCES_ERROR_HASBEENDEL'] = "The Source '%1' has been successfully deleted!";
|
||||
$content['LN_SOURCES_DESCRIPTION'] = "Source Description (Optional)";
|
||||
$content['LN_SOURCES_ERROR_INVALIDVALUE'] = "Invalid value for the paramater '%1'.";
|
||||
$content['LN_SOURCES_STATSNAME'] = "Name";
|
||||
$content['LN_SOURCES_STATSVALUE'] = "Value";
|
||||
$content['LN_SOURCES_DETAILS'] = "Details for this logstream source";
|
||||
$content['LN_SOURCES_STATSDETAILS'] = "Statistic details for this logstream source";
|
||||
$content['LN_SOURCES_ERROR_NOSTATSDATA'] = "Could not find or obtain any stats related information for this logstream source.";
|
||||
$content['LN_SOURCES_ERROR_NOCLEARSUPPORT'] = "This logstream source does not support deleting data.";
|
||||
$content['LN_SOURCES_ROWCOUNT'] = "Total Rowcount";
|
||||
$content['LN_SOURCES_CLEAR_HELPTEXT'] = "Attention! Be carefull with deleting data, any action performed here can not be undone!";
|
||||
$content['LN_SOURCES_CLEARSINCE'] = "Clear all data older than ... ";
|
||||
$content['LN_SOURCES_CLEARDATE'] = "Clear all data which is older than ... ";
|
||||
$content['LN_SOURCES_CLEARDATA_SEND'] = "Clear selected data range";
|
||||
$content['LN_SOURCES_ERROR_INVALIDCLEANUP'] = "Invalid Data Cleanup type";
|
||||
$content['LN_SOURCES_WARNDELETEDATA'] = "Are you sure that you want to clear logdata in the '%1' source? This cannot be undone!";
|
||||
$content['LN_SOURCES_ERROR_DELDATA'] = "Could not delete data in the '%1' source";
|
||||
$content['LN_SOURCES_HASBEENDELDATA'] = "Successfully deleted data from the '%1' source, '%2' rows were affected. ";
|
||||
|
||||
// Database Upgrade
|
||||
$content['LN_DBUPGRADE_TITLE'] = "phpLogCon Database Update";
|
||||
|
@ -238,18 +238,22 @@
|
||||
<strong>{LN_ADMIN_GLOBALONLY}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_ADMIN_SCRIPTTIMEOUT}</b></td>
|
||||
<td align="left" class="cellmenu2"><b>{LN_ADMIN_SCRIPTTIMEOUT}</b></td>
|
||||
<td align="right" class="line1" colspan="2"><input type="text" name="MiscMaxExecutionTime" size="16" maxlength="12" value="{MiscMaxExecutionTime}" {DISABLE_GLOBALEDIT_FORMCONTROL}></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_GEN_DEBUGUSERLOGIN}</b></td>
|
||||
<td align="left" class="cellmenu2_naked"><b>{LN_ADMIN_PHPLOGCON_LOGOURL}</b></td>
|
||||
<td align="right" class="line1" colspan="2"><input type="text" name="PhplogconLogoUrl" size="85" maxlength="255" value="{PhplogconLogoUrl}" {DISABLE_GLOBALEDIT_FORMCONTROL}></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2"><b>{LN_GEN_DEBUGUSERLOGIN}</b></td>
|
||||
<td align="right" class="line2" colspan="2"><input type="checkbox" name="DebugUserLogin" value="yes" {DebugUserLogin_checked} {DISABLE_GLOBALEDIT_FORMCONTROL}></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_GEN_DEBUGTOSYSLOG}</b></td>
|
||||
<td align="left" class="cellmenu2"><b>{LN_GEN_DEBUGTOSYSLOG}</b></td>
|
||||
<td align="right" class="line1" colspan="2"><input type="checkbox" name="MiscDebugToSyslog" value="yes" {MiscDebugToSyslog_checked} {DISABLE_GLOBALEDIT_FORMCONTROL}></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2_naked" valign="_top"><b>{LN_GEN_INJECTHTMLHEADER}</b></td>
|
||||
<td align="right" class="line2" colspan="2"><textarea name="InjectHtmlHeader" cols="85" rows="3" {DISABLE_GLOBALEDIT_FORMCONTROL}>{InjectHtmlHeader}</textarea></td>
|
||||
|
@ -58,8 +58,8 @@
|
||||
<td align="center" width="50" class="cellmenu1"><b>{LN_SOURCES_ID}</b></td>
|
||||
<td align="center" width="200" class="cellmenu1"><b>{LN_SOURCES_NAME}</b></td>
|
||||
<td align="center" width="150" class="cellmenu1"><b>{LN_SOURCES_TYPE}</b></td>
|
||||
<td align="center" width="200" class="cellmenu1"><b>{LN_SOURCES_ASSIGNTO}</b></td>
|
||||
<td align="center" width="150" class="cellmenu1"><b>{LN_GEN_ACTIONS}</b></td>
|
||||
<td align="center" width="175" class="cellmenu1"><b>{LN_SOURCES_ASSIGNTO}</b></td>
|
||||
<td align="center" width="175" class="cellmenu1" colspan="2"><b>{LN_GEN_ACTIONS}</b></td>
|
||||
</tr>
|
||||
<!-- BEGIN SOURCES -->
|
||||
<tr>
|
||||
@ -85,14 +85,154 @@
|
||||
<img src="{MENU_DELETE_DISABLED}" width="16" title="{LN_GEN_DISABLED}">
|
||||
<!-- ENDIF ActionsAllowed!="true" -->
|
||||
</td>
|
||||
|
||||
<td align="center" class="{cssclass}">
|
||||
<!-- IF IsDatabaseSource="true" -->
|
||||
<a href="{BASEPATH}admin/sources.php?op=dbstats&id={ID}"><img src="{MENU_CHARTS}" width="16" OnMouseOver="HoverPopupHelp(event, this, '{LN_ADMIN_POPUPHELP}', '{LN_ADMIN_DBSTATS}');" OnMouseOut="FinishPopupWindowMenu();"></a>
|
||||
<a href="{BASEPATH}admin/sources.php?op=cleardata&id={ID}"><img src="{MENU_TRASH}" width="16" OnMouseOver="HoverPopupHelp(event, this, '{LN_ADMIN_POPUPHELP}', '{LN_ADMIN_CLEARDATA}');" OnMouseOut="FinishPopupWindowMenu();"></a>
|
||||
<!-- ENDIF IsDatabaseSource="true" -->
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END SOURCES -->
|
||||
<tr>
|
||||
<td align="center" colspan="5" class="line0"><b><a href="{BASEPATH}admin/sources.php?op=add"><img src="{MENU_ADD}" title="{LN_SOURCES_ADD}"> {LN_SOURCES_ADD}</a></b></td>
|
||||
<td align="center" colspan="6" class="line0"><b><a href="{BASEPATH}admin/sources.php?op=add"><img src="{MENU_ADD}" title="{LN_SOURCES_ADD}"> {LN_SOURCES_ADD}</a></b></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ENDIF LISTSOURCES="true" -->
|
||||
|
||||
<!-- IF ISCLEARDATA="true" -->
|
||||
<table border="0" cellpadding="1" cellspacing="1" bgcolor="#DDDDDD" width="600" class="with_border_alternate">
|
||||
<tr>
|
||||
<td align="center" class="cellmenu1" colspan="2"><b>{LN_SOURCES_DETAILS}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" width="200"><b>{LN_SOURCES_ID}</b></td>
|
||||
<td align="left" class="line1" width="400">{SOURCEID}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2"><b>{LN_SOURCES_NAME}</b></td>
|
||||
<td align="left" class="line2">{DisplayName}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" valign="top"><b>{LN_SOURCES_TYPE}</b></td>
|
||||
<td align="left" class="line1">{SourceTypeName}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" valign="top"><b>{LN_SOURCES_ROWCOUNT}</b></td>
|
||||
<td align="left" class="line1">{ROWCOUNT}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
|
||||
<form action="{BASEPATH}admin/sources.php?op=cleardata&id={SOURCEID}" method="post">
|
||||
<table border="0" cellpadding="2" cellspacing="1" bgcolor="#DDDDDD" width="600" class="with_border_alternate">
|
||||
<tr>
|
||||
<td align="center" class="cellmenu1" nowrap colspan="2"><B>{LN_SOURCES_CLEARDATA}</B></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="titleSecond" colspan="2"><blockquote>{LN_SOURCES_CLEAR_HELPTEXT}</blockquote></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2_naked" width="200" valign="top"><b>{LN_SOURCES_CLEAROPTIONS}</b></td>
|
||||
<td align="left" class="line1" width="400">
|
||||
<br>
|
||||
<input type="radio" name="subop" value="all"> <b>{LN_SOURCES_CLEARALL}</b><br>
|
||||
|
||||
<!-- IF DELETE_ALLOWDETAIL="true" -->
|
||||
<input type="radio" name="subop" value="since"> <b>{LN_SOURCES_CLEARSINCE}</b>
|
||||
<select name="olderthan" size="1">
|
||||
<!-- BEGIN OLDERTHAN -->
|
||||
<option {selected} value="{OlderThanSeconds}">{OlderThanDisplayName}</option>
|
||||
<!-- END OLDERTHAN -->
|
||||
</select>
|
||||
<br>
|
||||
|
||||
<input type="radio" name="subop" value="date"> <b>{LN_SOURCES_CLEARDATE}</b>
|
||||
<select name="olderdate_year" size="1">
|
||||
<!-- BEGIN olderdate_years -->
|
||||
<option {selected} value="{value}">{value}</option>
|
||||
<!-- END olderdate_years -->
|
||||
</select>
|
||||
-
|
||||
<select name="olderdate_month" size="1">
|
||||
<!-- BEGIN olderdate_months -->
|
||||
<option {selected} value="{value}">{value}</option>
|
||||
<!-- END olderdate_months -->
|
||||
</select>
|
||||
-
|
||||
<select name="olderdate_day" size="1">
|
||||
<!-- BEGIN olderdate_days -->
|
||||
<option {selected} value="{value}">{value}</option>
|
||||
<!-- END olderdate_days -->
|
||||
</select>
|
||||
<br>
|
||||
|
||||
<br>
|
||||
<!-- ENDIF DELETE_ALLOWDETAIL="true" -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<input type="submit" value="{LN_SOURCES_CLEARDATA_SEND}">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<br><br>
|
||||
<a href="javascript:history.back();" target="_top">{LN_GEN_ERRORRETURNPREV}</a>
|
||||
<!-- ENDIF ISCLEARDATA="true" -->
|
||||
|
||||
<!-- IF ISSTATS="true" -->
|
||||
<table border="0" cellpadding="1" cellspacing="1" bgcolor="#DDDDDD" width="500" class="with_border_alternate">
|
||||
<tr>
|
||||
<td align="center" class="cellmenu1" colspan="2"><b>{LN_SOURCES_DETAILS}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" width="200"><b>{LN_SOURCES_ID}</b></td>
|
||||
<td align="left" class="line1" width="300">{SOURCEID}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2"><b>{LN_SOURCES_NAME}</b></td>
|
||||
<td align="left" class="line2">{DisplayName}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" valign="top"><b>{LN_SOURCES_TYPE}</b></td>
|
||||
<td align="left" class="line1">{SourceTypeName}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2_naked" valign="top"><b>{LN_SOURCES_DESCRIPTION}</b></td>
|
||||
<td align="left" class="line1">{Description}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
|
||||
<table border="0" cellpadding="2" cellspacing="1" bgcolor="#DDDDDD" width="500" class="with_border_alternate">
|
||||
<tr>
|
||||
<td class="cellmenu1" nowrap><B>{LN_SOURCES_STATSDETAILS}</B></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- BEGIN STATS -->
|
||||
<table border="0" cellpadding="2" cellspacing="1" bgcolor="#DDDDDD" width="500" class="with_border_alternate">
|
||||
<tr>
|
||||
<td align="center" width="200" class="cellmenu2"><b>{LN_SOURCES_STATSNAME}</b></td>
|
||||
<td align="center" width="300" class="cellmenu2"><b>{LN_SOURCES_STATSVALUE}</b></td>
|
||||
</tr>
|
||||
<!-- BEGIN STATSDATA -->
|
||||
<tr>
|
||||
<td align="left" width="200" class="{cssclass}"><b>{StatsDisplayName}</b></td>
|
||||
<td align="left" width="300" class="{cssclass}">{StatsValue}</td>
|
||||
</tr>
|
||||
<!-- END STATSDATA -->
|
||||
</table>
|
||||
<!-- END STATS -->
|
||||
|
||||
<br><br>
|
||||
<a href="javascript:history.back();" target="_top">{LN_GEN_ERRORRETURNPREV}</a>
|
||||
|
||||
<!-- ENDIF ISSTATS="true" -->
|
||||
|
||||
<!-- IF ISEDITORNEWSOURCE="true" -->
|
||||
<form action="{BASEPATH}admin/sources.php" method="post">
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
<!-- IF MAXIMIZED!="true" -->
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="mainheader">
|
||||
<tr>
|
||||
<td rowspan="4" width="500" align="left" valign="top"><a href="{BASEPATH}index.php"><img src="{BASEPATH}images/main/Header-Logo.png" width="500" height="79" name="HeaderLogo"></a></td>
|
||||
<td rowspan="4" width="500" align="left" valign="top"><a href="{BASEPATH}index.php"><img src="{EXTRA_PHPLOGCON_LOGO}" width="500" height="79" name="HeaderLogo"></a></td>
|
||||
<td rowspan="4" width="100%" align="center" nowrap>
|
||||
<!-- IF SHOW_DONATEBUTTON="true" -->
|
||||
<b>Satisfied with phpLogCon?</b><br>
|
||||
|
Loading…
x
Reference in New Issue
Block a user