mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 21:34:12 -07:00
dns cluster support
This commit is contained in:
parent
0f7ea97e12
commit
68a34e18b7
47 changed files with 1536 additions and 64 deletions
|
@ -105,7 +105,7 @@ if (!empty($_POST['ok_rec'])) {
|
|||
$_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
|
||||
} else {
|
||||
// Add DNS Record
|
||||
exec (VESTA_CMD."v-add-dns-domain-record ".$user." ".$v_domain." ".$v_rec." ".$v_type." ".$v_val." ".$v_priority, $output, $return_var);
|
||||
exec (VESTA_CMD."v-add-dns-record ".$user." ".$v_domain." ".$v_rec." ".$v_type." ".$v_val." ".$v_priority, $output, $return_var);
|
||||
$v_type = $_POST['v_type'];
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
|
|
|
@ -23,11 +23,11 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
} else {
|
||||
switch ($action) {
|
||||
case 'delete': $cmd='v-delete-dns-domain-record';
|
||||
case 'delete': $cmd='v-delete-dns-record';
|
||||
break;
|
||||
case 'suspend': $cmd='v-suspend-dns-domain-record';
|
||||
case 'suspend': $cmd='v-suspend-dns-record';
|
||||
break;
|
||||
case 'unsuspend': $cmd='v-unsuspend-dns-domain-record';
|
||||
case 'unsuspend': $cmd='v-unsuspend-dns-record';
|
||||
break;
|
||||
default: header("Location: /list/dns/?domain=".$domain); exit;
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
}
|
||||
} else {
|
||||
switch ($action) {
|
||||
case 'delete': $cmd='v-delete-dns-domain-record';
|
||||
case 'delete': $cmd='v-delete-dns-record';
|
||||
break;
|
||||
default: header("Location: /list/dns/?domain=".$domain); exit;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|||
$v_username = escapeshellarg($user);
|
||||
$v_domain = escapeshellarg($_GET['domain']);
|
||||
$v_record_id = escapeshellarg($_GET['record_id']);
|
||||
exec (VESTA_CMD."v-delete-dns-domain-record ".$v_username." ".$v_domain." ".$v_record_id, $output, $return_var);
|
||||
exec (VESTA_CMD."v-delete-dns-record ".$v_username." ".$v_domain." ".$v_record_id, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = __('Error: vesta did not return any output.');
|
||||
|
|
|
@ -152,7 +152,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['record_id']))) {
|
|||
} else {
|
||||
$v_domain = escapeshellarg($_GET['domain']);
|
||||
$v_record_id = escapeshellarg($_GET['record_id']);
|
||||
exec (VESTA_CMD."v-list-dns-domain-records ".$user." ".$v_domain." 'json'", $output, $return_var);
|
||||
exec (VESTA_CMD."v-list-dns-records ".$user." ".$v_domain." 'json'", $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = __('Error code:',$return_var);
|
||||
|
@ -184,7 +184,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['record_id']))) {
|
|||
if (($v_val != $_POST['v_val']) || ($v_priority != $_POST['v_priority']) && (empty($_SESSION['error_msg']))) {
|
||||
$v_val = escapeshellarg($_POST['v_val']);
|
||||
$v_priority = escapeshellarg($_POST['v_priority']);
|
||||
exec (VESTA_CMD."v-change-dns-domain-record ".$v_username." ".$v_domain." ".$v_record_id." ".$v_val." ".$v_priority, $output, $return_var);
|
||||
exec (VESTA_CMD."v-change-dns-record ".$v_username." ".$v_domain." ".$v_record_id." ".$v_val." ".$v_priority, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = __('Error code:',$return_var);
|
||||
|
@ -198,7 +198,7 @@ if ((!empty($_GET['domain'])) && (empty($_GET['record_id']))) {
|
|||
|
||||
if (($_GET['record_id'] != $_POST['v_record_id']) && (empty($_SESSION['error_msg']))) {
|
||||
$v_old_record_id = escapeshellarg($_GET['record_id']);
|
||||
exec (VESTA_CMD."v-change-dns-domain-record-id ".$v_username." ".$v_domain." ".$v_old_record_id." ".$v_record_id, $output, $return_var);
|
||||
exec (VESTA_CMD."v-change-dns-record-id ".$v_username." ".$v_domain." ".$v_old_record_id." ".$v_record_id, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = __('Error code:',$return_var);
|
||||
|
|
|
@ -23,7 +23,7 @@ if (empty($_GET['domain'])){
|
|||
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_dns.html');
|
||||
}
|
||||
} else {
|
||||
exec (VESTA_CMD."v-list-dns-domain-records '".$user."' '".$_GET['domain']."' 'json'", $output, $return_var);
|
||||
exec (VESTA_CMD."v-list-dns-records '".$user."' '".$_GET['domain']."' 'json'", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
$data = array_reverse($data, true);
|
||||
unset($output);
|
||||
|
|
|
@ -35,7 +35,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
$v_username = escapeshellarg($user);
|
||||
$v_domain = escapeshellarg($_GET['domain']);
|
||||
$v_record_id = escapeshellarg($_GET['record_id']);
|
||||
exec (VESTA_CMD."v-suspend-dns-domain-record ".$v_username." ".$v_domain." ".$v_record_id, $output, $return_var);
|
||||
exec (VESTA_CMD."v-suspend-dns-record ".$v_username." ".$v_domain." ".$v_record_id, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = __('Error: vesta did not return any output.');
|
||||
|
|
|
@ -46,8 +46,8 @@
|
|||
<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" class="ch-toggle" name="domain[]" value="<?php echo "$key" ?>" ></td></tr>
|
||||
<tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo strftime("%d %b %Y", strtotime($data[$key]['DATE'])) ?></td></tr>
|
||||
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" class="ch-toggle" name="domain[]" value="<?php echo "$key" ?>" > </td></tr>
|
||||
<tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo strftime("%d %b %Y", strtotime($data[$key]['DATE'])) ?></a></td></tr>
|
||||
<tr><td class="data-<?php echo $status ?>"><b><?php echo __($status) ?></b></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
|
@ -100,10 +100,15 @@
|
|||
<td style="vertical-align:top;" >
|
||||
<table>
|
||||
<tr>
|
||||
<td class="counter-name" style="padding: 2px 0 0 2px;">
|
||||
<td class="counter-name" style="padding: 0 0 0 2px;">
|
||||
<?php echo $data[$key]['IP'] ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="counter-name" style="padding: 0 0 0 2px;">
|
||||
<?php print $data[$key]['SRC'] ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="vertical-align:top;" width="270">
|
||||
|
|
|
@ -35,7 +35,7 @@ if ($_SESSION['user'] == 'admin') {
|
|||
$v_username = escapeshellarg($user);
|
||||
$v_domain = escapeshellarg($_GET['domain']);
|
||||
$v_record_id = escapeshellarg($_GET['record_id']);
|
||||
exec (VESTA_CMD."v-unsuspend-dns-domain-record ".$v_username." ".$v_domain." ".$v_record_id, $output, $return_var);
|
||||
exec (VESTA_CMD."v-unsuspend-dns-record ".$v_username." ".$v_domain." ".$v_record_id, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = __('Error: vesta did not return any output.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue