Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezbug/admin/search.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: search.php 8504 2001-11-19 09:46:46Z jhe $
5 //
6 // Created on: <04-Dec-2000 10:55:51 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( "ezbug/classes/ezbugcategory.php" );
32 // include_once( "ezbug/classes/ezbugmodule.php" );
33 // include_once( "ezbug/classes/ezbug.php" );
34
35 // include_once( "ezuser/classes/ezuser.php" );
36
37 $ini = eZINI::instance( 'site.ini' );
38
39 $Language = $ini->variable( "eZBugMain", "Language" );
40
41 $t = new eZTemplate( "kernel/ezbug/admin/" . $ini->variable( "eZBugMain", "AdminTemplateDir" ),
42 "kernel/ezbug/admin/intl/", $Language, "search.php" );
43
44 $t->setAllStrings();
45
46 $t->set_file( array(
47 "bug_list_page_tpl" => "search.tpl"
48 ) );
49
50
51 // bug
52 $t->set_block( "bug_list_page_tpl", "bug_list_tpl", "bug_list" );
53 $t->set_block( "bug_list_tpl", "bug_item_tpl", "bug_item" );
54 $t->set_block( "bug_item_tpl", "bug_is_closed_tpl", "bug_is_closed" );
55 $t->set_block( "bug_item_tpl", "bug_is_open_tpl", "bug_is_open" );
56
57
58 // bugs
59 $bug = new eZBug();
60 $bugList = $bug->search( $SearchText );
61
62 $t->set_var( "query_text", $SearchText );
63
64 $locale = new eZLocale( $Language );
65 $i=0;
66 $t->set_var( "bug_list", "" );
67 foreach ( $bugList as $bug )
68 {
69 $t->set_var( "bug_id", $bug->id() );
70 $t->set_var( "bug_name", $bug->name() );
71
72 $pri =& $bug->priority();
73 $status =& $bug->status();
74
75 if ( $pri )
76 {
77 $t->set_var( "bug_priority", $pri->name() );
78 }
79 else
80 {
81 $t->set_var( "bug_priority", "" );
82 }
83
84 if ( $status )
85 {
86 $t->set_var( "bug_status", $status->name() );
87 }
88 else
89 {
90 $t->set_var( "bug_status", "" );
91 }
92
93 if ( $bug->isClosed() == true )
94 {
95 $t->parse( "bug_is_closed", "bug_is_closed_tpl" );
96 $t->set_var( "bug_is_open", "" );
97 }
98 else
99 {
100 $t->set_var( "bug_is_closed", "" );
101 $t->parse( "bug_is_open", "bug_is_open_tpl" );
102 }
103
104 if ( ( $i % 2 ) == 0 )
105 {
106 $t->set_var( "td_class", "bglight" );
107 }
108 else
109 {
110 $t->set_var( "td_class", "bgdark" );
111 }
112
113 $t->parse( "bug_item", "bug_item_tpl", true );
114 $i++;
115 }
116
117 if ( count( $bugList ) > 0 )
118 $t->parse( "bug_list", "bug_list_tpl" );
119 else
120 $t->set_var( "bug_list", "" );
121
122 $t->pparse( "output", "bug_list_page_tpl" );
123
124 ?>
$status
$status
Definition: bugedit.php:473
$pri
$pri
Definition: bugpreview.php:70
eZBug
Definition: ezbug.php:80
eZLocale
Definition: ezlocale.php:119
eZTemplate
Definition: eztemplate.php:107
$SearchText
$SearchText
Definition: ezaddress/admin/typelist.php:143
$locale
$locale
Definition: ezbug/admin/search.php:64
$t
$t
Definition: ezbug/admin/search.php:41
$bug
$bug
Definition: ezbug/admin/search.php:59
$i
$i
Definition: ezbug/admin/search.php:65
$Language
$Language
Definition: ezbug/admin/search.php:39
$ini
$ini
Definition: ezbug/admin/search.php:37
$bugList
$bugList
Definition: ezbug/admin/search.php:60
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.