From 222ea214ffc25abac78e9d520ef34865280a0bab Mon Sep 17 00:00:00 2001
From: cfoe <cfoe@ispconfig3>
Date: Tue, 17 Jul 2012 04:33:47 -0400
Subject: [PATCH] standard sorting by main characteristic for most lists

---
 interface/web/sites/web_aliasdomain_list.php      |    2 
 interface/web/client/client_template_list.php     |    1 
 interface/web/client/list/client.list.php         |  109 ++++++------
 interface/web/mail/mail_domain_list.php           |    1 
 interface/web/client/templates/resellers_list.htm |    2 
 interface/web/client/form/client.tform.php        |   57 +++---
 interface/web/dns/list/dns_slave.list.php         |   88 +++++-----
 interface/web/client/templates/clients_list.htm   |    2 
 interface/web/domain/domain_list.php              |    1 
 interface/web/sites/user_quota_stats.php          |    2 
 interface/web/client/list/reseller.list.php       |   93 +++++-----
 interface/web/client/client_edit.php              |    2 
 interface/web/sites/shell_user_list.php           |    1 
 interface/web/dns/dns_template_list.php           |    1 
 interface/web/sites/web_subdomain_list.php        |    2 
 interface/web/dns/dns_wizard.php                  |    2 
 interface/web/sites/web_domain_list.php           |    2 
 interface/web/dns/list/dns_template.list.php      |   54 ++----
 interface/web/sites/web_sites_stats.php           |    2 
 interface/web/vm/openvz_ip_list.php               |    2 
 interface/web/sites/database_list.php             |    1 
 interface/web/sites/ftp_user_list.php             |    1 
 interface/web/sites/webdav_user_list.php          |    2 
 23 files changed, 210 insertions(+), 220 deletions(-)

diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php
index 76616fc..fd760af 100644
--- a/interface/web/client/client_edit.php
+++ b/interface/web/client/client_edit.php
@@ -101,7 +101,7 @@
 
 		global $app;
 
-		$sql = "SELECT template_id,template_name FROM client_template WHERE template_type = 'a'";
+		$sql = "SELECT template_id,template_name FROM client_template WHERE template_type = 'a' ORDER BY template_name ASC";
 		$tpls = $app->db->queryAllRecords($sql);
 		$option = '';
 		$tpl = array();
diff --git a/interface/web/client/client_template_list.php b/interface/web/client/client_template_list.php
index da316a7..f0d1752 100644
--- a/interface/web/client/client_template_list.php
+++ b/interface/web/client/client_template_list.php
@@ -44,5 +44,6 @@
 if(!$_SESSION["s"]["user"]["typ"] == 'admin') die('Client-Templates are only for Admins.');
 
 $app->uses('listform_actions');
+$app->listform_actions->SQLOrderBy = 'ORDER BY template_name';
 $app->listform_actions->onLoad();
 ?>
diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php
index d29a54c..8a76281 100644
--- a/interface/web/client/form/client.tform.php
+++ b/interface/web/client/form/client.tform.php
@@ -38,16 +38,16 @@
 
 */
 
-$form["title"] 			= "Client";
-$form["description"] 	= "";
-$form["name"] 			= "client";
-$form["action"]			= "client_edit.php";
-$form["db_table"]		= "client";
+$form["title"] 		= "Client";
+$form["description"]    = "";
+$form["name"] 		= "client";
+$form["action"]		= "client_edit.php";
+$form["db_table"]	= "client";
 $form["db_table_idx"]	= "client_id";
-$form["db_history"]		= "yes";
+$form["db_history"]	= "yes";
 $form["tab_default"]	= "address";
 $form["list_default"]	= "client_list.php";
-$form["auth"]			= 'yes';
+$form["auth"]		= 'yes';
 
 $form["auth_preset"]["userid"]  = 0; // 0 = id of the user, > 0 id must match with id of current user
 $form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
@@ -101,9 +101,9 @@
 		'contact_name' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
-			'validators'	=> array ( 	0 => array (	'type'	=> 'NOTEMPTY',
-														'errmsg'=> 'contact_error_empty'),
-										),
+			'validators'	=> array ( 0 => array (	'type'	=> 'NOTEMPTY',
+                                                                'errmsg'=> 'contact_error_empty'),
+                                                ),
 			'default'	=> '',
 			'value'		=> '',
 			'separator'	=> '',
@@ -129,19 +129,19 @@
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
 			'validators'	=> array ( 	0 => array (	'type'	=> 'NOTEMPTY',
-														'errmsg'=> 'username_error_empty'),
-										1 => array (	'type'	=> 'CUSTOM',
-														'class' => 'validate_client',
-														'function' => 'username_unique',
-														'errmsg'=> 'username_error_unique'),
-										2 => array (	'type'	=> 'CUSTOM',
-														'class' => 'validate_client',
-														'function' => 'username_collision',
-														'errmsg'=> 'username_error_collision'),
-										3 => array (	'type'	=> 'REGEX',
-														'regex' => '/^[\w\.\-\_]{0,64}$/',
-														'errmsg'=> 'username_error_regex'),
-										),
+                                                                        'errmsg'=> 'username_error_empty'),
+                                                        1 => array (	'type'	=> 'CUSTOM',
+                                                                        'class' => 'validate_client',
+                                                                        'function' => 'username_unique',
+                                                                        'errmsg'=> 'username_error_unique'),
+                                                        2 => array (	'type'	=> 'CUSTOM',
+                                                                        'class' => 'validate_client',
+                                                                        'function' => 'username_collision',
+                                                                        'errmsg'=> 'username_error_collision'),
+                                                        3 => array (	'type'	=> 'REGEX',
+                                                                        'regex' => '/^[\w\.\-\_]{0,64}$/',
+                                                                        'errmsg'=> 'username_error_regex'),
+                                                        ),
 			'default'	=> '',
 			'value'		=> '',
 			'separator'	=> '',
@@ -235,14 +235,13 @@
 		),
 		'country' => array (
 			'datatype'	=> 'VARCHAR',
-
 			'formtype'	=> 'SELECT',
 			'default'	=> (isset($conf['language']) ? strtoupper($conf['language']) : ''),
-			'datasource'	=> array ( 	'type'	=> 'SQL',
-										'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name',
-										'keyfield'=> 'iso',
-										'valuefield'=> 'printable_name'
-									 ),
+			'datasource'	=> array (  'type'          => 'SQL',
+                                                    'querystring'   => 'SELECT iso,printable_name FROM country ORDER BY iso ASC',
+                                                    'keyfield'      => 'iso',
+                                                    'valuefield'    => 'printable_name'
+                                                ),
 			'value'		=> ''
 		),
 		'telephone' => array (
diff --git a/interface/web/client/list/client.list.php b/interface/web/client/list/client.list.php
index 03ce0d9..2d45179 100644
--- a/interface/web/client/list/client.list.php
+++ b/interface/web/client/list/client.list.php
@@ -13,13 +13,13 @@
 
 
 // Name of the list
-$liste["name"] 				= "clients";
+$liste["name"] 			= "clients";
 
 // Database table
-$liste["table"] 			= "client";
+$liste["table"] 		= "client";
 
 // Index index field of the database table
-$liste["table_idx"]			= "client_id";
+$liste["table_idx"]		= "client_id";
 
 // Search Field Prefix
 $liste["search_prefix"] 	= "search_";
@@ -28,10 +28,10 @@
 $liste["records_per_page"] 	= "15";
 
 // Script File of the list
-$liste["file"]				= "client_list.php";
+$liste["file"]			= "client_list.php";
 
 // Script file of the edit form
-$liste["edit_file"]			= "client_edit.php";
+$liste["edit_file"]		= "client_edit.php";
 
 // Script File of the delete script
 $liste["delete_file"]		= "client_del.php";
@@ -40,66 +40,65 @@
 $liste["paging_tpl"]		= "templates/paging.tpl.htm";
 
 // Enable authe
-$liste["auth"]				= "yes";
+$liste["auth"]			= "yes";
 
 
 /*****************************************************
 * Suchfelder
 *****************************************************/
 
-$liste["item"][] = array(	'field'		=> "client_id",
-							'datatype'	=> "INTEGER",
-							'formtype'	=> "TEXT",
-							'op'		=> "=",
-							'prefix'	=> "",
-							'suffix'	=> "",
-							'width'		=> "",
-							'value'		=> "");
+$liste["item"][] = array(   'field'     => "client_id",
+                            'datatype'	=> "INTEGER",
+                            'formtype'	=> "TEXT",
+                            'op'	=> "=",
+                            'prefix'	=> "",
+                            'suffix'	=> "",
+                            'width'	=> "",
+                            'value'	=> "");
 
-$liste["item"][] = array(	'field'		=> "company_name",
-							'datatype'	=> "VARCHAR",
-							'formtype'	=> "TEXT",
-							'op'		=> "like",
-							'prefix'	=> "%",
-							'suffix'	=> "%",
-							'width'		=> "",
-							'value'		=> "");
+$liste["item"][] = array(   'field'     => "company_name",
+                            'datatype'	=> "VARCHAR",
+                            'formtype'	=> "TEXT",
+                            'op'	=> "like",
+                            'prefix'	=> "%",
+                            'suffix'	=> "%",
+                            'width'	=> "",
+                            'value'	=> "");
 
-$liste["item"][] = array(	'field'		=> "contact_name",
-							'datatype'	=> "VARCHAR",
-							'formtype'	=> "TEXT",
-							'op'		=> "like",
-							'prefix'	=> "%",
-							'suffix'	=> "%",
-							'width'		=> "",
-							'value'		=> "");  
+$liste["item"][] = array(   'field'     => "contact_name",
+                            'datatype'	=> "VARCHAR",
+                            'formtype'	=> "TEXT",
+                            'op'	=> "like",
+                            'prefix'	=> "%",
+                            'suffix'	=> "%",
+                            'width'	=> "",
+                            'value'	=> "");  
 
-$liste["item"][] = array(	'field'		=> "username",
-							'datatype'	=> "VARCHAR",
-							'formtype'	=> "TEXT",
-							'op'		=> "like",
-							'prefix'	=> "%",
-							'suffix'	=> "%",
-							'width'		=> "",
-							'value'		=> ""); 
+$liste["item"][] = array(   'field'     => "username",
+                            'datatype'	=> "VARCHAR",
+                            'formtype'	=> "TEXT",
+                            'op'	=> "like",
+                            'prefix'	=> "%",
+                            'suffix'	=> "%",
+                            'width'	=> "",
+                            'value'	=> ""); 
 
-$liste["item"][] = array(	'field'		=> "city",
-							'datatype'	=> "VARCHAR",
-							'formtype'	=> "TEXT",
-							'op'		=> "like",
-							'prefix'	=> "%",
-							'suffix'	=> "%",
-							'width'		=> "",
-							'value'		=> "");
+$liste["item"][] = array(   'field'     => "city",
+                            'datatype'	=> "VARCHAR",
+                            'formtype'	=> "TEXT",
+                            'op'	=> "like",
+                            'prefix'	=> "%",
+                            'suffix'	=> "%",
+                            'width'	=> "",
+                            'value'	=> "");
 
-$liste["item"][] = array(	'field'		=> "country",
-							'datatype'	=> "VARCHAR",
-							'formtype'	=> "TEXT",
-							'op'		=> "like",
-							'prefix'	=> "%",
-							'suffix'	=> "%",
-							'width'		=> "",
-							'value'		=> "");
-
+$liste["item"][] = array(   'field'     => "country",
+                            'datatype'	=> "VARCHAR",
+                            'formtype'	=> "SELECT",
+                            'op'	=> "=",
+                            'prefix'	=> "",
+                            'suffix'	=> "",
+                            'width'	=> "",
+                            'value'	=> "");
 
 ?>
\ No newline at end of file
diff --git a/interface/web/client/list/reseller.list.php b/interface/web/client/list/reseller.list.php
index 06be49f..2e2fbe7 100644
--- a/interface/web/client/list/reseller.list.php
+++ b/interface/web/client/list/reseller.list.php
@@ -13,13 +13,13 @@
 
 
 // Name of the list
-$liste["name"] 				= "resellers";
+$liste["name"] 			= "resellers";
 
 // Database table
-$liste["table"] 			= "client";
+$liste["table"] 		= "client";
 
 // Index index field of the database table
-$liste["table_idx"]			= "client_id";
+$liste["table_idx"]		= "client_id";
 
 // Search Field Prefix
 $liste["search_prefix"] 	= "search_";
@@ -28,10 +28,10 @@
 $liste["records_per_page"] 	= "15";
 
 // Script File of the list
-$liste["file"]				= "reseller_list.php";
+$liste["file"]			= "reseller_list.php";
 
 // Script file of the edit form
-$liste["edit_file"]			= "reseller_edit.php";
+$liste["edit_file"]		= "reseller_edit.php";
 
 // Script File of the delete script
 $liste["delete_file"]		= "reseller_del.php";
@@ -40,57 +40,56 @@
 $liste["paging_tpl"]		= "templates/paging.tpl.htm";
 
 // Enable authe
-$liste["auth"]				= "yes";
+$liste["auth"]			= "yes";
 
 
 /*****************************************************
 * Suchfelder
 *****************************************************/
 
-$liste["item"][] = array(	'field'		=> "client_id",
-							'datatype'	=> "INTEGER",
-							'formtype'	=> "TEXT",
-							'op'		=> "=",
-							'prefix'	=> "",
-							'suffix'	=> "",
-							'width'		=> "",
-							'value'		=> "");
+$liste["item"][] = array(   'field'     => "client_id",
+                            'datatype'	=> "INTEGER",
+                            'formtype'	=> "TEXT",
+                            'op'	=> "=",
+                            'prefix'	=> "",
+                            'suffix'	=> "",
+                            'width'	=> "",
+                            'value'	=> "");
 
-$liste["item"][] = array(	'field'		=> "company_name",
-							'datatype'	=> "VARCHAR",
-							'formtype'	=> "TEXT",
-							'op'		=> "like",
-							'prefix'	=> "%",
-							'suffix'	=> "%",
-							'width'		=> "",
-							'value'		=> "");
+$liste["item"][] = array(   'field'	=> "company_name",
+                            'datatype'	=> "VARCHAR",
+                            'formtype'	=> "TEXT",
+                            'op'	=> "like",
+                            'prefix'	=> "%",
+                            'suffix'	=> "%",
+                            'width'	=> "",
+                            'value'	=> "");
 
-$liste["item"][] = array(	'field'		=> "contact_name",
-							'datatype'	=> "VARCHAR",
-							'formtype'	=> "TEXT",
-							'op'		=> "like",
-							'prefix'	=> "%",
-							'suffix'	=> "%",
-							'width'		=> "",
-							'value'		=> "");  
+$liste["item"][] = array(   'field'	=> "contact_name",
+                            'datatype'	=> "VARCHAR",
+                            'formtype'	=> "TEXT",
+                            'op'	=> "like",
+                            'prefix'	=> "%",
+                            'suffix'	=> "%",
+                            'width'	=> "",
+                            'value'	=> "");  
 
-$liste["item"][] = array(	'field'		=> "city",
-							'datatype'	=> "VARCHAR",
-							'formtype'	=> "TEXT",
-							'op'		=> "like",
-							'prefix'	=> "%",
-							'suffix'	=> "%",
-							'width'		=> "",
-							'value'		=> "");
+$liste["item"][] = array(   'field'	=> "city",
+                            'datatype'	=> "VARCHAR",
+                            'formtype'	=> "TEXT",
+                            'op'	=> "like",
+                            'prefix'	=> "%",
+                            'suffix'	=> "%",
+                            'width'	=> "",
+                            'value'	=> "");
 
-$liste["item"][] = array(	'field'		=> "country",
-							'datatype'	=> "VARCHAR",
-							'formtype'	=> "TEXT",
-							'op'		=> "like",
-							'prefix'	=> "%",
-							'suffix'	=> "%",
-							'width'		=> "",
-							'value'		=> "");
-
+$liste["item"][] = array(   'field'	=> "country",
+                            'datatype'	=> "VARCHAR",
+                            'formtype'	=> "SELECT",
+                            'op'	=> "=",
+                            'prefix'	=> "",
+                            'suffix'	=> "",
+                            'width'	=> "",
+                            'value'	=> "");
 
 ?>
\ No newline at end of file
diff --git a/interface/web/client/templates/clients_list.htm b/interface/web/client/templates/clients_list.htm
index c3b3d57..cb3ee9c 100644
--- a/interface/web/client/templates/clients_list.htm
+++ b/interface/web/client/templates/clients_list.htm
@@ -32,7 +32,7 @@
                         <td class="tbl_col_contact_name"><input type="text" name="search_contact_name" value="{tmpl_var name='search_contact_name'}" style="width:120px;" /></td>
                         <td class="tbl_col_username"><input type="text" name="search_username" value="{tmpl_var name='search_username'}" style="width:120px;" /></td>
                         <td class="tbl_col_city"><input type="text" name="search_city" value="{tmpl_var name='search_city'}" style="width:120px;" /></td>
-                        <td class="tbl_col_country"><input type="text" name="search_country" value="{tmpl_var name='search_country'}" style="width:30px;" /></td>
+                        <td class="tbl_col_country"><select name="search_country" style="width:120px;">{tmpl_var name='search_country'}</select></td>
                         <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','client/client_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
                     </tr>
                 </thead>
diff --git a/interface/web/client/templates/resellers_list.htm b/interface/web/client/templates/resellers_list.htm
index 5ed9e94..ace4815 100644
--- a/interface/web/client/templates/resellers_list.htm
+++ b/interface/web/client/templates/resellers_list.htm
@@ -30,7 +30,7 @@
                         <td class="tbl_col_company_name"><input type="text" name="search_company_name" value="{tmpl_var name='search_company_name'}" style="width:120px;" /></td>
                         <td class="tbl_col_contact_name"><input type="text" name="search_contact_name" value="{tmpl_var name='search_contact_name'}" style="width:120px;" /></td>
                         <td class="tbl_col_city"><input type="text" name="search_city" value="{tmpl_var name='search_city'}" style="width:120px;" /></td>
-                        <td class="tbl_col_country"><input type="text" name="search_country" value="{tmpl_var name='search_country'}" style="width:30px;" /></td>
+                        <td class="tbl_col_country"><select name="search_country" style="width:120px;">{tmpl_var name='search_country'}</select></td>
                         <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','client/reseller_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
                     </tr>
                 </thead>
diff --git a/interface/web/dns/dns_template_list.php b/interface/web/dns/dns_template_list.php
index 20efa8d..37648a1 100644
--- a/interface/web/dns/dns_template_list.php
+++ b/interface/web/dns/dns_template_list.php
@@ -18,6 +18,7 @@
 $app->uses('listform_actions');
 // $app->listform_actions->SQLExtWhere = "access = 'REJECT'";
 
+$app->listform_actions->SQLOrderBy = 'ORDER BY name';
 $app->listform_actions->onLoad();
 
 
diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php
index cdb2448..18c7529 100644
--- a/interface/web/dns/dns_wizard.php
+++ b/interface/web/dns/dns_wizard.php
@@ -56,7 +56,7 @@
 
 
 // Load the templates
-$records = $app->db->queryAllRecords("SELECT * FROM dns_template WHERE visible = 'Y'");
+$records = $app->db->queryAllRecords("SELECT * FROM dns_template WHERE visible = 'Y' ORDER BY name ASC");
 $template_id_option = '';
 $n = 0;
 foreach($records as $rec){
diff --git a/interface/web/dns/list/dns_slave.list.php b/interface/web/dns/list/dns_slave.list.php
index aaa09e0..1e63544 100644
--- a/interface/web/dns/list/dns_slave.list.php
+++ b/interface/web/dns/list/dns_slave.list.php
@@ -13,13 +13,13 @@
 
 
 // Name of the list
-$liste["name"] 				= "dns_slave";
+$liste["name"] 			= "dns_slave";
 
 // Database table
-$liste["table"] 			= "dns_slave";
+$liste["table"] 		= "dns_slave";
 
 // Index index field of the database table
-$liste["table_idx"]			= "id";
+$liste["table_idx"]		= "id";
 
 // Search Field Prefix
 $liste["search_prefix"] 	= "search_";
@@ -28,10 +28,10 @@
 $liste["records_per_page"] 	= "15";
 
 // Script File of the list
-$liste["file"]				= "dns_slave_list.php";
+$liste["file"]			= "dns_slave_list.php";
 
 // Script file of the edit form
-$liste["edit_file"]			= "dns_slave_edit.php";
+$liste["edit_file"]		= "dns_slave_edit.php";
 
 // Script File of the delete script
 $liste["delete_file"]		= "dns_slave_del.php";
@@ -40,7 +40,7 @@
 $liste["paging_tpl"]		= "templates/paging.tpl.htm";
 
 // Enable auth
-$liste["auth"]				= "yes";
+$liste["auth"]			= "yes";
 
 
 /*****************************************************
@@ -48,50 +48,46 @@
 *****************************************************/
 
 
-$liste["item"][] = array(	'field'		=> "active",
-							'datatype'	=> "VARCHAR",
-							'formtype'	=> "SELECT",
-							'op'		=> "=",
-							'prefix'	=> "",
-							'suffix'	=> "",
-							'width'		=> "",
-							'value'		=> array('Y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>",'N' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>"));
+$liste["item"][] = array(   'field'     => "active",
+                            'datatype'	=> "VARCHAR",
+                            'formtype'	=> "SELECT",
+                            'op'	=> "=",
+                            'prefix'	=> "",
+                            'suffix'	=> "",
+                            'width'	=> "",
+                            'value'	=> array('Y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>",'N' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>"));
 
 
-$liste["item"][] = array(	'field'		=> "server_id",
-							'datatype'	=> "VARCHAR",
-							'formtype'	=> "SELECT",
-							'op'		=> "like",
-							'prefix'	=> "%",
-							'suffix'	=> "%",
-							'datasource'	=> array ( 	'type'	=> 'CUSTOM',
-														'class'=> 'custom_datasource',
-														'function'=> 'dns_servers'
-									 				  ),
-							'width'		=> "",
-							'value'		=> "");
+$liste["item"][] = array(   'field'	=> "server_id",
+                            'datatype'	=> "VARCHAR",
+                            'formtype'	=> "SELECT",
+                            'op'	=> "like",
+                            'prefix'	=> "%",
+                            'suffix'	=> "%",
+                            'datasource'=> array (  'type'   => 'CUSTOM',
+                                                    'class'=> 'custom_datasource',
+                                                    'function'=> 'dns_servers'
+                                                ),
+                            'width'	=> "",
+                            'value'	=> "");
 
-$liste["item"][] = array(	'field'		=> "origin",
-							'datatype'	=> "VARCHAR",
-							'formtype'	=> "TEXT",
-							'op'		=> "like",
-							'prefix'	=> "%",
-							'suffix'	=> "%",
-							'width'		=> "",
-							'value'		=> "");
+$liste["item"][] = array(   'field'	=> "origin",
+                            'datatype'	=> "VARCHAR",
+                            'formtype'	=> "TEXT",
+                            'op'	=> "like",
+                            'prefix'	=> "%",
+                            'suffix'	=> "%",
+                            'width'	=> "",
+                            'value'	=> "");
 
 
-$liste["item"][] = array(	'field'		=> "ns",
-							'datatype'	=> "VARCHAR",
-							'formtype'	=> "TEXT",
-							'op'		=> "like",
-							'prefix'	=> "%",
-							'suffix'	=> "%",
-							'width'		=> "",
-							'value'		=> "");
-
-
-
-
+$liste["item"][] = array(   'field'	=> "ns",
+                            'datatype'	=> "VARCHAR",
+                            'formtype'	=> "TEXT",
+                            'op'	=> "like",
+                            'prefix'	=> "%",
+                            'suffix'	=> "%",
+                            'width'	=> "",
+                            'value'	=> "");
 
 ?>
\ No newline at end of file
diff --git a/interface/web/dns/list/dns_template.list.php b/interface/web/dns/list/dns_template.list.php
index 90316d2..58055fb 100644
--- a/interface/web/dns/list/dns_template.list.php
+++ b/interface/web/dns/list/dns_template.list.php
@@ -13,13 +13,13 @@
 
 
 // Name of the list
-$liste["name"] 				= "dns_template";
+$liste["name"] 			= "dns_template";
 
 // Database table
-$liste["table"] 			= "dns_template";
+$liste["table"] 		= "dns_template";
 
 // Index index field of the database table
-$liste["table_idx"]			= "template_id";
+$liste["table_idx"]		= "template_id";
 
 // Search Field Prefix
 $liste["search_prefix"] 	= "search_";
@@ -28,10 +28,10 @@
 $liste["records_per_page"] 	= "15";
 
 // Script File of the list
-$liste["file"]				= "dns_template_list.php";
+$liste["file"]			= "dns_template_list.php";
 
 // Script file of the edit form
-$liste["edit_file"]			= "dns_template_edit.php";
+$liste["edit_file"]		= "dns_template_edit.php";
 
 // Script File of the delete script
 $liste["delete_file"]		= "dns_template_del.php";
@@ -40,7 +40,7 @@
 $liste["paging_tpl"]		= "templates/paging.tpl.htm";
 
 // Enable auth
-$liste["auth"]				= "yes";
+$liste["auth"]			= "yes";
 
 
 /*****************************************************
@@ -48,33 +48,23 @@
 *****************************************************/
 
 
-$liste["item"][] = array(	'field'		=> "visible",
-							'datatype'	=> "VARCHAR",
-							'formtype'	=> "SELECT",
-							'op'		=> "=",
-							'prefix'	=> "",
-							'suffix'	=> "",
-							'width'		=> "",
-							'value'		=> array('Y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>",'N' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>"));
+$liste["item"][] = array(   'field'     => "visible",
+                            'datatype'	=> "VARCHAR",
+                            'formtype'	=> "SELECT",
+                            'op'	=> "=",
+                            'prefix'	=> "",
+                            'suffix'	=> "",
+                            'width'	=> "",
+                            'value'	=> array('Y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>",'N' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>"));
 
 
-$liste["item"][] = array(	'field'		=> "name",
-							'datatype'	=> "VARCHAR",
-							'formtype'	=> "TEXT",
-							'op'		=> "like",
-							'prefix'	=> "%",
-							'suffix'	=> "%",
-							'width'		=> "",
-							'value'		=> "");
-
-
-
-
-
-
-
-
-
-
+$liste["item"][] = array(   'field'	=> "name",
+                            'datatype'	=> "VARCHAR",
+                            'formtype'	=> "TEXT",
+                            'op'	=> "like",
+                            'prefix'	=> "%",
+                            'suffix'	=> "%",
+                            'width'	=> "",
+                            'value'	=> "");
 
 ?>
\ No newline at end of file
diff --git a/interface/web/domain/domain_list.php b/interface/web/domain/domain_list.php
index 381285e..65a8897 100644
--- a/interface/web/domain/domain_list.php
+++ b/interface/web/domain/domain_list.php
@@ -46,6 +46,7 @@
 
 $app->uses('listform_actions');
 
+$app->listform_actions->SQLOrderBy = 'ORDER BY domain';
 $app->listform_actions->onLoad();
 
 ?>
\ No newline at end of file
diff --git a/interface/web/mail/mail_domain_list.php b/interface/web/mail/mail_domain_list.php
index 5bdfb69..d07855c 100644
--- a/interface/web/mail/mail_domain_list.php
+++ b/interface/web/mail/mail_domain_list.php
@@ -21,6 +21,7 @@
 // Limit the results to alias domains
 // $app->listform_actions->SQLExtWhere = "type = 'local'";
 
+$app->listform_actions->SQLOrderBy = 'ORDER BY domain';
 $app->listform_actions->onLoad();
 
 
diff --git a/interface/web/sites/database_list.php b/interface/web/sites/database_list.php
index 9ced595..dfe11be 100644
--- a/interface/web/sites/database_list.php
+++ b/interface/web/sites/database_list.php
@@ -67,6 +67,7 @@
 }
 
 $list = new list_action;
+$list->SQLOrderBy = 'ORDER BY database_name';
 $list->onLoad();
 
 
diff --git a/interface/web/sites/ftp_user_list.php b/interface/web/sites/ftp_user_list.php
index ef94dc2..250efcf 100644
--- a/interface/web/sites/ftp_user_list.php
+++ b/interface/web/sites/ftp_user_list.php
@@ -68,6 +68,7 @@
 }
 
 $list = new list_action;
+$list->SQLOrderBy = 'ORDER BY username';
 $list->onLoad();
 
 
diff --git a/interface/web/sites/shell_user_list.php b/interface/web/sites/shell_user_list.php
index a9c95fd..3307d63 100644
--- a/interface/web/sites/shell_user_list.php
+++ b/interface/web/sites/shell_user_list.php
@@ -49,6 +49,7 @@
 // Limit the results to alias domains
 //$app->listform_actions->SQLExtWhere = "type = 'subdomain'";
 
+$app->listform_actions->SQLOrderBy = 'ORDER BY username';
 $app->listform_actions->onLoad();
 
 
diff --git a/interface/web/sites/user_quota_stats.php b/interface/web/sites/user_quota_stats.php
index 0b23b1a..539d4ff 100644
--- a/interface/web/sites/user_quota_stats.php
+++ b/interface/web/sites/user_quota_stats.php
@@ -88,7 +88,7 @@
 
 $list = new list_action;
 $list->SQLExtWhere = "type = 'vhost'";
-
+$list->SQLOrderBy = 'ORDER BY domain';
 $list->onLoad();
 
 
diff --git a/interface/web/sites/web_aliasdomain_list.php b/interface/web/sites/web_aliasdomain_list.php
index 9417bb3..ef4a181 100644
--- a/interface/web/sites/web_aliasdomain_list.php
+++ b/interface/web/sites/web_aliasdomain_list.php
@@ -48,7 +48,7 @@
 
 // Limit the results to alias domains
 $app->listform_actions->SQLExtWhere = "type = 'alias'";
-
+$app->listform_actions->SQLOrderBy = 'ORDER BY domain';
 $app->listform_actions->onLoad();
 
 
diff --git a/interface/web/sites/web_domain_list.php b/interface/web/sites/web_domain_list.php
index da46e76..16cac5a 100644
--- a/interface/web/sites/web_domain_list.php
+++ b/interface/web/sites/web_domain_list.php
@@ -53,7 +53,7 @@
 
 $list = new list_action;
 $list->SQLExtWhere = "type = 'vhost'";
+$list->SQLOrderBy = 'ORDER BY domain';
 $list->onLoad();
-
 
 ?>
\ No newline at end of file
diff --git a/interface/web/sites/web_sites_stats.php b/interface/web/sites/web_sites_stats.php
index 076858b..e9a6c8d 100644
--- a/interface/web/sites/web_sites_stats.php
+++ b/interface/web/sites/web_sites_stats.php
@@ -59,7 +59,7 @@
 
 $list = new list_action;
 $list->SQLExtWhere = "type = 'vhost'";
-
+$list->SQLOrderBy = 'ORDER BY domain';
 $list->onLoad();
 
 
diff --git a/interface/web/sites/web_subdomain_list.php b/interface/web/sites/web_subdomain_list.php
index 78855ca..f5feaf7 100644
--- a/interface/web/sites/web_subdomain_list.php
+++ b/interface/web/sites/web_subdomain_list.php
@@ -48,7 +48,7 @@
 
 // Limit the results to alias domains
 $app->listform_actions->SQLExtWhere = "type = 'subdomain'";
-
+$app->listform_actions->SQLOrderBy = 'ORDER BY domain';
 $app->listform_actions->onLoad();
 
 
diff --git a/interface/web/sites/webdav_user_list.php b/interface/web/sites/webdav_user_list.php
index bac3de9..cc4532c 100644
--- a/interface/web/sites/webdav_user_list.php
+++ b/interface/web/sites/webdav_user_list.php
@@ -44,7 +44,7 @@
 $app->auth->check_module_permissions('sites');
 
 $app->uses('listform_actions');
-
+$app->listform_actions->SQLOrderBy = 'ORDER BY username';
 $app->listform_actions->onLoad();
 
 
diff --git a/interface/web/vm/openvz_ip_list.php b/interface/web/vm/openvz_ip_list.php
index 2a63788..8892efc 100644
--- a/interface/web/vm/openvz_ip_list.php
+++ b/interface/web/vm/openvz_ip_list.php
@@ -47,8 +47,8 @@
 
 $app->uses('listform_actions');
 
-// $app->listform_actions->SQLOrderBy = 'ORDER BY company_name, contact_name, client_id';
 // $app->listform_actions->SQLExtWhere = "limit_client = 0";
+$app->listform_actions->SQLOrderBy = 'ORDER BY server_id,ip_address';
 $app->listform_actions->onLoad();
 
 

--
Gitblit v1.9.1