Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

persontypelist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: persontypelist.php 6237 2001-07-20 12:01:51Z jakobn $
5 //
6 // Created on: <23-Oct-2000 17:53:46 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 /*
28 Viser liste over person typer.
29 */
30 // include_once( "classes/INIFile.php" );
31
32 $ini =& $GlobalSiteIni;
33 $Language = $ini->variable( "eZContactMain", "Language" );
34 $DOC_ROOT = $ini->variable( "eZContactMain", "DocumentRoot" );
35
36 // include_once( "classes/eztemplate.php" );
37 // include_once( "common/ezphputils.php" );
38
39 // include_once( "ezuser/classes/ezuser.php" );
40 // include_once( "ezuser/classes/ezusergroup.php" );
41 // include_once( "ezuser/classes/ezmodule.php" );
42 // include_once( "ezuser/classes/ezpermission.php" );
43
44 // include_once( "ezcontact/classes/ezperson.php" );
45 // include_once( "ezcontact/classes/ezpersontype.php" );
46
47 require( "kernel/ezuser/admin/admincheck.php" );
48
49 $t = new eZTemplate( $DOC_ROOT . "/" . $ini->variable( "eZContactMain", "TemplateDir" ), $DOC_ROOT . "/intl", $Language, "persontypelist.php" );
50 $t->setAllStrings();
51
52 $t->set_file( array(
53 "persontype_page" => "persontypelist.tpl",
54 "persontype_item" => "persontypeitem.tpl"
55 ) );
56
57 $persontype = new eZPersonType();
58 $persontype_array = $persontype->getAll();
59
60 for ( $i=0; $i<count( $persontype_array ); $i++ )
61 {
62 if ( ( $i % 2 ) == 0 )
63 {
64 $t->set_var( "bg_color", "#eeeeee" );
65 }
66 else
67 {
68 $t->set_var( "bg_color", "#dddddd" );
69 }
70
71 $t->set_var( "persontype_id", $persontype_array[$i][ "ID" ] );
72 $t->set_var( "persontype_name", $persontype_array[$i][ "Name" ] );
73 $t->set_var( "description", $persontype_array[$i][ "Description" ] );
74 $t->parse( "persontype_list", "persontype_item", true );
75 }
76
77 $t->set_var( "document_root", $DOC_ROOT );
78 $t->pparse( "output", "persontype_page" );
79
80 ?>
$i
$i
Definition: admin/adlist.php:91
eZTemplate
Definition: eztemplate.php:107
$GlobalSiteIni
$GlobalSiteIni
Definition: ezarticle/xmlrpc/xmlrpcserver.php:33
$DOC_ROOT
$DOC_ROOT
Definition: persontypelist.php:34
$t
$t
Definition: persontypelist.php:49
$persontype_array
$persontype_array
Definition: persontypelist.php:58
$Language
$Language
Definition: persontypelist.php:33
$ini
$ini
Definition: persontypelist.php:32
$persontype
$persontype
Definition: persontypelist.php:57
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.