Commit 4f4b91f5 authored by tbrehm's avatar tbrehm
Browse files

Improved the DNS manager.

parent 8e23f2ed
......@@ -77,20 +77,17 @@ CREATE TABLE `dns_rr` (
`sys_perm_user` varchar(5) NOT NULL,
`sys_perm_group` varchar(5) NOT NULL,
`sys_perm_other` varchar(5) NOT NULL,
`server_id` int(11) NOT NULL default '1',
`zone` int(10) unsigned NOT NULL,
`name` char(64) NOT NULL,
`type` enum('A','AAAA','CNAME','HINFO','MX','NAPTR','NS','PTR','RP','SRV','TXT') default NULL,
`type` enum('A','AAAA','ALIAS','CNAME','HINFO','MX','NAPTR','NS','PTR','RP','SRV','TXT') default NULL,
`data` char(128) NOT NULL,
`aux` int(10) unsigned NOT NULL,
`aux` int(10) unsigned NOT NULL default '0',
`ttl` int(10) unsigned NOT NULL default '86400',
`active` enum('N','Y') NOT NULL default 'Y',
PRIMARY KEY (`id`),
UNIQUE KEY `rr` (`zone`,`name`,`type`,`data`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Daten fr Tabelle `dns_rr`
--
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -105,6 +102,7 @@ CREATE TABLE `dns_soa` (
`sys_perm_user` varchar(5) NOT NULL,
`sys_perm_group` varchar(5) NOT NULL,
`sys_perm_other` varchar(5) NOT NULL,
`server_id` int(11) NOT NULL default '1',
`origin` char(255) NOT NULL,
`ns` char(255) NOT NULL,
`mbox` char(255) NOT NULL,
......@@ -119,11 +117,8 @@ CREATE TABLE `dns_soa` (
PRIMARY KEY (`id`),
UNIQUE KEY `origin` (`origin`),
KEY `active` (`active`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Daten fr Tabelle `dns_soa`
--
-- --------------------------------------------------------
......
......@@ -105,6 +105,25 @@ class page_action extends tform_actions {
parent::onSubmit();
}
function onAfterInsert() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
function onAfterUpdate() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
}
$page = new page_action;
......
......@@ -105,6 +105,24 @@ class page_action extends tform_actions {
parent::onSubmit();
}
function onAfterInsert() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
function onAfterUpdate() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
}
$page = new page_action;
......
......@@ -105,6 +105,24 @@ class page_action extends tform_actions {
parent::onSubmit();
}
function onAfterInsert() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
function onAfterUpdate() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
}
$page = new page_action;
......
......@@ -105,6 +105,24 @@ class page_action extends tform_actions {
parent::onSubmit();
}
function onAfterInsert() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
function onAfterUpdate() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
}
$page = new page_action;
......
......@@ -105,6 +105,24 @@ class page_action extends tform_actions {
parent::onSubmit();
}
function onAfterInsert() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
function onAfterUpdate() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
}
$page = new page_action;
......
......@@ -105,6 +105,24 @@ class page_action extends tform_actions {
parent::onSubmit();
}
function onAfterInsert() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
function onAfterUpdate() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
}
$page = new page_action;
......
......@@ -105,6 +105,24 @@ class page_action extends tform_actions {
parent::onSubmit();
}
function onAfterInsert() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
function onAfterUpdate() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
}
$page = new page_action;
......
......@@ -105,6 +105,24 @@ class page_action extends tform_actions {
parent::onSubmit();
}
function onAfterInsert() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
function onAfterUpdate() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
}
$page = new page_action;
......
......@@ -105,6 +105,24 @@ class page_action extends tform_actions {
parent::onSubmit();
}
function onAfterInsert() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
function onAfterUpdate() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
}
$page = new page_action;
......
......@@ -105,6 +105,24 @@ class page_action extends tform_actions {
parent::onSubmit();
}
function onAfterInsert() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
function onAfterUpdate() {
global $app, $conf;
// Update the serial number of the SOA record
$soa_id = intval($_POST["zone"]);
$serial = time();
$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
}
}
$page = new page_action;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment