Exemplo n.º 1
0
    include_once "include/jsonrpc/jsonrpc.inc";
    include_once "include/jsonrpc/jsonrpcs.inc";
    include_once "include/jsonrpc/json_extension_api.inc";
}
SE_DEBUG ? $_benchmark->end('include') : NULL;
SE_DEBUG ? $_benchmark->start('initialization') : NULL;
// INITIATE DATABASE CONNECTION
$database =& SEDatabase::getInstance();
// Use this line if you changed the way database connection is loaded
//$database = new SEDatabase($database_host, $database_username, $database_password, $database_name);
// SET DATABASE CONSTANTS
$database->database_query("SET @SE_PRIVACY_SELF = 1, @SE_PRIVACY_FRIEND = 2, @SE_PRIVACY_FRIEND2 = 4, @SE_PRIVACY_SUBNET = 8, @SE_PRIVACY_REGISTERED = 16, @SE_PRIVACY_ANONYMOUS = 32");
// SET LANGUAGE CHARSET
$database->database_set_charset(SE_Language::info('charset'));
// GET SETTINGS
$setting =& SECore::getSettings();
// CREATE URL CLASS
$url = new SEUrl();
// CREATE DATETIME CLASS
$datetime = new se_datetime();
// CREATE MISC CLASS
$misc = new se_misc();
// ENSURE NO SQL INJECTIONS THROUGH POST OR GET ARRAYS
$_POST = security($_POST);
$_GET = security($_GET);
$_COOKIE = security($_COOKIE);
// CREATE SESSION
$session_options = @unserialize($setting['setting_session_options']);
if (!empty($session_options)) {
    if (!empty($session_options['storage'])) {
        Configure::write('Session.save', $session_options['storage']);