Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

groupdisplay.php
Go to the documentation of this file.
1 <?
3 //
4 // $Id: groupdisplay.php,v 1.1 2001/04/24 09:39:43 bf Exp $
5 //
6 // Adam Fallert <FallertA@umsystem.edu>
7 // Created on: <3-Oct-2001 14:36:00>
8 //
9 // This source file is part of Exponential Basic, publishing software.
10 // Copyright (C) 1999-2000 eZ systems as
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/ezlocale.php" );
28 // include_once( "classes/ezhttptool.php" );
29 // include_once( "classes/eztemplate.php" );
30 // include_once( "classes/INIFile.php" );
31
32 // include_once( "ezuser/classes/ezusergroup.php" );
33
34 // include_once( "ezgroupeventcalendar/classes/ezgroupnoshow.php" );
35
36 if ( isset( $NoDisplayIDArray ) && isset( $Store ) )
37 {
38 $nodisplay = new eZGroupNoShow();
39
40 // first clear the table
41 $nodisplay->dumpTable();
42
43 //second reload the table
44 foreach ( $NoDisplayIDArray as $id )
45 {
46 $group = new eZUserGroup( $id );
47 $nodisplay = new eZGroupNoShow();
48 $nodisplay->setGroup( $group );
49 $nodisplay->store();
50 }
51 }
52 elseif( !isset( $NoDisplayIDArray ) && isset( $Store ) )
53 {
54 $nodisplay = new eZGroupNoShow();
55
56 // first clear the table
57 $nodisplay->dumpTable();
58 }
59
60 $t = new eZTemplate( "kernel/ezgroupeventcalendar/admin/" . $ini->variable( "eZGroupEventCalendarMain", "AdminTemplateDir" ),
61 "kernel/ezgroupeventcalendar/admin/intl", $Language, "groupdisplay.php" );
62
63 $locale = new eZLocale( $Language );
64
65 $t->set_file( "group_display_tpl", "groupdisplay.tpl" );
66
67 $t->setAllStrings();
68
69 $t->set_block( "group_display_tpl", "group_list_tpl", "group_list" );
70 $t->set_block( "group_list_tpl", "group_item_tpl", "group_item" );
71
72 $groups = new eZUserGroup();
73 $groups_no_show = new eZGroupNoShow();
74
75 $groups_list = $groups->getAll();
76 $groups_no_show_list = $groups_no_show->getAll();
77
78
79 foreach ( $groups_list as $group )
80 {
81 /*
82 foreach ( $groups_no_show_list as $group_no_show )
83 {
84 $t->set_var( "group_is_checked", $group->id() == $group_no_show->groupID() ? "checked" : "" );
85 }
86 */
87
88 if( $groups_no_show->groupEntry( $group->id() ) == true )
89 {
90 $t->set_var( "group_is_checked", "checked" );
91 }
92 else
93 {
94 $t->set_var( "group_is_checked", "" );
95 }
96
97 if ( ( $i % 2 ) == 0 )
98 {
99 $td_class = "bglight";
100 }
101 else
102 {
103 $td_class = "bgdark";
104 }
105
106 $t->set_var( "bgcolor", $td_class );
107 $t->set_var( "group_id", $group->id() );
108 $t->set_var( "group_name", $group->name() );
109 $t->parse( "group_item", "group_item_tpl", true );
110
111 $i++;
112 }
113 $t->parse( "group_list", "group_list_tpl", true );
114
115
116 $t->pparse( "output", "group_display_tpl" );
117 ?>
$i
$i
Definition: admin/adlist.php:91
$group
$group
Definition: admin/articleedit.php:799
eZGroupNoShow
Definition: ezgroupnoshow.php:34
eZLocale
Definition: ezlocale.php:119
eZTemplate
Definition: eztemplate.php:107
eZUserGroup
Definition: ezusergroup.php:66
$Language
$Language
Definition: classes/admin/linklist.php:65
$ini
$ini
Definition: classes/admin/linklist.php:64
$id
$id
Definition: companytypelist.php:193
$groups
$groups
Definition: groupdisplay.php:72
$locale
$locale
Definition: groupdisplay.php:63
$groups_no_show_list
$groups_no_show_list
Definition: groupdisplay.php:76
$groups_no_show
$groups_no_show
Definition: groupdisplay.php:73
$groups_list
$groups_list
Definition: groupdisplay.php:75
$t
if(isset( $NoDisplayIDArray) &&isset( $Store)) elseif(!isset( $NoDisplayIDArray) &&isset( $Store)) $t
Definition: groupdisplay.php:60
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.