Exemple #1
0
 public static function build_url($class_name, $params = null)
 {
     $arr = explode("_", $class_name);
     $path = implode("/" . $arr);
     $url = "/" . $path . "/";
     if (null != $params) {
         $url .= APF_Util_StringUtils::encode_seo_parameters($params);
     }
     return $url;
 }
 /**
  * 拼接分页按钮URL
  * @param array $p_arrParameters
  * @param string $p_strExtendURL
  * @return string
  */
 static function getUrlString($p_arrParameters = array(), $p_strExtendURL = 'combo/account/accountlog')
 {
     $p_strExtendURL = ltrim($p_strExtendURL, "/");
     return Util_Url::buildMyBasicUrl() . $p_strExtendURL . APF_Util_StringUtils::encode_seo_parameters($p_arrParameters);
 }
Exemple #3
0
 public function load_parameters()
 {
     return array_merge(APF_Util_StringUtils::decode_seo_parameters($_SERVER['REQUEST_URI']), $_GET, $_POST);
 }
 /**
  *
  * 组装小区链接
  * @author rocky.wu 2012/08/17
  * @param unknown $kw 小区Id
  * @param array $param 次级参数数组
  * @return string 返回链接uri
  */
 protected function build_url($kw, $params = array(), $uriParams = array(), $city_domain = '')
 {
     $apf = APF::get_instance();
     $request = $apf->get_request();
     $base_domain = $apf->get_config("base_domain");
     if ($city_domain != 'my') {
         $city_set = $request->load_city_set();
         $city_domain = $city_set['pinyin'] ? $city_set['pinyin'] : "www";
     }
     $schema = $request->is_secure() ? "https" : "http";
     if ($kw) {
         $kw = urlencode($kw);
     }
     $url = "{$schema}://{$city_domain}.{$base_domain}" . BASE_URI . "/";
     $url .= implode('/', (array) $params) . '/' . $kw;
     if (!empty($uriParams)) {
         $url .= APF_Util_StringUtils::encode_seo_parameters($uriParams);
     }
     return $url;
 }
Exemple #5
0
 private function formatFilterQueryString($highlights = array())
 {
     $data = APF::get_instance()->get_request()->get_attributes();
     $params = array();
     $params['type'] = isset($highlights['type']) ? $highlights['type'] : $data['type'];
     $params['room'] = isset($highlights['room']) ? $highlights['room'] : $data['room'];
     $params['area'] = isset($highlights['area']) ? $highlights['area'] : $data['area'];
     $params['subArea'] = isset($highlights['subArea']) ? $highlights['subArea'] : $data['subArea'];
     // 移除空参数
     foreach ($params as $key => $param) {
         if (!$param) {
             unset($params[$key]);
         }
     }
     return APF_Util_StringUtils::encode_seo_parameters($params);
 }
 public static function getPage($page, $uriparams, $uriprefix, $kw)
 {
     $firstpage = array();
     $firstpage['page'] = $page;
     $uriparams[Const_Listing::PARAM_N_PAGE] = $page;
     if ($uriparams[Const_Listing::PARAM_N_PAGE] <= 1) {
         unset($uriparams[Const_Listing::PARAM_N_PAGE]);
     }
     $firstpage['link'] = $uriprefix . $kw . APF_Util_StringUtils::encode_seo_parameters($uriparams);
     return $firstpage;
 }
Exemple #7
0
 public static function build_shop_edit_url($type)
 {
     $arrParam = array('type' => $type);
     return parent::build_broker_domain() . "/ajkbroker/user/broker/shop/change/" . APF_Util_StringUtils::encode_seo_parameters($arrParam);
 }
 /**
  * 拼接分页按钮URL
  * @param array $p_arrParameters
  * @param string $p_strExtendURL
  * @return string
  */
 static function getUrlString($p_arrParameters = array(), $p_strExtendURL = 'user/yuanbao/search/')
 {
     $p_strExtendURL = ltrim($p_strExtendURL, "/");
     return Util_Url::buildMyBasicUrl() . $p_strExtendURL . APF_Util_StringUtils::encode_seo_parameters($p_arrParameters);
 }
Exemple #9
0
 /**
  * 获取访问该页面的路径
  * @param mix $p_mixChannel 'city' or 'my' or cityid
  * @param string $p_strBaseURL
  * @param array $p_arrParameter
  * @param boolean $p_bolFouceIDC1
  * @return string
  */
 public static function _getURLNew($p_mixChannel, $p_strBaseURL, $p_strName, $p_arrParameter, $p_bolFouceIDC1)
 {
     $objAPF = @APF::get_instance();
     $objRequest = $objAPF->get_request();
     switch ($p_strName) {
         case 'haozu':
             $strBaseDomain = $objAPF->get_config('haozu_city_base_domain');
             $strBaseURI = '';
             break;
         case 'aifang':
             $strBaseDomain = $objAPF->get_config('aifang_city_base_domain');
             $strBaseURI = '';
             break;
         case 'jinpu':
             $strBaseDomain = $objAPF->get_config('jinpu_city_base_domain');
             $strBaseURI = '';
             break;
         case 'anjuke':
         default:
             $strBaseDomain = $objAPF->get_config('base_domain');
             $strBaseURI = BASE_URI;
             break;
     }
     $strSchema = $objRequest->is_secure() ? 'https' : 'http';
     $strPrefix = '';
     switch ($p_mixChannel) {
         case 'city':
             $arrCitySet = $objRequest->load_city_set();
             $strPrefix = $arrCitySet['pinyin'];
             break;
         case 'my':
             $strPrefix = 'my';
             break;
         case 'user':
             $strPrefix = 'user';
             break;
         case 'agent':
             $strPrefix = 'agent';
             break;
         case 'www':
             $strPrefix = 'www';
             break;
         default:
             if (is_numeric($p_mixChannel)) {
                 $arrCitySet = $objAPF->get_config('city_set', 'multicity');
                 $strPrefix = $arrCitySet[$p_mixChannel]['pinyin'];
             }
             $topicSetCheck = strpos($p_mixChannel, '-s');
             if (!empty($topicSetCheck)) {
                 $strPrefix = $p_mixChannel;
             }
             break;
     }
     if ($p_bolFouceIDC1) {
         return $strSchema . '://' . $strPrefix . '.' . $strBaseDomain . BASE_URI . '/aw' . $strBaseURI . $p_strBaseURL . (empty($p_arrParameter) ? '' : '/' . APF_Util_StringUtils::encode_seo_parameters($p_arrParameter));
     } else {
         return $strSchema . '://' . $strPrefix . '.' . $strBaseDomain . $strBaseURI . $p_strBaseURL . (empty($p_arrParameter) ? '' : '/' . APF_Util_StringUtils::encode_seo_parameters($p_arrParameter));
     }
 }
Exemple #10
0
 /**
  * 经纪人后台房源详情链接
  *
  * @param $id
  * @param $type
  *
  * @return string
  */
 private function formatHouseUrl($id, $type)
 {
     $url = '#';
     $baseDomain = APF::get_instance()->get_config('base_domain', 'common');
     switch ($type) {
         case Model_House_CommissionHouse::COMMISSION_TYPE_SALE:
             $url = "http://my.{$baseDomain}/user/broker/sale/newproview?proid={$id}";
             break;
         case Model_House_CommissionHouse::COMMISSION_TYPE_RENT:
             $params = array('proid' => $id);
             $url = "http://my.{$baseDomain}/zufang/my/propeffect/" . APF_Util_StringUtils::encode_seo_parameters($params);
             break;
     }
     return $url;
 }