Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

prioritylist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: prioritylist.php 8504 2001-11-19 09:46:46Z jhe $
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 Shows a list of priorities, and lets the user edit and add new priorities.
29 */
30 // include_once( "classes/INIFile.php" );
31 $ini = eZINI::instance( 'site.ini' );
32 $Language = $ini->variable( "eZBugMain", "Language" );
33 $LanguageIni = new eZINI( "kernel/ezbug/admin/intl/" . $Language . "/prioritylist.php.ini", false );
34
35 // include_once( "classes/eztemplate.php" );
36
37 // include_once( "ezbug/classes/ezbugpriority.php" );
38
39 $t = new eZTemplate( "kernel/ezbug/admin/" . $ini->variable( "eZBugMain", "AdminTemplateDir" ),
40 "kernel/ezbug/admin/intl", $Language, "prioritylist.php" );
41 $t->setAllStrings();
42
43 $t->set_file( array(
44 "priority_page" => "prioritylist.tpl"
45 ) );
46
47 $t->set_block( "priority_page", "priority_item_tpl", "priority_item" );
48
49 $t->set_var( "site_style", $SiteDesign );
50
51
52 if( isset( $DeletePriorities ) )
53 {
54 if( count( $PriorityArrayID ) > 0 )
55 {
56 foreach( $PriorityArrayID as $deleteItemID )
57 {
58 $item = new eZBugPriority( $PriorityID[ $deleteItemID ] );
59 $item->delete();
60 }
61 }
62 }
63
64
65 if( isset( $Ok ) || isset( $AddPriority ) )
66 {
67 $i = 0;
68 if( count( $PriorityID ) > 0 )
69 {
70 foreach( $PriorityID as $itemID )
71 {
72 $priority = new eZBugPriority( $itemID );
73 $priority->setName( $PriorityName[$i] );
74 $priority->store();
75 $i++;
76 }
77 }
78
79 // $priority = new eZBugPriority( $PriorityID );
80 // $priority->setName( $Name );
81 // $priority->store();
82 }
83
84 if( isset( $AddPriority ) )
85 {
86 $newItem = new eZBugPriority();
87 $newName = $LanguageIni->variable( "strings", "new_priority" );
88 $newItem->setName($newName);
89 $newItem->store();
90 }
91
92
93 $priority = new eZBugPriority();
94 $priorityList = $priority->getAll();
95
96 $i=0;
97 foreach( $priorityList as $priorityItem )
98 {
99 if ( ( $i %2 ) == 0 )
100 {
101 $t->set_var( "td_class", "bglight" );
102 }
103 else
104 {
105 $t->set_var( "td_class", "bgdark" );
106 }
107
108 $t->set_var( "priority_id", $priorityItem->id() );
109 $t->set_var( "priority_name", $priorityItem->name() );
110 $t->set_var( "index_nr", $i );
111
112 $t->parse( "priority_item", "priority_item_tpl", true );
113 $i++;
114 }
115
116 $t->pparse( "output", "priority_page" );
117
118 ?>
eZBugPriority
Definition: ezbugpriority.php:54
eZINI
Reads and writes .ini style configuration files.
eZTemplate
Definition: eztemplate.php:107
$item
$item
Definition: classes/admin/linklist.php:228
$SiteDesign
$SiteDesign
Definition: ezbulkmail/user/datasupplier.php:31
$t
$t
Definition: prioritylist.php:39
$priority
if(isset( $DeletePriorities)) if(isset( $Ok)||isset( $AddPriority)) if(isset( $AddPriority)) $priority
Definition: prioritylist.php:93
$i
$i
Definition: prioritylist.php:96
$Language
$Language
Definition: prioritylist.php:32
$ini
$ini
Definition: prioritylist.php:31
$LanguageIni
$LanguageIni
Definition: prioritylist.php:33
$priorityList
$priorityList
Definition: prioritylist.php:94
$PriorityID
$PriorityID
Definition: todoedit.php:121
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.