Commit ed64e223 authored by Nemo Ma's avatar Nemo Ma

fix

parent 93ab0326
...@@ -11,7 +11,7 @@ elseif(preg_match('/[,|<|>|&|;|#|"|\s|\p{C}]+/u',$username)) { return ...@@ -11,7 +11,7 @@ elseif(preg_match('/[,|<|>|&|;|#|"|\s|\p{C}]+/u',$username)) { return
'name_invalid'; } elseif(preg_match($nmlimit,$username)) { return 'name_banned'; 'name_invalid'; } elseif(preg_match($nmlimit,$username)) { return 'name_banned';
} return 'name_ok'; } } return 'name_ok'; }
function pass_check($pass,$rpass){//未经md5处理的 function pass_check($pass,$rpass){//未经md5处理的
if(!isset($pass) || strlen($pass)===0 || !isset($rpass) || strlen($rpass)===0){ if(!isset($pass) || strlen($pass)===0 || !isset($rpass) || strlen($rpass)===0){
return 'pass_not_set'; return 'pass_not_set';
} elseif($pass != $rpass) { } elseif($pass != $rpass) {
...@@ -25,7 +25,7 @@ function pass_check($pass,$rpass){//未 ...@@ -25,7 +25,7 @@ function pass_check($pass,$rpass){//未
} }
/** /**
* 获得用户的真实IP地址 * 获得用户的真实IP地址
* *
* @access public * @access public
* @return string * @return string
...@@ -42,7 +42,7 @@ function real_ip() ...@@ -42,7 +42,7 @@ function real_ip()
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{ {
$arr = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); $arr = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
/* 取X-Forwarded-For中第一个非unknown的有效IP字符串 */ /* 取X-Forwarded-For中第一个非unknown的有效IP字符串 */
foreach ($arr AS $ip) foreach ($arr AS $ip)
{ {
$ip = trim($ip); $ip = trim($ip);
...@@ -105,12 +105,12 @@ function get_iconlist(){ ...@@ -105,12 +105,12 @@ function get_iconlist(){
return $iconarray; return $iconarray;
} }
function get_utitlelist(){//称号 function get_utitlelist(){//称号
global $nicks,$utitlelist; global $nicks,$utitlelist;
$utarr = explode('/',$nicks);//字符串转数组 $utarr = explode('/',$nicks);//字符串转数组
$utlist = Array(); $utlist = Array();
//array_unshift($utarr,0);//数组右移一位以与$utitlelist对应 //array_unshift($utarr,0);//数组右移一位以与$utitlelist对应
foreach($utarr as $key => $val){//$utitlelist在resources里 foreach($utarr as $key => $val){//$utitlelist在resources里
$utlist[$key] = $val; $utlist[$key] = $val;
} }
return $utlist; return $utlist;
......

<!--{if $gbnum}-->当前奖池:{$gbpool}。<!--{else}-->当前还未开设赌局。<!--{/if}-->当前分成系数:{$nowodds} <!--{if $gbnum}-->当前奖池:{$gbpool}。<!--{else}-->当前还未开设赌局。<!--{/if}-->当前分成系数:{$nowodds}
<span class="yellow" id="gbinfo"> <span class="yellow" id="gbinfo">
$gbinfo $gbinfo
......
{template header} {template header}
......
...@@ -41,7 +41,7 @@ if (!valid_achievement($ach)) { ...@@ -41,7 +41,7 @@ if (!valid_achievement($ach)) {
$ach=init_achievement($ach); $ach=init_achievement($ach);
$db->query("UPDATE {$tablepre}users SET achievement='$ach' WHERE username='$n'" ); $db->query("UPDATE {$tablepre}users SET achievement='$ach' WHERE username='$n'" );
} }
//ɾ͵ //解析成就的完成情况
global $gamecfg; global $gamecfg;
require config("gamecfg",$gamecfg); require config("gamecfg",$gamecfg);
for ($i=0; $i<$achievement_count; $i++) for ($i=0; $i<$achievement_count; $i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment