mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 13:01:52 -07:00
Cron reporting handler + minor fixes in firewall templates
This commit is contained in:
parent
66ea0b3f98
commit
ea050062ae
7 changed files with 44 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('IP Address');?> <span class="optional">(<?php print __('CDIR format is supported');?>)</span>
|
||||
<?php print __('IP address');?> <span class="optional">(<?php print __('CIDR format is supported');?>)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('IP Address');?> <span class="optional">(<?php print __('CDIR format is supported');?>)</span>
|
||||
<?php print __('IP address');?> <span class="optional">(<?php print __('CDIR format is supported');?>)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text input-label">
|
||||
<?php print __('IP Address');?> <span class="optional">(<?php print __('CDIR format is supported');?>)</span>
|
||||
<?php print __('IP address');?> <span class="optional">(<?php print __('CIDR format is supported');?>)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -15,25 +15,29 @@
|
|||
<a class="submenu-select-link" href='javascript:checkedAll("objects");'> <?php print __('toggle all');?> </a>
|
||||
<select class="submenu-select-dropdown" name="action">
|
||||
<option value=""><?php print __('apply to selected');?></option>
|
||||
<?php if($panel[$user]['CRON_REPORTS'] == 'yes') echo '<option value="delete-cron-reports">'. __('turn off notifications').'</option>'; ?>
|
||||
<?php if($panel[$user]['CRON_REPORTS'] == 'no') echo '<option value="add-cron-reports">'. __('turn on notifications').'</option>'; ?>
|
||||
<option value="suspend"><?php print __('suspend');?></option>
|
||||
<option value="unsuspend"><?php print __('unsuspend');?></option>
|
||||
<option value="delete"><?php print __('delete');?></option>
|
||||
</select>
|
||||
<input type="submit" name="ok" value="›" class="submenu-button-select">
|
||||
</div>
|
||||
<?php if ($panel[$user]['LANGUAGE'] == 'en') { ?>
|
||||
<div class="submenu-select-block">
|
||||
<?php
|
||||
if($panel[$user]['CRON_REPORTS'] == 'yes') {
|
||||
?>
|
||||
<a class="submenu-select-link" href="/delete/cron/reports/">[ <?php print __('disable email reports');?> ]</a>
|
||||
<a class="submenu-select-link" href="/delete/cron/reports/">[ <?php print __('turn off notifications');?> ]</a>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<a class="submenu-select-link" href="/add/cron/reports/">[ <?php print __('enable email reports');?> ]</a>
|
||||
<a class="submenu-select-link" href="/add/cron/reports/">[ <?php print __('turn on notifications');?> ]</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php display_error_block(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
<div class="data-count">
|
||||
<?php
|
||||
if ( $i == 0) {
|
||||
echo __('There is no currently banned IP addresses');
|
||||
echo __('There are no currently banned IP');
|
||||
}
|
||||
if ( $i == 1) {
|
||||
echo __('1 IP address');
|
||||
|
|
|
@ -15,23 +15,27 @@
|
|||
<a class="submenu-select-link" href='javascript:checkedAll("objects");'> <?php print __('toggle all');?> </a>
|
||||
<select class="submenu-select-dropdown" name="action">
|
||||
<option value=""><?php print __('apply to selected');?></option>
|
||||
<?php if($panel[$user]['CRON_REPORTS'] == 'yes') echo '<option value="delete-cron-reports">'. __('turn off notifications').'</option>'; ?>
|
||||
<?php if($panel[$user]['CRON_REPORTS'] == 'no') echo '<option value="add-cron-reports">'. __('turn on notifications').'</option>'; ?>
|
||||
<option value="delete"><?php print __('delete');?></option>
|
||||
</select>
|
||||
<input type="submit" name="ok" value="›" class="submenu-button-select">
|
||||
</div>
|
||||
<?php if ($panel[$user]['LANGUAGE'] == 'en') { ?>
|
||||
<div class="submenu-select-block">
|
||||
<?php
|
||||
if($panel[$user]['CRON_REPORTS'] == 'yes') {
|
||||
?>
|
||||
<a class="submenu-select-link" href="/delete/cron/reports/">[ <?php print __('disable email reports');?> ]</a>
|
||||
<a class="submenu-select-link" href="/delete/cron/reports/">[ <?php print __('turn off notifications');?> ]</a>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<a class="submenu-select-link" href="/add/cron/reports/">[ <?php print __('enable email reports');?> ]</a>
|
||||
<a class="submenu-select-link" href="/add/cron/reports/">[ <?php print __('turn on notifications');?> ]</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php display_error_block(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue