diff --git a/src/admin/reports.php b/src/admin/reports.php index 5b6316d..f1cf524 100644 --- a/src/admin/reports.php +++ b/src/admin/reports.php @@ -326,11 +326,14 @@ if ( isset($_GET['op']) ) // Init other outputTarget properties $content['outputTarget_filename'] = ""; + + // Create visible CronCommand + $content['cronCommand'] = CreateCronCommand( null ); // Other settings ... TODO! // $content['customFilters'] = ""; // $content['outputTarget'] = ""; - $content['scheduleSettings'] = ""; +// $content['scheduleSettings'] = ""; } else { @@ -410,6 +413,9 @@ if ( isset($_GET['op']) ) $content['outputTarget_filename'] = ""; InitOutputtargetDefinitions($myReport, $mySavedReport['outputTargetDetails']); + // Create visible CronCommand + $content['cronCommand'] = CreateCronCommand( $mySavedReport ); + // Other settings ... TODO! // $content['customFilters'] = ""; // $content['outputTarget'] = ""; @@ -1172,6 +1178,30 @@ function InitOutputtargetDefinitions($myReport, $outputTargetDetails) } } +function CreateCronCommand( $mySavedReport ) +{ + global $content; + + //echo $_SERVER['SERVER_SOFTWARE']; + $pos = strpos( strtoupper($_SERVER['SERVER_SOFTWARE']), "WIN32"); + if ($pos !== false) + { + // Running on Windows + $phpCmd = "C:/php/php.exe"; + } + else + { + // Running on LINUX + $phpCmd = "/usr/bin/php"; + } + + $content['enableCronCommand'] = false; + + $szresult = ""; + + return $szresult; +} + // --- END Helper functions ?> \ No newline at end of file diff --git a/src/cron/cmdreportgen.php b/src/cron/cmdreportgen.php index 76d2e1f..7231dc9 100644 --- a/src/cron/cmdreportgen.php +++ b/src/cron/cmdreportgen.php @@ -161,7 +161,7 @@ function RunReport() // Check if exists if ( !isset($content['REPORTS'][ $content['reportid'] ]) ) - DieWithErrorMsg( GetAndReplaceLangStr($content["LN_CMD_LOGSTREAMNOTFOUND"], $content['reportid']) ); + DieWithErrorMsg( GetAndReplaceLangStr($content["LN_CMD_REPORTIDNOTFOUND"], $content['reportid']) ); // Get Reference to report! $myReport = $content['REPORTS'][ $content['reportid'] ]; @@ -177,7 +177,7 @@ function RunReport() // Check if exists if ( !isset($myReport['SAVEDREPORTS'][ $content['savedreportid'] ]) ) - DieWithErrorMsg( GetAndReplaceLangStr($content["LN_CMD_LOGSTREAMNOTFOUND"], $content['savedreportid']) ); + DieWithErrorMsg( GetAndReplaceLangStr($content["LN_CMD_SAVEDREPORTIDNOTFOUND"], $content['savedreportid']) ); } else DieWithErrorMsg( $content["LN_CMD_NOSAVEDREPORTID"] ); diff --git a/src/lang/en/main.php b/src/lang/en/main.php index 4969ae1..9339ee2 100644 --- a/src/lang/en/main.php +++ b/src/lang/en/main.php @@ -352,4 +352,11 @@ $content['LN_ORACLE_WHOIS'] = "WHOIS Lookup for '%1' value '%2'"; $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"; + + ?> \ No newline at end of file diff --git a/src/templates/admin/admin_reports.html b/src/templates/admin/admin_reports.html index 3742c15..66e2fdc 100644 --- a/src/templates/admin/admin_reports.html +++ b/src/templates/admin/admin_reports.html @@ -304,6 +304,12 @@ + + + + + +
{LN_REPORTS_CRONCMD}