From ea050062aee571ba9a9b26bb07bb1032df9768c9 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 20 Oct 2014 13:10:03 +0300 Subject: [PATCH] Cron reporting handler + minor fixes in firewall templates --- web/bulk/cron/index.php | 28 +++++++++++++++++++ web/templates/admin/add_firewall.html | 2 +- web/templates/admin/add_firewall_banlist.html | 2 +- web/templates/admin/edit_firewall.html | 2 +- web/templates/admin/list_cron.html | 8 ++++-- .../admin/list_firewall_banlist.html | 2 +- web/templates/user/list_cron.html | 8 ++++-- 7 files changed, 44 insertions(+), 8 deletions(-) diff --git a/web/bulk/cron/index.php b/web/bulk/cron/index.php index 3798b06cb..2f08fed5f 100644 --- a/web/bulk/cron/index.php +++ b/web/bulk/cron/index.php @@ -17,12 +17,40 @@ if ($_SESSION['user'] == 'admin') { break; case 'unsuspend': $cmd='v-unsuspend-cron-job'; break; + case 'delete-cron-reports': $cmd='v-delete-cron-reports'; + exec (VESTA_CMD.$cmd." ".$user, $output, $return_var); + $_SESSION['error_msg'] = __('Cronjob email reporting has been successfully diabled'); + unset($output); + header("Location: /list/cron/"); + exit; + break; + case 'add-cron-reports': $cmd='v-add-cron-reports'; + exec (VESTA_CMD.$cmd." ".$user, $output, $return_var); + $_SESSION['error_msg'] = __('Cronjob email reporting has been successfully enabled'); + unset($output); + header("Location: /list/cron/"); + exit; + break; default: header("Location: /list/cron/"); exit; } } else { switch ($action) { case 'delete': $cmd='v-delete-cron-job'; break; + case 'delete-cron-reports': $cmd='v-delete-cron-reports'; + exec (VESTA_CMD.$cmd." ".$user, $output, $return_var); + $_SESSION['error_msg'] = __('Cronjob email reporting has been successfully diabled'); + unset($output); + header("Location: /list/cron/"); + exit; + break; + case 'add-cron-reports': $cmd='v-add-cron-reports'; + exec (VESTA_CMD.$cmd." ".$user, $output, $return_var); + $_SESSION['error_msg'] = __('Cronjob email reporting has been successfully enabled'); + unset($output); + header("Location: /list/cron/"); + exit; + break; default: header("Location: /list/cron/"); exit; } } diff --git a/web/templates/admin/add_firewall.html b/web/templates/admin/add_firewall.html index eb7b795c2..3df119381 100644 --- a/web/templates/admin/add_firewall.html +++ b/web/templates/admin/add_firewall.html @@ -85,7 +85,7 @@ - () + () diff --git a/web/templates/admin/add_firewall_banlist.html b/web/templates/admin/add_firewall_banlist.html index 0da1a58be..9f8a6fd56 100644 --- a/web/templates/admin/add_firewall_banlist.html +++ b/web/templates/admin/add_firewall_banlist.html @@ -64,7 +64,7 @@ - () + () diff --git a/web/templates/admin/edit_firewall.html b/web/templates/admin/edit_firewall.html index 9c7fa3716..87fd798bf 100644 --- a/web/templates/admin/edit_firewall.html +++ b/web/templates/admin/edit_firewall.html @@ -90,7 +90,7 @@ - () + () diff --git a/web/templates/admin/list_cron.html b/web/templates/admin/list_cron.html index d07400c21..7ac971907 100644 --- a/web/templates/admin/list_cron.html +++ b/web/templates/admin/list_cron.html @@ -15,25 +15,29 @@ + + diff --git a/web/templates/admin/list_firewall_banlist.html b/web/templates/admin/list_firewall_banlist.html index 8b2ce48cd..42ab7203f 100644 --- a/web/templates/admin/list_firewall_banlist.html +++ b/web/templates/admin/list_firewall_banlist.html @@ -75,7 +75,7 @@
+ +