]> andersk Git - sql-web.git/blob - lib/mitsql.lib.php
errors are emailed in
[sql-web.git] / lib / mitsql.lib.php
1 <?php
2 /*
3         mitsql.lib.php
4         (c) 2005 Joe Presbrey
5         written for SIPB/MIT SQL service
6 */
7
8 require_once('joe.lib.php');
9 require_once('dbaccess.lib.php');
10
11 require_once('mitsql.cfg.php');
12 require_once('security.lib.php');
13 require_once('errorhandler.lib.php');
14
15 require_once('display.lib.php');
16
17 if (isset($_SERVER['SERVER_NAME'])) {
18         $BASE_URL = 'http'.(isSSL()?'s':'').'://'.$_SERVER['SERVER_NAME'].BASE_URL;
19 } else {
20         $BASE_URL = 'http://sql.mit.edu/';
21 }
22
23 if (isset($_SERVER['REQUEST_URI'])) {
24     //$thisPath=pathinfo($_SERVER['REQUEST_URI']);
25     //session_set_cookie_params(0, $thisPath['dirname']);
26         //$arr = explode('/', $_SERVER['SCRIPT_NAME']);
27     //session_set_cookie_params(0, '/'.$arr[1].'/');
28     session_set_cookie_params(0, BASE_URL);
29     session_start();
30     define('INTERACTIVE', 1);
31 } else {
32     define('INTERACTIVE', 0);
33 }
34
35 INTERACTIVE && require_once('global.act.php');
36
37 ?>
This page took 0.170125 seconds and 5 git commands to generate.