]> andersk Git - sql-web.git/blob - lib/mitsql.lib.php
c59a4347e776573ff2d6e91dc6c19cc7badb9c69
[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
14 require_once('display.lib.php');
15
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 }
21
22 if (isset($_SERVER['REQUEST_URI'])) {
23     //$thisPath=pathinfo($_SERVER['REQUEST_URI']);
24     //session_set_cookie_params(0, $thisPath['dirname']);
25         //$arr = explode('/', $_SERVER['SCRIPT_NAME']);
26     //session_set_cookie_params(0, '/'.$arr[1].'/');
27     session_set_cookie_params(0, BASE_URL);
28     session_start();
29     define('INTERACTIVE', 1);
30 } else {
31     define('INTERACTIVE', 0);
32 }
33
34 INTERACTIVE && require_once('global.act.php');
35
36 ?>
This page took 0.028314 seconds and 3 git commands to generate.