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