]> andersk Git - sql-web.git/blob - mitsql.cfg.php
check quotas function
[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 $CWD = getcwd();
9 chdir(dirname(__FILE__));
10
11 file_exists('server.cfg.php') && require('server.cfg.php');
12 defined('DEBUG') || define('DEBUG', 0);
13 defined('DEVEL') || define('DEVEL', 0);
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', '+');
23 defined('DBHOST') || define('DBHOST', 'sql.mit.edu');
24 defined('BASE_URL') || define('BASE_URL', '/~sql/main/');
25 defined('ADMINUSER') || define('ADMINUSER', 'root');
26 defined('ADMINPASS') || define('ADMINPASS', base64_decode('TXlCZWF0c1Bvc3RA'));
27 defined('ADMINDB') || define('ADMINDB', 'mitsql');
28
29 $BASE_PATH = dirname(__FILE__).'/';
30 $BASE_URL = 'http://'.$_SERVER['SERVER_NAME'].BASE_URL;
31 //$BASE_URL = isset($_SERVER['SCRIPT_NAME'])?dirname($_SERVER['SCRIPT_NAME']).'/':'';
32
33 set_time_limit(0);
34 ignore_user_abort(1);
35 import_request_variables('cgp', 'i_');
36 DEVEL && ini_set('display_errors', 1);
37 DEVEL && error_reporting(E_ALL);
38 set_include_path(get_include_path() . PATH_SEPARATOR . $BASE_PATH . 'lib/' . PATH_SEPARATOR . $BASE_PATH);
39
40 require_once('defaults.cfg.php');
41
42 $cxn = mysql_connect(DBHOST, ADMINUSER, ADMINPASS);
43 mysql_select_db(ADMINDB,$cxn);
44 if (mysql_error()) die(mysql_error());
45
46 chdir($CWD);
47
48 ?>
This page took 0.050232 seconds and 5 git commands to generate.