Merge branch 'master' of github.com:gnuboard/g5 into pbkdf2
This commit is contained in:
commit
a5bd3841dd
20 files changed
+91
-37
No files matched your search
+14
-3
@@ -2072,12 +2072,20 @@ function abs_ip2long($ip='')
|
||||
|
||||
function get_selected($field, $value)
|
||||
{
|
||||
if( is_int($value) ){
|
||||
return ((int) $field===$value) ? ' selected="selected"' : '';
|
||||
}
|
||||
|
||||
return ($field===$value) ? ' selected="selected"' : '';
|
||||
}
|
||||
|
||||
|
||||
function get_checked($field, $value)
|
||||
{
|
||||
if( is_int($value) ){
|
||||
return ((int) $field===$value) ? ' checked="checked"' : '';
|
||||
}
|
||||
|
||||
return ($field===$value) ? ' checked="checked"' : '';
|
||||
}
|
||||
|
||||
@@ -3449,10 +3457,13 @@ function is_use_email_certify(){
|
||||
|
||||
function get_real_client_ip(){
|
||||
|
||||
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
|
||||
return $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
$real_ip = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
return $_SERVER['REMOTE_ADDR'];
|
||||
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\z/', $_SERVER['HTTP_X_FORWARDED_FOR']) ){
|
||||
$real_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
}
|
||||
|
||||
return preg_replace('/[^0-9.]/', '', $real_ip);
|
||||
}
|
||||
|
||||
function get_call_func_cache($func, $args=array()){
|
||||
|
||||
Reference in new issue
Block a user