|
@@ -66,10 +66,6 @@ class bonusexControl extends mobileControl
|
|
}
|
|
}
|
|
|
|
|
|
$grabable = bonus_helper::can_grab($type,$_SESSION['member_id'],$_SESSION['member_mobile']);
|
|
$grabable = bonus_helper::can_grab($type,$_SESSION['member_id'],$_SESSION['member_mobile']);
|
|
- if($grabable == false) {
|
|
|
|
- return self::outsuccess(array('type_info' => $type_info,'msg' => "已注册用户不能领邀请红包~"),"bonus/over");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
$mine_bonus = bonus_helper::get_mine_by_typesn($type_sn);
|
|
$mine_bonus = bonus_helper::get_mine_by_typesn($type_sn);
|
|
if($mine_bonus != false)
|
|
if($mine_bonus != false)
|
|
{ //显示我抢到的红包,按照状态进行判断
|
|
{ //显示我抢到的红包,按照状态进行判断
|
|
@@ -78,6 +74,10 @@ class bonusexControl extends mobileControl
|
|
|
|
|
|
if($bonus->isBinded() == false && session_helper::isVerfiyMobile())
|
|
if($bonus->isBinded() == false && session_helper::isVerfiyMobile())
|
|
{
|
|
{
|
|
|
|
+ if($grabable == false) {
|
|
|
|
+ return self::outsuccess(array('type_info' => $type_info,'msg' => "已注册用户不能领邀请红包~"),"bonus/over");
|
|
|
|
+ }
|
|
|
|
+
|
|
$ret = bonus_helper::bind_bonus($bonus->bonus_sn(),$_SESSION['MPHPSESSID'],session_helper::cur_mobile(),$new_sn);
|
|
$ret = bonus_helper::bind_bonus($bonus->bonus_sn(),$_SESSION['MPHPSESSID'],session_helper::cur_mobile(),$new_sn);
|
|
if($ret == true) {
|
|
if($ret == true) {
|
|
$mine_bonus = bonus_helper::get_mine_by_bonussn($new_sn);
|
|
$mine_bonus = bonus_helper::get_mine_by_bonussn($new_sn);
|
|
@@ -97,7 +97,11 @@ class bonusexControl extends mobileControl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
else
|
|
- { //我没有抢过的情况
|
|
|
|
|
|
+ {
|
|
|
|
+ if($grabable == false) {
|
|
|
|
+ return self::outsuccess(array('type_info' => $type_info,'msg' => "已注册用户不能领邀请红包~"),"bonus/over");
|
|
|
|
+ }
|
|
|
|
+ //我没有抢过的情况
|
|
if($isMineType == false)
|
|
if($isMineType == false)
|
|
{
|
|
{
|
|
if($type->isEnd()) {
|
|
if($type->isEnd()) {
|
|
@@ -172,9 +176,6 @@ class bonusexControl extends mobileControl
|
|
}
|
|
}
|
|
|
|
|
|
$grabable = bonus_helper::can_grab($type,$_SESSION['member_id'],$_SESSION['member_mobile']);
|
|
$grabable = bonus_helper::can_grab($type,$_SESSION['member_id'],$_SESSION['member_mobile']);
|
|
- if($grabable == false) {
|
|
|
|
- return self::outsuccess(array('type_info' => $type_info,'msg' => "已注册用户不能领邀请红包~"),"bonus/over");
|
|
|
|
- }
|
|
|
|
|
|
|
|
$mine_bonus = bonus_helper::get_mine_by_typesn($type_sn);
|
|
$mine_bonus = bonus_helper::get_mine_by_typesn($type_sn);
|
|
if($mine_bonus != false)
|
|
if($mine_bonus != false)
|
|
@@ -196,6 +197,10 @@ class bonusexControl extends mobileControl
|
|
{
|
|
{
|
|
if(session_helper::isVerfiyMobile())
|
|
if(session_helper::isVerfiyMobile())
|
|
{
|
|
{
|
|
|
|
+ if($grabable == false) {
|
|
|
|
+ return self::outsuccess(array('type_info' => $type_info,'msg' => "已注册用户不能领邀请红包~"),"bonus/over");
|
|
|
|
+ }
|
|
|
|
+
|
|
$ret = bonus_helper::bind_bonus($bonus_obj->bonus_sn(),$_SESSION['MPHPSESSID'],session_helper::cur_mobile(),$new_sn);
|
|
$ret = bonus_helper::bind_bonus($bonus_obj->bonus_sn(),$_SESSION['MPHPSESSID'],session_helper::cur_mobile(),$new_sn);
|
|
if($ret == true) {
|
|
if($ret == true) {
|
|
$mine_bonus = bonus_helper::get_mine_by_bonussn($new_sn);
|
|
$mine_bonus = bonus_helper::get_mine_by_bonussn($new_sn);
|
|
@@ -214,6 +219,9 @@ class bonusexControl extends mobileControl
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
|
|
+ if($grabable == false) {
|
|
|
|
+ return self::outsuccess(array('type_info' => $type_info,'msg' => "已注册用户不能领邀请红包~"),"bonus/over");
|
|
|
|
+ }
|
|
if($type->isEnd()) {
|
|
if($type->isEnd()) {
|
|
return self::outsuccess(array('type_info' => $type_info),"bonus/end");
|
|
return self::outsuccess(array('type_info' => $type_info),"bonus/end");
|
|
}
|
|
}
|
|
@@ -281,7 +289,6 @@ class bonusexControl extends mobileControl
|
|
return self::outsuccess(array('type_info' => $type_info,'msg' => "已注册用户不能领邀请红包~"),"bonus/over");
|
|
return self::outsuccess(array('type_info' => $type_info,'msg' => "已注册用户不能领邀请红包~"),"bonus/over");
|
|
}
|
|
}
|
|
|
|
|
|
- $grabable = true;
|
|
|
|
if($type->isEnd()) {
|
|
if($type->isEnd()) {
|
|
return self::outsuccess(array('type_info' => $type_infos['type_info']),"bonus/end");
|
|
return self::outsuccess(array('type_info' => $type_infos['type_info']),"bonus/end");
|
|
}
|
|
}
|
|
@@ -312,9 +319,11 @@ class bonusexControl extends mobileControl
|
|
$_SESSION['member_mobile'] = $mobile;
|
|
$_SESSION['member_mobile'] = $mobile;
|
|
$password = $code . substr($mobile, -4);
|
|
$password = $code . substr($mobile, -4);
|
|
$relay_id = intval($_GET['relay_id']);
|
|
$relay_id = intval($_GET['relay_id']);
|
|
|
|
+
|
|
session_helper::bonus_register($mobile,$password,$type,$relay_id);
|
|
session_helper::bonus_register($mobile,$password,$type,$relay_id);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
if($grabable)
|
|
if($grabable)
|
|
{
|
|
{
|
|
$ret = bonus_helper::bind_bonus($bonus_sn,$_SESSION['MPHPSESSID'],$mobile,$new_bonus_sn);
|
|
$ret = bonus_helper::bind_bonus($bonus_sn,$_SESSION['MPHPSESSID'],$mobile,$new_bonus_sn);
|