2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar [#]version[#]
5 || # Copyright ©2002-[#]year[#] Blue Static
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
22 $fetchtemplates = array(
29 define('SVN', '$Id$');
31 $focus['index'] = 'focus';
33 require_once('./global.php');
34 require_once('./includes/class_pagination.php');
35 require_once('./includes/class_sort.php');
37 if (!can_perform('canviewbugs'))
39 $message->error_permission();
42 $sort = new ListSorter('index');
44 // ###################################################################
46 $pagination = new Pagination('p', 'pp');
47 $count = $db->query_first("
48 SELECT COUNT(*) AS count
49 FROM " . TABLE_PREFIX
. "bug
50 WHERE (!hidden OR (hidden AND product IN (" . fetch_on_bits('canviewhidden') . "))" . (can_perform('canviewownhidden') ?
" OR (hidden AND userid = " . $bugsys->userinfo
['userid'] . " AND product IN (" . fetch_on_bits('canviewownhidden') . "))" : "") . ")
51 AND product IN (" . fetch_on_bits('canviewbugs') . ")" . (($bugsys->options
['hidestatuses'] OR isset($bugsys->userinfo
['hidestatuses'])) ?
"
52 AND status NOT IN (" . ($bugsys->userinfo
['hidestatuses'] != '' ?
$bugsys->userinfo
['hidestatuses'] : $bugsys->options
['hidestatuses']) . ")" : "")
55 $pagination->total
= $count['count'];
56 $pagination->split_pages();
58 $bugs_fetch = $db->query($sort->fetch_sql_query(null
, $pagination->fetch_limit($pagination->page
- 1) . ", " . $pagination->perpage
));
60 while ($bug = $db->fetch_array($bugs_fetch))
62 $funct->exec_swap_bg($stylevar['alt_color'], '');
63 ProcessBugDataForDisplay(&$bug, $funct->bgcolour
);
64 eval('$bugs .= "' . $template->fetch('trackerhome_bits') . '";');
67 $db->free_result($bugs_fetch);
69 $order = $sort->fetch_display_array('p=' . $pagination->page
. '&pp=' . $pagination->perpage
);
70 $show['pagenav'] = (($pagination->pagecount
> 1) ? true
: false
);
71 $pagenav = $pagination->construct_page_nav($sort->fetch_sort_link($sort->sortkey
));
73 eval('$template->flush("' . $template->fetch('trackerhome') . '");');
75 /*=====================================================================*\
76 || ###################################################################
79 || ###################################################################
80 \*=====================================================================*/