Пример #1
0
 function SEUrl()
 {
     global $database;
     $server_array = explode("/", $_SERVER['PHP_SELF']);
     $server_array_mod = array_pop($server_array);
     if ($server_array[count($server_array) - 1] == "admin") {
         $server_array_mod = array_pop($server_array);
     }
     $server_info = implode("/", $server_array);
     $this->url_base = "http://" . $_SERVER['HTTP_HOST'] . $server_info . "/";
     $this->convert_urls =& SEUrl::getSettings();
 }
Пример #2
0
    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']);
    }
    if (!empty($session_options['name'])) {