forked from tylerhall/simple-php-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmaster.inc.php
More file actions
42 lines (32 loc) · 1.19 KB
/
master.inc.php
File metadata and controls
42 lines (32 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?PHP
// Application flag
define('SPF', true);
// https://twitter.com/#!/marcoarment/status/59089853433921537
date_default_timezone_set('America/Los_Angeles');
// Determine our absolute document root
define('DOC_ROOT', realpath(dirname(__FILE__) . '/../'));
// Global include files
require DOC_ROOT . '/includes/functions.inc.php'; // __autoload() is contained in this file
require DOC_ROOT . '/includes/class.dbobject.php';
require DOC_ROOT . '/includes/class.objects.php';
// Fix magic quotes
if(get_magic_quotes_gpc())
{
$_POST = fix_slashes($_POST);
$_GET = fix_slashes($_GET);
$_REQUEST = fix_slashes($_REQUEST);
$_COOKIE = fix_slashes($_COOKIE);
}
// Load our config settings
$Config = Config::getConfig();
// Store session info in the database?
if(Config::get('useDBSessions') === true)
DBSession::register();
// Initialize our session
session_name('spfs');
session_start();
// Initialize current user
$Auth = Auth::getAuth();
// Object for tracking and displaying error messages
$Error = Error::getError();
// Auth::createNewUser('username', 'password');