Пример #1
0
if (!function_exists('json_encode')) {
    include_once "include/xmlrpc/xmlrpc.inc";
    include_once "include/xmlrpc/xmlrpcs.inc";
    include_once "include/xmlrpc/xmlrpc_wrappers.inc";
    include_once "include/jsonrpc/jsonrpc.inc";
    include_once "include/jsonrpc/jsonrpcs.inc";
    include_once "include/jsonrpc/json_extension_api.inc";
}
// INITIATE DATABASE CONNECTION
//$database =& SEDatabase::getInstance();
// Use this line if you changed the way database connection is loaded
$database = new se_database($database_host, $database_username, $database_password, $database_name);
$database2 = new se_database($database_host2, $database_username2, $database_password2, $database_name2);
// SET LANGUAGE CHARSET
$database->database_set_charset(SE_Language::info('charset'));
$database2->database_set_charset(SE_Language::info('charset'));
// GET SETTINGS
$setting = $database->database_fetch_assoc($database->database_query("SELECT * FROM se_settings LIMIT 1"));
// Instantiate caching object
$cache_object = SECache::getInstance();
// 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']);
    }
    if (!empty($session_options['name'])) {