summaryrefslogtreecommitdiff
path: root/header.inc.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2007-12-12 16:29:16 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2007-12-12 16:29:16 +0000
commitd582054c77b22daeb08d2bff17794b9a69a20dd4 (patch)
treed6e7cef8639da6f573cd0b21a5316abf5af24fac /header.inc.php
downloadsemanticscuttle-d582054c77b22daeb08d2bff17794b9a69a20dd4.tar.gz
semanticscuttle-d582054c77b22daeb08d2bff17794b9a69a20dd4.tar.bz2
import of scuttle 0.7.2
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@1 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'header.inc.php')
-rw-r--r--header.inc.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/header.inc.php b/header.inc.php
new file mode 100644
index 0000000..751e4e8
--- /dev/null
+++ b/header.inc.php
@@ -0,0 +1,34 @@
+<?php
+ini_set('display_errors', '1');
+ini_set('mysql.trace_mode', '0');
+
+error_reporting(E_ALL ^ E_NOTICE);
+
+define('DEBUG', true);
+session_start();
+
+require_once(dirname(__FILE__) .'/services/servicefactory.php');
+require_once(dirname(__FILE__) .'/config.inc.php');
+require_once(dirname(__FILE__) .'/functions.inc.php');
+
+// Determine the base URL
+if (!isset($root)) {
+ $pieces = explode('/', $_SERVER['SCRIPT_NAME']);
+ $root = '/';
+ foreach($pieces as $piece) {
+ if ($piece != '' && !strstr($piece, '.php')) {
+ $root .= $piece .'/';
+ }
+ }
+ if (($root != '/') && (substr($root, -1, 1) != '/')) {
+ $root .= '/';
+ }
+ $root = 'http://'. $_SERVER['HTTP_HOST'] . $root;
+}
+
+// Error codes
+define('GENERAL_MESSAGE', 200);
+define('GENERAL_ERROR', 202);
+define('CRITICAL_MESSAGE', 203);
+define('CRITICAL_ERROR', 204);
+?> \ No newline at end of file