|
|
|
@ -2135,5 +2135,42 @@ function getPromoteGameRatio($promoteID = 0, $relationGameId = 0, $amount=0, $ti
|
|
|
|
|
}
|
|
|
|
|
return $ratio;
|
|
|
|
|
}
|
|
|
|
|
//验证账号
|
|
|
|
|
function checkAccount($type,$account) {
|
|
|
|
|
|
|
|
|
|
// $type = I('type');
|
|
|
|
|
// $account = I('account');
|
|
|
|
|
|
|
|
|
|
$map = [];
|
|
|
|
|
$map['account'] = $account;
|
|
|
|
|
|
|
|
|
|
if ($type == 1) {
|
|
|
|
|
|
|
|
|
|
$result = M('promote','tab_')->field('account')->where($map)->find();
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
$result = M('user','tab_')->field('account')->where($map)->find();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($result) {
|
|
|
|
|
return 1;
|
|
|
|
|
} else {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//去重函数
|
|
|
|
|
function a_array_unique($array){
|
|
|
|
|
$out = array();
|
|
|
|
|
|
|
|
|
|
foreach ($array as $key=>$value) {
|
|
|
|
|
if (!in_array($value, $out)){
|
|
|
|
|
$out[$key] = $value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$out = array_values($out);
|
|
|
|
|
return $out;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|