From 9994de85fcf14a98dcc54cc7399b87e34d9b3c29 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 17 Mar 2009 09:23:07 -0400
Subject: [PATCH] Updated all language files.
---
interface/web/dns/dns_wizard.php | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php
index 10ef756..dd98aea 100644
--- a/interface/web/dns/dns_wizard.php
+++ b/interface/web/dns/dns_wizard.php
@@ -36,15 +36,22 @@
// Loading the template
-$app->uses('tpl');
+$app->uses('tpl,validate_dns');
$app->tpl->newTemplate("form.tpl.htm");
$app->tpl->setInclude('content_tpl','templates/dns_wizard.htm');
// import variables
$template_id = (isset($_POST['template_id']))?intval($_POST['template_id']):1;
-$server_id = (isset($_POST['server_id']))?intval($_POST['server_id']):1;
$sys_groupid = (isset($_POST['client_group_id']))?intval($_POST['client_group_id']):0;
+// get the correct server_id
+if($_SESSION['s']['user']['typ'] == 'admin') {
+ $server_id = (isset($_POST['server_id']))?intval($_POST['server_id']):1;
+} else {
+ $client_group_id = $_SESSION["s"]["user"]["default_group"];
+ $client = $app->db->queryOneRecord("SELECT default_dnsserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
+ $server_id = $client["default_dnsserver"];
+}
// Load the templates
@@ -174,9 +181,10 @@
$minimum = $app->db->quote($vars['minimum']);
$ttl = $app->db->quote($vars['ttl']);
$xfer = $app->db->quote($vars['xfer']);
+ $serial = $app->validate_dns->increase_serial(0);
$insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `origin`, `ns`, `mbox`, `serial`, `refresh`, `retry`, `expire`, `minimum`, `ttl`, `active`, `xfer`) VALUES
- ('$sys_userid', '$sys_groupid', 'riud', 'riud', '', '$server_id', '$origin', '$ns', '$mbox', '1', '$refresh', '$retry', '$expire', '$minimum', '$ttl', 'Y', '$xfer')";
+ ('$sys_userid', '$sys_groupid', 'riud', 'riud', '', '$server_id', '$origin', '$ns', '$mbox', '$serial', '$refresh', '$retry', '$expire', '$minimum', '$ttl', 'Y', '$xfer')";
$dns_soa_id = $app->db->datalogInsert('dns_soa', $insert_data, 'id');
// Insert the dns_rr records
--
Gitblit v1.9.1