本文整理汇总了PHP中Area::retrieveCityEnglishName方法的典型用法代码示例。如果您正苦于以下问题:PHP Area::retrieveCityEnglishName方法的具体用法?PHP Area::retrieveCityEnglishName怎么用?PHP Area::retrieveCityEnglishName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Area
的用法示例。
在下文中一共展示了Area::retrieveCityEnglishName方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<div id="el_result_content" class="m_right_682">
<div class="m_box_green">
<?php
$option['search_target'] = "hospital.php";
GlobalTemplete::getSearchBar($option);
?>
<div class="bxhd2">
<div class="lf"></div>
<div class="rt"></div>
<div class="center">
<?php
if (empty($city))
{
if ($distinct)
{
$cityEnglishName = Area::retrieveCityEnglishName('', $prov, $distinct);
if( !empty($cityEnglishName) )
{
$url = 'http://www.'.URL_PREFIX.'haodf.com/yiyuan/'.$prov.'/'.$cityEnglishName.'/sanjia.htm';
} else {
//$url = 'http://www.'.URL_PREFIX.'haodf.com/yiyuan/'.$prov.'/'.urlencode($areaName).'/sanjia.htm';
$url = 'http://www.'.URL_PREFIX.'haodf.com/yiyuan/'.$prov.'/sanjia.htm';
}
}
else
{
$url = 'http://www.'.URL_PREFIX.'haodf.com/yiyuan/'.$prov.'/sanjia.htm';
}
?>
<!--table cellspacing="0" cellpadding="0" border="0" width="221" style="margin-top:16px;">
<tr>
示例2: getData
protected function getData($nowPage, $pageSize)
{/*{{{*/
$facultyIds = FacultyClient::getInstance()->getFacultyListByOption($nowPage, $pageSize);
$faculties = DAL::get()->find('Faculty', $facultyIds['ids']);
$provinces = Area::getAllProvinceNameList();
$provinces[] = "全国";
$res = array();
foreach ($faculties as $faculty)
{
$info['key'] = $faculty->name;
$offices = $doctorInfos = array();
foreach ($provinces as $province)
{
if (Area::isZXS($province))
{
$cities = array($province);
}
elseif($province == "全国")
{
$cities = array("全国");
}
else
{
$cities = Area::getProvinceCities($province);
$cities[] = $province;
}
foreach ($cities as $city)
{
$options = array();
$options['facultyId'] = $faculty->id;
$options['orderBy']['rank'] = true;
$options['isVirtual'] = 0;
$options['hospitalIsActivated'] = 1;
if ($city != "全国")
{
if (Area::isProvince($city) || Area::isZXS($city))
{
$options['province'] = $city;
$areaUrl = "http://haoping.haodf.com/keshi/".$faculty->getEncodeId()."/keshi/".Area::getProvKeyByName($city).".htm";
}
else
{
$options['city'] = $city;
$str = Area::retrieveCityEnglishName($province, Area::getProvKeyByName($province), $city);
$areaUrl = "http://haoping.haodf.com/keshi/".$faculty->getEncodeId()."/keshi/".Area::getProvKeyByName($province).".htm?city=".$str;
}
}
else
{
$areaUrl = "http://haoping.haodf.com/keshi/".$faculty->getEncodeId()."/keshi/all.htm";
}
$hospitalfaculties = HospitalFacultyClient::getInstance()->getHospitalFacultyByOption(1, 30, $options);
if (false == empty($hospitalfaculties))
{
$office['area'] = $city;
$office['areaurl'] = $areaUrl;
foreach ($hospitalfaculties as $hospitalfaculty)
{
if ($hospitalfaculty->doctorCount < 1)
{
continue;
}
$officeInfo['office']['officename'] = $hospitalfaculty->hospital->name.$hospitalfaculty->name;
$officeInfo['office']['city'] = $hospitalfaculty->hospital->city;
$officeInfo['office']['officeurl'] = $hospitalfaculty->getUrl();
$officeInfo['office']['aptitude'] = $hospitalfaculty->hospital->getGradeStr();
$officeInfo['office']['gooddoctornum'] = $hospitalfaculty->doctorCount;
$officeInfo['office']['votenum'] = $hospitalfaculty->rank;
$office[] = $officeInfo;
$officeInfo = array();
}
$offices[] = array('offices' =>$office);
$office = array();
}
$page = $params = array();
$page['nowPage'] = 1;
$page['pageSize'] = 30;
$doctorList = DoctorClient::getInstance()->getDoctorBetweenFaculty($faculty->id, $faculty->id+1, $options, $page);
if (false == empty($doctorList['list']))
{
$doctors['area'] = $city;
$pre = "all";
if ($city != "全国")
{
$pre = Area::getProvKeyByName($province);
}
$doctors['areaurl'] = "http://haoping.haodf.com/keshi/".$faculty->getEncodeId()."/daifu/".$pre.".htm";
$doctorInfo = array();
foreach ($doctorList['list'] as $doctor)
{
if (74154 != $doctor->id && $doctor->hospitalfaculty->hospital->isActivated && $doctor->hospitalfaculty->hospital->name != "未收录医院")
{
$doctors['doctor']['doctorname'] = $doctor->name;
$doctors['doctor']['doctorurl'] = $doctor->getUrl();
$doctors['doctor']['doctorgrade'] = $doctor->grade ? $doctor->grade : " ";
$doctors['doctor']['doctorjob'] = $doctor->educateGrade ? $doctor->educateGrade : " ";
//.........这里部分代码省略.........
示例3: if
<!--end header element-->
<!--start banner element-->
<div class="banner">
<div class="area-department clearfix">
<div class="area-department-l fl f16">地区分类</div>
<div class="area-department-r fl f14">
<?php if (count($cities) > 1) {
if ($city == '') { ?>
<a class="orange" href="/baiduapp/hospital/<?=$prov?>/list.htm">全部</a>
<?php } else { ?>
<a href="/baiduapp/hospital/<?=$prov?>/list.htm">全部</a>
<?php } } ?>
<?php foreach ($cities as $value) {
$cityEnglishName = Area::retrieveCityEnglishName($proName, '', $value);
if ( false == empty($cityEnglishName)) {
if ($cityEnglishName == $city) { ?>
<a class="orange" href="/baiduapp/hospital/<?=$prov?>/<?=$cityEnglishName?>/list.htm"><?=$value?></a>
<?php } else { ?>
<a href="/baiduapp/hospital/<?=$prov?>/<?=$cityEnglishName?>/list.htm"><?=$value?></a>
<? } } }?>
</div>
</div>
</div>
<!--end banner element-->
<!--start content element-->
<div class="content clearfix">
<div class="content-l fl"></div>
示例4: buildData
private function buildData($hosiptalFacultyList)
{/*{{{*/
$res = array();
foreach ($hosiptalFacultyList as $hospitalFaculty)
{
BeanFinder::get('LocalCache')->removeAll();
$url = array();
$url['loc'] = $hospitalFaculty->getUrl();
$url['lastmod'] = date('Y-m-d');
$url['changefreq'] = 'always';
$url['priority'] = '1.0';
$display = array();
$url['keshi'] = $hospitalFaculty->faculty->name;
$faculty = DAL::get()->find('Faculty', $hospitalFaculty->fld_facultyid);
$keshialiases = explode(",", $faculty->alias);
if (isset($this->keshialiasArr[$hospitalFaculty->faculty->name]))
{
$keshialiases = array_merge($keshialiases, $this->keshialiasArr[$hospitalFaculty->faculty->name]);
}
foreach ($keshialiases as $key => $alias)
{
if (0 == strlen($alias))
{
continue;
}
if (strlen($alias) > 6)
{
$url[] = array('keshialias' => array('name' => str_replace("科", "", $alias)));
}
else
{
$url[] = array('keshialias'=> array('name' => $alias));
}
}
$url['hospitalkeshi'] = $hospitalFaculty->hospital->name . $hospitalFaculty->name;
$url[] = $this->getHospitalKeshiAliasArray($hospitalFaculty->hospital->aliases, $hospitalFaculty->name);
$url['urlkeshicity'] = null;
$url['urlkeshipro'] = null;
$provinceKey = Area::getProvKeyByName($hospitalFaculty->hospital->province);
if (false == ($hospitalFaculty->hospital->isNull()) && false == empty($provinceKey))
{
$url['urlkeshipro'] = "http://haoping.haodf.com/keshi/".$hospitalFaculty->faculty->getEncodeId()."/keshi/".$provinceKey.".htm";
$cityKey = Area::retrieveCityEnglishName($hospitalFaculty->hospital->province, $provinceKey, $hospitalFaculty->hospital->city);
$url['urlkeshicity'] = "http://haoping.haodf.com/keshi/".$hospitalFaculty->faculty->getEncodeId()."/keshi/".$provinceKey.".htm?city=".$cityKey;
}
$url['hospitalkeshilink'] = $hospitalFaculty->getUrl();
$url['hospitalkeshiprovince'] = str_replace("省", "", $hospitalFaculty->hospital->province);
$url['hospitalkeshicity'] = str_replace("市","", $hospitalFaculty->hospital->city);
$url['hospitalkeshidoctornum'] = $hospitalFaculty->doctorCount;
$url['hospitalkeshidoctorvote'] = $hospitalFaculty->goodVoteCount;
$url['hospitallevel'] = $hospitalFaculty->hospital->gradeDesc();
$allVoteCount = DAL::get()->queryTotalVoteCountByFacultyId('hospitalfaculty', $faculty->id);
$url['patientnum'] = $allVoteCount;
$url[] = $this->hospitalKeshiSuffix;
$res[]['url'] = $url;
}
return $res;
}/*}}}*/
示例5: buildData
protected function buildData($nowPage, $pageSize, $hospitalList, $area)
{/*{{{*/
$hospitalRes = array();
if(count($hospitalList) >= 5)
{
$formData = $this->getSanjiaHospitalGroup($hospitalList);
$hospital = array_shift($hospitalList);
$area = $hospital->$area;
$province = Area::getProvKeyByName($hospital->province, 'all');
$city = Area::retrieveCityEnglishName($hospital->province, $province, $hospital->city);
$cityEng = Area::isProvince($area)?"":$city."/";
$hospitalRes['item']['key'] = $area."三甲医院";
$hospitalRes['item']['url'] = "http://www.haodf.com/yiyuan/".$province."/".$cityEng."list.htm?level=6";
$hospitalRes['item']['title'] = $area."地区三甲医院_门诊时间,专家推荐_好大夫在线";
$hospitalRes['item']['showurl'] = "www.haodf.com";
$hospitalRes['item']['pagesize'] = rand(60,60).'K';
$hospitalRes['item']['date'] = date('Y-m-d',time());
$hospitalRes['item']['content'] = "提供".$area."地区".count($hospitalList)."家三甲医院的医院等级、地址、预约电话及专家门诊时间查询;根据患者的就医经验,推荐".$area."地区专家,另有在线医生提供免费咨询...";
$hospitalRes['item']['linkurl'] = $hospitalRes['item']['url'];
$hospitalRes['item']['linkcontent'] = "查看".($cityEng?$hospital->city:$hospital->province)."所有三甲医院";
$hospitalRes['item'][] = $formData;
}
return $hospitalRes;
}/*}}}*/
示例6: dirname
<?php include_once dirname(__file__).'/../_headerwithx.php' ?>
<div class="mt15 ml10 mr10 bg_w b_ra5 bd_1 bor_t" style="border-top:none;">
<ul class="dis_n_list">
<?php $allCityUrl = $router->urlfor('hospital/hospitallist', array(
'provinceKey' => $provKey,
'cityKey' => HospitalController::ALL_CITY_KEY,
));?>
<li <?=('all' === $selectedCity)?'class="vis_t"':'';?>><a href="<?=$allCityUrl?>">È«²¿µØÇø</a></li>
<?php foreach ($citys as $city) {
$cityKey = Area::retrieveCityEnglishName($provName, $provKey, $city);
$cityUrl = $router->urlfor('hospital/hospitallist', array(
'provinceKey' => $provKey,
'cityKey' => $cityKey,
));
?>
<li <?=($cityKey === $selectedCity)?'class="vis_t"':'';?>><a href="<?=$cityUrl?>"><?=$city?></a></li>
<?php }?>
</ul>
<p class="clear_b"></p>
</div>
<?php include_once dirname(__file__).'/../_innerfooter.php' ?>
示例7: foreach
<?php foreach ($areaList as $areaName => $provinces) {?>
<div class="f_t19 hos_area bt_e pt10 clear_l"><?=$areaName?>地区</div>
<ul class="dis_n_list pt10">
<?php foreach ($provinces as $displayName) {
if (Area::isProvince($displayName))
{
$areaUrl = $router->urlfor('hospital/hospitallist', array(
'provinceKey' => Area::getProvKeyByName($displayName),
'cityKey' => HospitalController::ALL_CITY_KEY,
));
} else {
$cityName = $displayName;
$provinceName = Area::getProvinceByCity($cityName);
$provinceKey = Area::getProvKeyByName($provinceName);
$cityKey = Area::retrieveCityEnglishName($provinceName, $provinceKey, $cityName);
$areaUrl = $router->urlfor('hospital/hospitallist', array(
'provinceKey' => $provinceKey,
'cityKey' => $cityKey,
));
}
?>
<li><a href="<?=$areaUrl?>"><?=$displayName?></a></li>
<?php } ?>
</ul>
<?php } ?>
<p class="clear_b"></p>
</div>
<script type="text/javascript">
var authorizeLocation = function (btn, cb) {
示例8: hospital
public function hospital($request, $response)
{/*{{{*/
$this->initialize($request, $response);
//疾病页2013版
$diseasePage = DiseasePage::getByDiseaseId($this->disease->id);
if($diseasePage instanceof DiseasePage && $diseasePage->isOnlineOrPreview())
{
$this->diseasePageHospital($request, $response);
return 'diseasepage';
}
$this->provinceList = Area::provInfoAll();
if (isset($this->provinceList[$this->province])){
$this->provinceName = $this->provinceList[$this->province]['Province'];
}
unset($this->provinceList['xizang']);
$response->provinceList = $this->provinceList;
$this->pageIndex = 'hospital';
$this->pageSite = '好评医院';
$this->title = $this->disease->name . '患者推荐的医院_好大夫在线';
$name = $this->disease->name;
$city = $request->city;
$response->city = $city;
$response->diseaseName=$name;
$response->provinceName = $this->provinceName;
$binds = array();
if($this->provinceName){
$binds['province'] = $this->provinceName;
}
$diseaseId = $this->disease->voteDisease->id;
$binds['rank'] = 1;
$binds['needPage'] = true;
$response->modifiedTriageCity = array();
if($request->province)
{
$res0 = DiseaseClient::getInstance()->getDiseaseHospitalByDisease($diseaseId, $binds, $this->nowPage, 300);
$citypinyin_refs= array();
$cityPinyin_cityNames = array('all' => '全部');
foreach($res0['diseaseHospitalList'] as $a)
{
$cityPy = Area::retrieveCityEnglishName($this->provinceName, $request->province, $a->hospital->city);
$cityPinyin_cityNames[$cityPy] = $a->hospital->city;
$citypinyin_refs[$cityPy][] = $a;
}
$response->cityPinyin_cityNames = $cityPinyin_cityNames;
}
$res = array();
$pageSize = 19;
if($city)
{
$res['diseaseHospitalList'] = $citypinyin_refs[$city];
}else{
$res = DiseaseClient::getInstance()->getDiseaseHospitalByDisease($diseaseId, $binds, $this->nowPage, $pageSize);
}
//取推荐大夫数
$ddCnt = DiseaseClient::getInstance()->getDiseaseDoctorCnt($this->disease->id);
$hospitalList = $res['diseaseHospitalList'];
$response->pageIndex = $this->pageIndex;
$response->pageSite = $this->pageSite;
$response->ddCnt = $ddCnt;
$response->hospitalList = $hospitalList;
//SEO
$hospitalCount = isset($res['pageInfo']['total'])?$res['pageInfo']['total']:0;
$title = "{$this->provinceName}{$this->disease->name}医院_好大夫在线";
$keywords = "{$this->provinceName}治疗{$this->disease->name}的医院,{$this->provinceName}{$this->disease->name}最好的医院,{$this->provinceName}治疗{$this->disease->name}最好的医院";
$description = "{$this->provinceName}{$this->disease->name}医院,根据患者投票评选的{$this->provinceName}{$this->disease->name}医院排名,含广东{$this->disease->name}医院{$hospitalCount}家。查询门诊时间、咨询专家、预约专家门诊,帮您找到{$this->provinceName}治疗{$this->disease->name}最好的医院。";
if ( $this->nowPage != 1 && $this->provinceName)
{
$title = $this->provinceName.$this->disease->name."医院_".$this->provinceName."好评医院推荐第".$this->nowPage."页_好大夫在线";
$keywords = "";
$description = "";
}
$response->title = $title;
$response->keywords = $keywords;
$response->description = $description;
$response->pageName = "医院推荐";
$response->hospitalPageStatus = "active";
$pageLink = '';
if(empty($res['pageInfo']) == false) {
$pageLink = PageNav::getNavLink(PageNav::getPageNavTemplate("/jibing/".$this->disease->key."/yiyuan.htm?province=".$this->province."&p="),
$res['pageInfo']['nowpage'], $res['pageInfo']['pagesize'], $res['pageInfo']['total']);
}
$pageLink = str_replace('&p=1', '', $pageLink);
$response->pageLink = $pageLink;
}/*}}}*/