Exemplo n.º 1
0
 $sql = "select * from #@__member_order where ordersn='{$ordersn}'";
 $arr = $dsql->GetOne($sql);
 $dsql->ExecuteNoneQuery($updatesql);
 if ($ordertype != 'dz') {
     $msgInfo = Helper_Archive::getDefineMsgInfo($arr['typeid'], 3);
     $memberInfo = Helper_Archive::getMemberInfo($arr['memberid']);
     $nickname = !empty($memberInfo['nickname']) ? $memberInfo['nickname'] : $memberInfo['mobile'];
     if (isset($msgInfo['isopen'])) {
         $content = $msgInfo['msg'];
         $totalprice = $arr['price'] * $arr['dingnum'];
         $content = str_replace('{#MEMBERNAME#}', $memberinfo['nickname'], $content);
         $content = str_replace('{#PRODUCTNAME#}', $arr['productname'], $content);
         $content = str_replace('{#PRICE#}', $arr['PRICE'], $content);
         $content = str_replace('{#NUMBER#}', $arr['dingnum'], $content);
         $content = str_replace('{#TOTALPRICE#}', $totalPrice, $content);
         Helper_Archive::sendMsg($memberInfo['mobile'], $nickname, $content);
         //发送短信.
     }
     //支付成功后添加预订送积分
     if (!empty($arr['jifenbook'])) {
         $addjifen = intval($arr['jifenbook']);
         $sql = "update sline_member set jifen=jifen+{$addjifen} where mid='{$arr['memberid']}'";
         if ($dsql->ExecuteNoneQuery($sql)) {
             Helper_Archive::addJifenLog($arr['memberid'], "预订线路{$arr['productname']}获取得{$addjifen}", $addjifen, 2);
         }
     }
     //如果是酒店订单,则把子订单置为交易成功状态
     $sql = "select typeid,id from sline_member_order where ordersn='{$ordersn}'";
     $ar = $dsql->GetOne($sql);
     if ($ar['typeid'] == 2) {
         $s = "update sline_member_order set ispay=1 where pid='{$ar['id']}'";
Exemplo n.º 2
0
    //网上注册赠送积分
    if (!_checkMobile($mobile)) {
        $nickname = substr($mobile, 0, 5) . '***';
        $sql = "insert into #@__member(nickname,pwd,email,mobile,jointime,joinip,jifen) values('{$nickname}','{$pwd}','','{$mobile}','{$jointime}','{$joinip}','{$jifen}')";
        if ($dsql->ExecuteNoneQuery($sql)) {
            $content = "尊敬的用户{$mobile}你好,你已经成功注册成为{$GLOBALS['cfg_webname']}会员,你的登陆名是:{$mobile},密码是:{$mobile},为了你的帐户安全,请尽快修改密码!";
            $msgInfo = Helper_Archive::getDefineMsgInfo(0);
            if (isset($msgInfo['isopen'])) {
                $nickname = $mobile;
                $password = $mobile;
                $content = $msgInfo['msg'];
                $content = str_replace('{#LOGINNAME#}', $mobile, $content);
                $content = str_replace('{#PASSWORD#}', $mobile, $content);
                $content = str_replace('{#WEBNAME#}', $GLOBALS['cfg_webname'], $content);
                $content = str_replace('{#PHONE#}', $GLOBALS['cfg_phone'], $content);
                Helper_Archive::sendMsg($mobile, $mobile, $content);
                //注册短信
            }
            //sendMsg('',$content,$mobile,'','shortmsg');
            $User = new Member(7 * 3600);
            $status = $User->login($mobile, $mobile);
            $data['status'] = 1;
        }
    } else {
        $data['status'] = 'hasReg';
    }
    echo json_encode($data);
    exit;
}
//弹出登陆框
if ($dopost == 'getloginbox') {
Exemplo n.º 3
0
         if ($sentNum < 3 && $sentNum > 0 && $lastSentTime > $curtime - 60) {
             echo json_encode(array('status' => false, 'msg' => '验证码发送过于频繁,请稍后再试'));
             exit;
         }
         if ($sentNum >= 3 && $lastSentTime > $curtime - 60 * 15) {
             echo json_encode(array('status' => false, 'msg' => '验证码发送过于频繁,15分钟后再试'));
             exit;
         }
         $code = getRandCode(5);
         //验证码
         $msgInfo = Helper_Archive::getDefineMsgInfo2('reg_msgcode');
         $content = $msgInfo['msg'];
         $content = str_replace('{#CODE#}', $code, $content);
         $content = str_replace('{#WEBNAME#}', $GLOBALS['cfg_webname'], $content);
         $content = str_replace('{#PHONE#}', $GLOBALS['cfg_phone'], $content);
         $flag = Helper_Archive::sendMsg($mobile, '', $content);
         if ($flag->Success) {
             $_SESSION['senttime_' . $mobile] = $curtime;
             $sentNum = $sentNum >= 3 ? 0 : $sentNum + 1;
             $_SESSION['sendnum_' . $mobile] = $sentNum;
             $_SESSION['mobilecode_' . $mobile] = $code;
             echo json_encode(array('status' => true, 'msg' => '验证码发送成功'));
         } else {
             echo json_encode(array('status' => false, 'msg' => '验证码发送失败,请重试' . $flag->Message));
         }
     }
 } else {
     if ($dopost == 'ckcode') {
         @session_start();
         echo $_SESSION['mobilecode_' . $mobile] == $msgcode ? 'true' : 'false';
     } else {
Exemplo n.º 4
0
        } else {
            exit;
        }
    }
    $userinfo = Helper_Archive::getMemberInfo($_GET['uid']);
    $status = 'false';
    if (!empty($userinfo)) {
        $code = getRandCode(5);
        //验证码
        $msgInfo = Helper_Archive::getDefineMsgInfo2('reg_findpwd');
        //$content = "尊敬的会员,请您在{$GLOBALS['cfg_webname']}中输入以下验证码:{$code},完成密码找回验证.";
        $content = $msgInfo['msg'];
        $content = str_replace('{#CODE#}', $code, $content);
        $content = str_replace('{#WEBNAME#}', $GLOBALS['cfg_webname'], $content);
        $content = str_replace('{#PHONE#}', $GLOBALS['cfg_phone'], $content);
        $flag = Helper_Archive::sendMsg($userinfo['mobile'], '', $content);
        if ($flag->Success) {
            $status = 'ok';
        }
        $status = 'ok';
    }
    echo $status;
}
//检测短信验证码是否正确
if ($step == 'ckcode') {
    @session_start();
    echo $_SESSION['msgcode'] == $checkcode ? 'true' : 'false';
}
function checkUname($loginname)
{
    global $dsql;