mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
multiple name servers
This commit is contained in:
parent
808d2c3849
commit
99a403a2ef
7 changed files with 318 additions and 47 deletions
|
@ -39,14 +39,19 @@ if (!empty($_POST['ok'])) {
|
|||
if (!empty($_POST['v_ns2'])) $v_ns2 = escapeshellarg($_POST['v_ns2']);
|
||||
if (!empty($_POST['v_ns3'])) $v_ns3 = escapeshellarg($_POST['v_ns3']);
|
||||
if (!empty($_POST['v_ns4'])) $v_ns4 = escapeshellarg($_POST['v_ns4']);
|
||||
if (!empty($_POST['v_ns5'])) $v_ns5 = escapeshellarg($_POST['v_ns5']);
|
||||
if (!empty($_POST['v_ns6'])) $v_ns6 = escapeshellarg($_POST['v_ns6']);
|
||||
if (!empty($_POST['v_ns7'])) $v_ns7 = escapeshellarg($_POST['v_ns7']);
|
||||
if (!empty($_POST['v_ns8'])) $v_ns8 = escapeshellarg($_POST['v_ns8']);
|
||||
|
||||
// Add dns domain
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
exec (VESTA_CMD."v-add-dns-domain ".$user." ".$v_domain." ".$v_ip." ".$v_ns1." ".$v_ns2." ".$v_ns3." ".$v_ns4." no", $output, $return_var);
|
||||
exec (VESTA_CMD."v-add-dns-domain ".$user." ".$v_domain." ".$v_ip." ".$v_ns1." ".$v_ns2." ".$v_ns3." ".$v_ns4." ".$v_ns5." ".$v_ns6." ".$v_ns7." ".$v_ns8." no", $output, $return_var);
|
||||
check_return_code($return_var,$output);
|
||||
unset($output);
|
||||
}
|
||||
|
||||
|
||||
// Set expiriation date
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
if ((!empty($_POST['v_exp'])) && ($_POST['v_exp'] != date('Y-m-d', strtotime('+1 year')))) {
|
||||
|
@ -139,6 +144,16 @@ include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
|||
// Panel
|
||||
top_panel($user,$TAB);
|
||||
|
||||
$v_ns1 = str_replace("'", "", $v_ns1);
|
||||
$v_ns2 = str_replace("'", "", $v_ns2);
|
||||
$v_ns3 = str_replace("'", "", $v_ns3);
|
||||
$v_ns4 = str_replace("'", "", $v_ns4);
|
||||
$v_ns5 = str_replace("'", "", $v_ns5);
|
||||
$v_ns6 = str_replace("'", "", $v_ns6);
|
||||
$v_ns7 = str_replace("'", "", $v_ns7);
|
||||
$v_ns8 = str_replace("'", "", $v_ns8);
|
||||
|
||||
|
||||
// Display body for dns domain
|
||||
if (empty($_GET['domain'])) {
|
||||
if (empty($v_ttl)) $v_ttl = 14400;
|
||||
|
@ -146,10 +161,14 @@ if (empty($_GET['domain'])) {
|
|||
if (empty($v_ns1)) {
|
||||
exec (VESTA_CMD."v-list-user-ns ".$user." json", $output, $return_var);
|
||||
$nameservers = json_decode(implode('', $output), true);
|
||||
$v_ns1 = $nameservers[0];
|
||||
$v_ns2 = $nameservers[1];
|
||||
$v_ns3 = $nameservers[2];
|
||||
$v_ns4 = $nameservers[3];
|
||||
$v_ns1 = str_replace("'", "", $nameservers[0]);
|
||||
$v_ns2 = str_replace("'", "", $nameservers[1]);
|
||||
$v_ns3 = str_replace("'", "", $nameservers[2]);
|
||||
$v_ns4 = str_replace("'", "", $nameservers[3]);
|
||||
$v_ns5 = str_replace("'", "", $nameservers[4]);
|
||||
$v_ns6 = str_replace("'", "", $nameservers[5]);
|
||||
$v_ns7 = str_replace("'", "", $nameservers[6]);
|
||||
$v_ns8 = str_replace("'", "", $nameservers[7]);
|
||||
unset($output);
|
||||
}
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_dns.html');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue