public static function chkShopOpenByBrokerID($p_intBrokerID) { $objORM = new ORM_AnjukeORM('shop_list'); $strSQL = 'select IsOpen from shop_list where BrokerId = ?'; $arrData = $objORM->executeSQL($strSQL, array($p_intBrokerID), 'ONE'); return !empty($arrData) ? $arrData['IsOpen'] : null; }
public function getCommMapCorrectTrackList($userid, $opentime, $start, $limit) { apf_require_class("ORM_AnjukeORM"); $orm = new ORM_AnjukeORM('log_modify_commmap'); $rst = $orm->getList('UserId=? and PostTime > ? order by PostTime desc limit ' . $start . ',' . $limit, array($userid, $opentime), true); return empty($rst) ? array() : $rst; }
public function getHasRankExam($BrokerId) { $objORM = new ORM_AnjukeORM('ajk_question_broker'); $strWhere = 'BrokerId = ? and rankexam = 1'; $arrParams = array($BrokerId); return $objORM->getList($strWhere, $arrParams, true); }
public static function updateShopSwitcher($p_intShopId, $p_intIsOpen) { $objORM = new ORM_AnjukeORM('shop_list'); $objORM->SHOPID = $p_intShopId; $objORM->ISOPEN = $p_intIsOpen; return $objORM->updData(true); }
public function getAreaCodesByParentId($p_parentId) { apf_require_class("ORM_AnjukeORM"); $objORM = new ORM_AnjukeORM('ajk_commtype'); $areaCodesList = $objORM->getList("ParentId = ?", array($p_parentId), true); return empty($areaCodesList) ? array() : $areaCodesList; }
/** * 添加发短信队列 * @param array $params */ public static function add_sms_task($params) { $orm = new ORM_AnjukeORM('ajk_sms_task'); foreach ($params as $field => $value) { $orm->{$field} = $value; } return $orm->addData(); }
/** * 更新经纪人新手指导信息 * @param $brokerId * @return array */ public function updateBrokerGuideInfo($brokerId, $data) { $orm = new ORM_AnjukeORM('ajk_broker_guide'); foreach ($data as $field => $value) { $orm->{$field} = $value; } $orm->BROKER_ID = $brokerId; return $orm->updData(true); }
/** * 获取该城市的自定义内容 * @param string $p_strHTMLTag * @param int $p_intCityID * @param array */ static function getHTMLContent($p_strHTMLTag, $p_intCityID) { $objORM = new ORM_AnjukeORM('ajk_html_content'); $arrContent = $objORM->getList('CITYID=? and ID=?', array($p_intCityID, $p_strHTMLTag)); if (1 == count($arrContent)) { return $arrContent[0]; } return array(); }
static function getActiveAccountExecutive($p_strWhere, $p_arrParams) { $objORM = new ORM_AnjukeORM('ajk_admin_manager'); $arrAccountExecutive = $objORM->getList($p_strWhere, $p_arrParams); if (!empty($arrAccountExecutive)) { return $arrAccountExecutive[0]; } else { return array(); } }
public static function getShopStyleList() { $objORM = new ORM_AnjukeORM('shop_style_list'); $arrGroup = $objORM->getList(); if (!empty($arrGroup)) { return $arrGroup; } else { return NULL; } }
public static function getLastPostBnsCardFile($bid) { if (!$bid) { return false; } $objORM = new ORM_AnjukeORM("ajk_broker_updatedata"); $sql = "select Daid,CityId, AreaCode, CommpStore, UserMobile, UserPhone, FileName, IsPass, StoreId from ajk_broker_updatedata where BrokerId='{$bid}' order by PostTime desc limit 1 "; $rst = $objORM->executeSQL($sql); return $rst[0]; }
public function handle_request_internal() { //组织数据 if (!isset($this->_params["num"]) || $this->_params["num"] > 500) { return '图片数目不合法,1-500'; } $_objAjkORM = new ORM_AnjukeORM('ajk_communitys'); $comm_list = $_objAjkORM->getList('typeflag=0 limit 0,500', array(), true, true); //print_r($comm_list);die; $return_urls = array(); $no = 0; foreach ($comm_list as $k => $comm) { $params['commId'] = $comm['COMMID']; $params['pageNo'] = 1; $params['pageSize'] = 20; $params['imgSize'] = '800x600'; $params['rommNum'] = 2; $params['hallNum'] = 1; $params['toiletNum'] = 1; $params['forward'] = '南'; $params['forward'] = urlencode($params['forward']); //通过java接口获取数据 $api_url = "image/houseModuleImg/" . $params['commId']; $_params = array(); foreach ($params as $key => $value) { $_params[] = "{$key}={$value}"; } $api_url = $api_url . '?' . implode('&', $_params); $houseImg = Util_CallAPI::get_data_from_java_ga($api_url, '', false); //print_r($houseImg);die; if ($houseImg['data']['status'] == 'ok') { $houseImg = $houseImg['data']; if (!empty($houseImg['imgs'])) { foreach ($houseImg['imgs'] as $k => $img) { if ($no >= $this->_params["num"]) { break 2; } $return_urls[] = $houseImg['imgs'][$k]['url']; $no++; // print_r($houseImg['imgs'][$k]['url']) . "\n"; } } else { continue; } unset($houseImg['status']); } else { continue; } } $return = array(); $return["status"] = "ok"; $return['data'] = $return_urls; return $return; }
public function handle_request_internal() { if (!$this->isBrokerLogin()) { $this->redirect_to_login(); } $objRequest = APF::get_instance()->get_request(); $action = $objRequest->get_parameter("action"); $old_pass = $objRequest->get_parameter("old_pass"); $new_pass1 = $objRequest->get_parameter("new_pass1"); $new_pass2 = $objRequest->get_parameter("new_pass2"); $new_pass1Length = strlen($new_pass1); if ($new_pass1Length < 6 || $new_pass1Length > 16) { $updateSuccess = false; $objRequest->set_attribute("updateSuccess", $updateSuccess); return "Broker_ModifyPassword"; } if (preg_match("/[\\u4e00-\\u9fa5]/i", $new_pass1) || preg_match("/['\"&<>\\s]/i", $new_pass1)) { $updateSuccess = false; $objRequest->set_attribute("updateSuccess", $updateSuccess); return "Broker_ModifyPassword"; } if ($new_pass1 != $new_pass2) { $updateSuccess = false; $objRequest->set_attribute("updateSuccess", $updateSuccess); return "Broker_ModifyPassword"; } //提交表单 if ($action == "modifypasswd") { $md5_password = md5($old_pass); $baseencode_password = base64_encode($md5_password); $md5_passwordnew = md5($new_pass1); $baseencode_passwordnew = base64_encode($md5_passwordnew); $uid = $objRequest->getUserId(); $objORM = new ORM_AnjukeORM('ajk_members'); $sql = "select UserId from ajk_members where UserId='" . $uid . "' and UserPwd='{$baseencode_password}'"; $rst = $objORM->executeSQL($sql); if (count($rst)) { if ($uid) { $aff_row = $objORM->executeSQL("update ajk_members set UserPwd='{$baseencode_passwordnew}' where UserId='{$uid}'"); if ($aff_row == 1 || $baseencode_password == $baseencode_passwordnew) { $updateSuccess = true; } } } else { $updateSuccess = false; } } $objRequest->set_attribute("url", $this->getURL('my', '/ajkbroker/broker/brokerinfo')); $objRequest->set_attribute("updateSuccess", $updateSuccess); return "Broker_ModifyPassword"; }
public function updatebrokerlevelDao($brokerId = 0, $brokerLevel = "", $isValid = "") { $orm = new ORM_AnjukeORM('ajk_brokerextend'); if ($brokerLevel === "" && $isValid === "") { return false; } if ($brokerLevel !== "") { $orm->BROKERLEVEL = $brokerLevel; } if ($isValid !== "") { $orm->ISVALID = $isValid; } $where_str = 'BrokerId =?'; $arr = array($brokerId); return $orm->updList($where_str, $arr); }
/** * 获取地铁站点 * @param array $p_arrParam * @return array */ static function getMetroStation($p_arrParam) { $strSQL = ''; $arrParam = array(); if (isset($p_arrParam['METROID'])) { $strSQL .= ' and METRO_ID=?'; $arrParam[] = $p_arrParam['METROID']; } if (isset($p_arrParam['STATUS'])) { $strSQL .= ' and STATUS=?'; $arrParam[] = $p_arrParam['STATUS']; } if (isset($strSQL[0])) { $strSQL = substr($strSQL, 4); } $objORM = new ORM_AnjukeORM('map_metro_stations'); return $objORM->getList($strSQL . ' order by DISPLAY_ORDER asc', $arrParam); }
/** * 获得经纪人跟进信息 * @param int $p_intBrokerID * @return array/NULL */ static function getBrokerFollowInfo($p_intBrokerID) { $objORM = new ORM_AnjukeORM('ajk_cms_broker'); $objORM->BROKERID = $p_intBrokerID; return $objORM->getRow(); }
static function addAJKAccountDao($data = array()) { $orm = new ORM_AnjukeORM('ajk_useraccount'); foreach ($data as $field => $value) { $orm->{$field} = $value; } return $orm->addData(); }
public function getVipWorkNumDao($cityid, $type) { $orm = new ORM_AnjukeORM('cst_boss'); $arrFrmMem = $orm->getList("cityid = ? and type=?", array($cityid, $type), true); return empty($arrFrmMem) ? array() : $arrFrmMem[0]; }
/** * 获得门店信息 * @param int $intCompanyId * @return array/NULL */ static function getCompanyStore($CityId, $CompanyId, $p_bolStrictFreshCache = false) { apf_require_class("ORM_AnjukeORM"); $objORM = new ORM_AnjukeORM('cst_broker_company'); $where = 'CityId=? and cst_company_id=? and IsActive=1 order by SortNum asc'; $arrList = $objORM->getList($where, array($CityId, $CompanyId), $p_bolStrictFreshCache); return empty($arrList) ? array() : $arrList; }
/** * 根据typeid获取数据信息 */ static function getAreaInfo($TypeId) { $objORM = new ORM_AnjukeORM('ajk_commtype'); $objORM->TypeId = $TypeId; return $objORM->getRow(); }
/** * 更新老表ajk_listptab_rent中的默认图 * @param int $p_intPropertyID * @param array $default_img */ static function updListPtabRent($arrParam) { $objORM = new ORM_AnjukeORM('ajk_listptab_rent'); $objORM->DEFIMAGE = $arrParam['DefImage']; $where_str = 'Proid =?'; $arr = array($arrParam['Proid']); $objORM->updList($where_str, $arr); }
static function getArea($Areacode) { $objORM = new ORM_AnjukeORM('ajk_commtype'); $strWhere = "TypeCode=?"; $arrParams = array($Areacode); return $objORM->getList($strWhere, $arrParams); }
/** * 添加经纪人换门店的记录 */ function addChangeStoreLog($p_arrParams) { $orm = new ORM_AnjukeORM('log_broker_changeStore'); foreach ($p_arrParams as $field => $value) { $orm->{$field} = $value; } return $orm->addData(); }
/** * 根据小区ID获取小区信息 * @param $comm_id * @param $flush_cache */ public static function get_community_info_byid($comm_id, $flush_cache = false) { $_objAjkORM = new ORM_AnjukeORM('ajk_communitys'); return current($_objAjkORM->getList('`commid`=? and typeflag=0 limit 0,1', array($comm_id), $flush_cache, $flush_cache)); }
public function logChangeInfo($broker_id = 0, $cityid, $log_txt = '') { apf_require_class('DAO_Other_common'); $arrLog = array('BrokerId' => $broker_id, 'CityId' => $cityid, 'Editlog' => $log_txt, 'State' => 2, 'PostDate' => time(), 'ExecuteDate' => 0); $orm = new ORM_AnjukeORM('log_broker_changeStore'); foreach ($arrLog as $field => $value) { $orm->{$field} = $value; } return $orm->addData(); }
public static function get_citys() { $objAjkORM = new ORM_AnjukeORM('ajk_commtype'); return $objAjkORM->getList("`ParentId`=? and `TypeFlag`=?", array(0, 0)); }
/** * 获取好友总人数 */ public static function getFriendsCnt($condition, $params, $refresh = false) { $orm = new ORM_AnjukeORM('friend_list'); return $orm->getCnt($condition, $params, $refresh); }
public function sendmail($arrData = array()) { apf_require_class("ORM_AnjukeORM"); $objORM = new ORM_AnjukeORM('ajk_sms_task', true); foreach ($arrData as $strField => $strValue) { $objORM->{$strField} = $strValue; } $objORM->addData(); }
public static function get_broker_store_info($intStoreId) { $objORM = new ORM_AnjukeORM('cst_broker_company'); $objORM->COMANYID = $intStoreId; return $objORM->getRow(); }
/** * 根据条件获得公司列表 * @param string $p_strWhere * @param array $p_arrParams * @return array/NULL */ static function getCompanyList($p_strWhere, $p_arrParams) { $objORM = new ORM_AnjukeORM('cst_company'); return $objORM->getList($p_strWhere, $p_arrParams); }