mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 21:34:12 -07:00
delete backup exclusions
This commit is contained in:
parent
5edb660eb9
commit
a85aa52b22
5 changed files with 132 additions and 4 deletions
23
web/bulk/backup/exclusions/index.php
Normal file
23
web/bulk/backup/exclusions/index.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
ob_start();
|
||||
session_start();
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
$backup = $_POST['system'];
|
||||
$action = $_POST['action'];
|
||||
|
||||
switch ($action) {
|
||||
case 'delete': $cmd='v-delete-user-backup-exclusions';
|
||||
break;
|
||||
default: header("Location: /list/backup/exclusions"); exit;
|
||||
}
|
||||
|
||||
foreach ($backup as $value) {
|
||||
$value = escapeshellarg($value);
|
||||
exec (VESTA_CMD.$cmd." ".$user." ".$value, $output, $return_var);
|
||||
}
|
||||
|
||||
header("Location: /list/backup/exclusions");
|
27
web/delete/backup/exclusion/index.php
Normal file
27
web/delete/backup/exclusion/index.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
ob_start();
|
||||
session_start();
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
if (($_SESSION['user'] == 'admin') && (!empty($_GET['user']))) {
|
||||
$user=$_GET['user'];
|
||||
}
|
||||
|
||||
if (!empty($_GET['system'])) {
|
||||
$v_username = escapeshellarg($user);
|
||||
$v_system = escapeshellarg($_GET['system']);
|
||||
exec (VESTA_CMD."v-delete-user-backup-exclusions ".$v_username." ".$v_system, $output, $return_var);
|
||||
}
|
||||
check_return_code($return_var,$output);
|
||||
unset($output);
|
||||
|
||||
$back = $_SESSION['back'];
|
||||
if (!empty($back)) {
|
||||
header("Location: ".$back);
|
||||
exit;
|
||||
}
|
||||
|
||||
header("Location: /list/backup/exclusions/");
|
||||
exit;
|
|
@ -382,6 +382,7 @@ $LANG['en'] = array(
|
|||
'SUSPEND_CRON_CONFIRMATION' => 'Are you sure to suspend cron job?',
|
||||
'UNSUSPEND_CRON_CONFIRMATION' => 'Are you sure to unsuspend cron job?',
|
||||
'DELETE_BACKUP_CONFIRMATION' => 'Are you sure to delete %s backup?',
|
||||
'DELETE_EXCLUSION_CONFIRMATION' => 'Are you sure to delete %s exclusion?',
|
||||
'DELETE_PACKAGE_CONFIRMATION' => 'Are you sure to delete package %s?',
|
||||
'DELETE_IP_CONFIRMATION' => 'Are you sure to delere IP address %s?',
|
||||
'Welcome' => 'Welcome',
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</form>
|
||||
</div>
|
||||
<div class="submenu-select-block">
|
||||
<form action="/bulk/backup/" method="post" id="objects">
|
||||
<form action="/bulk/backup/exclusions/" method="post" id="objects">
|
||||
<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>
|
||||
|
@ -35,7 +35,7 @@
|
|||
<tr class="data-row">
|
||||
<td class="data-dotted">
|
||||
<table class="data-col1">
|
||||
<tr><td><input type="checkbox" class="ch-toggle" name="exclusion[]" value="<?php echo $key ?>" ></td></tr>
|
||||
<tr><td><input type="checkbox" class="ch-toggle" name="system[]" value="<?php echo $key ?>" ></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="data-dotted" width="830px">
|
||||
|
@ -43,9 +43,9 @@
|
|||
<span class="do_delete">
|
||||
<img src="/images/delete.png" width="7px" height="7px">
|
||||
<?php print __('delete');?>
|
||||
<input type="hidden" name="delete_url" value="/delete/backup/exclusion/?excl=<?php echo "$key" ?>" />
|
||||
<input type="hidden" name="delete_url" value="/delete/backup/exclusion/?system=<?php echo "$key" ?>" />
|
||||
<div id="delete_dialog_<?php echo $i ?>" class="confirmation-text-delete hidden" title="<?php print __('Confirmation');?>">
|
||||
<p class="counter-value"><?php print __('DELETE_BACKUP_CONFIRMATION',$key);?></p>
|
||||
<p class="counter-value"><?php print __('DELETE_EXCLUSION_CONFIRMATION',$key);?></p>
|
||||
</div>
|
||||
</span>
|
||||
</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue