From 7d52e00a51450bc4a080d4e21b7dda02c0a65191 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Thu, 14 Nov 2013 05:42:06 -0500
Subject: [PATCH] Fixed list sorting
---
interface/web/mail/list/mail_domain.list.php | 32 ++++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/interface/web/mail/list/mail_domain.list.php b/interface/web/mail/list/mail_domain.list.php
index 359a6df..0012e1c 100644
--- a/interface/web/mail/list/mail_domain.list.php
+++ b/interface/web/mail/list/mail_domain.list.php
@@ -13,7 +13,11 @@
// Name of the list
-$liste["name"] = "mail_domain";
+if($_SESSION['s']['user']['typ'] == 'admin') {
+ $liste["name"] = "mail_domain_admin";
+} else {
+ $liste["name"] = "mail_domain";
+}
// Database table
$liste["table"] = "mail_domain";
@@ -25,7 +29,7 @@
$liste["search_prefix"] = "search_";
// Records per page
-$liste["records_per_page"] = 15;
+$liste["records_per_page"] = "15";
// Script File of the list
$liste["file"] = "mail_domain_list.php";
@@ -55,7 +59,24 @@
'prefix' => "",
'suffix' => "",
'width' => "",
- 'value' => array('1' => "Yes",'0' => "No"));
+ 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>"));
+
+
+if($_SESSION['s']['user']['typ'] == 'admin') {
+$liste["item"][] = array( 'field' => "sys_groupid",
+ 'datatype' => "INTEGER",
+ 'formtype' => "SELECT",
+ 'op' => "=",
+ 'prefix' => "",
+ 'suffix' => "",
+ 'datasource' => array ( 'type' => 'SQL',
+ 'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name',
+ 'keyfield'=> 'groupid',
+ 'valuefield'=> 'name'
+ ),
+ 'width' => "",
+ 'value' => "");
+}
$liste["item"][] = array( 'field' => "server_id",
@@ -65,7 +86,7 @@
'prefix' => "%",
'suffix' => "%",
'datasource' => array ( 'type' => 'SQL',
- 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name',
+ 'querystring' => 'SELECT a.server_id, a.server_name FROM server a, mail_domain b WHERE (a.server_id = b.server_id) AND ({AUTHSQL-B}) ORDER BY a.server_name',
'keyfield'=> 'server_id',
'valuefield'=> 'server_name'
),
@@ -74,6 +95,9 @@
$liste["item"][] = array( 'field' => "domain",
'datatype' => "VARCHAR",
+ 'filters' => array( 0 => array( 'event' => 'SHOW',
+ 'type' => 'IDNTOUTF8')
+ ),
'formtype' => "TEXT",
'op' => "like",
'prefix' => "%",
--
Gitblit v1.9.1