From e1ceb050e19c7574bca146a8da7047ee4ff456b5 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Sun, 10 Jul 2016 05:02:35 -0400
Subject: [PATCH] Merge branch 'stable-3.1'
---
interface/web/client/client_list.php | 63 +++++++++++++++++++------------
1 files changed, 38 insertions(+), 25 deletions(-)
diff --git a/interface/web/client/client_list.php b/interface/web/client/client_list.php
index 49cecb9..b5f2ed0 100644
--- a/interface/web/client/client_list.php
+++ b/interface/web/client/client_list.php
@@ -1,25 +1,38 @@
-<?php
-require_once('../../lib/config.inc.php');
-require_once('../../lib/app.inc.php');
-
-/******************************************
-* Begin Form configuration
-******************************************/
-
-$list_def_file = "list/reseller.list.php";
-
-/******************************************
-* End Form configuration
-******************************************/
-
-// Checking module permissions
-if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) {
- header("Location: ../index.php");
- exit;
-}
-
-$app->uses('listform_actions');
-$app->listform_actions->onLoad();
-
-
-?>
\ No newline at end of file
+<?php
+require_once '../../lib/config.inc.php';
+require_once '../../lib/app.inc.php';
+
+/******************************************
+* Begin Form configuration
+******************************************/
+
+$list_def_file = "list/client.list.php";
+
+/******************************************
+* End Form configuration
+******************************************/
+
+//* Check permissions for module
+$app->auth->check_module_permissions('client');
+
+$app->uses('listform_actions');
+
+class list_action extends listform_actions {
+ function onShow() {
+ global $app;
+
+ if(is_file(ISPC_WEB_PATH.'/robot/lib/robot_config.inc.php')){
+ $app->tpl->setVar('has_robot', true);
+ }
+
+ parent::onShow();
+ }
+
+}
+
+$list = new list_action;
+$list->SQLOrderBy = 'ORDER BY client.company_name, client.contact_name, client.client_id';
+$list->SQLExtWhere = "client.limit_client = 0";
+$list->SQLExtSelect = ', LOWER(client.country) as countryiso';
+$list->onLoad();
+?>
--
Gitblit v1.9.1