]> andersk Git - sql-web.git/blobdiff - lib/mitsql.lib.php
move SQL to use external joe libraries
[sql-web.git] / lib / mitsql.lib.php
index db3790df2fd57df3e2ef4533e7939b118ffb4f35..4d915b5de183167f4fe33c3763f8d87af19926de 100755 (executable)
@@ -5,21 +5,27 @@
        written for SIPB/MIT SQL service
 */
 
-require_once('joe.lib.php');
+require_once('joe/util.lib.php');
 require_once('dbaccess.lib.php');
 
 require_once('mitsql.cfg.php');
 require_once('security.lib.php');
+require_once('errorhandler.lib.php');
 
 require_once('display.lib.php');
 
-$BASE_URL = 'http'.(isSSL()?'s':'').'://'.$_SERVER['SERVER_NAME'].BASE_URL;
+if (isset($_SERVER['SERVER_NAME'])) {
+       $BASE_URL = 'http'.(isSSL()?'s':'').'://'.$_SERVER['SERVER_NAME'].BASE_URL;
+} else {
+       $BASE_URL = 'http://sql.mit.edu/';
+}
 
 if (isset($_SERVER['REQUEST_URI'])) {
     //$thisPath=pathinfo($_SERVER['REQUEST_URI']);
     //session_set_cookie_params(0, $thisPath['dirname']);
        //$arr = explode('/', $_SERVER['SCRIPT_NAME']);
     //session_set_cookie_params(0, '/'.$arr[1].'/');
+       session_name('SQLMITEDU');
     session_set_cookie_params(0, BASE_URL);
     session_start();
     define('INTERACTIVE', 1);
This page took 0.038532 seconds and 4 git commands to generate.