ini_set('display_errors','on');
error_reporting(E_ALL);
// HTML Compress
function html_compress($c){ $n = str_replace(array("\t", "\n", "\r"), '', $c); return $n;}
ob_start('html_compress');
// Security
define('SY', true);
// Directories
$_dir = dirname(__FILE__);
$_sourcesdir = $_dir.'/Sources';
$_classdir = $_sourcesdir.'/Classes';
$_userimgdir = $_dir.'/IMG/User';
$_functiondir = $_dir.'/Functions';
$_postsdir = $_dir.'/Posts';
$_pagesdir = $_sourcesdir.'/Pages';
// Database Class
require_once($_sourcesdir.'/Class_Database.php');
$db = new Database();
// Session Class
require_once($_sourcesdir.'/Class_Session.php');
$session = new Session();
// Functions Boot
require_once($_sourcesdir.'/Functions_Boot.php');
// Options
$_http = 'http://';
define('URL', $_http.'localhost');
define('TITLE', 'Site Basligi');
// User Functions
require_once($_sourcesdir.'/Functions_User.php');
// User Session ==========================================
if(isset($_COOKIE['User'])){
$session->create('User', $_COOKIE['User']);
$UserCookie = $session->get('User');
$uCookie = explode('||', $UserCookie);
if(_CreateUserCookie($uCookie[0]) != $UserCookie){
define('ID', false);
}else{
define('ID', (string)$uCookie[0]);
}
}else{
define('ID', false);
}
// =======================================================
// Functions
require_once($_sourcesdir.'/Functions_View.php');
require_once($_sourcesdir.'/Functions_Filters.php');
?>
33.satırda ki kod bu;
// Database Class
require_once($_sourcesdir.'/Class_Database.php');
$db = new Database();