-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig-sample.php
More file actions
85 lines (59 loc) · 1.86 KB
/
config-sample.php
File metadata and controls
85 lines (59 loc) · 1.86 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
/**
* File name: config.php
* contains global - framework - configuration information
* @author Michael Orji
*/
error_reporting(E_ALL);
ini_set('display_errors', 1);
if(get_magic_quotes_gpc()):
function stripslashes_recursive($value)
{
$value = is_array($value) ? array_map('stripslashes_recursive', $value) : stripslashes($value);
return $value;
}
$_POST = array_map('stripslashes_recursive', $_POST);
$_GET = array_map('stripslashes_recursive', $_GET);
$_REQUEST = array_map('stripslashes_recursive', $_REQUEST);
$_COOKIE = array_map('stripslashes_recursive', $_COOKIE);
endif;
require 'a/pcl/ini.php';
$current_script_paths = UrlInspector::get_path(dirname(__FILE__));
/**
* database server name
*/
define('DB_SERVER', 'localhost');
/**
* database user name
*/
define('DB_USER', 'root');
/**
* database user password
*/
define('DB_PASS', '');
/**
* database name
*/
define('DB_NAME', 'forum_software');
/**
* database tables prefix
*/
define('TABLES_PREFIX', 'fs_');
define('SITE_DIR', rtrim($current_script_paths['dir_path'], '/'));
define('SITE_URL', rtrim($current_script_paths['http_path'], '/'));
define('INCLUDES_DIR', SITE_DIR. '/includes');
define('CONTROLLERS_DIR', SITE_DIR. '/controllers');
define('VIEWS_DIR', SITE_DIR. '/themes');
define('VIEWS_URL', SITE_URL. '/themes');
AutoLoader::load_class_on_demand(SITE_DIR.'/model/', '.class.php');
AutoLoader::load_class_on_demand(INCLUDES_DIR. '/classes/', '.class.php');
require_once INCLUDES_DIR. '/functions.php';
require SITE_DIR. '/a/base-model.class.php';
require SITE_DIR. '/a/base-controller.class.php';
include(SITE_DIR. '/app-bootstrap.php');
/**
* Starts the session
* This method must be called before using any of the UserManager methods,
* otherwise, you'll get a "Fatal error: Class 'SessionExtended' not found".
*/
UserModel::start_session();