]>
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 | ||
377015e0 JP |
8 | file_exists('server.cfg.php') && require('server.cfg.php'); |
9 | defined('DEBUG') || define('DEBUG', 0); | |
10 | defined('DEVEL') || define('DEVEL', 0); | |
98191b85 JP |
11 | |
12 | define('VER', '0.3'); | |
13 | if (DEVEL) { | |
14 | define('VERSION', VER.'-dev'); | |
15 | } else { | |
16 | define('VERSION', VER); | |
17 | } | |
18 | ||
19 | define('DELIMETER', '+'); | |
377015e0 JP |
20 | defined('DBHOST') || define('DBHOST', 'sql.mit.edu'); |
21 | defined('ADMINUSER') || define('ADMINUSER', 'root'); | |
22 | defined('ADMINPASS') || define('ADMINPASS', base64_decode('TXlCZWF0c1Bvc3RA')); | |
23 | defined('ADMINDB') || define('ADMINDB', 'mitsql'); | |
997305cf | 24 | |
b44496e6 JP |
25 | $BASE_PATH = dirname(__FILE__).'/'; |
26 | $BASE_URL = isset($_SERVER['SCRIPT_NAME'])?dirname($_SERVER['SCRIPT_NAME']).'/':''; | |
27 | ||
997305cf JP |
28 | set_time_limit(0); |
29 | ignore_user_abort(1); | |
30 | import_request_variables('cgp', 'i_'); | |
31 | DEVEL && ini_set('display_errors', 1); | |
32 | DEVEL && error_reporting(E_ALL); | |
b44496e6 | 33 | set_include_path(get_include_path() . PATH_SEPARATOR . $BASE_PATH . 'lib/'); |
997305cf JP |
34 | |
35 | require_once('defaults.cfg.php'); | |
36 | ||
dc478ec8 | 37 | $cxn = mysql_connect(DBHOST, ADMINUSER, ADMINPASS); |
997305cf | 38 | mysql_select_db(ADMINDB,$cxn); |
3ebfe9a3 | 39 | if (mysql_error()) die(mysql_error()); |
997305cf JP |
40 | |
41 | ?> |