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