Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

findwishlist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: findwishlist.php 6233 2001-07-20 11:42:02Z jakobn $
5 //
6 // Created on: <15-Jan-2001 16:46:13 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
31 // include_once( "ezuser/classes/ezuser.php" );
32
33 $ini =& eZINI::instance( 'site.ini' );
34
35 $Language = $ini->variable( "eZTradeMain", "Language" );
36
37 // include_once( "eztrade/classes/ezwishlist.php" );
38 // include_once( "ezsession/classes/ezsession.php" );
39 // include_once( "ezmail/classes/ezmail.php" );
40
41
42
43 $t = new eZTemplate( "kernel/eztrade/user/" . $ini->variable( "eZTradeMain", "TemplateDir" ),
44 "kernel/eztrade/user/intl/", $Language, "findwishlist.php" );
45
46 $t->setAllStrings();
47
48 $t->set_file( array(
49 "findwishlist_page_tpl" => "findwishlist.tpl"
50 ) );
51
52 $t->set_block( "findwishlist_page_tpl", "wishlist_tpl", "wishlist" );
53
54 $wishlist = new eZWishList();
55
56 if( isset( $SearchText ) )
57 $wishLists = $wishlist->search( $SearchText );
58 else
59 $wishLists = array();
60
61 if( isset( $SearchText ) )
62 $t->set_var( "search_text", $SearchText );
63 else
64 $t->set_var( "search_text", '' );
65
66 $t->set_var( "wishlist", "" );
67
68 $i=0;
69 foreach ( $wishLists as $wishlist )
70 {
71 if ( ( $i % 2 ) == 0 )
72 $t->set_var( "td_class", "bglight" );
73 else
74 $t->set_var( "td_class", "bgdark" );
75
76 $user = $wishlist->user();
77
78 $t->set_var( "user_id", $user->id() );
79 $t->set_var( "first_name", $user->firstName() );
80 $t->set_var( "last_name", $user->lastName() );
81
82 $t->parse( "wishlist", "wishlist_tpl", true );
83 $i++;
84 }
85
86
87
88 $t->pparse( "output", "findwishlist_page_tpl" );
89
90 ?>
91
eZTemplate
Definition: eztemplate.php:107
eZWishList
Definition: ezwishlist.php:63
$SearchText
$SearchText
Definition: ezaddress/admin/typelist.php:143
$t
$t
Definition: findwishlist.php:43
$i
$i
Definition: findwishlist.php:68
$Language
$Language
Definition: findwishlist.php:35
$ini
$ini
Definition: findwishlist.php:33
$wishLists
else $wishLists
Definition: findwishlist.php:59
$wishlist
$wishlist
Definition: findwishlist.php:54
$user
$user
Definition: user/adlist.php:39
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.