mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 21:04:06 -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;
|
break;
|
||||||
case 'unsuspend': $cmd='v-unsuspend-cron-job';
|
case 'unsuspend': $cmd='v-unsuspend-cron-job';
|
||||||
break;
|
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;
|
default: header("Location: /list/cron/"); exit;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
case 'delete': $cmd='v-delete-cron-job';
|
case 'delete': $cmd='v-delete-cron-job';
|
||||||
break;
|
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;
|
default: header("Location: /list/cron/"); exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text input-label">
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text input-label">
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text input-label">
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -15,25 +15,29 @@
|
||||||
<a class="submenu-select-link" href='javascript:checkedAll("objects");'> <?php print __('toggle all');?> </a>
|
<a class="submenu-select-link" href='javascript:checkedAll("objects");'> <?php print __('toggle all');?> </a>
|
||||||
<select class="submenu-select-dropdown" name="action">
|
<select class="submenu-select-dropdown" name="action">
|
||||||
<option value=""><?php print __('apply to selected');?></option>
|
<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="suspend"><?php print __('suspend');?></option>
|
||||||
<option value="unsuspend"><?php print __('unsuspend');?></option>
|
<option value="unsuspend"><?php print __('unsuspend');?></option>
|
||||||
<option value="delete"><?php print __('delete');?></option>
|
<option value="delete"><?php print __('delete');?></option>
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" name="ok" value="›" class="submenu-button-select">
|
<input type="submit" name="ok" value="›" class="submenu-button-select">
|
||||||
</div>
|
</div>
|
||||||
|
<?php if ($panel[$user]['LANGUAGE'] == 'en') { ?>
|
||||||
<div class="submenu-select-block">
|
<div class="submenu-select-block">
|
||||||
<?php
|
<?php
|
||||||
if($panel[$user]['CRON_REPORTS'] == 'yes') {
|
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
|
<?php
|
||||||
} else {
|
} 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
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
<?php display_error_block(); ?>
|
<?php display_error_block(); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
<div class="data-count">
|
<div class="data-count">
|
||||||
<?php
|
<?php
|
||||||
if ( $i == 0) {
|
if ( $i == 0) {
|
||||||
echo __('There is no currently banned IP addresses');
|
echo __('There are no currently banned IP');
|
||||||
}
|
}
|
||||||
if ( $i == 1) {
|
if ( $i == 1) {
|
||||||
echo __('1 IP address');
|
echo __('1 IP address');
|
||||||
|
|
|
@ -15,23 +15,27 @@
|
||||||
<a class="submenu-select-link" href='javascript:checkedAll("objects");'> <?php print __('toggle all');?> </a>
|
<a class="submenu-select-link" href='javascript:checkedAll("objects");'> <?php print __('toggle all');?> </a>
|
||||||
<select class="submenu-select-dropdown" name="action">
|
<select class="submenu-select-dropdown" name="action">
|
||||||
<option value=""><?php print __('apply to selected');?></option>
|
<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>
|
<option value="delete"><?php print __('delete');?></option>
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" name="ok" value="›" class="submenu-button-select">
|
<input type="submit" name="ok" value="›" class="submenu-button-select">
|
||||||
</div>
|
</div>
|
||||||
|
<?php if ($panel[$user]['LANGUAGE'] == 'en') { ?>
|
||||||
<div class="submenu-select-block">
|
<div class="submenu-select-block">
|
||||||
<?php
|
<?php
|
||||||
if($panel[$user]['CRON_REPORTS'] == 'yes') {
|
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
|
<?php
|
||||||
} else {
|
} 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
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
<?php display_error_block(); ?>
|
<?php display_error_block(); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue