diff --git a/src/admin/reports.php b/src/admin/reports.php
index 87fcef2..f2935f7 100644
--- a/src/admin/reports.php
+++ b/src/admin/reports.php
@@ -54,6 +54,10 @@ IncludeLanguageFile( $gl_root_path . '/lang/' . $LANG . '/admin.php' );
// --- BEGIN Custom Code
+// Hardcoded settings
+define('URL_ONLINEREPORTS', 'http://tools.adiscon.net/listreports.php');
+$content['OPTIONAL_TITLE'] = "";
+
// Firts of all init List of Reports!
InitReportModules();
@@ -480,6 +484,32 @@ if ( isset($_GET['op']) )
$content['ERROR_MSG'] = $content['LN_REPORTS_ERROR_INVALIDSAVEDREPORTID'];
}
}
+ else if ($_GET['op'] == "onlinelist")
+ {
+ // Set Mode to list Online Reports
+ $content['LISTONLINEREPORTS'] = "true";
+ $content['OPTIONAL_TITLE'] = " - " . $content['LN_REPORTMENU_ONLINELIST'];
+
+ if ( InitOnlineReports() )
+ {
+ $j = 0; // Help counter!
+ foreach ($content['ONLINEREPORTS'] as &$myOnlineReport )
+ {
+ // --- Set CSS Class
+ if ( $j % 2 == 0 )
+ $myOnlineReport['cssclass'] = "line1";
+ else
+ $myOnlineReport['cssclass'] = "line2";
+ $j++;
+ // ---
+ }
+ }
+ else
+ {
+ $content['ISERROR'] = true;
+ $content['ERROR_MSG'] = $content['LN_REPORTS_ERROR_ONLINELIST'];
+ }
+ }
}
@@ -1010,6 +1040,7 @@ if ( !isset($_POST['op']) && !isset($_GET['op']) )
{
// Default Mode = List Searches
$content['LISTREPORTS'] = "true";
+ $content['OPTIONAL_TITLE'] = " - " . $content['LN_REPORTMENU_LIST'];
$i = 0; // Help counter!
foreach ($content['REPORTS'] as &$myReport )
@@ -1060,7 +1091,7 @@ if ( !isset($_POST['op']) && !isset($_GET['op']) )
$mySavedReport['srcssclass'] = "line1";
else
$mySavedReport['srcssclass'] = "line2";
- $i++;
+ $j++;
// ---
}
}
@@ -1213,6 +1244,167 @@ function CreateCronCommand( $myReportID, $mySavedReportID = null )
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);
+}
+
// --- END Helper functions
?>
\ No newline at end of file
diff --git a/src/classes/reports/report.eventlog.monilog.class.php b/src/classes/reports/report.eventlog.eventsummary.class.php
similarity index 96%
rename from src/classes/reports/report.eventlog.monilog.class.php
rename to src/classes/reports/report.eventlog.eventsummary.class.php
index aaafec3..2163e89 100644
--- a/src/classes/reports/report.eventlog.monilog.class.php
+++ b/src/classes/reports/report.eventlog.eventsummary.class.php
@@ -5,7 +5,7 @@
* ----------------------------------------------------------------- *
* Some constants *
* *
- * Monilog Report is a basic report for EventLog and Syslog data
+ * Eventsummary Report is a basic report for EventLog
*
* \version 1.0.0 Init Version
* *
@@ -45,13 +45,13 @@ if ( !defined('IN_PHPLOGCON') )
require_once($gl_root_path . 'classes/reports/report.class.php');
// ---
-class Report_monilog extends Report {
+class Report_eventsummary extends Report {
// Common Properties
- public $_reportVersion = 1; // Internally Version of the ReportEngine
- public $_reportID = "report.eventlog.monilog.class"; // ID for the report, needs to be unique!
- public $_reportFileBasicName = "report.eventlog.monilog"; // Basic Filename for reportfiles
- public $_reportTitle = "EventLog Summary Report"; // Display name for the report
- public $_reportDescription = "This is a EventLog Summary Report based on Monilog";
+ public $_reportVersion = 1; // Internally Version of the ReportEngine
+ public $_reportID = "report.eventlog.eventsummary.class"; // ID for the report, needs to be unique!
+ public $_reportFileBasicName = "report.eventlog.eventsummary"; // Basic Filename for reportfiles
+ public $_reportTitle = "EventLog Summary Report"; // Display name for the report
+ public $_reportDescription = "This is a EventLog Summary Report";
public $_reportHelpArticle = "";
public $_reportNeedsInit = false; // True means that this report needs additional init stuff
public $_reportInitialized = false; // True means report is installed
@@ -62,7 +62,7 @@ class Report_monilog extends Report {
private $_colorThreshold = 10; // Threshold for coloured display of Eventcounter
// Constructor
- public function Report_monilog() {
+ public function Report_eventsummary() {
// $this->_logStreamConfigObj = $streamConfigObj;
// Fill fields we need for this report
diff --git a/src/classes/reports/report.eventlog.monilog/report.eventlog.monilog.css b/src/classes/reports/report.eventlog.eventsummary/report.eventlog.eventsummary.css
similarity index 100%
rename from src/classes/reports/report.eventlog.monilog/report.eventlog.monilog.css
rename to src/classes/reports/report.eventlog.eventsummary/report.eventlog.eventsummary.css
diff --git a/src/classes/reports/report.eventlog.monilog/report.eventlog.monilog.lang.en.php b/src/classes/reports/report.eventlog.eventsummary/report.eventlog.eventsummary.lang.en.php
similarity index 100%
rename from src/classes/reports/report.eventlog.monilog/report.eventlog.monilog.lang.en.php
rename to src/classes/reports/report.eventlog.eventsummary/report.eventlog.eventsummary.lang.en.php
diff --git a/src/classes/reports/report.eventlog.monilog/report.eventlog.monilog.template.html b/src/classes/reports/report.eventlog.eventsummary/report.eventlog.eventsummary.template.html
similarity index 100%
rename from src/classes/reports/report.eventlog.monilog/report.eventlog.monilog.template.html
rename to src/classes/reports/report.eventlog.eventsummary/report.eventlog.eventsummary.template.html
diff --git a/src/classes/reports/report.eventlog.monilog/report.eventlog.monilog.template.pdf b/src/classes/reports/report.eventlog.eventsummary/report.eventlog.eventsummary.template.pdf
similarity index 100%
rename from src/classes/reports/report.eventlog.monilog/report.eventlog.monilog.template.pdf
rename to src/classes/reports/report.eventlog.eventsummary/report.eventlog.eventsummary.template.pdf
diff --git a/src/images/icons/documents.png b/src/images/icons/documents.png
new file mode 100644
index 0000000..dccd69c
Binary files /dev/null and b/src/images/icons/documents.png differ
diff --git a/src/images/icons/windows.png b/src/images/icons/windows.png
new file mode 100644
index 0000000..6f2b2fe
Binary files /dev/null and b/src/images/icons/windows.png differ
diff --git a/src/include/functions_common.php b/src/include/functions_common.php
index 7e4981e..4c1750f 100644
--- a/src/include/functions_common.php
+++ b/src/include/functions_common.php
@@ -691,6 +691,9 @@ function InitFrontEndVariables()
$content['MENU_TRASH'] = $content['BASEPATH'] . "images/icons/garbage_empty.png";
$content['MENU_REPORTS'] = $content['BASEPATH'] . "images/icons/document_chart.png";
$content['MENU_CHARTPRESENTATION'] = $content['BASEPATH'] . "images/icons/presentation_chart.png";
+ $content['MENU_NETDOWNLOAD'] = $content['BASEPATH'] . "images/icons/download.png";
+ $content['MENU_DOCUMENTLIST'] = $content['BASEPATH'] . "images/icons/documents.png";
+ $content['MENU_WINDOWLIST'] = $content['BASEPATH'] . "images/icons/windows.png";
$content['MENU_PAGER_BEGIN'] = $content['BASEPATH'] . "images/icons/media_beginning.png";
$content['MENU_PAGER_PREVIOUS'] = $content['BASEPATH'] . "images/icons/media_rewind.png";
diff --git a/src/lang/en/admin.php b/src/lang/en/admin.php
index c72b9ea..fa267ff 100644
--- a/src/lang/en/admin.php
+++ b/src/lang/en/admin.php
@@ -437,6 +437,10 @@ $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_'] = "";
$content['LN_REPORTS_'] = "";
$content['LN_REPORTS_'] = "";
$content['LN_REPORTS_'] = "";
diff --git a/src/templates/admin/admin_reports.html b/src/templates/admin/admin_reports.html
index 66e2fdc..a96a425 100644
--- a/src/templates/admin/admin_reports.html
+++ b/src/templates/admin/admin_reports.html
@@ -15,12 +15,21 @@
- {LN_ADMINMENU_REEPORTSOPT} |
+ {LN_ADMINMENU_REEPORTSOPT}{OPTIONAL_TITLE} |
+
+
-
-
+
+
-
+
+
+
+
+
+
+
+ {reportid} |
+ {reportname} |
+ {reportdescription} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
-
-
+
{LN_GEN_ERRORRETURNPREV}
@@ -176,7 +216,7 @@
- |