diff --git a/src/images/icons/export1.png b/src/images/icons/export1.png
new file mode 100644
index 0000000..113a7cd
Binary files /dev/null and b/src/images/icons/export1.png differ
diff --git a/src/include/constants_general.php b/src/include/constants_general.php
index aa71f89..0a68e27 100644
--- a/src/include/constants_general.php
+++ b/src/include/constants_general.php
@@ -69,6 +69,14 @@ define('SOURCE_DB', '2');
define('SOURCE_PDO', '3');
// ---
+// --- Exportformat defines
+define('EXPORT_CVS', 'CVS');
+define('EXPORT_XML', 'XML');
+define('EXPORT_EXCEL', 'EXCEL');
+define('EXPORT_PDF', 'PDF');
+define('EXPORT_HTML', 'HTML');
+// ---
+
// ---
define('UID_UNKNOWN', -1);
// ---
diff --git a/src/include/functions_common.php b/src/include/functions_common.php
index f4c227a..a8504a3 100644
--- a/src/include/functions_common.php
+++ b/src/include/functions_common.php
@@ -175,6 +175,9 @@ function InitPhpLogCon()
// Init predefined reload times
CreateReloadTimesList();
+ // Init predefined reload times
+ CreateExportFormatList();
+
// --- Enable PHP Debug Mode
InitPhpDebugMode();
// ---
@@ -325,6 +328,23 @@ function CreateReloadTimesList()
}
+function CreateExportFormatList()
+{
+ global $content;
+
+ // Add basic formats!
+ $content['EXPORTTYPES'][EXPORT_CVS] = array( "ID" => EXPORT_CVS, "Selected" => "", "DisplayName" => $content['LN_GEN_EXPORT_CVS'] );
+ $content['EXPORTTYPES'][EXPORT_HTML] = array( "ID" => EXPORT_HTML, "Selected" => "", "DisplayName" => $content['LN_GEN_EXPORT_HTML'] );
+ $content['EXPORTTYPES'][EXPORT_EXCEL] = array( "ID" => EXPORT_EXCEL, "Selected" => "", "DisplayName" => $content['LN_GEN_EXPORT_EXCEL'] );
+
+ // Add formats by loaded extensions
+ if ( $content['XML_IS_ENABLED'] )
+ $content['EXPORTTYPES'][EXPORT_XML] = array( "ID" => EXPORT_XML, "Selected" => "", "DisplayName" => $content['LN_GEN_EXPORT_XML'] );
+ if ( $content['PDF_IS_ENABLED'] )
+ $content['EXPORTTYPES'][EXPORT_PDF] = array( "ID" => EXPORT_PDF, "Selected" => "", "DisplayName" => $content['LN_GEN_EXPORT_PDF'] );
+
+}
+
function CreatePredefinedSearches()
{
global $CFG, $content;
@@ -367,13 +387,49 @@ function InitPhpDebugMode()
function CheckAndSetRunMode()
{
- global $RUNMODE, $MaxExecutionTime;
+ global $content, $RUNMODE, $MaxExecutionTime;
// Set to command line mode if argv is set!
if ( !isset($_SERVER["GATEWAY_INTERFACE"]) )
$RUNMODE = RUNMODE_COMMANDLINE;
// Obtain max_execution_time
$MaxExecutionTime = ini_get("max_execution_time");
+
+ // --- Check necessary PHP Extensions!
+ $loadedExtensions = get_loaded_extensions();
+
+ // Check for GD libary
+ if ( in_array("gd", $loadedExtensions) )
+ $content['GD_IS_ENABLED'] = true;
+ else
+ $content['GD_IS_ENABLED'] = false;
+
+ // Check MYSQL Extension
+ 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 XML Extension
+ if ( in_array("xml", $loadedExtensions) )
+ $content['XML_IS_ENABLED'] = true;
+ else
+ $content['XML_IS_ENABLED'] = false;
+ // ---
+
+ // Check PDF Extension
+ if ( in_array("pdf", $loadedExtensions) )
+ $content['PDF_IS_ENABLED'] = true;
+ else
+ $content['PDF_IS_ENABLED'] = false;
+ // ---
}
function InitRuntimeInformations()
@@ -448,7 +504,8 @@ function InitFrontEndVariables()
$content['MENU_MAXIMIZE'] = $content['BASEPATH'] . "images/icons/table_selection_all.png";
$content['MENU_NORMAL'] = $content['BASEPATH'] . "images/icons/table_selection_block.png";
$content['MENU_USEROPTIONS'] = $content['BASEPATH'] . "images/icons/businessman_preferences.png";
-
+ $content['MENU_EXPORT'] = $content['BASEPATH'] . "images/icons/export1.png";
+
$content['MENU_PAGER_BEGIN'] = $content['BASEPATH'] . "images/icons/media_beginning.png";
$content['MENU_PAGER_PREVIOUS'] = $content['BASEPATH'] . "images/icons/media_rewind.png";
$content['MENU_PAGER_NEXT'] = $content['BASEPATH'] . "images/icons/media_fast_forward.png";
diff --git a/src/index.php b/src/index.php
index ba0f4a4..0b2c0a3 100644
--- a/src/index.php
+++ b/src/index.php
@@ -86,6 +86,8 @@ else
$content['skipone'] = false;
// ---
+// Init Export Stuff!
+$content['EXPORT_ENABLED'] = true;
// Init Pager variables
// $content['uid_previous'] = UID_UNKNOWN;
diff --git a/src/lang/en/main.php b/src/lang/en/main.php
index 5ff580f..eeeb968 100644
--- a/src/lang/en/main.php
+++ b/src/lang/en/main.php
@@ -60,7 +60,6 @@ $content['LN_GEN_SELECTVIEW'] = "Select View";
$content['LN_GEN_CRITERROR_UNKNOWNTYPE'] = "The source type '%1' is not supported by phpLogCon yet. This is a critical error, please fix your configuration.";
$content['LN_GEN_ERRORRETURNPREV'] = "Click here to return to the previous site.";
$content['LN_GEN_ERRORDETAILS'] = "Error Details:";
-
$content['LN_SOURCES_ERROR_WITHINSOURCE'] = "The source '%1' checking returned with an error:
%2";
$content['LN_SOURCES_ERROR_EXTRAMSG'] = "Extra Error Details:
%1";
$content['LN_ERROR_NORECORDS'] = "No syslog records found";
@@ -80,6 +79,13 @@ $content['LN_ERROR_DB_NOPROPERTIES'] = "No database properties found";
$content['LN_ERROR_DB_INVALIDDBMAPPING'] = "Invalid datafield mappings";
$content['LN_ERROR_DB_INVALIDDBDRIVER'] = "Invalid database driver selected";
$content['LN_ERROR_DB_TABLENOTFOUND'] = "Could not find the configured table, maybe misspelled or the tablenames are case sensitive";
+ $content['LN_GEN_SELECTEXPORT'] = "Select to Export";
+ $content['LN_GEN_EXPORT_CVS'] = "CVS (Comma separated)";
+ $content['LN_GEN_EXPORT_HTML'] = "HTML";
+ $content['LN_GEN_EXPORT_XML'] = "XML";
+ $content['LN_GEN_EXPORT_PDF'] = "PDF";
+ $content['LN_GEN_EXPORT_EXCEL'] = "Excel";
+
// Topmenu Entries
$content['LN_MENU_SEARCH'] = "Search";
diff --git a/src/templates/index.html b/src/templates/index.html
index c531566..75db873 100644
--- a/src/templates/index.html
+++ b/src/templates/index.html
@@ -89,12 +89,34 @@
- Recent syslog messages |
+ Recent syslog messages |
+
+
+
+ |
+
+
{LN_GEN_PAGE} {main_currentpagenumber}
@@ -109,8 +131,7 @@
-
- | |