本文整理汇总了PHP中Area::getProvKeyByName方法的典型用法代码示例。如果您正苦于以下问题:PHP Area::getProvKeyByName方法的具体用法?PHP Area::getProvKeyByName怎么用?PHP Area::getProvKeyByName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Area
的用法示例。
在下文中一共展示了Area::getProvKeyByName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getData
protected function getData($nowPage,$pageSize)
{/*{{{*/
$dataList = $this->prepareData($nowPage, $pageSize);
$res = array();
foreach ($dataList as $data)
{
$provinceKey = Area::getProvKeyByName($data['prov']);
$tempData = array();
$tempData['item']['key'] = $data['prov'].$data['dname'].'医院';
$tempData['item']['url'] = 'http://www.haodf.com/jibing/'.$data['dkey'].'/yiyuan.htm?province='.$provinceKey;
$tempData['item']['showurl'] = 'www.haodf.com';
$tempData['item']['title'] = $data['prov'].$data['dname']."推荐医院_好大夫在线";
$tempData['item']['pagesize'] = rand(58, 62).'K';
$tempData['item']['date'] = date('Y-m-d', time());
$tempData['item']['content1'] = "根据".$data['diseasevote']."位".$data['dname']."患者投票得出的医院排行";
$tempData['item']['link'] = $tempData['item']['url'];
foreach ($data['formdata'] as $formData)
{
$tempData['item'][] = $formData;
unset($formData);
}
$res[] = $tempData;
unset($data);
}
return $res;
}/*}}}*/
示例2: echoChangeCity
public static function echoChangeCity()
{
return false;
if (isset($_COOKIE['b']['switch'])) {
return $_COOKIE['b']['switch'];
} else {
$usercity = Area::getIpCity();
$province = Area::getProvinceByCity($usercity);
$province = Area::getProvKeyByName($province);
$province_all = Area::provInfo();
return isset($province_all[$province]['Triage']) && $province_all[$province]['Triage'] ? true : false;
}
}
示例3: getDoctorInfo
private function getDoctorInfo($disease)
{/*{{{*/
$doctorList = DiseaseClient::getInstance()->getDieaseDoctorByDisease($disease->voteDisease->id, array());
$result = array();
foreach($doctorList as $diseaseDoctor)
{
$doctor = $diseaseDoctor->doctor;
if($doctor->hospitalfaculty->hospital->isTestHospital() || $doctor->isDead() || empty($doctor->hospitalfaculty->hospital->commonName))
{
continue;
}
if (in_array($doctor->hospitalfaculty->hospital->id, DiseaseHospital4Sougou::$offlineHospitalIds)) continue;
$province = $doctor->hospitalfaculty->hospital->province;
$res = array();
$res['name'] = $doctor->name;
$res['url'] = $doctor->getUrl();
$res['tagteach'] = $doctor->educateGrade;
$res['tagclinic'] = $doctor->grade;
$res['province'] = $province;
$res['province_url'] = 'http://www.haodf.com/jibing/'.$disease->key.'/daifu.htm?province='. Area::getProvKeyByName($province);
$res['city'] = $doctor->hospitalfaculty->hospital->getDistrictStr();
$res['seo_spelling'] = Area::getProvKeyByName($province);
$res['hospital']['url'] = $doctor->hospitalfaculty->hospital->getUrl();
$res['hospital']['name'] = $doctor->hospitalfaculty->hospital->commonName;
$res['lab'] = $doctor->hospitalfaculty->name;
$res['goodat'] = $doctor->specialize;
if($doctor->space->isBookingOpened())
{
$res['registerurl'] = $doctor->space->getBookingUrl();
}
$result[] = array('doctor' => $res);
unset($diseaseDoctor, $doctor, $province, $res);
}
unset($doctorList);
BeanFinder::get('LocalCache')->removeAll();
return $result;
}/*}}}*/
示例4: getData
public function getData($nowPage, $pageSize)
{/*{{{*/
$option['topLevel'] = 1;
$diseases = DiseaseClient::getInstance()->getDiseaseByOption($option, $nowPage, $pageSize);
$provinceList = Area::provInfo();
unset($provinceList['q']);//不要“其它”省份
$doctors = array();
foreach($diseases as $diseaseKey => $disease)
{
$res = $diseaseNames = array();
$diseaseNames = $this->getAllNames($disease->thesaurus, $disease->name);
foreach($provinceList as $provinceKey => $province)
{
$doctorList = $this->getDoctorInfo($disease, $province['Province']);
if (false == empty($doctorList))
{
foreach ($diseaseNames as $diseaseNameKey => $diseaseName)
{
$res = array();
$res['key'] = $diseaseName;
$res['province'] = $province['Province'];
$res['provincemoreurl'] = 'http://www.haodf.com/jibing/'.$disease->key.'/daifu.htm?province='. Area::getProvKeyByName($province['Province']);
$res['showurl'] = 'www.haodf.com/';
$res = array_merge($res, $doctorList);
$doctors[] = array('item' => $res);
unset($diseaseNames[$diseaseNameKey]);
}
}
unset($provinceList[$provinceKey]);
}
unset($diseases[$diseaseKey]);
BeanFinder::get('LocalCache')->removeAll();
}
return $doctors;
}/*}}}*/
示例5: getHospitalsForDisease
private function getHospitalsForDisease(Disease $disease)
{/*{{{*/
$dHInfo = DiseaseClient::getInstance()->getDiseaseHospitalByDisease($disease->voteDisease->id);
$dHList = $dHInfo['diseaseHospitalList'];
$hInfos = array();
foreach ($dHList as $dH)
{
$hospital = $dH->hospital;
if ($hospital->isTestHospital()) continue;
if (in_array($hospital->id, self::$offlineHospitalIds)) continue;
$provKey = Area::getProvKeyByName($hospital->province);
$hInfo = array();
$hInfo['id'] = $hospital->id;
$hInfo['name'] = $hospital->name;
$hInfo['province'] = $hospital->province;
$hInfo['province_url'] = $disease->getHospitalUrl().'?province='.$provKey;
$hInfo['city'] = $hospital->getCityIncludeZXS();
$hInfo['seo_spelling'] = $provKey;
$hInfo['hospital_url'] = $hospital->getUrl();
$hInfo['official_url'] = $hospital->website;
$hInfo['recommend_doctors_url'] = $hospital->getDiseaseDoctorUrl($disease);
$hInfo['register_url'] = $hospital->getJiaHaoUrl();
$hInfo['doctor_count'] = $hospital->doctorCount;
$hInfo['recommend_doctor_count'] = $dH->doctorCount;
$hInfo['grade'] = $hospital->gradeDesc();
$hInfo['labs'] = $this->getLabsForDiseaseHospital($dH);
$hInfos[] = array('hospital' => $hInfo);
unset($hInfo, $dH, $hospital);
}
return $hInfos;
}/*}}}*/
示例6:
<td>
<table width="960" border="0" cellspacing="0" cellpadding="0"
align="center">
<tr>
<td><?php require '_navigation.php' ?></td>
</tr>
</table>
</td>
</tr>
</table>
<?php
echo AdWord::getHtmlContentByHospital('hospital_ba', $hospital->id);
?>
<div style="margin:5px;">
当前位置:<a href="http://www.haodf.com">好大夫在线</a> > <a
href="http://www.haodf.com/yiyuan/<?=Area::getProvKeyByName($hospital->province)?>/list.htm">医院</a> > <a
href="<?=$hospital->getUrl()?>"><?=$hospital->commonName?></a> >推荐专家
</div>
<!-- Start -->
<div class="hdf-intro_doc clearfix">
<!--start hdf-intro_doc-nav-->
<div class="hdf-intro_doc-nav">
<div class="intro_doc-nav-mod">
<h3><span>按科室查看</span></h3>
<?php
$html = '';
if(isset($hospitalFacultyList) && !empty($hospitalFacultyList)){
foreach($hospitalFacultyList as $facultyBigName => $facultyList){
$html .= '<div class="de_title-mod">'.$facultyBigName.'</div><ul class="de_content-mod">';
示例7: include
body {
margin: 0px auto;
font-size: 12px;
background-color: #ffffff;
}
-->
</style>
</head>
<body>
<?php include('_partnerheader.php');?>
<div class="width_yy">
<a href="/"><?php if($isSohu) { echo '搜狐健康'; } else { echo '就医指南首页'; } ?></a> >
<a href="/province/all.htm">医院列表</a> >
<a href="/province/<?=Area::getProvKeyByName($hospitalFaculty->hospital->province ) ?>.htm"><?=$hospitalFaculty->hospital->province ?></a> >
<a href="<?=$router->urlfor('hospital/showdetail', array('id'=>$hospitalFaculty->hospital->getEncodeId())) ?>"><?=$hospitalFaculty->hospital->commonName ?></a> >
<?=$hospitalFaculty->name ?>
</div>
<div class="width_yy" id="ss">
<ul>
<li class="bg_l"><a href="/" class="bg_l" style="text-decoration: none">医院<span>Hospital</span></a></li>
<li class="bg_c">
<?php if ($isThreadOpen) {include('_searchform.php');}?>
</li>
<li class="bg_r"></li>
</ul>
</div>
<div class="width_yy">
<div class="yyleft">
示例8: include
body {
margin: 0px auto;
font-size: 12px;
background-color: #ffffff;
}
</style>
<script type="text/javascript" src="http://i1.hdfimg.com/js/jquery-1.4.2.min.js"></script>
<style type="text/css">#container{height:550px;width:650px;}</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.2"></script>
</head>
<body>
<?php include('_partnerheader.php');?>
<div class="width_yy">
<a href="/"><?php if($isSohu) { echo '搜狐健康'; } else { echo '就医指南首页'; } ?></a> >
<a href="/province/all.htm">医院列表</a> >
<a href="/province/<?=Area::getProvKeyByName($hospitalInfo->province) ?>.htm">
<?=$hospitalInfo->province ?></a> > <a href="<?=$router->urlfor('hospital/showdetail', array('id'=>$hospitalInfo->getEncodeId())) ?>"><?=$hospitalInfo->commonName ?> ></a> 医院地图
</div>
<div class="width_yy" id="ss">
<ul>
<li class="bg_l">医院 <span>Hospital</span></li>
<li class="bg_c">
<?php if ($isThreadOpen) {include('_searchform.php');}?>
</li>
<li class="bg_r"></li>
</ul>
</div>
<div class="width_yy">
<div class="yyleft">
<div class="yy">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="shhy_panel3">
示例9: ajaxgetcitybyip
public function ajaxgetcitybyip($request, $response)
{/*{{{*/
$callback = $request->callback;
$usercity = $request->city;
if(true == empty($usercity)){
$usercity = Area::getIpCity();
}
$usercity = mb_convert_encoding(($usercity),'GBK','auto');
$province = Area::getProvinceByCity($usercity);
$province = Area::getProvKeyByName($province);
$province_all = Area::provInfo();
$py = (isset($province_all[$province]['Triage'])&&$province_all[$province]['Triage'])?$province:"";
$usercity = mb_convert_encoding(($usercity),'utf8','auto');
$response->callback = $request->callback?$request->callback:'';
$response->usercity = $usercity;
$response->province = $province;
$response->py = $py;
}/*}}}*/
示例10:
<li style="padding-bottom: 5px"><a target="_blank"
href="<?=$space->getPatientFeedBackUrl() ?>" rel="nofollow"><img
src="http://i1.hdfimg.com/v2/images/h_hf/ktdh.gif" /></a></li>
<?
}
?>
<?php } ?> <?php } ?></td>
</tr>
<?php
}
}
?>
</table>
<div id="adv_doc_bottom">
<?php
$provinceEnglishName = Area::getProvKeyByName($hospitalFaculty->hospital->province);
if( false == empty($provinceEnglishName) )
{
$provinceEnglishName = '/'.$provinceEnglishName;
}
?>
<span class="font14 bold orange">没有适合您疾病的大夫?</span><br />
<span class="gray"><a href="<?=$wwwUrl ?>/hospital/<?=$hospitalFaculty->hospital->getEncodeId() ?>/jibing.htm" class="blue">请点击此处查找本院可咨询大夫>></a></span><br />
<span class="gray"><a href="http://<?=URL_PREFIX?>haoping.haodf.com/keshi/<?=$hospitalFaculty->faculty->getEncodeId() ?>/daifu<?=$provinceEnglishName?>.htm" class="blue">请点击此处查找其他医院可咨询大夫>></a></span><br />
</div>
<?php
}
else
{
?>
示例11: 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 : " ";
//.........这里部分代码省略.........
示例12: 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;
}/*}}}*/
示例13: 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;
}/*}}}*/
示例14:
<p class="pb10"><span class="g_area pl20 mr30"><?=$hospital->city?></span><span class="g_rank pl20"><?=Hospital::$GradeDefine[$hospital->grade]?></span></p>
<p>
<span class="g_good1 pl20"><a class="look_a1" target="_blank" href="http://www.haodf.com/tuijian/<?=$hospital->getEncodeId()?>/<?=$disease->key?>.htm">患者好评<span class="look_num1"><?=$diseaseHospital->rate1Value1Count?></span>票</a></span>
<span class="g_praise2 pl20 ml20"><a class="look_a1" target="_blank" href="http://www.haodf.com/tuijian/<?=$hospital->getEncodeId()?>/<?=$disease->key?>.htm">好评大夫<span class="look_num1"><?=$diseaseHospital->doctorCount?></span></a>位</span>
</p>
</div>
</li>
<?php }
?>
<p class="tr fs"><a href="<?=$diseasePage->getHospitalUrl($disease->key, Area::getProvKeyByName($key), '', '', '')?>" class="blue_font3" target="_blank">全部<?=$key?>推荐医院</a></p>
</ul>
<?php
} ?>
</div>
</div>
<!--推荐医院 end-->
示例15: foreach
<div class="mt10 ml10 mr10 bg_w b_ra5">
<?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">