diff --git a/src/admin/reports.php b/src/admin/reports.php index a102ddd..53a6d0d 100644 --- a/src/admin/reports.php +++ b/src/admin/reports.php @@ -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'] . "
\r\n"; -// echo $szFilterString . "
\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'] . "
\r\n"; + echo $szFilterString . "
\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'] .= "

" . 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'] .= "

" . 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'] .= "

" . 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'] .= "

" . 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 */ diff --git a/src/asktheoracle.php b/src/asktheoracle.php index ab21a14..b1bb3b0 100644 --- a/src/asktheoracle.php +++ b/src/asktheoracle.php @@ -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(); // --- -?> +?> \ No newline at end of file diff --git a/src/chartgenerator.php b/src/chartgenerator.php index bb2dab8..f3ff7aa 100644 --- a/src/chartgenerator.php +++ b/src/chartgenerator.php @@ -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); // --- -?> +?> \ No newline at end of file diff --git a/src/classes/class_template.php b/src/classes/class_template.php index e4e9dec..d5305ab 100644 --- a/src/classes/class_template.php +++ b/src/classes/class_template.php @@ -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 ********************************************************************* */ diff --git a/src/classes/enums.class.php b/src/classes/enums.class.php index ed019c9..a2b8b3d 100644 --- a/src/classes/enums.class.php +++ b/src/classes/enums.class.php @@ -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 ********************************************************************* */ diff --git a/src/classes/logstream.class.php b/src/classes/logstream.class.php index 3dae34c..344b9b8 100644 --- a/src/classes/logstream.class.php +++ b/src/classes/logstream.class.php @@ -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 ********************************************************************* */ diff --git a/src/classes/logstreamconfig.class.php b/src/classes/logstreamconfig.class.php index bf66574..bfc0429 100644 --- a/src/classes/logstreamconfig.class.php +++ b/src/classes/logstreamconfig.class.php @@ -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 ********************************************************************* */ diff --git a/src/classes/logstreamconfigdb.class.php b/src/classes/logstreamconfigdb.class.php index 003f174..1dd8104 100644 --- a/src/classes/logstreamconfigdb.class.php +++ b/src/classes/logstreamconfigdb.class.php @@ -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 ********************************************************************* */ diff --git a/src/classes/logstreamconfigdisk.class.php b/src/classes/logstreamconfigdisk.class.php index a4b5ad6..b0af9d3 100644 --- a/src/classes/logstreamconfigdisk.class.php +++ b/src/classes/logstreamconfigdisk.class.php @@ -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 ********************************************************************* */ diff --git a/src/classes/logstreamconfigpdo.class.php b/src/classes/logstreamconfigpdo.class.php index 4c3a0a8..23e898a 100644 --- a/src/classes/logstreamconfigpdo.class.php +++ b/src/classes/logstreamconfigpdo.class.php @@ -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 ********************************************************************* */ diff --git a/src/classes/logstreamdb.class.php b/src/classes/logstreamdb.class.php index f11e2b7..513628d 100644 --- a/src/classes/logstreamdb.class.php +++ b/src/classes/logstreamdb.class.php @@ -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 ********************************************************************* */ diff --git a/src/classes/logstreamdisk.class.php b/src/classes/logstreamdisk.class.php index f78f7bf..4784c5b 100644 --- a/src/classes/logstreamdisk.class.php +++ b/src/classes/logstreamdisk.class.php @@ -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 ********************************************************************* */ diff --git a/src/classes/logstreamlineparser.class.php b/src/classes/logstreamlineparser.class.php index 5256e3f..44a62df 100644 --- a/src/classes/logstreamlineparser.class.php +++ b/src/classes/logstreamlineparser.class.php @@ -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 ********************************************************************* */ diff --git a/src/classes/logstreamlineparsermisc.class.php b/src/classes/logstreamlineparsermisc.class.php index 4a6600e..5ab29e6 100644 --- a/src/classes/logstreamlineparsermisc.class.php +++ b/src/classes/logstreamlineparsermisc.class.php @@ -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 ********************************************************************* */ diff --git a/src/classes/logstreamlineparsersyslog.class.php b/src/classes/logstreamlineparsersyslog.class.php index 3f432cc..3038239 100644 --- a/src/classes/logstreamlineparsersyslog.class.php +++ b/src/classes/logstreamlineparsersyslog.class.php @@ -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 ********************************************************************* */ diff --git a/src/classes/logstreamlineparsersyslog23.class.php b/src/classes/logstreamlineparsersyslog23.class.php index a2b7c9c..11f3dcd 100644 --- a/src/classes/logstreamlineparsersyslog23.class.php +++ b/src/classes/logstreamlineparsersyslog23.class.php @@ -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 ********************************************************************* */ diff --git a/src/classes/logstreamlineparserwinsyslog.class.php b/src/classes/logstreamlineparserwinsyslog.class.php index 3c2516b..63b90cd 100644 --- a/src/classes/logstreamlineparserwinsyslog.class.php +++ b/src/classes/logstreamlineparserwinsyslog.class.php @@ -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 ********************************************************************* */ diff --git a/src/classes/logstreampdo.class.php b/src/classes/logstreampdo.class.php index 6e51bfd..729acfc 100644 --- a/src/classes/logstreampdo.class.php +++ b/src/classes/logstreampdo.class.php @@ -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 ********************************************************************* */ diff --git a/src/classes/msgparser.class.php b/src/classes/msgparser.class.php index f1fcd18..e7e9430 100644 --- a/src/classes/msgparser.class.php +++ b/src/classes/msgparser.class.php @@ -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 ********************************************************************* */ diff --git a/src/convert.php b/src/convert.php index 6e561ee..fec99cb 100644 --- a/src/convert.php +++ b/src/convert.php @@ -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 // --- -?> +?> \ No newline at end of file diff --git a/src/details.php b/src/details.php index 0534f33..d88e482 100644 --- a/src/details.php +++ b/src/details.php @@ -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(); // --- -?> +?> \ No newline at end of file diff --git a/src/export.php b/src/export.php index 9f74795..6963319 100644 --- a/src/export.php +++ b/src/export.php @@ -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 } // --- -?> +?> \ No newline at end of file diff --git a/src/include/config.sample.php b/src/include/config.sample.php index 5e37f30..721fe3f 100644 --- a/src/include/config.sample.php +++ b/src/include/config.sample.php @@ -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% // --- -?> +?> \ No newline at end of file diff --git a/src/include/constants_errors.php b/src/include/constants_errors.php index d126073..2f6e7dc 100644 --- a/src/include/constants_errors.php +++ b/src/include/constants_errors.php @@ -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); -?> +?> \ No newline at end of file diff --git a/src/include/constants_filters.php b/src/include/constants_filters.php index faabf58..ab6544d 100644 --- a/src/include/constants_filters.php +++ b/src/include/constants_filters.php @@ -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" => "" ); -?> +?> \ No newline at end of file diff --git a/src/include/constants_general.php b/src/include/constants_general.php index ab8b3c5..4b69cda 100644 --- a/src/include/constants_general.php +++ b/src/include/constants_general.php @@ -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); -?> +?> \ No newline at end of file diff --git a/src/include/constants_logstream.php b/src/include/constants_logstream.php index 164ad96..08a44ed 100644 --- a/src/include/constants_logstream.php +++ b/src/include/constants_logstream.php @@ -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'); -?> +?> \ No newline at end of file diff --git a/src/include/functions_common.php b/src/include/functions_common.php index 21ba253..96a8f56 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -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 ( "Adiscon LogAnalyzer :: Critical Error occured" . "

" . "". @@ -1048,7 +1054,20 @@ function DieWithErrorMsg( $szerrmsg ) "" . "
Errordetails:
" . $szerrmsg . - "

" . + "

"); + + // Print Detail error's if available + if ( isset($content['detailederror']) ) + { + print ("". + "" . + "
Additional Errordetails:
" . + $content['detailederror'] . + "

"); + } + + // End HTML Body + print( "" ); } @@ -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; } // --- -?> +?> \ No newline at end of file diff --git a/src/include/functions_config.php b/src/include/functions_config.php index 58f6bf6..7f9dfec 100644 --- a/src/include/functions_config.php +++ b/src/include/functions_config.php @@ -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() } -?> +?> \ No newline at end of file diff --git a/src/include/functions_db.php b/src/include/functions_db.php index 35c8830..5c48363 100644 --- a/src/include/functions_db.php +++ b/src/include/functions_db.php @@ -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'] .= "

" . GetErrorMessage(ERROR_DB_QUERYFAILED); + + // Append SQL Detail Error + $content['detailederror'] .= "

" . $errormsg; + } } function DB_RemoveParserSpecialBadChars($myString) @@ -437,4 +451,4 @@ function GetRowsAffected() return mysql_affected_rows(); } -?> +?> \ No newline at end of file diff --git a/src/include/functions_debugoutput.php b/src/include/functions_debugoutput.php index 5b5ef7e..1d89793 100644 --- a/src/include/functions_debugoutput.php +++ b/src/include/functions_debugoutput.php @@ -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() } -?> +?> \ No newline at end of file diff --git a/src/include/functions_filters.php b/src/include/functions_filters.php index 77c9831..9cf3adb 100644 --- a/src/include/functions_filters.php +++ b/src/include/functions_filters.php @@ -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; } -?> +?> \ No newline at end of file diff --git a/src/include/functions_frontendhelpers.php b/src/include/functions_frontendhelpers.php index fef3b19..484dc59 100644 --- a/src/include/functions_frontendhelpers.php +++ b/src/include/functions_frontendhelpers.php @@ -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 ) } } -?> +?> \ No newline at end of file diff --git a/src/include/functions_installhelpers.php b/src/include/functions_installhelpers.php index 99f22a2..4ae6c2c 100644 --- a/src/include/functions_installhelpers.php +++ b/src/include/functions_installhelpers.php @@ -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() } // --- -?> +?> \ No newline at end of file diff --git a/src/include/functions_reports.php b/src/include/functions_reports.php new file mode 100644 index 0000000..604271f --- /dev/null +++ b/src/include/functions_reports.php @@ -0,0 +1,268 @@ + * + * * + * 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 . + * + * 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); +} + + +?> \ No newline at end of file diff --git a/src/include/functions_themes.php b/src/include/functions_themes.php index 5ac1bf4..bbdbb04 100644 --- a/src/include/functions_themes.php +++ b/src/include/functions_themes.php @@ -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 diff --git a/src/include/functions_users.php b/src/include/functions_users.php index 211db1d..81d1f8d 100644 --- a/src/include/functions_users.php +++ b/src/include/functions_users.php @@ -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 ) -?> +?> \ No newline at end of file diff --git a/src/index.php b/src/index.php index 9b12b93..ba84b5a 100644 --- a/src/index.php +++ b/src/index.php @@ -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) } // --- -?> +?> \ No newline at end of file diff --git a/src/install.php b/src/install.php index 7698581..109c90e 100644 --- a/src/install.php +++ b/src/install.php @@ -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"); } // --- -?> +?> \ No newline at end of file diff --git a/src/lang/de/admin.php b/src/lang/de/admin.php index a95b4b7..1de0ccf 100644 --- a/src/lang/de/admin.php +++ b/src/lang/de/admin.php @@ -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.

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.

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!

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.

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_'] = ""; ?> \ No newline at end of file diff --git a/src/lang/de/main.php b/src/lang/de/main.php index d1d2b34..7e044c2 100644 --- a/src/lang/de/main.php +++ b/src/lang/de/main.php @@ -328,28 +328,46 @@ $content['LN_ORACLE_FIELD'] = "Feld"; $content['LN_ORACLE_ONLINESEARCH'] = "Online Suche"; $content['LN_ORACLE_WHOIS'] = "WHOIS Abfrage fü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. +
To run a report, click on the buttons right to the Saved Reports. +
Attention! Generating reports can be very time consuming depending on the size of your database. +"; +$content['LN_REPORTS_CHECKLOGSTREAMSOURCE'] = "Verify Logstream optimization"; + ?> \ No newline at end of file diff --git a/src/lang/en/admin.php b/src/lang/en/admin.php index 363b921..63933d1 100644 --- a/src/lang/en/admin.php +++ b/src/lang/en/admin.php @@ -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.

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.

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!

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.

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_'] = ""; + ?> \ No newline at end of file diff --git a/src/lang/en/main.php b/src/lang/en/main.php index 5cceb72..dc7ecbe 100644 --- a/src/lang/en/main.php +++ b/src/lang/en/main.php @@ -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. +
To run a report, click on the buttons right to the Saved Reports. +
Attention! Generating reports can be very time consuming depending on the size of your database. +"; +$content['LN_REPORTS_CHECKLOGSTREAMSOURCE'] = "Verify Logstream optimization"; + ?> \ No newline at end of file diff --git a/src/login.php b/src/login.php index ac4e160..17db1c4 100644 --- a/src/login.php +++ b/src/login.php @@ -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(); // --- -?> +?> \ No newline at end of file diff --git a/src/reportgenerator.php b/src/reportgenerator.php index dc3f774..37cb2d4 100644 --- a/src/reportgenerator.php +++ b/src/reportgenerator.php @@ -27,8 +27,8 @@ * along with LogAnalyzer. If not, see . * * 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'] ) // --- -?> +?> \ No newline at end of file diff --git a/src/reports.php b/src/reports.php new file mode 100644 index 0000000..245ab55 --- /dev/null +++ b/src/reports.php @@ -0,0 +1,147 @@ + 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 . + * + * 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'] = ''; + $myReport['rowend'] = ''; + } + else + { + $myReport['cssclass'] = "line2"; + $myReport['rowbegin'] = ''; + $myReport['rowend'] = ''; + } + $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(); +// --- +?> \ No newline at end of file diff --git a/src/search.php b/src/search.php index 6c305f6..5336808 100644 --- a/src/search.php +++ b/src/search.php @@ -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(); // --- -?> +?> \ No newline at end of file diff --git a/src/statistics.php b/src/statistics.php index 679d223..aaa9932 100644 --- a/src/statistics.php +++ b/src/statistics.php @@ -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(); -?> +?> \ No newline at end of file diff --git a/src/templates/admin/admin_reports.html b/src/templates/admin/admin_reports.html index 8014aeb..02159ce 100644 --- a/src/templates/admin/admin_reports.html +++ b/src/templates/admin/admin_reports.html @@ -5,7 +5,7 @@
{LN_GEN_ERRORDETAILS}
-

{ERROR_MSG}

+

{ERROR_MSG}



{LN_GEN_ERRORRETURNPREV} @@ -270,6 +270,36 @@ + + + + + + + + + + +
+
{MSG_WARNING_TITLE}
+

{MSG_WARNING_DETAILS}

+ {LN_REPORTS_RECHECKLOGSTREAMSOURCE} +
+
+
+
+
+ + + + +
+ +
+ +
+ +
@@ -434,6 +464,8 @@ + {LN_REPORTS_CHECKLOGSTREAMSOURCE} + @@ -479,6 +511,7 @@ + diff --git a/src/templates/include_menu.html b/src/templates/include_menu.html index 066eba2..26e8f65 100644 --- a/src/templates/include_menu.html +++ b/src/templates/include_menu.html @@ -4,6 +4,7 @@ {LN_MENU_SEARCH} {LN_MENU_SHOWEVENTS} {LN_MENU_STATISTICS} + {LN_MENU_REPORTS} - {LN_MENU_SEARCHINKB} + {LN_MENU_SEARCHINKB} {LN_MENU_LOGIN} diff --git a/src/templates/reports.html b/src/templates/reports.html new file mode 100644 index 0000000..122fb09 --- /dev/null +++ b/src/templates/reports.html @@ -0,0 +1,221 @@ + + + +

+
+
+
{LN_GEN_ERRORDETAILS}
+

{ERROR_MSG}

+

+ + + {LN_GEN_MOREINFORMATION} + +

+
+

+
+

+ + + + + + + + + + + + + +
{LN_MENU_REPORTS}

{LN_REPORTS_INFORMATION}

+ + + + + + + + + + + +
{LN_REPORTS_ADMIN}{LN_REPORTMENU_ONLINELIST}{REPORTS_DETAILSFOR} 
+ +
+ +

+ + + +{rowbegin} +
+ + + + + + + + + + + + + + + + +
{LN_REPORTS_NAME}{DisplayName}
{LN_REPORTS_HELP} + +    {LN_REPORTS_HELP} + +    {LN_REPORTS_INFO} +
{LN_REPORTS_DESCRIPTION}{Description}
{LN_REPORTS_SAVEDREPORTS} + + + + + + + + + +
+ + {customTitle} + +   +
+ + +
+

+{rowend} + + + + + + + + + + + + + + + + + + + + + + +
{LN_REPORTS_INSTALLED}{LN_REPORTS_ID}{LN_REPORTS_NAME}{LN_REPORTS_DESCRIPTION}{LN_REPORTS_LINKS}
{reportid} + + {reportname} + + + {reportname} + + {reportdescription} + +    + + +    + + +    + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{LN_REPORTS_DETAILS}
{LN_REPORTS_CAT}{Category}
{LN_REPORTS_ID}{ReportID}
{LN_REPORTS_NAME}{DisplayName}
{LN_REPORTS_DESCRIPTION}{Description}
{LN_REPORTS_REQUIREDFIELDS} + +
{FieldCaption} ({FieldDefine}) + +

+
{LN_REPORTS_HELP}{LN_REPORTS_HELP_CLICK}
+ + {LN_REPORTS_INIT} + + + {LN_REPORTS_REMOVE} + +
{LN_REPORTS_SAVEDREPORTS} +
+ + {customTitle} + +   +   +   +
+ +

+ {LN_GEN_ERRORRETURNPREV} + + +

+ + + + + + \ No newline at end of file diff --git a/src/userchange.php b/src/userchange.php index 96f02b8..935c6b1 100644 --- a/src/userchange.php +++ b/src/userchange.php @@ -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 ); // --- -?> +?> \ No newline at end of file