backup restoration 90% completed

This commit is contained in:
Serghey Rodin 2013-03-28 01:12:57 +02:00
commit 65db51189c
16 changed files with 330 additions and 99 deletions

View file

@ -2,7 +2,7 @@
<tr>
<td style="padding: 2px 0 0 6px">
<div class="submenu-button-block">
<button class="submenu-button" onclick="location.href='/add/backup/'"> <?php print _('Create Backup');?> </button>
<button class="submenu-button" onclick="location.href='/schedule/backup/'"> <?php print _('Create Backup');?> </button>
</div>
<div class="submenu-search-block">
<form action="/search/" method="get">
@ -14,8 +14,8 @@
<form action="/bulk/backup/" 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><?php print _('apply to selected');?></option>
<option><?php print _('delete');?></option>
<option value=""><?php print _('apply to selected');?></option>
<option value="delete"><?php print _('delete');?></option>
</select>
<input type="submit" name="ok" value="" class="submenu-button" style="width: 36px;">
</div>
@ -61,11 +61,16 @@
$dns = _('no');
$mail = _('no');
$db = _('no');
$cron = _('no');
$udir = _('no');
if (!empty($data[$key]['WEB'])) $web = _('yes').' ¨';
if (!empty($data[$key]['DNS'])) $dns = _('yes').' ¨';
if (!empty($data[$key]['MAIL'])) $mail = _('yes').' ¨';
if (!empty($data[$key]['DB'])) $db = _('yes').' ¨';
if (!empty($data[$key]['CRON'])) $cron = _('yes').' ¨';
if (!empty($data[$key]['UDIR'])) $udir = _('yes').' ¨';
?>
<tr class="data-row">
@ -127,16 +132,6 @@
</td>
<td style="vertical-align:top;" width="250">
<table>
<tr>
<td class="counter-name" width="48">
<?php print _('SYS');?>:
</td>
<td>
<a class="counter-value" title="<?php echo $data[$key]['VESTA'] ?>">
<?php echo _($data[$key]['VESTA']) ?>
</a>
</td>
</tr>
<tr>
<td class="counter-name" width="48">
<?php print _('WEB');?>:
@ -157,10 +152,6 @@
</a>
</td>
</tr>
</table>
</td>
<td rowspan=4 style="vertical-align:top;" width="300">
<table>
<tr>
<td class="counter-name" width="48">
<?php print _('MAIL');?>:
@ -171,8 +162,12 @@
</a>
</td>
</tr>
</table>
</td>
<td rowspan=4 style="vertical-align:top;" width="300">
<table>
<tr>
<td class="counter-name" width="48">
<td class="counter-name" width="90">
<?php print _('DB');?>:
</td>
<td>
@ -182,15 +177,26 @@
</td>
</tr>
<tr>
<td class="counter-name" width="48">
<td class="counter-name" width="90">
<?php print _('CRON');?>:
</td>
<td>
<a class="counter-value" title="<?php echo $data[$key]['CRON'] ?>">
<?php echo _($data[$key]['CRON']) ?>
<?php echo $cron ?>
</a>
</td>
</tr>
<tr>
<td class="counter-name" width="90">
<?php print _('USER DIRS');?>:
</td>
<td>
<a class="counter-value" title="<?php echo str_replace(',', ', ', $data[$key]['UDIR']) ?>">
<?php echo $udir ?>
</a>
</td>
</tr>
</table>
</td>
</tr>

View file

@ -2,7 +2,7 @@
<tr>
<td style="padding: 2px 0 0 6px">
<div class="submenu-button-block">
<button class="submenu-button" onclick="location.href='/add/backup/'"> <?php print _('Restore All');?> </button>
<button class="submenu-button" onclick="location.href='/schedule/restore/'"> <?php print _('Restore All');?> </button>
</div>
<div class="submenu-search-block">
<form action="/search/" method="get">
@ -11,16 +11,17 @@
</form>
</div>
<div class="submenu-select-block">
<form action="/bulk/backup/" method="post" id="objects">
<form action="/bulk/restore/" 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><?php print _('apply to selected');?></option>
<option><?php print _('delete');?></option>
<option value=""><?php print _('apply to selected');?></option>
<option value="restore"><?php print _('restore');?></option>
</select>
<input type="hidden" name="backup" value="<?php echo $_GET['backup'] ?>">
<input type="submit" name="ok" value="" class="submenu-button" style="width: 36px;">
</div>
<?php
if (!empty($_SESSION['backup_msg'])) {
if (!empty($_SESSION['restore_msg'])) {
?>
<div>
<script type="text/javascript">
@ -37,11 +38,11 @@
});
</script>
<div id="dialog-message" title="<?php print _('Backup System') ?>">
<p><?php echo $_SESSION['backup_msg'] ?></p>
<p><?php echo $_SESSION['restore_msg'] ?></p>
</div>
</div>
<?php
unset($_SESSION['backup_msg']);
unset($_SESSION['restore_msg']);
}
?>
</td>
@ -63,55 +64,22 @@
<div style="height:10px; font-size:0;"></div>
<table class="data">
<?php
$backup = $_GET['backup'];
if (!empty($data[$backup]['VESTA'])) {
?>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="backup[]" value="<?php echo $key ?>" ></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<a href="#" id="restore_link_<?php echo "$i"?>" class="data-controls">
<span>
<img src="/images/restore.png" width="6px" height="8px">
<?php print _('restore');?>
</span>
</a>
<table class="data-col2" width="830px">
<tr>
<td class="cron" style="width: 170px; font-size: 14px;">
<?php echo _('sys') ?>
</td>
<td class="domain" style="padding: 0 0 0 4px;">
<b><?php echo _('user data') ?></b>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
?>
<?php
$web = explode(',',$data[$backup]['WEB']);
foreach ($web as $key) {
if (!empty($key)) {
?>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="backup[]" value="<?php echo $key ?>" ></td></tr>
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="web[]" value="<?php echo $key ?>" ></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<a href="#" id="restore_link_<?php echo "$i"?>" class="data-controls">
<a href="/schedule/restore/?backup=<?php echo $backup ?>&type=web&object=<?php echo $key ?>" class="data-controls">
<span>
<img src="/images/restore.png" width="6px" height="8px">
<?php print _('restore');?>
@ -120,7 +88,7 @@
<table class="data-col2" width="830px">
<tr>
<td class="cron" style="width: 170px; font-size: 14px;">
<?php echo 'web ' . _('domain') ?>
<?php echo 'web ' . _('domain') ?>
</td>
<td class="domain" style="padding: 0 0 0 4px;">
<b><?php echo $key ?></b>
@ -131,22 +99,24 @@
</tr>
<?php
}
}
?>
<?php
$dns = explode(',',$data[$backup]['DNS']);
foreach ($dns as $key) {
if (!empty($key)) {
?>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="backup[]" value="<?php echo $key ?>" ></td></tr>
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="dns[]" value="<?php echo $key ?>" ></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<a href="#" id="restore_link_<?php echo "$i"?>" class="data-controls">
<a href="/schedule/restore/?backup=<?php echo $backup ?>&type=dns&object=<?php echo $key ?>" class="data-controls">
<span>
<img src="/images/restore.png" width="6px" height="8px">
<?php print _('restore');?>
@ -166,22 +136,24 @@
</tr>
<?php
}
}
?>
<?php
$mail = explode(',',$data[$backup]['MAIL']);
foreach ($mail as $key) {
if (!empty($key)) {
?>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="backup[]" value="<?php echo $key ?>" ></td></tr>
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="mail[]" value="<?php echo $key ?>" ></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<a href="#" id="restore_link_<?php echo "$i"?>" class="data-controls">
<a href="/schedule/restore/?backup=<?php echo $backup ?>&type=mail&object=<?php echo $key ?>" class="data-controls">
<span>
<img src="/images/restore.png" width="6px" height="8px">
<?php print _('restore');?>
@ -201,22 +173,24 @@
</tr>
<?php
}
}
?>
<?php
$db = explode(',',$data[$backup]['DB']);
foreach ($db as $key) {
if (!empty($key)) {
?>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="backup[]" value="<?php echo $key ?>" ></td></tr>
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="db[]" value="<?php echo $key ?>" ></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<a href="#" id="restore_link_<?php echo "$i"?>" class="data-controls">
<a href="/schedule/restore/?backup=<?php echo $backup ?>&type=db&object=<?php echo $key ?>" class="data-controls">
<span>
<img src="/images/restore.png" width="6px" height="8px">
<?php print _('restore');?>
@ -236,22 +210,24 @@
</tr>
<?php
}
}
?>
<?php
$backup = $_GET['backup'];
if (!empty($data[$backup]['CRON'])) {
if (!empty($key)) {
?>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="backup[]" value="<?php echo $key ?>" ></td></tr>
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="cron[]" value="<?php echo 'yes' ?>" ></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<a href="#" id="restore_link_<?php echo "$i"?>" class="data-controls">
<a href="/schedule/restore/?backup=<?php echo $backup ?>&type=cron&object=records" class="data-controls">
<span>
<img src="/images/restore.png" width="6px" height="8px">
<?php print _('restore');?>
@ -271,6 +247,44 @@
</tr>
<?php
}
}
?>
<?php
$udir = explode(',',$data[$backup]['UDIR']);
foreach ($udir as $key) {
if (!empty($key)) {
?>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="udir[]" value="<?php echo $key ?>" ></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<a href="/schedule/restore/?backup=<?php echo $backup ?>&type=udir&object=<?php echo $key ?>" class="data-controls">
<span>
<img src="/images/restore.png" width="6px" height="8px">
<?php print _('restore');?>
</span>
</a>
<table class="data-col2" width="830px">
<tr>
<td class="cron" style="width: 170px; font-size: 14px;">
<?php echo _('user dir') ?>
</td>
<td class="domain" style="padding: 0 0 0 4px;">
<b><?php echo $key ?></b>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
}
?>