public function get_view() { $request = APF::get_instance()->get_request(); $this->assign_data("loginName", $request->get_attribute("loginName")); $this->assign_data("flg", $request->get_attribute("flg")); $this->assign_data("result", $request->get_attribute("result")); $this->assign_data("username", $request->get_attribute("username")); $this->assign_data("managerinfo", $request->get_attribute("managerinfo")); $this->assign_data("history", $request->get_attribute("history")); $this->assign_data("Phone", $request->get_attribute("Phone")); $this->assign_data("mobileReleased", $request->get_attribute("mobileReleased")); $this->assign_data("ErrorCnt", $request->get_attribute("ErrorCnt")); $truename = $request->get_attribute('truename'); if ($truename) { $this->assign_data('truename', $truename); } $base_domain = APF::get_instance()->get_config("base_domain"); $base_uri = Uri_Http::build_uri($base_domain, 'my'); $this->assign_data('base_uri', $base_uri); //标题 $title = '中国网络经纪人-安居客'; $this->assign_data('title', $title); $login_url = Uri_Http::build_uri($base_domain, 'agent') . BASE_URI . '/login'; $this->assign_data('desk_url', $login_url . '?from=desk'); $this->assign_data('favorite_url', $login_url . '?from=favorite'); $this->assign_data('home_url', $login_url . '?from=home'); $redirect_desk_url = $base_uri . '/shortcut.php?url=' . base64_encode($login_url . '?from=desk') . '&title=' . base64_encode($title); $this->assign_data('redirect_desk_url', $redirect_desk_url); return "Login"; }
/** * 获取安居客房源详情页 * * @param int $houseId * @param int $cityId * @return string */ public static function ajkHouseDetailUrl($houseId, $cityId) { $baseDomain = APF::get_instance()->get_config('base_domain'); $citySets = APF::get_instance()->get_config('city_set', 'multicity'); $citySet = $citySets[$cityId]; $url = Uri_Http::build_uri($baseDomain, $citySet['pinyin']); return $url . '/prop/view/' . $houseId; }
public function handle_request_internal() { $request = APF::get_instance()->get_request(); $broker = self::$BrokerInfo; $brokerIdentity = Bll_BrokerBaseBll::get_instance()->get_broker_identity_info_v2($broker['BaseInfo']['brokerId']); if (empty($broker['BaseInfo']) || empty($brokerIdentity)) { apf_require_class("Uri_Http"); //Uri_Http::redirect_header("/user/broker/new/brokerinfo/"); Uri_Http::redirect_header("/ajkbroker/broker/modify/brokerinfo/"); } $broker['UsrCardState'] = $brokerIdentity['IdentityInfo']['usrCardState']; $broker['UsrPhotoTmpState'] = $brokerIdentity['IdentityInfo']['userPhotoTmpState']; $broker['UsrPhotoState'] = $brokerIdentity['IdentityInfo']['userPhotoState']; $broker['BnsCardState'] = $brokerIdentity['IdentityInfo']['bnsCardState']; $broker['CheckState'] = $brokerIdentity['IdentityInfo']['checkState']; // $area = $this->getBlockName(substr($broker['BaseInfo']['areaCode'], 4, 4)); // $block = $this->getBlockName(substr($broker['BaseInfo']['areaCode'], 8, 4)); $area = Bll_Commtype_Api::getInfoByTypeCodeV2(substr($broker['BaseInfo']['areaCode'], 0, 8)); $block = Bll_Commtype_Api::getInfoByTypeCodeV2($broker['BaseInfo']['areaCode']); $broker['CityName'] = $this->getCityName($broker['BaseInfo']['cityId']); $broker['AreaName'] = $area['typeName']; $broker['BlockName'] = $block['typeName']; //获得最后提交资料 $lastupdata = Bll_BrokerBaseBll::get_instance()->getLastPostFile($broker['BaseInfo']['brokerId']); $brokerCheckInfoBll = new Bll_Broker_BrokerCheckInfo(); //获取经纪人最近一次头像或名片审核不通过的原因记录 if ($broker['UsrPhotoState'] == 2) { $brokerTheLastCheck = $brokerCheckInfoBll->getBrokerTheLastCheckInfo($broker['BaseInfo']['brokerId'], 1); $faceLastCheckInfo = $brokerTheLastCheck['content']; } else { $faceLastCheckInfo = $brokerCheckInfoBll->getNoPassExp($broker['BaseInfo']['brokerId'], 1); //1图像 } $brokerTheLastCheckInfo = $brokerCheckInfoBll->getBrokerTheLastCheckInfo($broker['BaseInfo']['brokerId'], 2); //名片 $mingpianLastCheckInfo = $brokerCheckInfoBll->getNoPassExp($broker['BaseInfo']['brokerId'], 3); //名片 $idCardLastCheckInfo = $brokerCheckInfoBll->getNoPassExp($broker['BrokerId'], 2); //电话锁定状态 $phoneLockInfo = $brokerCheckInfoBll->getLockStatus($broker['BaseInfo']['brokerId']); if ($phoneLockInfo['company_id'] == $broker['BaseInfo']['companyId'] && $phoneLockInfo['status'] == 1) { $phoneLockStatus = 1; } else { $phoneLockStatus = 0; } $request->set_attribute('broker', $broker); $request->set_attribute('lastupdata', $lastupdata); $request->set_attribute('faceLastCheckInfo', $faceLastCheckInfo); $request->set_attribute('mingpianLastCheckInfo', $mingpianLastCheckInfo); $request->set_attribute('phoneLockStatus', $phoneLockStatus); $request->set_attribute('idCardLastCheckInfo', $idCardLastCheckInfo); $request->set_attribute('brokerTheLastCheckInfo', $brokerTheLastCheckInfo); return 'Broker_BrokerInfo'; }
public function handle_request_internal() { $request = APF::get_instance()->get_request(); $brokerId = $request->getBrokerId(); $userId = $request->getUserId(); $params = $request->get_parameters(); $BrokerServiceObj = new Bll_Service_Broker(); $sq1 = $BrokerServiceObj->getBasicInfo(array('brokerId' => $brokerId)); $replies1 = $BrokerServiceObj->aps_wait_for_replies(); if (empty($replies1)) { apf_require_class("Uri_Http"); Uri_Http::redirect_header('/user/broker/new/brokeremail?type=modify'); } $oldEmail = $replies1[$sq1]['data']['email']; $flag = 0; if ($request->is_post_method()) { $password = Bll_Broker_User::getPasswordByUserId($userId); if (base64_encode(md5($params['password'])) == $password) { $userIdByEmail = Bll_Broker_User::getUserIdByEmail($params['email']); if (empty($userIdByEmail)) { try { //可以更改邮箱 $apsParams = array('brokerId' => $brokerId, 'email' => trim($params['email'])); $sq2 = $BrokerServiceObj->setBasicInfo($apsParams); $replies2 = $BrokerServiceObj->aps_wait_for_replies(); $flag = $replies2[$sq2]['status'] == 'ok' ? Broker_EditEmailController::EDIT_SUCCESS : Broker_EditEmailController::EDIT_ERROR; } catch (Exception $e) { $flag = Broker_EditEmailController::EDIT_ERROR; } } else { //邮箱已经存在 //$flag = $userIdByEmail == $userId ? Broker_EditEmailController::EDIT_ERROR : Broker_EditEmailController::EMAIL_IS_EXIST; $flag = Broker_EditEmailController::EMAIL_IS_EXIST; } } else { if (empty($params['password'])) { $flag = Broker_EditEmailController::PASSWORD_EMPTY; } else { $flag = Broker_EditEmailController::PASSWORD_ERROR; } } $request->set_attribute("newEmail", $params['email']); $request->set_attribute("url", $this->getURL('my', '/ajkbroker/broker/brokerinfo')); } $request->set_attribute("flag", $flag); $request->set_attribute("oldEmail", $oldEmail); return "Broker_EditEmail"; }
public function handle_request_internal() { $request = APF::get_instance()->get_request(); $broker = self::$BrokerInfo; $base_domain = APF::get_instance()->get_config('base_domain'); $objBLL = new Bll_Broker_ManageEditMobile($broker); //得到修改手机号码逻辑层对象 $uri_params = $request->get_parameters(); $newMobile = $uri_params['newmobile']; $reMobile = $uri_params['remobile']; $Code = $uri_params['code']; $act = $uri_params['act']; switch ($act) { case 'edit': if ($objBLL->editMobile($newMobile, $Code)) { Uri_Http::redirect_header("/ajkbroker/broker/editmobile/W0QQactZsuccess"); } else { Uri_Http::redirect_header("/ajkbroker/broker/editmobile/W0QQactZerror"); } break; case 'success': case 'error': $request->set_attribute("url", '/ajkbroker/broker/brokerinfo'); default: $allowEdit = $objBLL->allowEditMobile($broker['BaseInfo']['brokerId']); //判断经纪人有没有修改过 $request->set_attribute("allowEdit", $allowEdit); $request->set_attribute("UserMobile", $broker['BaseInfo']['mobile']); break; } $brokerCheckInfoBll = new Bll_Broker_BrokerCheckInfo(); //电话锁定状态 $phoneLockInfo = $brokerCheckInfoBll->getLockStatus($broker['BaseInfo']['brokerId']); if ($phoneLockInfo['company_id'] == $broker['BaseInfo']['companyId'] && $phoneLockInfo['status'] == 1) { $phoneLockStatus = 1; } else { $phoneLockStatus = 0; } $releaseMobileUrl = "http://my." . $base_domain . "/broker/releasemp?mobilesec="; $request->set_attribute('phoneLockStatus', $phoneLockStatus); $request->set_attribute("CityId", $broker['BaseInfo']['cityId']); $request->set_attribute("act", $act); $request->set_attribute("releaseMobileUrl", $releaseMobileUrl); return 'Broker_EditMobile'; }
public function get_view() { $base_domain = APF::get_instance()->get_config("base_domain"); $base_uri = Uri_Http::build_uri($base_domain, 'my'); //标题 $title = '中国网络经纪人-安居客'; $this->assign_data('title', $title); $login_url = Uri_Http::build_uri($base_domain, 'my') . BASE_URI . '/login'; $this->assign_data('desk_url', $login_url); //.'?from=desk' $this->assign_data('favorite_url', $login_url); //.'?from=favorite' $this->assign_data('home_url', $login_url); //.'?from=home' $redirect_desk_url = $base_uri . '/shortcut.php?url=' . base64_encode($login_url) . '&title=' . base64_encode($title); //base64_encode($login_url.'?from=desk') $this->assign_data('redirect_desk_url', $redirect_desk_url); $this->assign_data('type', $this->get_params()); return "Functionality"; }
/** * 获取当前页面的URL * * @return string */ protected function getURLPrefix() { $base_domain = APF::get_instance()->get_config('base_domain'); $base_uri = Uri_Http::build_uri($base_domain, 'my'); return $base_uri . BASE_URI . '/broker/gardener/'; }
public function build_page_url($ChangeDomain = 'my', $suffix = '') { $base_domain = APF::get_instance()->get_config("base_domain"); $url = Uri_Http::build_uri($base_domain, $ChangeDomain); return $url . '/' . $suffix; }
public function redirect_to_login() { $uri = $this->get_base_domain("agent") . BASE_URI . "/login.php?history=" . base64_encode($this->get_current_uri()); Uri_Http::redirect_header($uri); }
public function handle_request_internal() { $apf = APF::get_instance(); $response = $apf->get_response(); $request = APF::get_instance()->get_request(); $params = $request->get_parameters(); //加密公钥 $member_key = $apf->get_config("member_key"); //加密字符串 $key = $params['key']; //用户ID $uid = $params['uid']; //用户NAME $username = $params['name']; //用户类型 $usertype = $params['utype']; //$response->set_cookie("uid",$uid); $response->set_cookie("usertype", $usertype); //成功跳转页面 $location = base64_decode(urldecode($params['location'])); if (strpos($location, chr(13))) { $location = substr($location, 0, strpos($location, chr(13))); } if (strpos($location, '?') !== false) { $location .= '&_r=' . mt_rand(0, time()); } else { $location .= '?_r=' . mt_rand(0, time()); } //用户登录时间 $time = $params['time']; //key的过期时间 $keytime = $params['keytime']; //是否来自经纪人登陆 $frombroker = $params['frombroker']; $errmsg = htmlspecialchars(urldecode($params['errmsg'])); //错误代码 $error = $params['error']; //来源 $sid = @APF::get_instance()->get_request()->get_parameter("sid"); //登陆成功 if ($uid && Bll_Security_Member::check_key($key, $uid, $username, $member_key, $time, $keytime)) { $user = Model_Broker_Member::getAjkMembersByUserId($uid); if ($user->userType > 1) { $broker = Model_Broker_AjkBrokerExtend::getBrokerInfoByUserId($user->userId); } if ($user) { header("P3P: CP=CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"); $brokerid = 0; $cookietime = 86400 * 365; $ucity = APF::get_instance()->get_request()->getCityId(); if ($user->userType == 2) { // 自动创建三网支付中心账号 /*$bll_account = new BLL_Acenter_AccountUser(); $bll_account->create_three_account_must($uid);*/ if (intval($broker->checkState) == 2) { // 被业务经理关闭的帐号 $errorMess = Const_Verify::CLOSE_ERROR; } if (intval($broker->accountType) == 10000) { // 被业务经理冻结帐号 $errorMess = Const_Verify::FREEZE_ERROR; } if ($broker->isLogin == 0 && $broker->punish == 2) { //黑名单经纪人不管是免费的还是续费的,立即关闭。 $errorMess = Const_Verify::BLACK_ERROR; } if ($errorMess) { $backurl = strpos($location, '?') ? $location . '&errorMess=' . $errorMess : $location . '?errmsg=' . $errorMess; Uri_Http::redirect_header($backurl, 302); return; } $ucity = @$broker->cityId; $brokerid = @$broker->brokerId; $cookietime = 0; $userTypeNew = Const_Verify::BROKER_USER; } else { //查询是用户是否门店 $AgcyInfo = Model_Broker_AgcyAccount::getAgcyByUserId($user->userId); if (is_array($AgcyInfo) && count($AgcyInfo)) { $userTypeNew = Const_Verify::COMPANY_USER; } else { $userTypeNew = Const_Verify::COMMON_USER; } } $userid = $user->userId; $username = $user->userName; $usertype = $user->userType; $fuid = $user->fuid; $emailpass = 1; if ($brokerid > 0) { Model_Log_BrokerLogin::insertLoginLog(date('Ym'), $brokerid); } $anjuke_secques = APF::get_instance()->get_config("AnjukeSecques"); $this->setLoginDataCookie($userid, $username, $usertype, $emailpass, $anjuke_secques, 0, $fuid, $ucity, $brokerid, $cookietime, $afutype = 0, $sid, $userTypeNew); $this->setLastLoinUserName($username, 86400 * 365); } //跳转用户原访问页面 if (!$params['no_redirect']) { Uri_Http::redirect_header($location, 302); } } else { //登陆失败 $backurl = strpos($location, '?') ? $location . '&errorMess=' . $errmsg . '&errorCode=' . $error : $location . '?errorMess=' . $errmsg . '&errorCode=' . $error; Uri_Http::redirect_header($backurl, 302); return; } }
public function build_return_url($ChangeDomain = 'my') { $base_domain = APF::get_instance()->get_config("base_domain"); return Uri_Http::build_uri($base_domain, $ChangeDomain); }
/** * 苏州站的昆山区域的所有页面做临时跳转 */ public static function tempRedirect($cityid, $blockid, $redUrl) { if ($cityid == 19 && $blockid == '2109') { $base_domain = APF::get_instance()->get_config("base_domain"); apf_require_class("Uri_Http"); Uri_Http::redirect_header("http://ks.{$base_domain}{$redUrl}"); } }