- Enforce minimum elapsed time on registration form
[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_WARNING & ~E_NOTICE);
6 session_start();
7
8 require_once dirname(__FILE__) .'/services/servicefactory.php';
9 require_once dirname(__FILE__) .'/config.inc.php';
10 require_once dirname(__FILE__) .'/functions.inc.php';
11
12 // Determine the base URL
13 if (!isset($root)) {
14     $pieces = explode('/', $_SERVER['SCRIPT_NAME']);
15     $root   = '/';
16     foreach ($pieces as $piece) {
17         if ($piece != '' && !strstr($piece, '.php')) {
18             $root .= $piece .'/';
19         }
20     }
21     if (($root != '/') && (substr($root, -1, 1) != '/')) {
22         $root .= '/';
23     }
24     $path = $root;
25
26     $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
27     $root     = $protocol .'://'. $_SERVER['HTTP_HOST'] . $root;
28 }
29
30 define('GENERAL_MESSAGE',  200);
31 define('GENERAL_ERROR',    202);
32 define('CRITICAL_MESSAGE', 203);
33 define('CRITICAL_ERROR',   204);
34 define('DEBUG',            TRUE);

Benjamin Mako Hill || Want to submit a patch?