]> andersk Git - sql-web.git/blob - mitsql.cfg.php
BASE_PATH calc'd and added to include_path
[sql-web.git] / mitsql.cfg.php
1 <?php
2 /*
3     mitsql.cfg.php
4         (c) 2005 Joe Presbrey
5         written for SIPB/MIT SQL service
6 */
7
8 file_exists('server.cfg.php') && require('server.cfg.php');
9 defined('DEBUG') || define('DEBUG', 0);
10 defined('DEVEL') || define('DEVEL', 0);
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', '+');
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');
24
25 $BASE_PATH = dirname(__FILE__).'/';
26 $BASE_URL = isset($_SERVER['SCRIPT_NAME'])?dirname($_SERVER['SCRIPT_NAME']).'/':'';
27
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);
33 set_include_path(get_include_path() . PATH_SEPARATOR . $BASE_PATH . 'lib/');
34
35 require_once('defaults.cfg.php');
36
37 $cxn = mysql_connect(DBHOST, ADMINUSER, ADMINPASS);
38 mysql_select_db(ADMINDB,$cxn);
39 if (mysql_error()) die(mysql_error());
40
41 ?>
This page took 0.035079 seconds and 5 git commands to generate.