当前位置: 首页>>代码示例>>PHP>>正文


PHP sbr_meta::authMobPhone方法代码示例

本文整理汇总了PHP中sbr_meta::authMobPhone方法的典型用法代码示例。如果您正苦于以下问题:PHP sbr_meta::authMobPhone方法的具体用法?PHP sbr_meta::authMobPhone怎么用?PHP sbr_meta::authMobPhone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sbr_meta的用法示例。


在下文中一共展示了sbr_meta::authMobPhone方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unset

                 $error_phone = false;
                 unset($_SESSION["unbind_phone_action"]);
                 header_location_exit("/users/" . $_SESSION["login"] . "/setup/main/");
             } else {
                 $error_phone['phone'] = current($text_error);
                 // Телефон забит
             }
         } else {
             if ($type == 'unbind') {
                 // Сбрасываем все
                 $phone = '';
                 $save_reqv['mob_phone'] = '';
                 $ureqv['mob_phone'] = '';
                 sbr_meta::setUserReqv($uid, $reqv['rez_type'], $reqv['form_type'], $save_reqv);
                 // Удаляем телефон
                 sbr_meta::authMobPhone($uid, false);
                 sbr_meta::safetyMobPhone($uid, false);
                 $user->updateSafetyPhone($uid, false);
                 $reqv['is_activate_mob'] = 'f';
                 $_SESSION["unbind_phone_action"] = true;
                 header_location_exit("/users/" . $_SESSION["login"] . "/setup/main/");
             }
         }
     } else {
         $error_phone['code'] = true;
     }
     break;
 case "save_safety":
     require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/sbr.php";
     $post_safety_phone = true;
     $uid = get_uid(false);
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例2: unauthCodeSMS

function unauthCodeSMS($code)
{
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/sms_gate_a1.php';
    $objResponse = new xajaxResponse();
    $uid = get_uid();
    $reqv = sbr_meta::getUserReqvs($uid);
    $ureqv = $reqv[$reqv['form_type']];
    $sms_gate = new sms_gate_a1($ureqv['mob_phone']);
    $info = $sms_gate->getInfoSend();
    if ($info['data'] == $code) {
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php';
        $user = new users();
        sbr_meta::authMobPhone($uid, false);
        sbr_meta::safetyMobPhone($uid, false);
        $user->updateSafetyPhone($uid, false);
        $html = '<a href="javascript:void(0)" class="b-button b-button_rectangle_color_transparent b-button_margtop_-2" data-send="safety"><span class="b-button__b1"><span class="b-button__b2"><span class="b-button__txt">Активировать</span></span></span></a>';
        if ($_SESSION['is_verify'] != 't') {
            $mobphone = "\$('safety_mob_phone').removeClass('b-combo__input_disabled'); \$('safety_mob_phone').getElement('input').set('disabled', false);";
        } else {
            $mobphone = '';
        }
        $objResponse->script("\$('auth_popup').set('html', '').hide();\n                              \$\$('.c_sms_main').set('html', '{$html}');\n                              \$\$('.safety_phone_checks').each( function(el) {\n                                  \$(el).getElements('input[type=checkbox]').set('disabled', true).set('checked', false);\n                              });\n                              {$mobphone}\n                              \$('safety_status').set('html', 'выключена');\n                              \$('safety_status').addClass('b-layout__txt_color_c10600').removeClass('b-layout__txt_color_6bb336');\n                              bindLinkActivateAuth();\n                              ");
        return $objResponse;
    }
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:25,代码来源:sbr.server.php

示例3: checkCode

function checkCode($phone, $code, $type = "bind")
{
    $objResponse = new xajaxResponse();
    $success = 0;
    $reqv = sbr_meta::getUserReqvs(get_uid(false));
    $ureqv = $reqv[$reqv['form_type']];
    $uid = get_uid(false);
    if ($type == 'unbind') {
        $phone = $ureqv['mob_phone'];
    }
    $error = false;
    if ($code == $_SESSION['send_sms_code'] && $phone == $_SESSION['send_sms_phone']) {
        unset($_SESSION['send_sms_code'], $_SESSION['send_sms_phone']);
        $user = new users();
        $ureqv['mob_phone'] = $phone;
        $save_reqv['mob_phone'] = $phone;
        if ($type == 'bind') {
            if (!($text_error = sbr_meta::setUserReqv($uid, $reqv['rez_type'], $reqv['form_type'], $save_reqv))) {
                sbr_meta::authMobPhone($uid, true);
                $reqv['is_activate_mob'] = 't';
                unset($_SESSION["unbind_phone_action"]);
                unset($_SESSION['send_sms_time']);
                $success = 2;
            } else {
                $error = current($text_error);
                // Телефон забит
            }
        } else {
            if ($type == 'unbind') {
                // Сбрасываем все
                $phone = '';
                $save_reqv['mob_phone'] = '';
                $ureqv['mob_phone'] = '';
                sbr_meta::setUserReqv($uid, $reqv['rez_type'], $reqv['form_type'], $save_reqv);
                // Удаляем телефон
                sbr_meta::authMobPhone($uid, false);
                sbr_meta::safetyMobPhone($uid, false);
                $user->updateSafetyPhone($uid, false);
                $reqv['is_activate_mob'] = 'f';
                $_SESSION["unbind_phone_action"] = true;
                $success = 3;
            }
        }
    } else {
        $error = 'Неправильный код';
    }
    switch ($success) {
        case 2:
            //Прицепили телефон
            $objResponse->script("\$('safety_status')" . ".set('text', 'включена')" . ".removeClass('b-layout__txt_color_c10600')" . ".addClass('b-layout__txt_color_6db335');");
            $objResponse->script("\$('mob_phone_text').set('html', " . "'<a href=\"javascript:void(0)\" onclick=\"User_Phone.unbindStart();\" " . "class=\"b-layout__link b-layout__link_fontsize_11 b-layout__link_bordbot_dot_0f71c8\">Отвязать</a>')");
            $objResponse->script("\$('mob_phone_text').removeClass('b-layout__txt_hide')");
            $objResponse->script("\$('mob_code_block').addClass('b-layout__txt_hide');");
            $objResponse->script("\$('buttons_step1').addClass('b-layout__txt_hide');");
            $objResponse->script("\$('buttons_step2').removeClass('b-layout__txt_hide');");
            break;
        case 3:
            //Отцепили телефон
            $objResponse->script("\$('safety_status')" . ".set('text', 'выключена')" . ".removeClass('b-layout__txt_color_6db335')" . ".addClass('b-layout__txt_color_c10600');");
            $objResponse->script("\$('mob_phone_text').set('text', 'без пробелов и дефиса')");
            $objResponse->script("\$('sms_sent_ok').addClass('b-layout__txt_hide');");
            $objResponse->script("\$('smscode').set('value', '');");
            $objResponse->script("\$('buttons_step1').removeClass('b-layout__txt_hide');");
            $objResponse->script("\$('buttons_step3').addClass('b-layout__txt_hide');");
            break;
        case 0:
        default:
            $objResponse->script("\$('smscode').getParent().addClass('b-combo__input_error');");
    }
    if ($error) {
        $objResponse->script("\$('sms_error').set('html', '{$error}').removeClass('b-layout__txt_hide');");
    } else {
        $objResponse->script("\$('sms_error').addClass('b-layout__txt_hide');");
    }
    $objResponse->script("shadow_center();");
    return $objResponse;
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:77,代码来源:users.server.php


注:本文中的sbr_meta::authMobPhone方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。