Esempio n. 1
0
 function ResultFunctionFieldQuery($query,$key='name',$value='total')
 {
 	$records = array();
   $res = $this->db->database_query($query);
   while ($row = $this->db->database_fetch_assoc($res)) {
     $records[$row['name']] = $row['total'];
   }
   return $records; 
 }
Esempio n. 2
0
include "include/functions_stats.php";
// JS API MOD JSON FUNCTIONS
include "include/class_javascript.php";
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'])) {