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