Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

customerlist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: customerlist.php 7848 2001-10-15 11:32:18Z ce $
5 //
6 // Created on: <21-Sep-2001 16:06:44 bf>
7 //
8 // This source file is part of Exponential Basic, publishing software.
9 //
10 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
11 //
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
25 //
26
27 // include_once( "classes/INIFile.php" );
28 // include_once( "classes/eztemplate.php" );
29 // include_once( "classes/ezlocale.php" );
30 // include_once( "classes/ezcurrency.php" );
31 // include_once( "classes/ezlist.php" );
32
33 // include_once( "eztrade/classes/ezorder.php" );
34 // include_once( "ezuser/classes/ezuser.php" );
35
36 $ini =& eZINI::instance( 'site.ini' );
37 $Language = $ini->variable( "eZTradeMain", "Language" );
38
39 $t = new eZTemplate( "kernel/eztrade/admin/" . $ini->variable( "eZTradeMain", "AdminTemplateDir" ),
40 "kernel/eztrade/admin/intl/", $Language, "customerlist.php" );
41
42 $t->setAllStrings();
43
44 $t->set_file( "customer_list_tpl", "customerlist.tpl" );
45
46 $t->set_block( "customer_list_tpl", "customer_item_list_tpl", "customer_item_list" );
47 $t->set_block( "customer_item_list_tpl", "customer_item_tpl", "customer_item" );
48
49 $t->set_var( "customer_item", "" );
50
51 if ( isset( $SearchText) && $SearchText != "" )
52 {
53 $SearchText = addslashes (trim ($SearchText) );
54 $customers =& eZOrder::customers( $SearchText );
55 }
56 else
57 $customers =& eZOrder::customers();
58
59 $i=0;
60 foreach ( $customers as $customer )
61 {
62 if ( ( $i % 2 ) == 0 )
63 $t->set_var( "td_class", "bglight" );
64 else
65 $t->set_var( "td_class", "bgdark" );
66
67 $t->set_var( "customer_id", $customer->id() );
68 $t->set_var( "customer_first_name", $customer->firstName() );
69 $t->set_var( "customer_last_name", $customer->lastName() );
70
71 $i++;
72 $t->parse( "customer_item", "customer_item_tpl", true );
73 }
74
75 if ( count( $customers ) > 0 )
76 $t->parse( "customer_list", "customer_list_tpl" );
77 else
78 $t->set_var( "customer_list", "" );
79
80 $t->parse( "customer_item_list", "customer_item_list_tpl" );
81
82 $t->pparse( "output", "customer_list_tpl" );
83
84 ?>
eZOrder\customers
static & customers( $searchText=false)
Definition: ezorder.php:1271
eZTemplate
Definition: eztemplate.php:107
$t
$t
Definition: customerlist.php:39
$customers
if(isset( $SearchText) && $SearchText !="") else $customers
Definition: customerlist.php:57
$i
$i
Definition: customerlist.php:59
$Language
$Language
Definition: customerlist.php:37
$ini
$ini
Definition: customerlist.php:36
$customer
$customer
Definition: customerview.php:72
$SearchText
$SearchText
Definition: ezaddress/admin/typelist.php:143
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.