]>
Commit | Line | Data |
---|---|---|
997305cf JP |
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 | ||
14 | require_once('display.lib.php'); | |
15 | ||
aaaa7a8f JP |
16 | if (isset($_SERVER['SERVER_NAME'])) { |
17 | $BASE_URL = 'http'.(isSSL()?'s':'').'://'.$_SERVER['SERVER_NAME'].BASE_URL; | |
18 | } else { | |
19 | $BASE_URL = 'http://sql.mit.edu/'; | |
20 | } | |
9840d102 | 21 | |
997305cf JP |
22 | if (isset($_SERVER['REQUEST_URI'])) { |
23 | //$thisPath=pathinfo($_SERVER['REQUEST_URI']); | |
24 | //session_set_cookie_params(0, $thisPath['dirname']); | |
e47be57b JP |
25 | //$arr = explode('/', $_SERVER['SCRIPT_NAME']); |
26 | //session_set_cookie_params(0, '/'.$arr[1].'/'); | |
9840d102 | 27 | session_set_cookie_params(0, BASE_URL); |
997305cf JP |
28 | session_start(); |
29 | define('INTERACTIVE', 1); | |
30 | } else { | |
31 | define('INTERACTIVE', 0); | |
32 | } | |
33 | ||
34 | INTERACTIVE && require_once('global.act.php'); | |
35 | ||
36 | ?> |