]>
Commit | Line | Data |
---|---|---|
997305cf JP |
1 | <?php |
2 | /* | |
3 | mitsql.cfg.php | |
4 | (c) 2005 Joe Presbrey | |
997305cf JP |
5 | */ |
6 | ||
e47be57b JP |
7 | $CWD = getcwd(); |
8 | chdir(dirname(__FILE__)); | |
9 | ||
377015e0 JP |
10 | file_exists('server.cfg.php') && require('server.cfg.php'); |
11 | defined('DEBUG') || define('DEBUG', 0); | |
12 | defined('DEVEL') || define('DEVEL', 0); | |
98191b85 | 13 | |
4396d61b | 14 | define('VER', '1.0'); |
98191b85 JP |
15 | if (DEVEL) { |
16 | define('VERSION', VER.'-dev'); | |
17 | } else { | |
18 | define('VERSION', VER); | |
19 | } | |
20 | ||
21 | define('DELIMETER', '+'); | |
377015e0 | 22 | defined('DBHOST') || define('DBHOST', 'sql.mit.edu'); |
224df904 | 23 | defined('BASE_URL') || define('BASE_URL', '/~sql/main/'); |
377015e0 JP |
24 | defined('ADMINUSER') || define('ADMINUSER', 'root'); |
25 | defined('ADMINPASS') || define('ADMINPASS', base64_decode('TXlCZWF0c1Bvc3RA')); | |
26 | defined('ADMINDB') || define('ADMINDB', 'mitsql'); | |
997305cf | 27 | |
b44496e6 | 28 | $BASE_PATH = dirname(__FILE__).'/'; |
b44496e6 | 29 | |
997305cf JP |
30 | set_time_limit(0); |
31 | ignore_user_abort(1); | |
32 | import_request_variables('cgp', 'i_'); | |
33 | DEVEL && ini_set('display_errors', 1); | |
34 | DEVEL && error_reporting(E_ALL); | |
e47be57b | 35 | set_include_path(get_include_path() . PATH_SEPARATOR . $BASE_PATH . 'lib/' . PATH_SEPARATOR . $BASE_PATH); |
997305cf JP |
36 | |
37 | require_once('defaults.cfg.php'); | |
38 | ||
dc478ec8 | 39 | $cxn = mysql_connect(DBHOST, ADMINUSER, ADMINPASS); |
997305cf | 40 | mysql_select_db(ADMINDB,$cxn); |
3ebfe9a3 | 41 | if (mysql_error()) die(mysql_error()); |
997305cf | 42 | |
e47be57b | 43 | chdir($CWD); |
997305cf | 44 | ?> |