Exemplo n.º 1
0
 public static function check_condit_priv($uinfo, $priv, $model_name, $notice)
 {
     global $_lang;
     $uid = $uinfo['uid'];
     $item_list = keke_auth_base_class::get_auth_item('', 'auth_code,auth_open,auth_title');
     $condition = array_filter(explode(",", $priv['condit']));
     $priv_return = array("pass" => true, "notice" => $notice);
     if ($uid) {
         if (empty($condition)) {
             return $priv_return;
         } else {
             $priv_return['notice'] .= "。" . $model_name . $_lang['need_pass'];
             $i = 0;
             foreach ($condition as $k => $v) {
                 if ($item_list[$v] && $item_list[$v]['auth_open'] == '1') {
                     $pass = keke_auth_fac_class::auth_check($v, $uid);
                     if (!$pass) {
                         if ($v == 'realname' || $v == 'enterprise') {
                             $i++;
                             if ($i == 2) {
                                 $priv_return['pass'] = false;
                                 $priv_return['notice'] .= "实名或企业认证,";
                             }
                         } else {
                             $priv_return['pass'] = false;
                             $priv_return['notice'] .= $item_list[$v]['auth_title'] . ",";
                         }
                     }
                 }
             }
         }
     } else {
         $priv_return['pass'] = false;
         $priv_return['notice'] = $_lang['user_not_login'];
     }
     return $priv_return;
 }
Exemplo n.º 2
0
    $intAuthStatus = keke_auth_fac_class::auth_check('enterprise', $gUid);
    if ($intUserRole && !$intAuthStatus) {
        $intAuthStatus = 1;
    }
} else {
    $strCodeWh = " auth_code!='enterprise' ";
    $intAuthStatus = keke_auth_fac_class::auth_check('realname', $gUid);
    if ($intUserRole && !$intAuthStatus) {
        $intAuthStatus = 1;
    }
}
$arrAuthItems = keke_auth_base_class::get_auth_item(null, null, 1, $strCodeWh);
$arrAllAuthItems = keke_auth_base_class::get_auth_item(null, null, 1, null);
$keys = array_keys($arrAuthItems);
$arrAllowAuth = array('realname', 'enterprise', 'bank', 'mobile', 'email', 'alipayjs');
if ($code && in_array($code, $arrAllowAuth)) {
    $code or $code = $keys['0'];
    $code or kekezu::show_msg($_lang['param_error'], "index.php?do=auth", 3, '', 'warning');
    $auth_class = "keke_auth_" . $code . "_class";
    $objAuth = new $auth_class($code);
    $auth_item = $arrAllAuthItems[$code];
    $auth_dir = $auth_item['auth_dir'];
    $arrAuthInfo = $objAuth->get_user_auth_info($gUid, 0, $intBankAid);
    require S_ROOT . "/auth/{$code}/control/index.php";
    require keke_tpl_class::template('auth/' . $code . '/tpl/' . $_K['template'] . '/' . $step);
    die;
} else {
    $real_pass = keke_auth_fac_class::auth_check('enterprise', $gUid) or $real_pass = keke_auth_fac_class::auth_check("realname", $gUid);
    $arrHasAuthItem = keke_auth_fac_class::get_auth($gUserInfo);
    $arrUserAuthInfo = $arrHasAuthItem['info'];
}
Exemplo n.º 3
0
                    db_factory::execute(sprintf(" update %switkey_member_ext set v1='%s' where k='%s' and uid='%d'", TABLEPRE, $v, $k, $gUid));
                } else {
                    $ext_obj = new Keke_witkey_member_ext_class();
                    $ext_obj->setK($k);
                    $ext_obj->setV1(kekezu::escape($v));
                    $ext_obj->setUid($gUid);
                    $ext_obj->setType('sect');
                    $ext_obj->create_keke_witkey_member_ext();
                }
            }
        }
        unset($objSpaceT);
        kekezu::show_msg('已保存', NULL, NULL, NULL, 'ok');
    }
} else {
    $intAuthStatus = keke_auth_fac_class::auth_check("realname", $gUid);
    if (isset($formhash) && kekezu::submitcheck($formhash)) {
        if ($gUserInfo['uid'] != $pk['uid']) {
            kekezu::show_msg('无权操作', NULL, NULL, NULL, 'error');
            return false;
        }
        if (strtotime($birthday) >= strtotime(date('Y-m-d', time()))) {
            $tips['errors']['birthday'] = '出生日期不得大于或等于当前日期';
            kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
        }
        if (strtoupper(CHARSET) == 'GBK') {
            $truename = kekezu::utftogbk($truename);
        }
        $arrData = array('indus_pid' => $indus_pid, 'indus_id' => $indus_id, 'truename' => $truename, 'sex' => $sex, 'is_perfect' => $is_perfect, 'birthday' => $birthday);
        $objSpaceT->save($arrData, array('uid' => $pk['uid']));
        $arrData = array();
Exemplo n.º 4
0
<?php

defined('IN_KEKE') or exit('Access Denied');
$strUrl = 'index.php?do=user&view=account&op=contact';
$objSpaceT = keke_table_class::get_instance('witkey_space');
$arrMemberExts = kekezu::get_table_data("*", "witkey_member_ext", " type='sect' and uid= " . $gUid, "", "", "", "k");
$boolEmailAuth = keke_auth_fac_class::auth_check('email', $gUid);
$boolMobileAuth = keke_auth_fac_class::auth_check('mobile', $gUid);
$arrProvinces = CommonClass::getDistrictByPid('0', 'id,upid,name');
if ($gUserInfo['city']) {
    $arrCity = CommonClass::getDistrictByPid($gUserInfo['province'], 'id,upid,name');
}
if ($gUserInfo['area']) {
    $arrArea = CommonClass::getDistrictByPid($gUserInfo['city'], 'id,upid,name');
}
if (isset($formhash) && kekezu::submitcheck($formhash)) {
    if ($gUserInfo['uid'] != $pk['uid']) {
        kekezu::show_msg('无权操作', NULL, NULL, NULL, 'error');
        return false;
    }
    $arrData = array('email' => $email, 'mobile' => $mobile, 'qq' => $qq, 'msn' => $msn, 'phone' => $phone, 'province' => $province, 'city' => $city, 'area' => $area);
    $intRes = $objSpaceT->save($arrData, $pk);
    if ($sect) {
        foreach ($sect as $k => $v) {
            if ($arrMemberExts[$k]) {
                db_factory::execute(sprintf(" update %switkey_member_ext set v1='%s' where k='%s' and uid='%d'", TABLEPRE, $v, $k, $gUid));
            } else {
                $ext_obj = new Keke_witkey_member_ext_class();
                $ext_obj->setK($k);
                $ext_obj->setV1(kekezu::escape($v));
                $ext_obj->setUid($gUid);
Exemplo n.º 5
0
             if ($intWithdrawCash < $arrPays['withdraw_min']['v'] || $intWithdrawCash > $arrPays['withdraw_max']['v']) {
                 $tips['errors']['intWithdrawCash'] = '单日提现金额范围为' . "{$arrPays['withdraw_min']['v']}-{$arrPays['withdraw_max']['v']}," . '您的提现金额输入有误';
                 kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
             }
             $_SESSION['withdraw_cash'] = $intWithdrawCash;
             kekezu::show_msg('', $strUrl . "&strStep=2&intWithdrawCash={$intWithdrawCash}&ver=1#userCenter", NULL, NULL, 'ok');
         } else {
             kekezu::show_msg('输入金额不正确', NULL, NULL, NULL, 'error');
         }
     }
     break;
 case "2":
     if ($intWithdrawCash != $_SESSION['withdraw_cash']) {
         kekezu::show_msg($_lang['alert_return_rewrite'], $strUrl . "&step=step1&intReset=1#userCenter", "3", "", "warning");
     }
     $arrBankauthInfo = keke_auth_fac_class::auth_check("bank", $gUid);
     $arrBindLists = kekezu::get_table_data("*", "witkey_auth_bank", "uid='{$gUid}' and auth_status=1", "", "", "", "bank_id", null);
     $arrBank = keke_glob_class::get_bank();
     $arrOfflineLists = kekezu::get_payment_config('', 'offline', 1);
 case "3":
     switch ($paymode) {
         case "online":
             $arrPayInfo = $arrPaymentLists[$pay_type];
             break;
         case "offline":
             $arrBankInfo = db_factory::get_one(" select * from " . TABLEPRE . "witkey_auth_bank  where uid ='{$uid}' and auth_status=1 and bank_name='{$pay_type}'");
             $arrUserBankInfo = kekezu::get_table_data("*", "witkey_member_bank", 'uid=' . $uid, '', "", '', '');
             break;
     }
     break;
 case "4":