<?php
/****************************************
 * 
 *  Author : Miguel Vasquez
 *  File   : index.php
 *  
 * Session::init() = SESSION START
 * Bootstrap::run( new Request ) = Request
 * $obj->getSettings() = Settings default Admin
 * 
 **************************************/
 
	error_reporting( 0 );
	/* Define absolute paths */
	define( 'DS', DIRECTORY_SEPARATOR );
	define( 'ROOT', realpath( dirname( __FILE__ ) ) . DS );
	define( 'APP_PATH', ROOT . 'application' . DS );
	
	// Login Social
	define( 'SOCIAL_PATH', ROOT . 'oauth' . DS . 'twitter' . DS );
	
	/* REQUIRE FILES */
	
try {
    require_once APP_PATH . 'Config.php';
	require_once APP_PATH . 'SPDO.php';
	require_once APP_PATH . 'ModelBase.php';
    require_once APP_PATH . 'Request.php';
    require_once APP_PATH . 'Bootstrap.php';
    require_once APP_PATH . 'Controller.php';
    require_once APP_PATH . 'View.php';
    require_once APP_PATH . 'Sessions.php';
	require_once APP_PATH . 'Db.php';
	require_once APP_PATH . 'AdminSettings.php';
	require_once APP_PATH . 'functions.php';
	
	// Login Social
	require_once SOCIAL_PATH . 'twitteroauth.php';
	
	/*-----------------
	 * ADMIN SETTINGS
	 * ---------------
	 */
	$obj       = new adminSettings();
	$settings  = $obj->getSettings();
	
	require_once APP_PATH . 'DataConfig.php';
	
    //<-* SESSION START *->
    Session :: init();
	
	//<-* Languages *->
	_Function :: getLang();
	
	//<- * REQUEST * ->
    Bootstrap :: run( new Request );
				
}
catch( Exception $e ) {
    echo $e->getMessage();
}
?>