Fixed merge problem from beta to stable

This commit is contained in:
Andre Lorbach 2011-12-06 14:05:01 +01:00
parent 0cd38fdd47
commit 62d046639c
52 changed files with 1251 additions and 370 deletions

View File

@ -39,6 +39,7 @@ $gl_root_path = './../';
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($gl_root_path . 'include/functions_reports.php');
// Set PAGE to be ADMINPAGE!
define('IS_ADMINPAGE', true);
@ -59,10 +60,11 @@ if ( !isset($_SESSION['SESSION_ISREADONLY']) || $_SESSION['SESSION_ISREADONLY']
(
isset($_GET['op']) &&
(
$_GET['op'] == "initreport" ||
$_GET['op'] == "removereport" ||
$_GET['op'] == "addsavedreport" ||
$_GET['op'] == "removesavedreport"
strpos($_GET['op'], "initreport") !== false ||
strpos($_GET['op'], "removereport") !== false ||
strpos($_GET['op'], "editsavedreport") !== false ||
strpos($_GET['op'], "addsavedreport") !== false ||
strpos($_GET['op'], "removesavedreport") !== false
)
)
)
@ -71,8 +73,6 @@ if ( !isset($_SESSION['SESSION_ISREADONLY']) || $_SESSION['SESSION_ISREADONLY']
// ---
// --- BEGIN Custom Code
// Hardcoded settings
define('URL_ONLINEREPORTS', 'http://tools.adiscon.net/listreports.php');
$content['OPTIONAL_TITLE'] = "";
// Firts of all init List of Reports!
@ -307,7 +307,7 @@ if ( isset($_GET['op']) )
$content['ERROR_MSG'] = $content['LN_REPORTS_ERROR_INVALIDID'];
}
}
else if ($_GET['op'] == "addsavedreport")
else if (strpos($_GET['op'], "addsavedreport") !== false )
{
if ( isset($_GET['id']) )
{
@ -317,7 +317,9 @@ if ( isset($_GET['op']) )
// Init Form variables
$content['ISADDSAVEDREPORT'] = "true";
$content['REPORT_FORMACTION'] = "addsavedreport";
$content['REPORT_FORMACTIONRETURN'] = "addsavedreport_return";
$content['REPORT_SENDBUTTON'] = $content['LN_REPORTS_ADDSAVEDREPORT'];
$content['REPORT_SENDANDRETURN'] = $content['LN_REPORTS_ADDSAVEDREPORTANDRETURN'];
$content['FormUrlAddOP'] = "?op=addsavedreport&id=" . $content['ReportID'];
// Check if report exists
@ -359,6 +361,9 @@ if ( isset($_GET['op']) )
$mySource['sourceselected'] = "";
}
// Check if logstream is optimized!
CheckConfiguredLogStreamSource($myReport, $content['SourceID']);
// Create Outputlist
$content['outputFormat'] = REPORT_OUTPUT_HTML;
CreateOutputformatList( $content['outputFormat'] );
@ -390,12 +395,15 @@ if ( isset($_GET['op']) )
$content['ERROR_MSG'] = $content['LN_REPORTS_ERROR_INVALIDID'];
}
}
else if ($_GET['op'] == "editsavedreport")
else if (strpos($_GET['op'], "editsavedreport") !== false )
{
// Set Mode to add
$content['ISADDSAVEDREPORT'] = "true";
$content['REPORT_FORMACTION'] = "editsavedreport";
$content['REPORT_FORMACTIONRETURN'] = "editsavedreport_return";
$content['REPORT_SENDBUTTON'] = $content['LN_REPORTS_EDITSAVEDREPORT'];
$content['REPORT_SENDANDRETURN'] = $content['LN_REPORTS_EDITSAVEDREPORTANDRETURN'];
if ( isset($_GET['id']) )
{
@ -448,6 +456,9 @@ if ( isset($_GET['op']) )
$mySource['sourceselected'] = "";
}
// Check if logstream is optimized!
CheckConfiguredLogStreamSource($myReport, $content['SourceID']);
// Create Outputlist
$content['outputFormat'] = $mySavedReport['outputFormat'];
CreateOutputformatList( $content['outputFormat'] );
@ -590,9 +601,9 @@ if ( isset($content['ISADDSAVEDREPORT']) && $content['ISADDSAVEDREPORT'] )
$szFilterString = "";
if (
( strlen($content['filterString']) <= 0 &&
isset($_POST['report_filterString']) )
||
// ( strlen($content['filterString']) <= 0 &&
// isset($_POST['report_filterString']) )
// ||
( strlen($content['filterString']) > 0 &&
!isset($_POST['subop']) &&
!isset($_POST['subop_edit']) &&
@ -740,10 +751,20 @@ if ( isset($content['ISADDSAVEDREPORT']) && $content['ISADDSAVEDREPORT'] )
$i++;
}
// DEBUG stuff
// echo $content['filterString'] . "<br>\r\n";
// echo $szFilterString . "<br>\r\n";
// print_r ( $AllFilters );
// Reset Allfilters Array to NULL in this case!
if ( strlen($szFilterString) <= 0 )
{
$content['filterString'] = "";
$content['filterString_htmlform'] = "";
}
/*
// DEBUG stuff
echo $content['filterString'] . "<br>\r\n";
echo $szFilterString . "<br>\r\n";
print_r ( $AllFilters );
// */
}
}
@ -797,7 +818,10 @@ if ( isset($content['ISADDSAVEDREPORT']) && $content['ISADDSAVEDREPORT'] )
}
// Copy Final Filterstring if necessary
if ( strlen($szFilterString) > 0 )
{
$content['filterString'] = $szFilterString;
$content['filterString_htmlform'] = htmlspecialchars($szFilterString);
}
// echo $content['SourceID'];
if ( isset($content['Sources'][$content['SourceID']]['ObjRef']) )
@ -959,7 +983,6 @@ if ( isset($_POST['op']) )
// Get ReportID!
if ( isset($_POST['id']) ) { $content['ReportID'] = DB_RemoveBadChars($_POST['id']); } else {$content['ReportID'] = ""; }
// Only Continue if reportid is valud!
if ( isset($content['REPORTS'][ $content['ReportID'] ]) )
{
@ -1074,7 +1097,7 @@ if ( isset($_POST['op']) )
if ( !isset($content['ISERROR']) )
{
// Everything was alright, so we go to the next step!
if ( $_POST['op'] == "addsavedreport" )
if ( strpos($_POST['op'], "addsavedreport") !== false )
{
// Add custom search now!
$sqlquery = "INSERT INTO " . DB_SAVEDREPORTS . " (reportid, sourceid, customTitle, customComment, filterString, customFilters, outputFormat, outputTarget, outputTargetDetails, scheduleSettings)
@ -1089,14 +1112,29 @@ if ( isset($_POST['op']) )
'" . $content['outputTargetDetails'] . "',
'" . $content['scheduleSettings'] . "'
)";
// Perform INSERT
$result = DB_Query($sqlquery);
// Get INSERTID from query!
$lastInsertID = mysql_insert_id();
// free ressources
DB_FreeQuery($result);
// Do the final redirect
RedirectResult( GetAndReplaceLangStr( $content['LN_REPORTS_HASBEENADDED'], DB_StripSlahes($content['customTitle']) ) , "reports.php" );
if ( strpos($_POST['op'], "_return") !== false )
RedirectResult( GetAndReplaceLangStr( $content['LN_REPORTS_HASBEENADDED'], DB_StripSlahes($content['customTitle']) ) , "reports.php" );
else
{
// Correct FormUrlAddUrl!
$szRediUrl = str_replace( "op=addsavedreport", "op=editsavedreport", $content['FormUrlAddOP']);
$szRediUrl .= "&savedreportid=" . $lastInsertID;
// Redirect to editpage!
RedirectResult( GetAndReplaceLangStr( $content['LN_REPORTS_HASBEENADDED'], DB_StripSlahes($content['customTitle']) ) , "reports.php" . $szRediUrl );
}
}
else if ( $_POST['op'] == "editsavedreport" )
else if ( strpos($_POST['op'], "editsavedreport") !== false )
{
$result = DB_Query("SELECT ID FROM " . DB_SAVEDREPORTS . " WHERE ID = " . $content['SavedReportID']);
$myrow = DB_GetSingleRow($result, true);
@ -1123,7 +1161,10 @@ if ( isset($_POST['op']) )
DB_FreeQuery($result);
// Done redirect!
RedirectResult( GetAndReplaceLangStr( $content['LN_REPORTS_HASBEENEDIT'], DB_StripSlahes($content['customTitle']) ) , "reports.php" );
if ( strpos($_POST['op'], "_return") !== false )
RedirectResult( GetAndReplaceLangStr( $content['LN_REPORTS_HASBEENEDIT'], DB_StripSlahes($content['customTitle']) ) , "reports.php" );
else
RedirectResult( GetAndReplaceLangStr( $content['LN_REPORTS_HASBEENEDIT'], DB_StripSlahes($content['customTitle']) ) , "reports.php" . $content['FormUrlAddOP'] );
}
}
@ -1224,6 +1265,198 @@ $page -> output();
// ---
// --- BEGIN Helper functions
// ---
/*
* Helper function to init custom filters from report
*/
function CheckConfiguredLogStreamSource($myReport, $mySourceID)
{
global $content, $extraErrorDescription;
// Get Objectreference to report
$myReportObj = $myReport["ObjRef"];
// Handle GET and POST input!
$content['MSG_WARNING_FORMURL'] = $_SERVER['SCRIPT_NAME'] . "?";
$content['MSG_CHECK_URL'] = $_SERVER['SCRIPT_NAME'] . "?";
foreach ($_GET as $varname => $varvalue)
{
// All variables!
$content['MSG_WARNING_FORMURL'] .= $varname . "=" . $varvalue . "&";
// Skip the Optimize variable!
if (strpos( $varname, "optimize" ) === false )
$content['MSG_CHECK_URL'] .= $varname . "=" . $varvalue . "&";
}
foreach ($_POST as $varname => $varvalue)
$content['POST_VARIABLES'][] = array( "varname" => $varname, "varvalue" => $varvalue );
// Append Force Optimice Paramater
$content['MSG_CHECK_URL'] .= "forcecheckoptimize=true";
// Check if optimize variable is set!
if ( isset($_GET['optimize']) )
{
// Check what we have to do
if ( $_GET['optimize'] == "addfields" )
{
// This will create all INDEXES we need for this logstream!
$res = $myReportObj->CreateMissingLogStreamFields( $mySourceID );
if ( $res != SUCCESS )
{
$content['ISERROR'] = true;
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_REPORTS_ERROR_FAILED_ADDING_FIELDS'], $content['SOURCES'][$mySourceID]['Name'], $res );
if ( isset($extraErrorDescription) )
$content['ERROR_MSG'] .= "<br><br>" . GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_EXTRAMSG'], $extraErrorDescription);
}
// Show information in performance warning area
$content['ISSOURCENOTOPTIMIZED'] = true;
$content['MSG_WARNING_TITLE'] = $content['LN_REPORTS_FIELDS_CREATED'];
$content['MSG_WARNING_CLASS'] = 'PriorityNotice';
$content['MSG_WARNING_DETAILS'] = GetAndReplaceLangStr( $content['LN_REPORTS_FIELDS_CREATED_SUCCESS'], $content['SOURCES'][$mySourceID]['Name'] );
$content['MSG_WARNING_SUBMITFORM'] = "false";
// return result
return $res;
}
else if ( $_GET['optimize'] == "indexes" )
{
// This will create all INDEXES we need for this logstream!
$res = $myReportObj->CreateLogStreamIndexes( $mySourceID );
if ( $res != SUCCESS )
{
$content['ISERROR'] = true;
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_REPORTS_ERROR_FAILED_CREATE_INDEXES'], $content['SOURCES'][$mySourceID]['Name'], $res );
if ( isset($extraErrorDescription) )
$content['ERROR_MSG'] .= "<br><br>" . GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_EXTRAMSG'], $extraErrorDescription);
}
// Show information in performance warning area
$content['ISSOURCENOTOPTIMIZED'] = true;
$content['MSG_WARNING_TITLE'] = $content['LN_REPORTS_INDEX_CREATED'];
$content['MSG_WARNING_CLASS'] = 'PriorityNotice';
$content['MSG_WARNING_DETAILS'] = GetAndReplaceLangStr( $content['LN_REPORTS_INDEX_CREATED_SUCCESS'], $content['SOURCES'][$mySourceID]['Name'] );
$content['MSG_WARNING_SUBMITFORM'] = "false";
// return result
return $res;
}
else if ( $_GET['optimize'] == "trigger" )
{
// This will create all INDEXES we need for this logstream!
$res = $myReportObj->CreateLogStreamTrigger( $mySourceID );
if ( $res != SUCCESS )
{
$content['ISERROR'] = true;
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_REPORTS_ERROR_FAILED_CREATE_TRIGGER'], $content['SOURCES'][$mySourceID]['Name'], $res );
if ( isset($extraErrorDescription) )
$content['ERROR_MSG'] .= "<br><br>" . GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_EXTRAMSG'], $extraErrorDescription);
}
else
{
// Show information in performance warning area
$content['ISSOURCENOTOPTIMIZED'] = true;
$content['MSG_WARNING_TITLE'] = $content['LN_REPORTS_TRIGGER_CREATED'];
$content['MSG_WARNING_CLASS'] = 'PriorityNotice';
$content['MSG_WARNING_DETAILS'] = GetAndReplaceLangStr( $content['LN_REPORTS_TRIGGER_CREATED_SUCCESS'], $content['SOURCES'][$mySourceID]['Name'] );
$content['MSG_WARNING_SUBMITFORM'] = "false";
}
// return result
return $res;
}
else if ( $_GET['optimize'] == "checksum" )
{
// This will create all INDEXES we need for this logstream!
$res = $myReportObj->ChangeChecksumFieldUnsigned( $mySourceID );
if ( $res != SUCCESS )
{
$content['ISERROR'] = true;
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_REPORTS_ERROR_FAILED_CHANGE_CHECKSUM'], $content['SOURCES'][$mySourceID]['Name'], $res );
if ( isset($extraErrorDescription) )
$content['ERROR_MSG'] .= "<br><br>" . GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_EXTRAMSG'], $extraErrorDescription);
}
else
{
// Show information in performance warning area
$content['ISSOURCENOTOPTIMIZED'] = true;
$content['MSG_WARNING_TITLE'] = $content['LN_REPORTS_CHECKSUM_CHANGED'];
$content['MSG_WARNING_CLASS'] = 'PriorityNotice';
$content['MSG_WARNING_DETAILS'] = GetAndReplaceLangStr( $content['LN_REPORTS_CHECKSUM_CHANGED_SUCCESS'], $content['SOURCES'][$mySourceID]['Name'] );
$content['MSG_WARNING_SUBMITFORM'] = "false";
}
// return result
return $res;
}
}
// Use SESSION to check if Source needs to be checked for optimization
$bForceCheck = false;
if ( !isset($_SESSION['Sources'][$mySourceID]['optimized']) ||
$_SESSION['Sources'][$mySourceID]['optimized'] == false ||
( isset($_GET['forcecheckoptimize']) && $_GET['forcecheckoptimize'] == "true" )
)
// Set Checking to true!
$bForceCheck = true;
// Lets see if we need to check
if ( $bForceCheck )
{
// Run checks
$res = $myReportObj->CheckLogStreamSource( $mySourceID );
if ( $res != SUCCESS )
{
// Current Logstream Source is not optimized! Show to user!
$content['ISSOURCENOTOPTIMIZED'] = true;
if ( $res == ERROR_DB_DBFIELDNOTFOUND )
{
$content['MSG_WARNING_TITLE'] = $content['LN_REPORTS_PERFORMANCE_WARNING'];
$content['MSG_WARNING_CLASS'] = 'PriorityWarning';
$content['MSG_WARNING_DETAILS'] = GetAndReplaceLangStr( $content['LN_REPORTS_ADD_MISSINGFIELDS'], $content['SOURCES'][$mySourceID]['Name'] ); // GetAndReplaceLangStr( $content['LN_REPORTS_ERROR_IDNOTFOUND'], $content['ReportID'] );
$content['MSG_WARNING_SUBMITFORM'] = "true";
$content['MSG_WARNING_FORMURL'] .= "optimize=addfields"; // Addmissing fields
}
else if ( $res == ERROR_DB_INDEXESMISSING )
{
$content['MSG_WARNING_TITLE'] = $content['LN_REPORTS_PERFORMANCE_WARNING'];
$content['MSG_WARNING_CLASS'] = 'PriorityWarning';
$content['MSG_WARNING_DETAILS'] = GetAndReplaceLangStr( $content['LN_REPORTS_OPTIMIZE_INDEXES'], $content['SOURCES'][$mySourceID]['Name'] ); // GetAndReplaceLangStr( $content['LN_REPORTS_ERROR_IDNOTFOUND'], $content['ReportID'] );
$content['MSG_WARNING_SUBMITFORM'] = "true";
$content['MSG_WARNING_FORMURL'] .= "optimize=indexes"; // Add missing INDEXES
}
else if ( $res == ERROR_DB_TRIGGERMISSING )
{
$content['MSG_WARNING_TITLE'] = $content['LN_REPORTS_PERFORMANCE_WARNING'];
$content['MSG_WARNING_CLASS'] = 'PriorityWarning';
$content['MSG_WARNING_DETAILS'] = GetAndReplaceLangStr( $content['LN_REPORTS_OPTIMIZE_TRIGGER'], $content['SOURCES'][$mySourceID]['Name'] ); // GetAndReplaceLangStr( $content['LN_REPORTS_ERROR_IDNOTFOUND'], $content['ReportID'] );
$content['MSG_WARNING_SUBMITFORM'] = "true";
$content['MSG_WARNING_FORMURL'] .= "optimize=trigger"; // Add missing TRIGGERS
}
else if ( $res == ERROR_DB_CHECKSUMERROR )
{
$content['MSG_WARNING_TITLE'] = $content['LN_REPORTS_PERFORMANCE_WARNING'];
$content['MSG_WARNING_CLASS'] = 'PriorityWarning';
$content['MSG_WARNING_DETAILS'] = GetAndReplaceLangStr( $content['LN_REPORTS_CHANGE_CHECKSUM'], $content['SOURCES'][$mySourceID]['Name'] ); // GetAndReplaceLangStr( $content['LN_REPORTS_ERROR_IDNOTFOUND'], $content['ReportID'] );
$content['MSG_WARNING_SUBMITFORM'] = "true";
$content['MSG_WARNING_FORMURL'] .= "optimize=checksum"; // Change Checksum field!
}
}
else
{
// Check was successfull! Set Checked Property in LogStream Source
$_SESSION['Sources'][$mySourceID]['optimized'] = true;
}
}
}
/*
* Helper function to init custom filters from report
*/
function InitCustomFilterDefinitions($myReport, $CustomFilterValues)
{
global $content;
@ -1312,224 +1545,6 @@ function InitOutputtargetDefinitions($myReport, $outputTargetDetails)
}
}
function CreateCronCommand( $myReportID, $mySavedReportID = null )
{
global $content, $gl_root_path, $myReport;
if ( isset($mySavedReportID) )
{
// Get Reference to report!
$myReport = $content['REPORTS'][ $myReportID ];
// Get reference to savedreport
$mySavedReport = $myReport['SAVEDREPORTS'][ $mySavedReportID ];
// Get configured Source for savedreport
$myReportSource = null;
if ( isset($content['Sources'][ $mySavedReport['sourceid'] ]) )
$myReportSource = $content['Sources'][ $mySavedReport['sourceid'] ];
$pos = strpos( strtoupper(PHP_OS), "WIN");
if ($pos !== false)
{
// Running on Windows
$phpCmd = PHP_BINDIR . "\\php.exe";
$phpScript = realpath($gl_root_path) . "cron\\cmdreportgen.php";
}
else
{
// Running on LINUX
$phpCmd = PHP_BINDIR . "/php";
$phpScript = realpath($gl_root_path) . "/cron/cmdreportgen.php";
}
// Enable display of report command
$content['enableCronCommand'] = true;
$szCommand = $phpCmd . " " . $phpScript . " runreport " . $myReportID . " " . $mySavedReportID;
// --- Check for user or group sources
if ( $myReportSource['userid'] != null )
{
$szCommand .= " " . "userid=" . $myReportSource['userid'];
}
else if ( $myReportSource['groupid'] != null )
{
$szCommand .= " " . "groupid=" . $myReportSource['groupid'];
}
// ---
}
else
{
// Disable display of report command
$content['enableCronCommand'] = false;
$szCommand = "";
}
// return result
return $szCommand;
}
function InitOnlineReports()
{
global $content;
$xmlArray = xml2array( URL_ONLINEREPORTS );
if ( is_array($xmlArray) && isset($xmlArray['reports']['report']) && count($xmlArray['reports']['report']) > 0 )
{
foreach( $xmlArray['reports']['report'] as $myOnlineReport )
{
// Copy to OnlineReports Array
$content['ONLINEREPORTS'][] = $myOnlineReport;
}
// Success!
return true;
}
else
// Failure
return false;
}
// Helper function from php doc
function xml2array($url, $get_attributes = 1, $priority = 'tag')
{
$contents = "";
if (!function_exists('xml_parser_create'))
{
return false;
}
$parser = xml_parser_create('');
if (!($fp = @ fopen($url, 'rb')))
{
return false;
}
while (!feof($fp))
{
$contents .= fread($fp, 8192);
}
fclose($fp);
xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8");
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
xml_parse_into_struct($parser, trim($contents), $xml_values);
xml_parser_free($parser);
if (!$xml_values)
return; //Hmm...
$xml_array = array ();
$parents = array ();
$opened_tags = array ();
$arr = array ();
$current = & $xml_array;
$repeated_tag_index = array ();
foreach ($xml_values as $data)
{
unset ($attributes, $value);
extract($data);
$result = array ();
$attributes_data = array ();
if (isset ($value))
{
if ($priority == 'tag')
$result = $value;
else
$result['value'] = $value;
}
if (isset ($attributes) and $get_attributes)
{
foreach ($attributes as $attr => $val)
{
if ($priority == 'tag')
$attributes_data[$attr] = $val;
else
$result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'
}
}
if ($type == "open")
{
$parent[$level -1] = & $current;
if (!is_array($current) or (!in_array($tag, array_keys($current))))
{
$current[$tag] = $result;
if ($attributes_data)
$current[$tag . '_attr'] = $attributes_data;
$repeated_tag_index[$tag . '_' . $level] = 1;
$current = & $current[$tag];
}
else
{
if (isset ($current[$tag][0]))
{
$current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result;
$repeated_tag_index[$tag . '_' . $level]++;
}
else
{
$current[$tag] = array (
$current[$tag],
$result
);
$repeated_tag_index[$tag . '_' . $level] = 2;
if (isset ($current[$tag . '_attr']))
{
$current[$tag]['0_attr'] = $current[$tag . '_attr'];
unset ($current[$tag . '_attr']);
}
}
$last_item_index = $repeated_tag_index[$tag . '_' . $level] - 1;
$current = & $current[$tag][$last_item_index];
}
}
elseif ($type == "complete")
{
if (!isset ($current[$tag]))
{
$current[$tag] = $result;
$repeated_tag_index[$tag . '_' . $level] = 1;
if ($priority == 'tag' and $attributes_data)
$current[$tag . '_attr'] = $attributes_data;
}
else
{
if (isset ($current[$tag][0]) and is_array($current[$tag]))
{
$current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result;
if ($priority == 'tag' and $get_attributes and $attributes_data)
{
$current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data;
}
$repeated_tag_index[$tag . '_' . $level]++;
}
else
{
$current[$tag] = array (
$current[$tag],
$result
);
$repeated_tag_index[$tag . '_' . $level] = 1;
if ($priority == 'tag' and $get_attributes)
{
if (isset ($current[$tag . '_attr']))
{
$current[$tag]['0_attr'] = $current[$tag . '_attr'];
unset ($current[$tag . '_attr']);
}
if ($attributes_data)
{
$current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data;
}
}
$repeated_tag_index[$tag . '_' . $level]++; //0 and 1 index is already taken
}
}
}
elseif ($type == 'close')
{
$current = & $parent[$level -1];
}
}
return ($xml_array);
}
/*
* Helper functions to init a Datefield
*/

View File

@ -29,7 +29,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -154,4 +154,4 @@ $page -> parser($content, "asktheoracle.html");
$page -> output();
// ---
?>
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -528,4 +528,4 @@ if ( $content['error_occured'] )
$graph->StrokeCSIM( basename(__FILE__), '', 0);
// ---
?>
?>

View File

@ -37,6 +37,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -27,6 +27,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -27,6 +27,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -27,6 +27,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -27,6 +27,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -27,6 +27,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -27,6 +27,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -32,6 +32,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -33,6 +33,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -26,6 +26,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -27,6 +27,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -26,6 +26,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -26,6 +26,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -26,6 +26,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -28,6 +28,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -26,6 +26,10 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -279,4 +279,4 @@ $page -> output();
// --- Helper functions
// ---
?>
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -459,4 +459,4 @@ $page -> output();
// ---
?>
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -422,4 +422,4 @@ else
}
// ---
?>
?>

View File

@ -26,7 +26,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -155,4 +155,4 @@ $CFG['Charts'][] = array ( "DisplayName" => "Usage by Day", "chart_type" => CHAR
// --- %Insert Source Here%
// ---
?>
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -71,5 +71,12 @@ define('ERROR_CHARTS_NOTCONFIGURED', 20);
define('ERROR_MSG_SKIPMESSAGE', 21);
define('ERROR_MSG_SCANABORTED', 23);
define('ERROR_REPORT_NODATA', 25);
define('ERROR_DB_INDEXESMISSING', 26);
define('ERROR_DB_TRIGGERMISSING', 27);
define('ERROR_DB_INDEXFAILED', 28);
define('ERROR_DB_TRIGGERFAILED', 29);
define('ERROR_DB_CHECKSUMERROR', 30);
define('ERROR_DB_CHECKSUMCHANGEFAILED', 31);
define('ERROR_DB_ADDDBFIELDFAILED', 32);
?>
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -118,4 +118,4 @@ $content['filter_messagetype_list'][] = array( "ID" => IUT_NT_EventReport, "Disp
$content['filter_messagetype_list'][] = array( "ID" => IUT_File_Monitor, "DisplayName" => "File Monitor", "selected" => "" );
$content['filter_messagetype_list'][] = array( "ID" => IUT_WEBSERVERLOG, "DisplayName" => "Webserver Logfile", "selected" => "" );
?>
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -226,4 +226,4 @@ define('ENC_UTF8', "utf-8");
$encodings[ENC_ISO_8859_1] = array("ID" => ENC_ISO_8859_1);
$encodings[ENC_UTF8] = array("ID" => ENC_UTF8);
?>
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -389,4 +389,4 @@ define('EVTIME_TIMESTAMP', '0');
define('EVTIME_TIMEZONE', '1');
define('EVTIME_MICROSECONDS', '2');
?>
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -70,12 +70,15 @@ $LANG_EN = "en"; // Used for fallback
$LANG = "en"; // Default language
// Default Template vars
$content['BUILDNUMBER'] = "3.2.3";
$content['BUILDNUMBER'] = "3.4.0";
$content['UPDATEURL'] = "http://loganalyzer.adiscon.com/files/version.txt";
$content['TITLE'] = "Adiscon LogAnalyzer :: Release " . $content['BUILDNUMBER']; // Default page title
$content['BASEPATH'] = $gl_root_path;
$content['SHOW_DONATEBUTTON'] = true; // Default = true!
// Hardcoded DEFINES
define('URL_ONLINEREPORTS', 'http://tools.adiscon.net/listreports.php');
// PreInit overall user variables
$content['EXTRA_PHPLOGCON_LOGO'] = $content['BASEPATH'] . "images/main/Header-Logo.png";
$content['EXTRA_METATAGS'] = "";
@ -567,11 +570,10 @@ function CheckAndSetRunMode()
// Define and Inits Syslog variables now!
// DEPRECIATED! define_syslog_variables();
// Syslog Constants are defined by default anyway!
openlog("LogAnalyzer", LOG_PID, LOG_USER);
$syslogOpened = openlog("LogAnalyzer", LOG_PID, LOG_USER);
// --- Check necessary PHP Extensions!
$loadedExtensions = get_loaded_extensions();
// Check for GD libary
if ( in_array("gd", $loadedExtensions) )
$content['GD_IS_ENABLED'] = true;
@ -582,6 +584,8 @@ function CheckAndSetRunMode()
if ( in_array("mysql", $loadedExtensions) ) { $content['MYSQL_IS_ENABLED'] = true; } else { $content['MYSQL_IS_ENABLED'] = false; }
// Check PDO Extension
if ( in_array("PDO", $loadedExtensions) ) { $content['PDO_IS_ENABLED'] = true; } else { $content['PDO_IS_ENABLED'] = false; }
// Check sockets Extension
if ( in_array("sockets", $loadedExtensions) ) { $content['SOCKETS_IS_ENABLED'] = true; } else { $content['SOCKETS_IS_ENABLED'] = false; }
// ---
}
@ -737,6 +741,7 @@ function InitFrontEndVariables()
$content['MENU_WINDOWLIST'] = $content['BASEPATH'] . "images/icons/windows.png";
$content['MENU_CHECKED'] = $content['BASEPATH'] . "images/icons/check.png";
$content['MENU_PLAY_GREEN'] = $content['BASEPATH'] . "images/icons/bullet_triangle_green.png";
$content['MENU_PLAY_GREEN_WINDOW'] = $content['BASEPATH'] . "images/icons/table_sql_run.png";
$content['MENU_PAGER_BEGIN'] = $content['BASEPATH'] . "images/icons/media_beginning.png";
$content['MENU_PAGER_PREVIOUS'] = $content['BASEPATH'] . "images/icons/media_rewind.png";
@ -1038,7 +1043,8 @@ function DieWithErrorMsg( $szerrmsg )
}
else if ( $RUNMODE == RUNMODE_WEBSERVER )
{
print(
// Print main error!
print (
"<html><title>Adiscon LogAnalyzer :: Critical Error occured</title><head>" .
"<link rel=\"stylesheet\" href=\"" . $gl_root_path . "themes/default/main.css\" type=\"text/css\"></head><body><br><br>" .
"<table width=\"600\" align=\"center\" class=\"with_border_alternate ErrorMsg\" cellpadding=\"2\"><tr>".
@ -1048,7 +1054,20 @@ function DieWithErrorMsg( $szerrmsg )
"<tr><td class=\"cellmenu1_naked\" align=\"left\">Errordetails:</td>" .
"<td class=\"tableBackground\" align=\"left\"><br>" .
$szerrmsg .
"<br><br></td></tr></table>" .
"<br><br></td></tr></table>");
// Print Detail error's if available
if ( isset($content['detailederror']) )
{
print ("<table width=\"600\" align=\"center\" class=\"with_border_alternate ErrorMsg\" cellpadding=\"2\"><tr>".
"<tr><td class=\"cellmenu1_naked\" align=\"left\">Additional Errordetails:</td>" .
"<td class=\"tableBackground\" align=\"left\"><br>" .
$content['detailederror'] .
"<br><br></td></tr></table>");
}
// End HTML Body
print(
"</body></html>"
);
}
@ -1333,7 +1352,31 @@ function OutputDebugMessage($szDbg, $szDbgLevel = DEBUG_INFO)
// Check if the user wants to syslog the error!
if ( GetConfigSetting("MiscDebugToSyslog", 0, CFGLEVEL_GLOBAL) == 1 )
{
syslog(GetPriorityFromDebugLevel($szDbgLevel), $szDbg);
if ( $content['SOCKETS_IS_ENABLED'] )
{
// Send using UDP ourself!
$sock = @socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
$stprifac = (SYSLOG_LOCAL0 << 3);
if ( $szDbgLevel == DEBUG_ERROR_WTF )
$stprifac += SYSLOG_CRIT;
else if ( $szDbgLevel == DEBUG_ERROR )
$stprifac += SYSLOG_ERR;
else if ( $szDbgLevel == DEBUG_WARN )
$stprifac += SYSLOG_WARNING;
else if ( $szDbgLevel == DEBUG_INFO )
$stprifac += SYSLOG_NOTICE;
else if ( $szDbgLevel == DEBUG_DEBUG )
$stprifac += SYSLOG_INFO;
else if ( $szDbgLevel == DEBUG_ULTRADEBUG )
$stprifac += SYSLOG_DEBUG;
// Generate RFC5424 Syslog MSG
$szsyslogmsg = "<" . $stprifac . ">" . date("c") . " " . php_uname ("n") . " " . "loganalyzer - - - " . $szDbg ;
@socket_sendto($sock, $szsyslogmsg, strlen($szsyslogmsg), 0, '127.0.0.1', 514);
@socket_close($sock);
}
else // Use PHP System function to send via syslog
$syslogSend = syslog(GetPriorityFromDebugLevel($szDbgLevel), $szDbg);
}
}
@ -1896,11 +1939,11 @@ function GetErrorMessage($errorCode)
function MultiSortArrayByItemCountDesc( $arrayFirst, $arraySecond )
{
// Do not sort in this case
if ($arrayFirst['ItemCount'] == $arraySecond['ItemCount'])
if ($arrayFirst['itemcount'] == $arraySecond['itemcount'])
return 0;
// Move up or down
return ($arrayFirst['ItemCount'] < $arraySecond['ItemCount']) ? 1 : -1;
return ($arrayFirst['itemcount'] < $arraySecond['itemcount']) ? 1 : -1;
}
/**
@ -1909,12 +1952,12 @@ function MultiSortArrayByItemCountDesc( $arrayFirst, $arraySecond )
function MultiSortArrayByItemCountAsc( $arrayFirst, $arraySecond )
{
// Do not sort in this case
if ($arrayFirst['ItemCount'] == $arraySecond['ItemCount'])
if ($arrayFirst['itemcount'] == $arraySecond['itemcount'])
return 0;
// Move up or down
return ($arrayFirst['ItemCount'] < $arraySecond['ItemCount']) ? -1 : 1;
return ($arrayFirst['itemcount'] < $arraySecond['itemcount']) ? -1 : 1;
}
// ---
?>
?>

View File

@ -26,7 +26,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -1005,4 +1005,4 @@ function LoadSourcesFromDatabase()
}
?>
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -215,13 +215,14 @@ function DB_ReturnSimpleErrorMsg()
function DB_PrintError($MyErrorMsg, $DieOrNot)
{
global $n,$HTTP_COOKIE_VARS, $errdesc, $errno, $linesep;
global $content, $n,$HTTP_COOKIE_VARS, $errdesc, $errno, $linesep;
$errdesc = mysql_error();
$errno = mysql_errno();
// Define global variable so we know an error has occured!
define('PHPLOGCON_INERROR', true);
if ( !defined('PHPLOGCON_INERROR') )
define('PHPLOGCON_INERROR', true);
$errormsg="Database error: $MyErrorMsg $linesep";
$errormsg.="mysql error: $errdesc $linesep";
@ -233,7 +234,20 @@ function DB_PrintError($MyErrorMsg, $DieOrNot)
if ($DieOrNot == true)
DieWithErrorMsg( "$linesep" . $errormsg );
else
{
OutputDebugMessage("DB_PrintError: $errormsg", DEBUG_ERROR);
if ( !isset($content['detailederror']) )
{
$content['detailederror_code'] = ERROR_DB_QUERYFAILED;
$content['detailederror'] = GetErrorMessage(ERROR_DB_QUERYFAILED);
}
else
$content['detailederror'] .= "<br><br>" . GetErrorMessage(ERROR_DB_QUERYFAILED);
// Append SQL Detail Error
$content['detailederror'] .= "<br><br>" . $errormsg;
}
}
function DB_RemoveParserSpecialBadChars($myString)
@ -437,4 +451,4 @@ function GetRowsAffected()
return mysql_affected_rows();
}
?>
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -199,4 +199,4 @@ function CreateHTMLFooter()
}
?>
?>

View File

@ -24,7 +24,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -357,4 +357,4 @@ function GetDateTimeDetailsFromTimeString($szTimeString, &$second, &$minute, &$h
return false;
}
?>
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -217,23 +217,32 @@ function GetFormatedDate($evttimearray)
{
global $content;
if ( !is_array($evttimearray) )
return $evttimearray;
if (
GetConfigSetting("ViewUseTodayYesterday", 0, CFGLEVEL_USER) == 1
&&
( date('m', $evttimearray[EVTIME_TIMESTAMP]) == date('m') && date('Y', $evttimearray[EVTIME_TIMESTAMP]) == date('Y') )
)
if ( is_array($evttimearray) )
{
if ( date('d', $evttimearray[EVTIME_TIMESTAMP]) == date('d') )
return "Today " . date("H:i:s", $evttimearray[EVTIME_TIMESTAMP] );
else if ( date('d', $evttimearray[EVTIME_TIMESTAMP] + 86400) == date('d') )
return "Yesterday " . date("H:i:s", $evttimearray[EVTIME_TIMESTAMP] );
if (
GetConfigSetting("ViewUseTodayYesterday", 0, CFGLEVEL_USER) == 1
&&
( date('m', $evttimearray[EVTIME_TIMESTAMP]) == date('m') && date('Y', $evttimearray[EVTIME_TIMESTAMP]) == date('Y') )
)
{
if ( date('d', $evttimearray[EVTIME_TIMESTAMP]) == date('d') )
return "Today " . date("H:i:s", $evttimearray[EVTIME_TIMESTAMP] );
else if ( date('d', $evttimearray[EVTIME_TIMESTAMP] + 86400) == date('d') )
return "Yesterday " . date("H:i:s", $evttimearray[EVTIME_TIMESTAMP] );
}
// Copy to local variable
$nMyTimeStamp = $evttimearray[EVTIME_TIMESTAMP];
}
else
{
$nMyTimeStamp = strtotime($evttimearray);
if ( $nMyTimeStamp === FALSE ) // Could not convert into timestamp so return original!
return $evttimearray;
}
// Reach return normal format!
return $szDateFormatted = date("Y-m-d H:i:s", $evttimearray[EVTIME_TIMESTAMP] );
return $szDateFormatted = date("Y-m-d H:i:s", $nMyTimeStamp );
}
function GetDebugBgColor( $szDebugMode )
@ -312,4 +321,4 @@ function GetPriorityFromDebugLevel( $DebugLevel )
}
}
?>
?>

View File

@ -29,7 +29,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -258,4 +258,4 @@ function ConvertCustomSources()
}
// ---
?>
?>

View File

@ -0,0 +1,268 @@
<?php
/*
*********************************************************************
* LogAnalyzer - http://loganalyzer.adiscon.com
* ----------------------------------------------------------------- *
* Report Helper functions *
* *
* -> *
* *
* All directives are explained within this file *
*
* Copyright (C) 2008-2011 Adiscon GmbH.
*
* This file is part of LogAnalyzer.
*
* LogAnalyzer 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.
*
* LogAnalyzer 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 LogAnalyzer. If not, see <http://www.gnu.org/licenses/>.
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/
// --- Avoid directly accessing this file!
if ( !defined('IN_PHPLOGCON') )
{
die('Hacking attempt');
exit;
}
// ---
// ---
// --- BEGIN Helper functions
// ---
function CreateCronCommand( $myReportID, $mySavedReportID = null )
{
global $content, $gl_root_path, $myReport;
if ( isset($mySavedReportID) )
{
// Get Reference to report!
$myReport = $content['REPORTS'][ $myReportID ];
// Get reference to savedreport
$mySavedReport = $myReport['SAVEDREPORTS'][ $mySavedReportID ];
// Get configured Source for savedreport
$myReportSource = null;
if ( isset($content['Sources'][ $mySavedReport['sourceid'] ]) )
$myReportSource = $content['Sources'][ $mySavedReport['sourceid'] ];
$pos = strpos( strtoupper(PHP_OS), "WIN");
if ($pos !== false)
{
// Running on Windows
$phpCmd = PHP_BINDIR . "\\php.exe";
$phpScript = realpath($gl_root_path) . "cron\\cmdreportgen.php";
}
else
{
// Running on LINUX
$phpCmd = PHP_BINDIR . "/php";
$phpScript = realpath($gl_root_path) . "/cron/cmdreportgen.php";
}
// Enable display of report command
$content['enableCronCommand'] = true;
$szCommand = $phpCmd . " " . $phpScript . " runreport " . $myReportID . " " . $mySavedReportID;
// --- Check for user or group sources
if ( $myReportSource['userid'] != null )
{
$szCommand .= " " . "userid=" . $myReportSource['userid'];
}
else if ( $myReportSource['groupid'] != null )
{
$szCommand .= " " . "groupid=" . $myReportSource['groupid'];
}
// ---
}
else
{
// Disable display of report command
$content['enableCronCommand'] = false;
$szCommand = "";
}
// return result
return $szCommand;
}
function InitOnlineReports()
{
global $content;
$xmlArray = xml2array( URL_ONLINEREPORTS );
if ( is_array($xmlArray) && isset($xmlArray['reports']['report']) && count($xmlArray['reports']['report']) > 0 )
{
foreach( $xmlArray['reports']['report'] as $myOnlineReport )
{
// Copy to OnlineReports Array
$content['ONLINEREPORTS'][] = $myOnlineReport;
}
// Success!
return true;
}
else
// Failure
return false;
}
// Helper function from php doc
function xml2array($url, $get_attributes = 1, $priority = 'tag')
{
$contents = "";
if (!function_exists('xml_parser_create'))
{
return false;
}
$parser = xml_parser_create('');
if (!($fp = @ fopen($url, 'rb')))
{
return false;
}
while (!feof($fp))
{
$contents .= fread($fp, 8192);
}
fclose($fp);
xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8");
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
xml_parse_into_struct($parser, trim($contents), $xml_values);
xml_parser_free($parser);
if (!$xml_values)
return; //Hmm...
$xml_array = array ();
$parents = array ();
$opened_tags = array ();
$arr = array ();
$current = & $xml_array;
$repeated_tag_index = array ();
foreach ($xml_values as $data)
{
unset ($attributes, $value);
extract($data);
$result = array ();
$attributes_data = array ();
if (isset ($value))
{
if ($priority == 'tag')
$result = $value;
else
$result['value'] = $value;
}
if (isset ($attributes) and $get_attributes)
{
foreach ($attributes as $attr => $val)
{
if ($priority == 'tag')
$attributes_data[$attr] = $val;
else
$result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'
}
}
if ($type == "open")
{
$parent[$level -1] = & $current;
if (!is_array($current) or (!in_array($tag, array_keys($current))))
{
$current[$tag] = $result;
if ($attributes_data)
$current[$tag . '_attr'] = $attributes_data;
$repeated_tag_index[$tag . '_' . $level] = 1;
$current = & $current[$tag];
}
else
{
if (isset ($current[$tag][0]))
{
$current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result;
$repeated_tag_index[$tag . '_' . $level]++;
}
else
{
$current[$tag] = array (
$current[$tag],
$result
);
$repeated_tag_index[$tag . '_' . $level] = 2;
if (isset ($current[$tag . '_attr']))
{
$current[$tag]['0_attr'] = $current[$tag . '_attr'];
unset ($current[$tag . '_attr']);
}
}
$last_item_index = $repeated_tag_index[$tag . '_' . $level] - 1;
$current = & $current[$tag][$last_item_index];
}
}
elseif ($type == "complete")
{
if (!isset ($current[$tag]))
{
$current[$tag] = $result;
$repeated_tag_index[$tag . '_' . $level] = 1;
if ($priority == 'tag' and $attributes_data)
$current[$tag . '_attr'] = $attributes_data;
}
else
{
if (isset ($current[$tag][0]) and is_array($current[$tag]))
{
$current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result;
if ($priority == 'tag' and $get_attributes and $attributes_data)
{
$current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data;
}
$repeated_tag_index[$tag . '_' . $level]++;
}
else
{
$current[$tag] = array (
$current[$tag],
$result
);
$repeated_tag_index[$tag . '_' . $level] = 1;
if ($priority == 'tag' and $get_attributes)
{
if (isset ($current[$tag . '_attr']))
{
$current[$tag]['0_attr'] = $current[$tag . '_attr'];
unset ($current[$tag . '_attr']);
}
if ($attributes_data)
{
$current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data;
}
}
$repeated_tag_index[$tag . '_' . $level]++; //0 and 1 index is already taken
}
}
}
elseif ($type == 'close')
{
$current = & $parent[$level -1];
}
}
return ($xml_array);
}
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -365,4 +365,4 @@ function CompareVersionNumbers( $oldVer, $newVer )
?>
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -1004,4 +1004,4 @@ function AddOnClickMenu(&$fieldGridItem, $fieldType, $FieldID)
}
// ---
?>
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -834,4 +834,4 @@ function InitUserDbSettings()
define('DB_VIEWS', $CFG['UserDBPref'] . "views");
}
// ---
?>
?>

View File

@ -395,14 +395,8 @@ $content['LN_CMD_'] = "";
// Report Options
$content['LN_REPORTS_EDIT'] = "Edit Report";
$content['LN_REPORTS_DELETE'] = "Remove Report";
$content['LN_REPORTS_CAT'] = "Report Category";
$content['LN_REPORTS_ID'] = "Report ID";
$content['LN_REPORTS_NAME'] = "Report Name";
$content['LN_REPORTS_DESCRIPTION'] = "Report Description";
$content['LN_REPORTS_REQUIREDFIELDS'] = "Required Fields";
$content['LN_REPORTS_ERROR_NOREPORTS'] = "There were no valid reports found in your installation.";
$content['LN_REPORTS_HELP'] = "Help";
$content['LN_REPORTS_HELP_CLICK'] = "Click here for a detailed report description";
$content['LN_REPORTS_INFO'] = "Show more Information";
$content['LN_REPORTS_INIT'] = "Initialize settings";
$content['LN_REPORTS_REMOVE'] = "Remove settings";
@ -414,8 +408,6 @@ $content['LN_REPORTS_ERROR_HASBEENREMOVED'] = "All settings for the report '%1'
$content['LN_REPORTS_ERROR_HASBEENADDED'] = "All required settings for the report '%1' have been added.";
$content['LN_REPORTS_ERROR_NOFIELDS'] = "The report '%1' does not have any custom settings which can be added.";
$content['LN_REPORTS_ERROR_REPORTDOESNTNEEDTOBEREMOVED'] = "The report '%1' does not need to be removed or initialized.";
$content['LN_REPORTS_ADDSAVEDREPORT'] = "Add Savedreport";
$content['LN_REPORTS_EDITSAVEDREPORT'] = "Edit Savedreport";
$content['LN_REPORTS_REMOVESAVEDREPORT'] = "Remove Savedreport";
$content['LN_REPORTS_CUSTOMTITLE'] = "Report Title";
$content['LN_REPORTS_CUSTOMCOMMENT'] = "Comment / Description";
@ -427,7 +419,6 @@ $content['LN_REPORTS_HASBEENEDIT'] = "The Savedreport '%1' has been successfully
$content['LN_REPORTS_SOURCEID'] = "Logstream source";
$content['LN_REPORTS_ERROR_SAVEDREPORTIDNOTFOUND'] = "There was no savedreport with ID '%1' found.";
$content['LN_REPORTS_ERROR_INVALIDSAVEDREPORTID'] = "Invalid savedreport id.";
$content['LN_REPORTS_SAVEDREPORTS'] = "Saved reports";
$content['LN_REPORTS_RUNNOW'] = "Run saved report now!";
$content['LN_REPORTS_WARNDELETESAVEDREPORT'] = "Are you sure that you want to delete the savedreport '%1'?";
$content['LN_REPORTS_ERROR_DELSAVEDREPORT'] = "Deleting of the savedreport with id '%1' failed!";
@ -447,16 +438,36 @@ $content['LN_REPORTS_ADVANCEDFILTERLIST'] = "List of advanced report filters";
$content['LN_REPORTS_OUTPUTTARGET_DETAILS'] = "Outputtarget Options";
$content['LN_REPORTS_OUTPUTTARGET_FILE'] = "Output Path and Filename";
$content['LN_REPORTS_CRONCMD'] = "Local Report command";
$content['LN_REPORTMENU_LIST'] = "List installed Reports";
$content['LN_REPORTMENU_ONLINELIST'] = "All Available Reports";
$content['LN_REPORTS_LINKS'] = "Related Links";
$content['LN_REPORTS_INSTALLED'] = "Installed";
$content['LN_REPORTS_NOTINSTALLED'] = "Not installed";
$content['LN_REPORTS_DOWNLOAD'] = "Download Link";
$content['LN_REPORTS_SAMPLELINK'] = "Report Sample";
$content['LN_REPORTS_DETAILSFOR'] = "Details for '%1' report";
$content['LN_REPORTS_'] = "";
$content['LN_REPORTS_'] = "";
$content['LN_REPORTS_PERFORMANCE_WARNING'] = "Logstream Performance Warning";
$content['LN_REPORTS_OPTIMIZE_LOGSTREAMSOURCE'] = "Yes, optimize logstream source!";
$content['LN_REPORTS_OPTIMIZE_INDEXES'] = "The datasource '%1' is not optimized for this report. There is at least one INDEX missing. Creating INDEXES will speedup the report generation. <br><br>Do you want LogAnalyzer to create the necessary INDEXES now? This may take more then a few minutes, so please be patient!";
$content['LN_REPORTS_ERROR_FAILED_CREATE_INDEXES'] = "Failed to create INDEXES for datasource '%1' with error code '%2'";
$content['LN_REPORTS_INDEX_CREATED'] = "Logstream INDEXES created";
$content['LN_REPORTS_INDEX_CREATED_SUCCESS'] = "Successfully created all INDEXES for datasource '%1'.";
$content['LN_REPORTS_OPTIMIZE_TRIGGER'] = "The datasource '%1' does not have a TRIGGER installed to automatically generate the message checksum on INSERT. Creating the TRIGGER will speedup the report generation. <br><br>Do you want LogAnalyzer to create the TRIGGER now? ";
$content['LN_REPORTS_TRIGGER_CREATED'] = "Logstream TRIGGER created";
$content['LN_REPORTS_TRIGGER_CREATED_SUCCESS'] = "Successfully created TRIGGER for datasource '%1'.";
$content['LN_REPORTS_ERROR_FAILED_CREATE_TRIGGER'] = "Failed to create TRIGGER for datasource '%1' with error code '%2'";
$content['LN_REPORTS_CHANGE_CHECKSUM'] = "The Checksum field for datasource '%1' is not set to UNSIGNED INT. To get the report work properly, changing the CHECKSUM field to UNSIGNED INT is necessary! <br><br>Do you want LogAnalyzer to change the CHECKSUM field now? This may take more then a few minutes, so please be patient!";
$content['LN_REPORTS_ERROR_FAILED_CHANGE_CHECKSUM'] = "Failed to change the CHECKSUM field for datasource '%1' with error code '%2'";
$content['LN_REPORTS_CHECKSUM_CHANGED'] = "Checksum field changed";
$content['LN_REPORTS_CHECKSUM_CHANGED_SUCCESS'] = "Successfully changed the Checksum field for datasource '%1'.";
$content['LN_REPORTS_LOGSTREAM_WARNING'] = "Logstream Warning";
$content['LN_REPORTS_ADD_MISSINGFIELDS'] = "The datasource '%1' does not contain all necessary datafields There is at least one FIELD missing. <br><br>Do you want LogAnalyzer to create the missing datafields now?";
$content['LN_REPORTS_ERROR_FAILED_ADDING_FIELDS'] = "Failed adding missing datafields in datasource '%1' with error code '%2'";
$content['LN_REPORTS_FIELDS_CREATED'] = "Added missing datafields";
$content['LN_REPORTS_FIELDS_CREATED_SUCCESS'] = "Successfully added missing datafields for datasource '%1'.";
$content['LN_REPORTS_RECHECKLOGSTREAMSOURCE'] = "Do you want to check the current logstream source again?";
$content['LN_REPORTS_ADDSAVEDREPORT'] = "Add Savedreport and save changes";
$content['LN_REPORTS_EDITSAVEDREPORT'] = "Save changes";
$content['LN_REPORTS_ADDSAVEDREPORTANDRETURN'] = "Add Savedreport and return to reportlist";
$content['LN_REPORTS_EDITSAVEDREPORTANDRETURN'] = "Save changes and return to reportlist";
$content['LN_REPORTS_'] = "";
?>

View File

@ -328,28 +328,46 @@ $content['LN_ORACLE_FIELD'] = "Feld";
$content['LN_ORACLE_ONLINESEARCH'] = "Online Suche";
$content['LN_ORACLE_WHOIS'] = "WHOIS Abfrage f&uuml;r '%1' - '%2'";
$content['LN_GEN_ERROR_INVALIDOP'] = "Invalid or missing operation type";
$content['LN_GEN_ERROR_INVALIDREPORTID'] = "Invalid or missing report id";
$content['LN_GEN_ERROR_MISSINGSAVEDREPORTID'] = "Invalid or missing savedreport id";
$content['LN_GEN_ERROR_REPORTGENFAILED'] = "Failed generating report '%1' with the following error reason: %2";
$content['LN_GEN_ERROR_WHILEREPORTGEN'] = "Error occured while generating report";
$content['LN_GEN_ERROR_REPORT_NODATA'] = "No data found for report generation";
$content['LN_GEN_ALL_OTHER_EVENTS'] = "All other events";
$content['LN_REPORT_FOOTER_ENDERED'] = "Report rendered in";
$content['LN_REPORT_FILTERS'] = "List of used filters";
$content['LN_REPORT_FILTERTYPE_DATE'] = "Date";
$content['LN_REPORT_FILTERTYPE_NUMBER'] = "Number";
$content['LN_REPORT_FILTERTYPE_STRING'] = "String";
$content['LN_GEN_SUCCESS_WHILEREPORTGEN'] = "Report was successfully generated";
$content['LN_GEN_ERROR_REPORTFAILEDTOGENERATE'] = "Failed to generate report, error details: %1";
$content['LN_GEN_SUCCESS_REPORTWASGENERATED_DETAILS'] = "Successfully generated report: %1";
$content['LN_GEN_ERROR_INVALIDOP'] = "Invalid or missing operation type";
$content['LN_GEN_ERROR_INVALIDREPORTID'] = "Invalid or missing report id";
$content['LN_GEN_ERROR_MISSINGSAVEDREPORTID'] = "Invalid or missing savedreport id";
$content['LN_GEN_ERROR_REPORTGENFAILED'] = "Failed generating report '%1' with the following error reason: %2";
$content['LN_GEN_ERROR_WHILEREPORTGEN'] = "Error occured while generating report";
$content['LN_GEN_ERROR_REPORT_NODATA'] = "No data found for report generation";
$content['LN_GEN_ALL_OTHER_EVENTS'] = "All other events";
$content['LN_REPORT_FOOTER_ENDERED'] = "Report rendered in";
$content['LN_REPORT_FILTERS'] = "List of used filters";
$content['LN_REPORT_FILTERTYPE_DATE'] = "Date";
$content['LN_REPORT_FILTERTYPE_NUMBER'] = "Number";
$content['LN_REPORT_FILTERTYPE_STRING'] = "String";
$content['LN_GEN_SUCCESS_WHILEREPORTGEN'] = "Report was successfully generated";
$content['LN_GEN_ERROR_REPORTFAILEDTOGENERATE'] = "Failed to generate report, error details: %1";
$content['LN_GEN_SUCCESS_REPORTWASGENERATED_DETAILS'] = "Successfully generated report: %1";
$content['LN_CMD_RUNREPORT'] = "Generating saved report '%1'";
$content['LN_CMD_REPORTIDNOTFOUND'] = "Invalid Report ID '%1'";
$content['LN_CMD_SAVEDREPORTIDNOTFOUND'] = "Invalid SavedReport ID '%1'";
$content['LN_CMD_NOREPORTID'] = "Missing Report ID";
$content['LN_CMD_NOSAVEDREPORTID'] = "Missing SavedReport ID";
$content['LN_CMD_NOCMDPROMPT'] = "Error, this script can only be run from the command prompt.";
$content['LN_CMD_RUNREPORT'] = "Generating saved report '%1'";
$content['LN_CMD_REPORTIDNOTFOUND'] = "Invalid Report ID '%1'";
$content['LN_CMD_SAVEDREPORTIDNOTFOUND'] = "Invalid SavedReport ID '%1'";
$content['LN_CMD_NOREPORTID'] = "Missing Report ID";
$content['LN_CMD_NOSAVEDREPORTID'] = "Missing SavedReport ID";
$content['LN_CMD_NOCMDPROMPT'] = "Error, this script can only be run from the command prompt.";
$content['LN_REPORT_GENERATEDTIME'] = "Report generated at: ";
$content['LN_REPORT_ACTIONS'] = "Run Report Actions";
$content['LN_REPORTS_CAT'] = "Report Category";
$content['LN_REPORTS_ID'] = "Report ID";
$content['LN_REPORTS_NAME'] = "Report Name";
$content['LN_REPORTS_DESCRIPTION'] = "Report Description";
$content['LN_REPORTS_HELP'] = "Help";
$content['LN_REPORTS_HELP_CLICK'] = "Click here for a detailed report description";
$content['LN_REPORTS_INFO'] = "Show more Information";
$content['LN_REPORTS_SAVEDREPORTS'] = "Saved reports";
$content['LN_REPORTS_ADMIN'] = "Administrate Reports";
$content['LN_REPORTMENU_LIST'] = "List installed Reports";
$content['LN_REPORTMENU_ONLINELIST'] = "All Available Reports";
$content['LN_REPORTS_INFORMATION'] = "This page shows a list of installed and available reports including saved report configurations.
<br/>To run a report, click on the buttons right to the Saved Reports.
<br/>Attention! Generating reports can be very time consuming depending on the size of your database.
";
$content['LN_REPORTS_CHECKLOGSTREAMSOURCE'] = "Verify Logstream optimization";
?>

View File

@ -407,15 +407,8 @@ $content['LN_CMD_'] = "";
// Report Options
$content['LN_REPORTS_EDIT'] = "Edit Report";
$content['LN_REPORTS_DELETE'] = "Remove Report";
$content['LN_REPORTS_CAT'] = "Report Category";
$content['LN_REPORTS_ID'] = "Report ID";
$content['LN_REPORTS_NAME'] = "Report Name";
$content['LN_REPORTS_DESCRIPTION'] = "Report Description";
$content['LN_REPORTS_REQUIREDFIELDS'] = "Required Fields";
$content['LN_REPORTS_ERROR_NOREPORTS'] = "There were no valid reports found in your installation.";
$content['LN_REPORTS_HELP'] = "Help";
$content['LN_REPORTS_HELP_CLICK'] = "Click here for a detailed report description";
$content['LN_REPORTS_INFO'] = "Show more Information";
$content['LN_REPORTS_INIT'] = "Initialize settings";
$content['LN_REPORTS_REMOVE'] = "Remove settings";
$content['LN_REPORTS_ERROR_IDNOTFOUND'] = "There was no report with ID '%1' found.";
@ -426,8 +419,6 @@ $content['LN_REPORTS_ERROR_HASBEENREMOVED'] = "All settings for the report '%1'
$content['LN_REPORTS_ERROR_HASBEENADDED'] = "All required settings for the report '%1' have been added.";
$content['LN_REPORTS_ERROR_NOFIELDS'] = "The report '%1' does not have any custom settings which can be added.";
$content['LN_REPORTS_ERROR_REPORTDOESNTNEEDTOBEREMOVED'] = "The report '%1' does not need to be removed or initialized.";
$content['LN_REPORTS_ADDSAVEDREPORT'] = "Add Savedreport";
$content['LN_REPORTS_EDITSAVEDREPORT'] = "Edit Savedreport";
$content['LN_REPORTS_REMOVESAVEDREPORT'] = "Remove Savedreport";
$content['LN_REPORTS_CUSTOMTITLE'] = "Report Title";
$content['LN_REPORTS_CUSTOMCOMMENT'] = "Comment / Description";
@ -439,7 +430,6 @@ $content['LN_REPORTS_HASBEENEDIT'] = "The Savedreport '%1' has been successfully
$content['LN_REPORTS_SOURCEID'] = "Logstream source";
$content['LN_REPORTS_ERROR_SAVEDREPORTIDNOTFOUND'] = "There was no savedreport with ID '%1' found.";
$content['LN_REPORTS_ERROR_INVALIDSAVEDREPORTID'] = "Invalid savedreport id.";
$content['LN_REPORTS_SAVEDREPORTS'] = "Saved reports";
$content['LN_REPORTS_RUNNOW'] = "Run saved report now!";
$content['LN_REPORTS_WARNDELETESAVEDREPORT'] = "Are you sure that you want to delete the savedreport '%1'?";
$content['LN_REPORTS_ERROR_DELSAVEDREPORT'] = "Deleting of the savedreport with id '%1' failed!";
@ -459,16 +449,37 @@ $content['LN_REPORTS_ADVANCEDFILTERLIST'] = "List of advanced report filters";
$content['LN_REPORTS_OUTPUTTARGET_DETAILS'] = "Outputtarget Options";
$content['LN_REPORTS_OUTPUTTARGET_FILE'] = "Output Path and Filename";
$content['LN_REPORTS_CRONCMD'] = "Local Report command";
$content['LN_REPORTMENU_LIST'] = "List installed Reports";
$content['LN_REPORTMENU_ONLINELIST'] = "All Available Reports";
$content['LN_REPORTS_LINKS'] = "Related Links";
$content['LN_REPORTS_INSTALLED'] = "Installed";
$content['LN_REPORTS_NOTINSTALLED'] = "Not installed";
$content['LN_REPORTS_DOWNLOAD'] = "Download Link";
$content['LN_REPORTS_SAMPLELINK'] = "Report Sample";
$content['LN_REPORTS_DETAILSFOR'] = "Details for '%1' report";
$content['LN_REPORTS_'] = "";
$content['LN_REPORTS_'] = "";
$content['LN_REPORTS_PERFORMANCE_WARNING'] = "Logstream Performance Warning";
$content['LN_REPORTS_OPTIMIZE_LOGSTREAMSOURCE'] = "Yes, optimize logstream source!";
$content['LN_REPORTS_OPTIMIZE_INDEXES'] = "The datasource '%1' is not optimized for this report. There is at least one INDEX missing. Creating INDEXES will speedup the report generation. <br><br>Do you want LogAnalyzer to create the necessary INDEXES now? This may take more then a few minutes, so please be patient!";
$content['LN_REPORTS_ERROR_FAILED_CREATE_INDEXES'] = "Failed to create INDEXES for datasource '%1' with error code '%2'";
$content['LN_REPORTS_INDEX_CREATED'] = "Logstream INDEXES created";
$content['LN_REPORTS_INDEX_CREATED_SUCCESS'] = "Successfully created all INDEXES for datasource '%1'.";
$content['LN_REPORTS_OPTIMIZE_TRIGGER'] = "The datasource '%1' does not have a TRIGGER installed to automatically generate the message checksum on INSERT. Creating the TRIGGER will speedup the report generation. <br><br>Do you want LogAnalyzer to create the TRIGGER now? ";
$content['LN_REPORTS_TRIGGER_CREATED'] = "Logstream TRIGGER created";
$content['LN_REPORTS_TRIGGER_CREATED_SUCCESS'] = "Successfully created TRIGGER for datasource '%1'.";
$content['LN_REPORTS_ERROR_FAILED_CREATE_TRIGGER'] = "Failed to create TRIGGER for datasource '%1' with error code '%2'";
$content['LN_REPORTS_CHANGE_CHECKSUM'] = "The Checksum field for datasource '%1' is not set to UNSIGNED INT. To get the report work properly, changing the CHECKSUM field to UNSIGNED INT is necessary! <br><br>Do you want LogAnalyzer to change the CHECKSUM field now? This may take more then a few minutes, so please be patient!";
$content['LN_REPORTS_ERROR_FAILED_CHANGE_CHECKSUM'] = "Failed to change the CHECKSUM field for datasource '%1' with error code '%2'";
$content['LN_REPORTS_CHECKSUM_CHANGED'] = "Checksum field changed";
$content['LN_REPORTS_CHECKSUM_CHANGED_SUCCESS'] = "Successfully changed the Checksum field for datasource '%1'.";
$content['LN_REPORTS_LOGSTREAM_WARNING'] = "Logstream Warning";
$content['LN_REPORTS_ADD_MISSINGFIELDS'] = "The datasource '%1' does not contain all necessary datafields There is at least one FIELD missing. <br><br>Do you want LogAnalyzer to create the missing datafields now?";
$content['LN_REPORTS_ERROR_FAILED_ADDING_FIELDS'] = "Failed adding missing datafields in datasource '%1' with error code '%2'";
$content['LN_REPORTS_FIELDS_CREATED'] = "Added missing datafields";
$content['LN_REPORTS_FIELDS_CREATED_SUCCESS'] = "Successfully added missing datafields for datasource '%1'.";
$content['LN_REPORTS_RECHECKLOGSTREAMSOURCE'] = "Do you want to check the current logstream source again?";
$content['LN_REPORTS_ADDSAVEDREPORT'] = "Add Savedreport and save changes";
$content['LN_REPORTS_EDITSAVEDREPORT'] = "Save changes";
$content['LN_REPORTS_ADDSAVEDREPORTANDRETURN'] = "Add Savedreport and return to reportlist";
$content['LN_REPORTS_EDITSAVEDREPORTANDRETURN'] = "Save changes and return to reportlist";
$content['LN_REPORTS_'] = "";
?>

View File

@ -124,9 +124,9 @@ $content['LN_MENU_LOGOFF'] = "Logoff";
$content['LN_MENU_LOGGEDINAS'] = "Logged in as";
$content['LN_MENU_MAXVIEW'] = "Maximize View";
$content['LN_MENU_NORMALVIEW'] = "Normalize View";
$content['LN_MENU_STATISTICS'] = "Statistics";
$content['LN_MENU_CLICKTOEXPANDMENU'] = "Click the icon to show the menu";
$content['LN_MENU_STATISTICS'] = "Statistics";
$content['LN_MENU_CLICKTOEXPANDMENU'] = "Click the icon to show the menu";
$content['LN_MENU_REPORTS'] = "Reports";
// Main Index Site
$content['LN_ERROR_INSTALLFILEREMINDER'] = "Warning! You still have NOT removed the 'install.php' from your LogAnalyzer main directory!";
@ -339,6 +339,7 @@ $content['LN_ORACLE_FIELD'] = "Field";
$content['LN_ORACLE_ONLINESEARCH'] = "Online Search";
$content['LN_ORACLE_WHOIS'] = "WHOIS Lookup for '%1' value '%2'";
// Report Strings
$content['LN_GEN_ERROR_INVALIDOP'] = "Invalid or missing operation type";
$content['LN_GEN_ERROR_INVALIDREPORTID'] = "Invalid or missing report id";
$content['LN_GEN_ERROR_MISSINGSAVEDREPORTID'] = "Invalid or missing savedreport id";
@ -363,5 +364,23 @@ $content['LN_CMD_NOSAVEDREPORTID'] = "Missing SavedReport ID";
$content['LN_CMD_NOCMDPROMPT'] = "Error, this script can only be run from the command prompt.";
$content['LN_REPORT_GENERATEDTIME'] = "Report generated at: ";
$content['LN_REPORT_ACTIONS'] = "Run Report Actions";
$content['LN_REPORTS_CAT'] = "Report Category";
$content['LN_REPORTS_ID'] = "Report ID";
$content['LN_REPORTS_NAME'] = "Report Name";
$content['LN_REPORTS_DESCRIPTION'] = "Report Description";
$content['LN_REPORTS_HELP'] = "Help";
$content['LN_REPORTS_HELP_CLICK'] = "Click here for a detailed report description";
$content['LN_REPORTS_INFO'] = "Show more Information";
$content['LN_REPORTS_SAVEDREPORTS'] = "Saved reports";
$content['LN_REPORTS_ADMIN'] = "Administrate Reports";
$content['LN_REPORTMENU_LIST'] = "List installed Reports";
$content['LN_REPORTMENU_ONLINELIST'] = "All Available Reports";
$content['LN_REPORTS_INFORMATION'] = "This page shows a list of installed and available reports including saved report configurations.
<br/>To run a report, click on the buttons right to the Saved Reports.
<br/>Attention! Generating reports can be very time consuming depending on the size of your database.
";
$content['LN_REPORTS_CHECKLOGSTREAMSOURCE'] = "Verify Logstream optimization";
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -112,4 +112,4 @@ $page -> parser($content, "login.html");
$page -> output();
// ---
?>
?>

View File

@ -27,8 +27,8 @@
* along with LogAnalyzer. If not, see <http://www.gnu.org/licenses/>.
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution
*
* distribution
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -217,4 +217,4 @@ if ( $content['error_occured'] || $content['report_success'] )
// ---
?>
?>

147
src/reports.php Normal file
View File

@ -0,0 +1,147 @@
<?php
/*
*********************************************************************
* LogAnalyzer - http://loganalyzer.adiscon.com
* -----------------------------------------------------------------
* Search Admin File
*
* -> Helps administrating report modules
*
* All directives are explained within this file
*
* Copyright (C) 2008-2010 Adiscon GmbH.
*
* This file is part of LogAnalyzer.
*
* LogAnalyzer 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.
*
* LogAnalyzer 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 LogAnalyzer. If not, see <http://www.gnu.org/licenses/>.
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
*********************************************************************
*/
// *** 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($gl_root_path . 'include/functions_reports.php');
InitPhpLogCon();
InitSourceConfigs();
InitFrontEndDefaults(); // Only in WebFrontEnd
InitFilterHelpers(); // Helpers for frontend filtering!
// ---
// --- BEGIN Custom Code
// Firts of all init List of Reports!
InitReportModules();
if ( isset($content['REPORTS']) )
{
// This will enable to Stats View
$content['reportsenabled'] = true;
$i = 0; // Help counter!
foreach ($content['REPORTS'] as &$myReport )
{
// Set if help link is enabled
if ( strlen($myReport['ReportHelpArticle']) > 0 )
$myReport['ReportHelpEnabled'] = true;
else
$myReport['ReportHelpEnabled'] = false;
// check for custom fields
if ( $myReport['NeedsInit'] ) // && count($myReport['CustomFieldsList']) > 0 )
{
// Needs custom fields!
$myReport['EnableNeedsInit'] = true;
if ( $myReport['Initialized'] )
{
$myReport['InitEnabled'] = false;
$myReport['DeleteEnabled'] = true;
}
else
{
$myReport['InitEnabled'] = true;
$myReport['DeleteEnabled'] = false;
}
}
// --- Set CSS Class
if ( $i % 2 == 0 )
{
$myReport['cssclass'] = "line1";
$myReport['rowbegin'] = '<tr><td width="50%" valign="top">';
$myReport['rowend'] = '</td>';
}
else
{
$myReport['cssclass'] = "line2";
$myReport['rowbegin'] = '<td width="50%" valign="top">';
$myReport['rowend'] = '</td></tr>';
}
$i++;
// ---
// --- Check for saved reports!
if ( isset($myReport['SAVEDREPORTS']) && count($myReport['SAVEDREPORTS']) > 0 )
{
$myReport['HASSAVEDREPORTS'] = "true";
$myReport['SavedReportRowSpan'] = ( count($myReport['SAVEDREPORTS']) + 1);
$j = 0; // Help counter!
foreach ($myReport['SAVEDREPORTS'] as &$mySavedReport )
{
// --- Set CSS Class
if ( $j % 2 == 0 )
$mySavedReport['srcssclass'] = "line1";
else
$mySavedReport['srcssclass'] = "line2";
$j++;
// ---
}
}
// ---
}
}
else
{
$content['LISTREPORTS'] = "false";
$content['ISERROR'] = true;
$content['ERROR_MSG'] = $content['LN_REPORTS_ERROR_NOREPORTS'];
}
// --- END Custom Code
// --- BEGIN CREATE TITLE
$content['TITLE'] = InitPageTitle();
// Append custom title part!
$content['TITLE'] .= " :: " . $content['LN_MENU_REPORTS'];
// --- END CREATE TITLE
// --- Parsen and Output
InitTemplateParser();
$page -> parser($content, "reports.html");
$page -> output();
// ---
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -243,4 +243,4 @@ $page -> parser($content, "search.html");
$page -> output();
// ---
?>
?>

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -159,4 +159,4 @@ $page -> output();
//include($gl_root_path . 'include/functions_installhelpers.php');
//ConvertCustomCharts();
?>
?>

View File

@ -5,7 +5,7 @@
<center>
<div class="table_with_border_second ErrorMsg" style="width:600px">
<div class="PriorityError">{LN_GEN_ERRORDETAILS}</div>
<p>{ERROR_MSG}</p>
<p align="left">{ERROR_MSG}</p>
</div>
<br><br>
<a href="javascript:history.back();" target="_top">{LN_GEN_ERRORRETURNPREV}</a>
@ -270,6 +270,36 @@
</script>
<!-- IF ISSOURCENOTOPTIMIZED="true" -->
<table width="775" cellpadding="2" cellspacing="1" border="0" align="center" class="with_border_alternate">
<tr>
<td align="center" valign="top" class="line1 ErrorMsg">
<div class="{MSG_WARNING_CLASS}">{MSG_WARNING_TITLE}</div>
<p align="left">{MSG_WARNING_DETAILS}</p>
<a href="{MSG_CHECK_URL}" target="_top">{LN_REPORTS_RECHECKLOGSTREAMSOURCE}</a>
<br>
<br>
</td>
</tr>
<!-- IF MSG_WARNING_SUBMITFORM="true" -->
<tr>
<td align="center" class="line2">
<br>
<form action="{MSG_WARNING_FORMURL}" method="post" name="confirmform">
<!-- BEGIN POST_VARIABLES -->
<input type="hidden" name="{varname}" value="{varvalue}">
<!-- END POST_VARIABLES -->
<input type="image" src="{BASEPATH}images/icons/check.png" alt="{LN_REPORTS_OPTIMIZEYES}" class="borderless" width="16">
<br>
<input type="submit" value="{LN_REPORTS_OPTIMIZE_LOGSTREAMSOURCE}" class="borderless">
</form>
</td>
</tr>
<!-- ENDIF MSG_WARNING_SUBMITFORM="true" -->
</table>
<!-- ENDIF ISSOURCENOTOPTIMIZED="true" -->
<form action="{BASEPATH}admin/reports.php{FormUrlAddOP}" method="post" id="savedreportform">
<input type="hidden" name="id" value="{ReportID}">
<input type="hidden" name="savedreportid" value="{SavedReportID}">
@ -434,6 +464,8 @@
<option value="{SourceID}" {sourceselected}>{Name}</option>
<!-- END SOURCES -->
</select>
<a href="{MSG_CHECK_URL}" target="_top">{LN_REPORTS_CHECKLOGSTREAMSOURCE}</a>
<!-- <button name="forcecheckoptimize" type="true" value="{REPORT_FORMACTION}" title="{LN_REPORTS_CHECKLOGSTREAMSOURCE}">{LN_REPORTS_CHECKLOGSTREAMSOURCE}</button>-->
</td>
</tr>
<tr>
@ -479,6 +511,7 @@
<tr>
<td align="center" colspan="2">
<button name="op" type="submit" value="{REPORT_FORMACTION}" title="{REPORT_SENDBUTTON}">{REPORT_SENDBUTTON}</button>
<button name="op" type="submit" value="{REPORT_FORMACTIONRETURN}" title="{REPORT_SENDBUTTON}">{REPORT_SENDANDRETURN}</button>
</td>
</tr>
</table>

View File

@ -4,6 +4,7 @@
<td class="topmenu1" nowrap align="center" width="75"><a class="topmenu1_link" href="{BASEPATH}search.php" target="_top"><img align="left" src="{MENU_SEARCH}" width="16" height="16" vspace="0">{LN_MENU_SEARCH}</a></td>
<td class="topmenu1" nowrap align="center" width="100"><a class="topmenu1_link" href="{BASEPATH}index.php?{additional_url}" target="_top"><img align="left" src="{MENU_HOMEPAGE}" width="16" height="16" vspace="0">{LN_MENU_SHOWEVENTS}</a></td>
<td class="topmenu1" nowrap align="center" width="90"><a class="topmenu1_link" href="{BASEPATH}statistics.php" target="_top"><img align="left" src="{MENU_CHARTS}" width="16" height="16" vspace="0">{LN_MENU_STATISTICS}</a></td>
<td class="topmenu1" nowrap align="center" width="80"><a class="topmenu1_link" href="{BASEPATH}reports.php" target="_top"><img align="left" src="{MENU_CHARTPRESENTATION}" width="16" height="16" vspace="0">{LN_MENU_REPORTS}</a></td>
<td class="topmenu1" nowrap align="left" width="60" nowrap>
<img align="left" src="{MENU_HELP}" width="16" height="16" title="{LN_GEN_PREDEFINEDSEARCHES}" OnClick="ToggleDisplayTypeById('menu_help');" OnMouseOver="HoverPopupMenuHelp(event, this, '{LN_MENU_HELP}', '{LN_MENU_CLICKTOEXPANDMENU}');" OnMouseOut="FinishPopupWindowMenu();">
<div id="menu"><ul>
@ -19,7 +20,7 @@
</li>
</ul></div>
</td>
<td class="topmenu1" nowrap align="center" width="200"><a class="topmenu1_link" href="http://kb.monitorware.com/search.php" target="_blank"><img align="left" src="{MENU_KB}" width="16" height="16" vspace="0">{LN_MENU_SEARCHINKB}</a></td>
<td class="topmenu1" nowrap align="center" width="180"><a class="topmenu1_link" href="http://kb.monitorware.com/search.php" target="_blank"><img align="left" src="{MENU_KB}" width="16" height="16" vspace="0">{LN_MENU_SEARCHINKB}</a></td>
<!-- IF UserDBEnabled="true" -->
<!-- IF SESSION_LOGGEDIN!="true" -->
<td class="topmenu1" nowrap align="center" width="100"><a class="topmenu1_link" href="{BASEPATH}login.php" target="_top"><img align="left" src="{MENU_ADMINLOGOFF}" width="16" height="16" vspace="0">{LN_MENU_LOGIN}</a></td>

221
src/templates/reports.html Normal file
View File

@ -0,0 +1,221 @@
<!-- INCLUDE include_header.html -->
<!-- IF ISERROR="true" -->
<br><br>
<center>
<div class="table_with_border_second ErrorMsg" style="width:600px">
<div class="PriorityError">{LN_GEN_ERRORDETAILS}</div>
<p align="left">{ERROR_MSG}</p>
<p>
<a href="http://kb.monitorware.com/kbeventdb-list-12-Adiscon-phpLogCon-{detailederror_code}.html" target="_blank">
<img src="{MENU_HELP_ORANGE}" width="16" height="16" title="{LN_GEN_MOREINFORMATION}">
{LN_GEN_MOREINFORMATION}
</a>
</p>
</div>
<br><br>
</center>
<br><br>
<!-- ENDIF ISERROR="true" -->
<!-- IF reportsenabled="true" -->
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="with_border">
<tr>
<td colspan="3" class="title" nowrap><B>{LN_MENU_REPORTS}</B></td>
</tr>
<tr>
<td colspan="3" class="titleSecond"><br><blockquote>{LN_REPORTS_INFORMATION}</blockquote><br></td>
</tr>
<tr>
<td align="center" class="line2">
<table border="0" cellpadding="2" cellspacing="0" bgcolor="#DDDDDD" width="100%" class="with_border_alternate">
<tr>
<td class="topmenu2begin" nowrap align="center" width="16"><img align="left" src="{MENU_BULLET_YELLOW}" width="16" height="16" vspace="0"></td>
<td class="topmenu2" nowrap align="center" width="150"><a class="topmenu1_link" href="{BASEPATH}admin/reports.php" target="_top"><img align="left" src="{MENU_DOCUMENTLIST}" width="16" height="16" vspace="0">{LN_REPORTS_ADMIN}</a></td>
<td class="topmenu2" nowrap align="center" width="150"><a class="topmenu1_link" href="http://loganalyzer.adiscon.com/plugins/reports" target="_blank"><img align="left" src="{MENU_NETDOWNLOAD}" width="16" height="16" vspace="0">{LN_REPORTMENU_ONLINELIST}</a></td>
<!-- IF ISADDSAVEDREPORT="true" -->
<td class="topmenu2" nowrap align="center" width="250"><a class="topmenu1_link" href="{BASEPATH}admin/reports.php?op=details&id={ReportID}" target="_top"><img align="left" src="{MENU_VIEW}" width="16" height="16" vspace="0">{REPORTS_DETAILSFOR}</a></td>
<!-- ENDIF ISADDSAVEDREPORT="true" -->
<td class="topmenu2end" nowrap align="center" width="max">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
<br/><br/>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="with_border_alternative">
<!-- BEGIN REPORTS -->
{rowbegin}
<table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="350" class="table_with_border_light">
<tr>
<td align="center" width="100" class="cellmenu1" nowrap><b>{LN_REPORTS_NAME}</b></td>
<td align="center" width="100%" class="cellmenu1"><a href="{BASEPATH}admin/reports.php?op=details&id={ID}" class="cellmenu1_link">{DisplayName}</a></td>
</tr>
<tr>
<td align="center" class="cellmenu2"><b>{LN_REPORTS_HELP}</b></td>
<td align="left" width="100%" class="line1">
<!-- IF ReportHelpEnabled="true" -->
&nbsp;&nbsp;<a href="{ReportHelpArticle}" target="_blank"><img src="{MENU_HELP}" width="16" title="{LN_REPORTS_HELP}">&nbsp;{LN_REPORTS_HELP}</a>
<!-- ENDIF ReportHelpEnabled="true" -->
&nbsp;&nbsp;<a href="{BASEPATH}admin/reports.php?op=details&id={ID}"><img src="{MENU_INFORMATION}" width="16" title="{LN_REPORTS_INFO}">&nbsp;{LN_REPORTS_INFO}</a>
</td>
</tr>
<tr>
<td align="center" class="cellmenu2_naked"><b>{LN_REPORTS_DESCRIPTION}</b></td>
<td align="left" width="100%" class="line2">{Description}</td>
</tr>
<tr>
<td align="center" class="cellmenu2_naked" valign="_top"><b>{LN_REPORTS_SAVEDREPORTS}</b></td>
<td align="center" width="100%" class="line2">
<!-- IF HASSAVEDREPORTS="true" -->
<table border="0" cellpadding="2" cellspacing="1" bgcolor="#DDDDDD" width="400" class="with_border_alternative">
<!-- BEGIN SAVEDREPORTS -->
<tr>
<td align="left" class="{srcssclass}" colspan="2">
<img src="{MENU_REPORTS}" width="16">
<a href="{BASEPATH}admin/reports.php?op=editsavedreport&id={ID}&savedreportid={SavedReportID}">{customTitle}</a>
</td>
<td align="center" class="{srcssclass}">
&nbsp;<a href="{BASEPATH}reportgenerator.php?op=runreport&id={ID}&savedreportid={SavedReportID}" target="_blank"><img src="{MENU_PLAY_GREEN}" width="16" title="{LN_REPORTS_RUNNOW}"></a>
</td>
</tr>
<!-- END SAVEDREPORTS -->
</table>
<!-- ENDIF HASSAVEDREPORTS="true" -->
</td>
</tr>
</table>
<br><br>
{rowend}
<!-- END REPORTS -->
</table>
<!-- IF LISTONLINEREPORTS="true" -->
<table border="0" cellpadding="2" cellspacing="1" bgcolor="#DDDDDD" width="775" class="with_border_alternate">
<tr>
<td align="center" width="50" class="cellmenu1"><b>{LN_REPORTS_INSTALLED}</b></td>
<td align="center" width="100" class="cellmenu1"><b>{LN_REPORTS_ID}</b></td>
<td align="center" width="200" class="cellmenu1"><b>{LN_REPORTS_NAME}</b></td>
<td align="center" width="300" class="cellmenu1"><b>{LN_REPORTS_DESCRIPTION}</b></td>
<td align="center" width="125" class="cellmenu1" nowrap><b>{LN_REPORTS_LINKS}</b></td>
</tr>
<!-- BEGIN ONLINEREPORTS -->
<tr>
<td align="center" class="{cssclass}"><img src="{installed_icon}" width="16" title="{installed_text}"></td>
<td align="left" class="{cssclass}" valign="top"><b>{reportid}</b></td>
<td align="left" class="{cssclass}" valign="top">
<!-- IF reportdownloadlink="-" -->
<b>{reportname}</b>
<!-- ENDIF reportdownloadlink="-" -->
<!-- IF reportdownloadlink!="-" -->
<a href="{reportdownloadlink}" target="_blank">{reportname}</a>
<!-- ENDIF reportdownloadlink!="-" -->
</td>
<td align="left" class="{cssclass}" valign="top">{reportdescription}</td>
<td align="center" class="{cssclass}">
<!-- IF reportdownloadlink!="-" -->
<a href="{reportdownloadlink}" target="_blank"><img src="{MENU_NETDOWNLOAD}" width="16" title="{LN_REPORTS_DOWNLOAD}"></a>&nbsp;&nbsp;
<!-- ENDIF reportdownloadlink!="-" -->
<!-- IF reporthelparticle!="-" -->
<a href="{reporthelparticle}" target="_blank"><img src="{MENU_HELP}" width="16" title="{LN_REPORTS_HELP}"></a>&nbsp;&nbsp;
<!-- ENDIF reporthelparticle!="-" -->
<!-- IF reportsamplelink!="-" -->
<a href="{reportsamplelink}" target="_blank"><img src="{MENU_CHART_PREVIEW}" width="16" title="{LN_REPORTS_SAMPLELINK}"></a>&nbsp;&nbsp;
<!-- ENDIF reportsamplelink!="-" -->
</td>
</tr>
<!-- END ONLINEREPORTS -->
</table>
<!-- ENDIF LISTONLINEREPORTS="true" -->
<!-- IF ISSHOWDETAILS="true" -->
<table border="0" cellpadding="2" cellspacing="1" bgcolor="#DDDDDD" width="775" class="with_border_alternate">
<tr>
<td align="center" class="cellmenu1" colspan="3"><b>{LN_REPORTS_DETAILS}</b></td>
</tr>
<tr>
<td align="left" class="cellmenu2" width="250"><b>{LN_REPORTS_CAT}</b></td>
<td align="left" class="line1" width="350" colspan="2">{Category}</td>
</tr>
<tr>
<td align="left" class="cellmenu2" width="250"><b>{LN_REPORTS_ID}</b></td>
<td align="left" class="line1" width="350" colspan="2">{ReportID}</td>
</tr>
<tr>
<td align="left" class="cellmenu2"><b>{LN_REPORTS_NAME}</b></td>
<td align="left" class="line2" colspan="2">{DisplayName}</td>
</tr>
<tr>
<td align="left" class="cellmenu2_naked" valign="top"><b>{LN_REPORTS_DESCRIPTION}</b></td>
<td align="left" class="line1" colspan="2">{Description}</td>
</tr>
<!-- IF EnableRequiredFields="true" -->
<tr>
<td align="left" class="cellmenu2_naked" valign="top"><b>{LN_REPORTS_REQUIREDFIELDS}</b></td>
<td align="left" class="line1" colspan="2">
<!-- BEGIN RequiredFieldsList -->
<br><B>{FieldCaption}</B> ({FieldDefine})
<!-- END RequiredFieldsList -->
<br><br>
</td>
</tr>
<!-- ENDIF EnableRequiredFields="true" -->
<!-- IF EnableHelpArticle="true" -->
<tr>
<td align="left" class="cellmenu2"><b>{LN_REPORTS_HELP}</b></td>
<td align="center" class="line2" colspan="2"><a href="{ReportHelpArticle}" target="_blank">{LN_REPORTS_HELP_CLICK}</a></td>
</tr>
<!-- ENDIF EnableHelpArticle="true" -->
<!-- IF EnableNeedsInit="true" -->
<tr>
<td align="center" class="tableBackground" colspan="2">
<!-- IF InitEnabled="true" -->
<a href="{BASEPATH}admin/reports.php?op=initreport&id={ReportID}"><img src="{MENU_PARSER_INIT}" width="16" title="{LN_REPORTS_INIT}"> {LN_REPORTS_INIT}</a>
<!-- ENDIF InitEnabled="true" -->
<!-- IF DeleteEnabled="true" -->
<a href="{BASEPATH}admin/reports.php?op=removereport&id={ReportID}"><img src="{MENU_PARSER_DELETE}" width="16" title="{LN_REPORTS_REMOVE}"> {LN_REPORTS_REMOVE}</a>
<!-- ENDIF DeleteEnabled="true" -->
</td>
</tr>
<!-- ENDIF EnableNeedsInit="true" -->
<!-- IF HASSAVEDREPORTS="true" -->
<tr>
<td align="center" rowspan="{SavedReportRowSpan}" class="cellmenu2_naked" valign="top">{LN_REPORTS_SAVEDREPORTS}</td>
<td align="left" class="line1" colspan="2">
</td>
</tr>
<!-- BEGIN SAVEDREPORTS -->
<tr>
<td align="left" class="{srcssclass}">
<img src="{MENU_REPORTS}" width="16">
<a href="{BASEPATH}admin/reports.php?op=editsavedreport&id={ReportID}&savedreportid={SavedReportID}">{customTitle}</a>
</td>
<td align="center" class="{srcssclass}">
&nbsp;<a href="{BASEPATH}reportgenerator.php?op=runreport&id={ReportID}&savedreportid={SavedReportID}" target="_blank"><img src="{MENU_CHART_PREVIEW}" width="16" title="{LN_REPORTS_RUNNOW}"></a>
&nbsp;<a href="{BASEPATH}admin/reports.php?op=editsavedreport&id={ReportID}&savedreportid={SavedReportID}"><img src="{MENU_EDIT}" width="16" title="{LN_REPORTS_EDITSAVEDREPORT}"></a>
&nbsp;<a href="{BASEPATH}admin/reports.php?op=removesavedreport&savedreportid={SavedReportID}"><img src="{MENU_DELETE}" width="16" title="{LN_REPORTS_REMOVESAVEDREPORT}"></a>
</td>
</tr>
<!-- END SAVEDREPORTS -->
<!-- ENDIF HASSAVEDREPORTS="true" -->
</table>
<br><br>
<a href="javascript:history.back();" target="_top">{LN_GEN_ERRORRETURNPREV}</a>
<!-- ENDIF ISSHOWDETAILS="true" -->
<br><br>
</td>
</tr>
</table>
<!-- ENDIF reportsenabled="true" -->
<!-- INCLUDE include_footer.html -->

View File

@ -28,7 +28,7 @@
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*
*
* Adiscon LogAnalyzer is also available under a commercial license.
* For details, contact info@adiscon.com or visit
* http://loganalyzer.adiscon.com/commercial
@ -112,4 +112,4 @@ if ( isset($_GET['op']) )
// Final redirect
RedirectPage( $szRedir );
// ---
?>
?>