r665: Renaming product from "BugStrike" to "Bugdar"
[bugdar.git] / install / global.php
1 <?php
2 /*=====================================================================*\
3 || ################################################################### ||
4 || # Bugdar [#]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 error_reporting(E_ALL & ~E_NOTICE);
14
15 // ###################################################################
16 // load system
17
18 chdir('./../');
19
20 define('ISSO_MT_START', microtime());
21
22 if (!file_exists('./includes/config.php'))
23 {
24 echo 'includes/config.php needs to be present!';
25 exit;
26 }
27
28 require_once('./includes/config.php');
29
30 define('ISSO_ESCAPE_STRINGS', 1);
31 define('ISSO_CHECK_POST_REFERER', 1);
32
33 require_once($pathtoisso . 'kernel.php');
34 $bugsys =& $_isso;
35 $bugsys->application = 'Bugdar';
36 $bugsys->apppath = $bugsys->fetch_sourcepath(getcwd());
37 $bugsys->appversion = '[#]version[#]';
38 $bugsys->debug = $debug;
39 $bugsys->sourcepath = $bugsys->fetch_sourcepath($pathtoisso);
40
41 $bugsys->load('db_mysql');
42 $db->database = $database;
43 $db->connect($servername, $username, $password, $usepconnect);
44
45 $bugsys->exec_sanitize_data();
46
47 define('DEVDEBUG', $debug);
48 define('TABLE_PREFIX', $tableprefix);
49 define('COOKIE_PREFIX', $cookieprefix);
50
51 unset($database, $servername, $username, $password, $usepconnect, $tableprefix, $cookieprefix);
52
53 require_once('./includes/functions_datastore.php');
54 require_once('./includes/functions.php');
55
56 // ###################################################################
57 // init the big three
58 $bugsys->options = array();
59 $bugsys->userinfo = array();
60 $bugsys->datastore = array();
61
62 // ###################################################################
63
64 $bugsys->in['mark'] = intval($bugsys->in['mark']);
65
66 // ###################################################################
67 // ###################################################################
68 // ###################################################################
69
70 // ###################################################################
71 // constructs the page header bit
72
73 function page_start()
74 {
75 ?>
76 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
77 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
78 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
79 <head>
80 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
81 <link rel="stylesheet" href="install.css" media="screen" />
82 <title>Bugdar Installer</title>
83 </head>
84 <body>
85
86 <?php
87 }
88
89 // ###################################################################
90 // puts the end of the page down
91
92 function page_end($next = true)
93 {
94 global $bugsys;
95
96 if (defined('STOP_MARK') AND $next)
97 {
98 if ($bugsys->in['mark'] >= STOP_MARK)
99 {
100 echo '<div class="buttonlink"><a href="../admin/">Go to the Administrative Control Panel</a></div>';
101 }
102 else
103 {
104 echo '<div class="buttonlink"><a href="' . ACTIVE_SITE . '?mark=' . ($bugsys->in['mark'] + 1) . '">Next Step</a></div>';
105 }
106 }
107
108 echo '
109
110 </body>
111
112 </html>';
113
114 exit;
115 }
116
117 /*=====================================================================*\
118 || ###################################################################
119 || # $HeadURL$
120 || # $Id$
121 || ###################################################################
122 \*=====================================================================*/
123 ?>