From aa78fde6a92f66b84d626e114d8b54a5fb6ece0c Mon Sep 17 00:00:00 2001 From: ftimme <ft@falkotimme.com> Date: Wed, 14 Nov 2012 07:19:43 -0500 Subject: [PATCH] - Added function for IPv6 prefixes in multiserver mirror setups to nginx plugin. --- interface/web/dns/form/dns_srv.tform.php | 46 +++++++++++++++++++++++++++++++++------------- 1 files changed, 33 insertions(+), 13 deletions(-) diff --git a/interface/web/dns/form/dns_srv.tform.php b/interface/web/dns/form/dns_srv.tform.php index 188c10f..736bbc9 100644 --- a/interface/web/dns/form/dns_srv.tform.php +++ b/interface/web/dns/form/dns_srv.tform.php @@ -32,8 +32,9 @@ */ +global $app; -$form["title"] = "DNS srv"; +$form["title"] = "DNS SRV"; $form["description"] = ""; $form["name"] = "dns_srv"; $form["action"] = "dns_srv_edit.php"; @@ -51,7 +52,7 @@ $form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete $form["tabs"]['dns'] = array ( - 'title' => "DNS srv", + 'title' => "DNS SRV", 'width' => 100, 'template' => "templates/dns_srv_edit.htm", 'fields' => array ( @@ -69,7 +70,7 @@ 'zone' => array ( 'datatype' => 'INTEGER', 'formtype' => 'TEXT', - 'default' => intval($_REQUEST["zone"]), + 'default' => @$app->functions->intval($_REQUEST["zone"]), 'value' => '', 'width' => '30', 'maxlength' => '255' @@ -77,10 +78,15 @@ 'name' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', - 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', - 'errmsg'=> 'name_error_empty'), - 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{1,64}$/', + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'IDNTOASCII'), + 1 => array( 'event' => 'SHOW', + 'type' => 'IDNTOUTF8'), + 2 => array( 'event' => 'SAVE', + 'type' => 'TOLOWER') + ), + 'validators' => array ( 0 => array ( 'type' => 'REGEX', + 'regex' => '/^[\w\.\-]{0,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', @@ -91,7 +97,7 @@ 'type' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', - 'default' => 'A', + 'default' => 'SRV', 'value' => '', 'width' => '5', 'maxlength' => '5' @@ -101,16 +107,15 @@ 'formtype' => 'TEXT', 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'data_error_empty'), - 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[0-9\.]{10,15}$/', - 'errmsg'=> 'data_error_regex'), + 1 => array ( 'type' => 'REGEX', + 'regex' => '/^[\w\.\-]{0,64}\s[\w\.\-]{0,64}\s[\w\.\-]{0,64}$/', + 'errmsg'=> 'srv_error_regex'), ), 'default' => '', 'value' => '', 'width' => '30', 'maxlength' => '255' ), - /* 'aux' => array ( 'datatype' => 'INTEGER', 'formtype' => 'TEXT', @@ -119,7 +124,6 @@ 'width' => '10', 'maxlength' => '10' ), - */ 'ttl' => array ( 'datatype' => 'INTEGER', 'formtype' => 'TEXT', @@ -134,6 +138,22 @@ 'default' => 'Y', 'value' => array(0 => 'N',1 => 'Y') ), + 'stamp' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + 'serial' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '10', + 'maxlength' => '10' + ), ################################## # ENDE Datatable fields ################################## -- Gitblit v1.9.1