-
Notifications
You must be signed in to change notification settings - Fork 0
/
sys-settings.php
39 lines (29 loc) · 1006 Bytes
/
sys-settings.php
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
<?php
// Start session
session_start();
// Set and reset global variables
global $db, $current_user, $errors;
$db = $current_user = $errors = null;
// Define the core path
define( 'CORE', 'core' );
// Define the templates path
define( 'TEMPLATEPATH', 'templates' );
// Include files required for initialization.
require( ABSPATH . CORE . '/load.php' );
require( ABSPATH . CORE . '/functions.php' );
require( ABSPATH . CORE . '/constants.php' );
// Include main classes
require( ABSPATH . CORE . '/classes/class-user.php' );
require( ABSPATH . CORE . '/classes/class-course.php' );
require( ABSPATH . CORE . '/classes/class-note.php' );
// Set timezone
date_default_timezone_set( 'UTC' );
setlocale( LC_ALL, 'pt_BR', 'pt_BR.utf-8', 'pt_BR.utf-8', 'portuguese' );
// Include and connect DB
require_db();
// Set internal encoding.
if ( function_exists( 'mb_internal_encoding' ) ) {
mb_internal_encoding( 'UTF-8' );
}
// Include user login and logout actions
require( ABSPATH . CORE . '/user.php' );