diff --git a/interface/lib/classes/plugin_listview.inc.php b/interface/lib/classes/plugin_listview.inc.php
index 762e5a721361150f8c0529c2670d29e77f89f133..59d1b56b7f906daeea80c1f951a4c0e7ddb79a8f 100644
--- a/interface/lib/classes/plugin_listview.inc.php
+++ b/interface/lib/classes/plugin_listview.inc.php
@@ -49,10 +49,14 @@ class plugin_listview extends plugin_base {
$limit_sql = $app->listform->getPagingSQL($sql_where);
$listTpl->setVar("paging",$app->listform->pagingHTML);
+ $sql_order_by = '';
+ if(isset($this->options["sql_order_by"])) {
+ $sql_order_by = $this->options["sql_order_by"];
+ }
// Get the data
- $records = $app->db->queryAllRecords("SELECT * FROM ".$app->listform->listDef["table"]." WHERE $sql_where $limit_sql");
+ $records = $app->db->queryAllRecords("SELECT * FROM ".$app->listform->listDef["table"]." WHERE $sql_where $sql_order_by $limit_sql");
$bgcolor = "#FFFFFF";
if(is_array($records)) {
@@ -71,6 +75,8 @@ class plugin_listview extends plugin_base {
if($field['formtype'] == "SELECT") {
$rec[$key] = $field['value'][$rec[$key]];
}
+ // Create a lowercase version of every item
+ $rec[$key.'_lowercase'] = strtolower($rec[$key]);
}
// The variable "id" contains always the index field
diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php
index e631e2309fe96faa1b7c164808bb6add9957e8f9..cc29d2727c7cbbf11d61ee92cb976608e9c7b7d2 100644
--- a/interface/lib/classes/tform.inc.php
+++ b/interface/lib/classes/tform.inc.php
@@ -539,7 +539,11 @@ class tform {
$validator['regex'] .= 's';
if(!preg_match($validator['regex'], $field_value)) {
$errmsg = $validator['errmsg'];
- $this->errorMessage .= $this->wordbook[$errmsg]."
\r\n";
+ if(isset($this->wordbook[$errmsg])) {
+ $this->errorMessage .= $this->wordbook[$errmsg]."
\r\n";
+ } else {
+ $this->errorMessage .= $errmsg."
\r\n";
+ }
}
break;
case 'UNIQUE':
diff --git a/interface/lib/classes/tform_actions.inc.php b/interface/lib/classes/tform_actions.inc.php
index 131752ddfcab9fe95fdfb54ddf2b8aafaa4e09fa..034bb323b804bca834e052f49aecd2b6bc1ba797 100644
--- a/interface/lib/classes/tform_actions.inc.php
+++ b/interface/lib/classes/tform_actions.inc.php
@@ -285,7 +285,8 @@ class tform_actions {
$app->tform->datalogSave('DELETE',$this->id,$this->dataRecord,array());
}
- $app->db->query("DELETE FROM ".$liste["table"]." WHERE ".$liste["table_idx"]." = ".$this->id." LIMIT 0,1");
+ $app->db->query("DELETE FROM ".$app->tform->formDef['db_table']." WHERE ".$app->tform->formDef['db_table_idx']." = ".$this->id." LIMIT 1");
+
// loading plugins
$next_tab = $app->tform->getCurrentTab();
diff --git a/interface/web/dns/form/dns_alias.tform.php b/interface/web/dns/form/dns_alias.tform.php
index 0302f7e4e9a6e310d77b961efacaf501896d5470..dc93f2e4835b14d28fe66f6053dbdb6fba06f736 100644
--- a/interface/web/dns/form/dns_alias.tform.php
+++ b/interface/web/dns/form/dns_alias.tform.php
@@ -51,7 +51,7 @@ $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update,
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['dns'] = array (
- 'title' => "DNS A",
+ 'title' => "DNS ALIAS",
'width' => 100,
'template' => "templates/dns_alias_edit.htm",
'fields' => array (
@@ -91,7 +91,7 @@ $form["tabs"]['dns'] = array (
'type' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'default' => 'A',
+ 'default' => 'ALIAS',
'value' => '',
'width' => '5',
'maxlength' => '5'
@@ -102,7 +102,7 @@ $form["tabs"]['dns'] = array (
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'data_error_empty'),
1 => array ( 'type' => 'REGEX',
- 'regex' => '/^[0-9\.]{10,15}$/',
+ 'regex' => '/^[\w\.\-]{1,64}$/',
'errmsg'=> 'data_error_regex'),
),
'default' => '',
diff --git a/interface/web/dns/form/dns_cname.tform.php b/interface/web/dns/form/dns_cname.tform.php
index e48605f8d9c7c45923b2d552139ef93a82ece39e..146cad2f5683f365bb8ee8556bf9862062632583 100644
--- a/interface/web/dns/form/dns_cname.tform.php
+++ b/interface/web/dns/form/dns_cname.tform.php
@@ -91,7 +91,7 @@ $form["tabs"]['dns'] = array (
'type' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'default' => 'A',
+ 'default' => 'CNAME',
'value' => '',
'width' => '5',
'maxlength' => '5'
@@ -102,7 +102,7 @@ $form["tabs"]['dns'] = array (
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'data_error_empty'),
1 => array ( 'type' => 'REGEX',
- 'regex' => '/^[0-9\.]{10,15}$/',
+ 'regex' => '/^[\w\.\-]{1,64}$/',
'errmsg'=> 'data_error_regex'),
),
'default' => '',
diff --git a/interface/web/dns/form/dns_hinfo.tform.php b/interface/web/dns/form/dns_hinfo.tform.php
index b2b30b629cfd29b5f9ad3dbb6d73973533db0e76..d0bfc1651d4d8838079be0143564f3e490c3ff98 100644
--- a/interface/web/dns/form/dns_hinfo.tform.php
+++ b/interface/web/dns/form/dns_hinfo.tform.php
@@ -51,7 +51,7 @@ $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update,
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['dns'] = array (
- 'title' => "DNS hinfo",
+ 'title' => "DNS HINFO",
'width' => 100,
'template' => "templates/dns_hinfo_edit.htm",
'fields' => array (
@@ -91,7 +91,7 @@ $form["tabs"]['dns'] = array (
'type' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'default' => 'A',
+ 'default' => 'HINFO',
'value' => '',
'width' => '5',
'maxlength' => '5'
@@ -101,9 +101,6 @@ $form["tabs"]['dns'] = array (
'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'),
),
'default' => '',
'value' => '',
diff --git a/interface/web/dns/form/dns_mx.tform.php b/interface/web/dns/form/dns_mx.tform.php
index 1f7382c2beed96a0a1f3024c6419e7f9b226927c..2d70e16a5157ccedd0c9101f82fd8ea93aa01f68 100644
--- a/interface/web/dns/form/dns_mx.tform.php
+++ b/interface/web/dns/form/dns_mx.tform.php
@@ -80,7 +80,7 @@ $form["tabs"]['dns'] = array (
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'name_error_empty'),
1 => array ( 'type' => 'REGEX',
- 'regex' => '/^[\w\.\-]{1,64}$/',
+ 'regex' => '/^[\w\.\-]{1,255}$/',
'errmsg'=> 'name_error_regex'),
),
'default' => '',
@@ -91,7 +91,7 @@ $form["tabs"]['dns'] = array (
'type' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'default' => 'A',
+ 'default' => 'MX',
'value' => '',
'width' => '5',
'maxlength' => '5'
@@ -102,7 +102,7 @@ $form["tabs"]['dns'] = array (
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'data_error_empty'),
1 => array ( 'type' => 'REGEX',
- 'regex' => '/^[0-9\.]{10,15}$/',
+ 'regex' => '/^[\w\.\-]{1,255}$/',
'errmsg'=> 'data_error_regex'),
),
'default' => '',
@@ -110,16 +110,16 @@ $form["tabs"]['dns'] = array (
'width' => '30',
'maxlength' => '255'
),
- /*
+
'aux' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
- 'default' => '0',
+ 'default' => '10',
'value' => '',
'width' => '10',
'maxlength' => '10'
),
- */
+
'ttl' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
diff --git a/interface/web/dns/form/dns_ns.tform.php b/interface/web/dns/form/dns_ns.tform.php
index a845dc6e14ac57550c061bcc3e20f37175fa6171..fbaa0e96944406d63ceefac9b3b3bb755ca04e67 100644
--- a/interface/web/dns/form/dns_ns.tform.php
+++ b/interface/web/dns/form/dns_ns.tform.php
@@ -51,7 +51,7 @@ $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update,
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['dns'] = array (
- 'title' => "DNS ns",
+ 'title' => "DNS NS",
'width' => 100,
'template' => "templates/dns_ns_edit.htm",
'fields' => array (
@@ -91,7 +91,7 @@ $form["tabs"]['dns'] = array (
'type' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'default' => 'A',
+ 'default' => 'NS',
'value' => '',
'width' => '5',
'maxlength' => '5'
@@ -102,7 +102,7 @@ $form["tabs"]['dns'] = array (
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'data_error_empty'),
1 => array ( 'type' => 'REGEX',
- 'regex' => '/^[0-9\.]{10,15}$/',
+ 'regex' => '/^[\w\.\-]{1,64}$/',
'errmsg'=> 'data_error_regex'),
),
'default' => '',
diff --git a/interface/web/dns/form/dns_ptr.tform.php b/interface/web/dns/form/dns_ptr.tform.php
index 7b193cf2470c25f5c3ad907ec6461b964ce8889d..61a2350069e89b079bf2c7fddd987e456b08071b 100644
--- a/interface/web/dns/form/dns_ptr.tform.php
+++ b/interface/web/dns/form/dns_ptr.tform.php
@@ -91,7 +91,7 @@ $form["tabs"]['dns'] = array (
'type' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'default' => 'A',
+ 'default' => 'PTR',
'value' => '',
'width' => '5',
'maxlength' => '5'
@@ -102,7 +102,7 @@ $form["tabs"]['dns'] = array (
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'data_error_empty'),
1 => array ( 'type' => 'REGEX',
- 'regex' => '/^[0-9\.]{10,15}$/',
+ 'regex' => '/^[\w\.\-]{1,64}$/',
'errmsg'=> 'data_error_regex'),
),
'default' => '',
diff --git a/interface/web/dns/form/dns_rp.tform.php b/interface/web/dns/form/dns_rp.tform.php
index 81a5c2fc6edbee8a3e0545a93535d428915d5cd6..9d80a358c27db9bbce45147722e98db82a282541 100644
--- a/interface/web/dns/form/dns_rp.tform.php
+++ b/interface/web/dns/form/dns_rp.tform.php
@@ -51,7 +51,7 @@ $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update,
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['dns'] = array (
- 'title' => "DNS rp",
+ 'title' => "DNS RP",
'width' => 100,
'template' => "templates/dns_rp_edit.htm",
'fields' => array (
@@ -91,7 +91,7 @@ $form["tabs"]['dns'] = array (
'type' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'default' => 'A',
+ 'default' => 'RP',
'value' => '',
'width' => '5',
'maxlength' => '5'
diff --git a/interface/web/dns/form/dns_soa.tform.php b/interface/web/dns/form/dns_soa.tform.php
index b149fec455450fe3cf6902c8948fa7daedd87c7b..cf5f0d1d232998e2ab0de771f8dc60988c7914c3 100644
--- a/interface/web/dns/form/dns_soa.tform.php
+++ b/interface/web/dns/form/dns_soa.tform.php
@@ -201,7 +201,8 @@ $form["tabs"]['dns_records'] = array (
'class' => 'plugin_listview',
'options' => array(
'listdef' => 'list/dns_a.list.php',
- 'sqlextwhere' => "zone = ".intval($_REQUEST['id'])
+ 'sqlextwhere' => "zone = ".intval($_REQUEST['id']),
+ 'sql_order_by' => "ORDER BY type, name"
)
)
)
diff --git a/interface/web/dns/form/dns_srv.tform.php b/interface/web/dns/form/dns_srv.tform.php
index 188c10fa45c7238c808daac278f0231c69b611ab..6b99b065e78ce6d4887f92fe9482c8cc13017b54 100644
--- a/interface/web/dns/form/dns_srv.tform.php
+++ b/interface/web/dns/form/dns_srv.tform.php
@@ -33,7 +33,7 @@
*/
-$form["title"] = "DNS srv";
+$form["title"] = "DNS SRV";
$form["description"] = "";
$form["name"] = "dns_srv";
$form["action"] = "dns_srv_edit.php";
@@ -91,7 +91,7 @@ $form["tabs"]['dns'] = array (
'type' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'default' => 'A',
+ 'default' => 'SRV',
'value' => '',
'width' => '5',
'maxlength' => '5'
@@ -101,9 +101,6 @@ $form["tabs"]['dns'] = array (
'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'),
),
'default' => '',
'value' => '',
diff --git a/interface/web/dns/form/dns_txt.tform.php b/interface/web/dns/form/dns_txt.tform.php
index b18d84af200d2cfd20d79281b3d1c790a6aed8c0..5c5e55b047f0c3d0ce9191f9bff60045b52043b5 100644
--- a/interface/web/dns/form/dns_txt.tform.php
+++ b/interface/web/dns/form/dns_txt.tform.php
@@ -51,7 +51,7 @@ $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update,
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['dns'] = array (
- 'title' => "DNS txt",
+ 'title' => "DNS TXT",
'width' => 100,
'template' => "templates/dns_txt_edit.htm",
'fields' => array (
@@ -91,7 +91,7 @@ $form["tabs"]['dns'] = array (
'type' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'default' => 'A',
+ 'default' => 'TXT',
'value' => '',
'width' => '5',
'maxlength' => '5'
@@ -101,9 +101,6 @@ $form["tabs"]['dns'] = array (
'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'),
),
'default' => '',
'value' => '',
diff --git a/interface/web/dns/lib/lang/en_dns_alias.lng b/interface/web/dns/lib/lang/en_dns_alias.lng
index ca96ae5846ac8aef1ee19ad9f8b830ca81b043a4..187a110339903a1bf88078bfdf4dcf8c364bec7c 100644
--- a/interface/web/dns/lib/lang/en_dns_alias.lng
+++ b/interface/web/dns/lib/lang/en_dns_alias.lng
@@ -3,7 +3,7 @@ $wb["server_id_txt"] = 'Server';
$wb["zone_txt"] = 'Zone';
$wb["name_txt"] = 'Hostname';
$wb["type_txt"] = 'type';
-$wb["data_txt"] = 'IP-Address';
+$wb["data_txt"] = 'Target Hostname';
$wb["ttl_txt"] = 'TTL';
$wb["active_txt"] = 'Active';
$wb["btn_save_txt"] = 'Save';
diff --git a/interface/web/dns/lib/lang/en_dns_cname.lng b/interface/web/dns/lib/lang/en_dns_cname.lng
index ca96ae5846ac8aef1ee19ad9f8b830ca81b043a4..187a110339903a1bf88078bfdf4dcf8c364bec7c 100644
--- a/interface/web/dns/lib/lang/en_dns_cname.lng
+++ b/interface/web/dns/lib/lang/en_dns_cname.lng
@@ -3,7 +3,7 @@ $wb["server_id_txt"] = 'Server';
$wb["zone_txt"] = 'Zone';
$wb["name_txt"] = 'Hostname';
$wb["type_txt"] = 'type';
-$wb["data_txt"] = 'IP-Address';
+$wb["data_txt"] = 'Target Hostname';
$wb["ttl_txt"] = 'TTL';
$wb["active_txt"] = 'Active';
$wb["btn_save_txt"] = 'Save';
diff --git a/interface/web/dns/lib/lang/en_dns_hinfo.lng b/interface/web/dns/lib/lang/en_dns_hinfo.lng
index ca96ae5846ac8aef1ee19ad9f8b830ca81b043a4..5b4a20463297fffff0ca4ebbc9d2d69083af9df7 100644
--- a/interface/web/dns/lib/lang/en_dns_hinfo.lng
+++ b/interface/web/dns/lib/lang/en_dns_hinfo.lng
@@ -3,7 +3,7 @@ $wb["server_id_txt"] = 'Server';
$wb["zone_txt"] = 'Zone';
$wb["name_txt"] = 'Hostname';
$wb["type_txt"] = 'type';
-$wb["data_txt"] = 'IP-Address';
+$wb["data_txt"] = 'Host Information';
$wb["ttl_txt"] = 'TTL';
$wb["active_txt"] = 'Active';
$wb["btn_save_txt"] = 'Save';
diff --git a/interface/web/dns/lib/lang/en_dns_mx.lng b/interface/web/dns/lib/lang/en_dns_mx.lng
index ca96ae5846ac8aef1ee19ad9f8b830ca81b043a4..55ebd0a99c940cd62d6d9584417f3be0ecb07658 100644
--- a/interface/web/dns/lib/lang/en_dns_mx.lng
+++ b/interface/web/dns/lib/lang/en_dns_mx.lng
@@ -3,7 +3,8 @@ $wb["server_id_txt"] = 'Server';
$wb["zone_txt"] = 'Zone';
$wb["name_txt"] = 'Hostname';
$wb["type_txt"] = 'type';
-$wb["data_txt"] = 'IP-Address';
+$wb["data_txt"] = 'Mailserver hostname';
+$wb["aux_txt"] = 'Priority';
$wb["ttl_txt"] = 'TTL';
$wb["active_txt"] = 'Active';
$wb["btn_save_txt"] = 'Save';
diff --git a/interface/web/dns/lib/lang/en_dns_ns.lng b/interface/web/dns/lib/lang/en_dns_ns.lng
index ca96ae5846ac8aef1ee19ad9f8b830ca81b043a4..c430cdd20fbd561913e7b79afbaed4c4116df51b 100644
--- a/interface/web/dns/lib/lang/en_dns_ns.lng
+++ b/interface/web/dns/lib/lang/en_dns_ns.lng
@@ -1,9 +1,9 @@
"Zones",
'target' => 'content',
'link' => 'dns/dns_soa_list.php');
-
+/*
$items[] = array( 'title' => "A-Records",
'target' => 'content',
'link' => 'dns/dns_a_list.php');
+*/
$module["nav"][] = array( 'title' => 'DNS',
diff --git a/interface/web/dns/templates/dns_a_edit.htm b/interface/web/dns/templates/dns_a_edit.htm
index 7b0adfd1be64c52aaf4b40578f33ad7350472790..15f1a513307db7bef7103593fec354959419eff3 100644
--- a/interface/web/dns/templates/dns_a_edit.htm
+++ b/interface/web/dns/templates/dns_a_edit.htm
@@ -21,7 +21,7 @@
{tmpl_var name='name_txt'}: | -+ | e.g. yourdomain.com. |
{tmpl_var name='data_txt'}: | -+ | e.g. mail.yourdomain.com. | +
{tmpl_var name='aux_txt'}: | +||
{tmpl_var name='ttl_txt'}: | @@ -20,8 +24,8 @@||
- | - + | + |
{tmpl_var name='data_txt'}: | -+ | |
{tmpl_var name='ttl_txt'}: | @@ -20,8 +20,8 @@||
- | - + | + |
{tmpl_var name='data_txt'}: | -+ | |
{tmpl_var name='ttl_txt'}: | @@ -20,8 +20,8 @@||
- | - + | + |
{tmpl_var name='name_txt'}: | ||
{tmpl_var name='data_txt'}: | -+ | example: `webmaster.example.com. contactinfo.example.com.' |
{tmpl_var name='ttl_txt'}: | @@ -20,8 +20,8 @@||
- | - + | + |
{tmpl_var name='data_txt'}: | -+ | + example: `0 9 server.example.com.' |
{tmpl_var name='ttl_txt'}: | @@ -20,8 +21,8 @@||
- | - + | + |
{tmpl_var name='data_txt'}: | -+ | |
{tmpl_var name='ttl_txt'}: | @@ -20,8 +20,8 @@||
- | - + | + |