]> andersk Git - sql-web.git/blobdiff - mitsql.cfg.php
contact: page formatting
[sql-web.git] / mitsql.cfg.php
index 870266061d9042a4fdeda19106fdacf98a235d98..587f482e39f3509a0588203d2bb89eb12ca55451 100755 (executable)
@@ -10,6 +10,7 @@ chdir(dirname(__FILE__));
 file_exists('server.cfg.php') && require('server.cfg.php');
 defined('DEBUG') || define('DEBUG', 0);
 defined('DEVEL') || define('DEVEL', 0);
+defined('OFFLINE') || define('OFFLINE', 0);
 
 define('VER', '1.0');
 if (DEVEL) {
@@ -26,8 +27,12 @@ defined('ADMINPASS') || define('ADMINPASS', base64_decode('TXlCZWF0c1Bvc3RA'));
 defined('ADMINDB') || define('ADMINDB', 'mitsql');
 
 $BASE_PATH = dirname(__FILE__).'/';
+define('BASE_PATH', $BASE_PATH);
 $URI = (isset($_SERVER["REDIRECT_URL"])?$_SERVER["REDIRECT_URL"]:'');
 $URI = ((empty($URI) && isset($_SERVER['REQUEST_URI']))?$_SERVER['REQUEST_URI']:$URI);
+define('URI', $URI);
+$THIS_PAGE = str_replace(BASE_URL, '', URI);
+define('THIS_PAGE', $THIS_PAGE);
 
 set_time_limit(0);
 ignore_user_abort(1);
@@ -38,9 +43,12 @@ set_include_path(get_include_path() . PATH_SEPARATOR . $BASE_PATH . 'lib/' . PAT
 
 require_once('defaults.cfg.php');
 
-$cxn = mysql_connect(DBHOST, ADMINUSER, ADMINPASS);
-mysql_select_db(ADMINDB,$cxn);
-if (mysql_error()) die(mysql_error());
+if (!OFFLINE) {
+       $cxn = mysql_connect(DBHOST, ADMINUSER, ADMINPASS);
+       mysql_select_db(ADMINDB,$cxn);
+       if (mysql_error()) die(mysql_error());
+}
 
 chdir($CWD);
+
 ?>
This page took 0.026618 seconds and 4 git commands to generate.