diff --git a/upload/includes/classes/user.class.php b/upload/includes/classes/user.class.php index 1e70a312..32b32cb3 100644 --- a/upload/includes/classes/user.class.php +++ b/upload/includes/classes/user.class.php @@ -4040,7 +4040,7 @@ class userquery extends CBCategory{ $fields = array( 'users' => get_user_fields(), - 'profile' => array( 'rating', 'rated_by', 'voters', 'first_name', 'last_name', 'profile_title', 'profile_desc'), + 'profile' => array( 'rating', 'rated_by', 'voters', 'first_name', 'last_name', 'profile_title', 'profile_desc','city','hometown'), ); $fields['users'][] = 'last_active'; $fields['users'][] = 'total_collections'; diff --git a/upload/includes/config.inc.php b/upload/includes/config.inc.php index 639fcd8e..7484b9e0 100644 --- a/upload/includes/config.inc.php +++ b/upload/includes/config.inc.php @@ -14,6 +14,7 @@ include('common.php'); include('plugins.php'); + define('TEMPLATEDIR',BASEDIR.'/'.TEMPLATEFOLDER.'/'.$Cbucket->template); define('TEMPLATEURL',BASEURL.'/'.TEMPLATEFOLDER.'/'.$Cbucket->template); define('LAYOUT',TEMPLATEDIR.'/layout'); diff --git a/upload/includes/functions.php b/upload/includes/functions.php index 5ac35e61..ebbedd5b 100644 --- a/upload/includes/functions.php +++ b/upload/includes/functions.php @@ -5427,7 +5427,7 @@ "SA" => "South America" ); if (filter_var($ip, FILTER_VALIDATE_IP) && in_array($purpose, $support)) { - $ipdat = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=" . $ip)); + $ipdat = @json_decode(get_data("http://www.geoplugin.net/json.gp?ip=" . $ip)); if (@strlen(trim($ipdat->geoplugin_countryCode)) == 2) { switch ($purpose) { case "location": @@ -5848,6 +5848,19 @@ } } + + function cb_curl($url) + { + $ch = curl_init(); + $timeout = 5; + curl_setopt($ch,CURLOPT_URL,$url); + curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); + curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); + $data = curl_exec($ch); + curl_close($ch); + return $data; + } +