r233: Removing template sets. Part 3 of 3 in a multi-stage commit.
[bugdar.git] / global.php
1 <?php
2 /*=====================================================================*\
3 || ################################################################### ||
4 || # BugStrike [#]version[#]
5 || # --------------------------------------------------------------- # ||
6 || # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
7 || # This file may not be reproduced in any way without permission. # ||
8 || # --------------------------------------------------------------- # ||
9 || # User License Agreement at http://www.iris-studios.com/license/ # ||
10 || ################################################################### ||
11 \*=====================================================================*/
12
13 require_once('./includes/init.php');
14
15 $bugsys->load('template_fs');
16 $template->extension = 'tpl';
17 $template->templatedir = $bugsys->fetch_sourcepath('templates/');
18
19 // ###################################################################
20 // check for userinfo -- temp
21 // #*# remove
22 if ($bugsys->userinfo['userid'])
23 {
24 echo '<div>You are logged in as ' . construct_user_display($bugsys->userinfo) . ' | [<a href="index.php?">Home</a>] | [<a href="newreport.php">New Bug</a>]' . ((can_perform('canadminpanel')) ? ' | [<a href="admin/">Admin</a>]' : '') . ' | [<a href="login.php?do=logout">Logout</a>]</div><hr />' . "\n\n<!-- ******************************************************************* -->\n\n";
25 }
26
27 // ###################################################################
28 // cache templates
29 $globaltemplates = array(
30 'doctype',
31 'header',
32 'headinclude',
33 'footer',
34 'selectoption',
35 'selectoptgroup',
36 'std_error',
37 'std_redirect',
38 'std_message',
39 'bugfield_input_text',
40 'bugfield_input_checkbox',
41 'bugfield_select_single_option',
42 'bugfield_select_single'
43 );
44
45 $template->cache(array_merge($globaltemplates, (array)$fetchtemplates));
46
47 // ###################################################################
48 // initialize template variables
49 $show = array();
50
51 // ###################################################################
52 // create error reporter
53 require_once('./includes/class_message_reporter.php');
54 $message = new Message_Reporter();
55 $bugsys->message =& $message;
56
57 /*=====================================================================*\
58 || ###################################################################
59 || # $HeadURL$
60 || # $Id$
61 || ###################################################################
62 \*=====================================================================*/
63 ?>