* Fixed REG_BADRPT error in isValidEmail() that prevented registration
[scuttle] / header.inc.php
1 <?php
2 ini_set('display_errors', '1');
3 ini_set('mysql.trace_mode', '0');
4
5 error_reporting(E_ALL ^ E_NOTICE);
6
7 define('DEBUG', true);
8 session_start();
9
10 require_once(dirname(__FILE__) .'/services/servicefactory.php');
11 require_once(dirname(__FILE__) .'/config.inc.php');
12 require_once(dirname(__FILE__) .'/functions.inc.php');
13
14 // Determine the base URL
15 if (!isset($root)) {
16     $pieces = explode('/', $_SERVER['SCRIPT_NAME']);
17     $root = '/';
18     foreach($pieces as $piece) {
19         if ($piece != '' && !strstr($piece, '.php')) {
20             $root .= $piece .'/';
21         }
22     }
23     if (($root != '/') && (substr($root, -1, 1) != '/')) {
24         $root .= '/';
25     }
26     $path = $root;
27     $root = 'http://'. $_SERVER['HTTP_HOST'] . $root;
28 }
29
30 // Error codes
31 define('GENERAL_MESSAGE', 200);
32 define('GENERAL_ERROR', 202);
33 define('CRITICAL_MESSAGE', 203);
34 define('CRITICAL_ERROR', 204);
35 ?>

Benjamin Mako Hill || Want to submit a patch?