?> <li> <?php $rootList = LableDefine::getRootLableList();?> <a href="<?=DiseasePage::getZhuantiUrl($disease->key, DiseaseController::ZHUANTI_QUERYTYPE_LABLE, $rootKey)?>" class="<?=($rootKey == $rootLableKey) ? 'cur' : ''?>"><p class="<?=($rootKey == $rootLableKey) ? 'cur' : ''?>"><?=$rootList[$rootKey]?>(<?=$lableInfo['count']?>)</p></a> <ul class="slide_box bb_e5"> <?php foreach($lableInfo['leafs'] as $leafId => $leafCount){?> <li><a href="<?=DiseasePage::getZhuantiUrl($disease->key, DiseaseController::ZHUANTI_QUERYTYPE_LABLE, '', $leafId)?>" class="<?=($leafId == $leafLableKey) ? 'cur' : ''?>"><?=LableDefine::getLableTitle($leafId);?>(<?=$leafCount?>)</a></li> <?php } ?> </ul> </li> <?php }?> </ul> <h3 class="total"><a href="<?=DiseasePage::getZhuantiUrl($disease->key, DiseaseController::ZHUANTI_QUERYTYPE_CMSCATEGORY, '', '', '')?>">全部栏目</a></h3> <ul class="menu_cate3"> <?php $array4Paper = CmsObjCategory::getDescArray4Paper(); $categoryInfos = $diseasePage->getPaperCountGroupByCategory(); foreach($categoryInfos as $key => $count){ ?> <li><a href="<?=DiseasePage::getZhuantiUrl($disease->key, DiseaseController::ZHUANTI_QUERYTYPE_CMSCATEGORY, '', '', $key)?>" class="<?=($key == $cmsCategory) ? 'cur' : ''?>"><?=$array4Paper[$key]?>(<?=$count?>)</a></li> <?php } ?> </ul> </div> </div> </div> <!--左侧导航 end-->
$des = isset($desArr[$category]) ? $desArr[$category] : ''; if(isset($paperTagId)) { ?> <span><a href="/thesis/showtaglist?searchType=tagId&searchParam=<?=$paperTagId?>"><?=$paperTag?></a> > </span> <?php } ?> <span class="green"> <?php if(isset($category) && false == empty($category)) { if (isset($diseaseName) && false == empty($diseaseName)) { echo '<span class="black"><a href="http://www.'.URL_PREFIX.'haodf.com/thesis/showlist?category='.$category.'">'.CmsObjCategory::getDesc($category).' </a> > </span>'; echo '<span class="green">'.$diseaseName.$des.'</span>'; } else { echo CmsObjCategory::getDesc($category); } } elseif(isset($paperTitle) && false == empty($paperTitle)) { echo "<span class='black'> <a href='".$paper->getUrl()."' target='_blank'>".$paperTitle." </a> > </span> <span class='green'>文章列表</span>"; } ?> </span> </div> </div> <!-- end dd-nav --> <div class="clearfix mt20"> <div class="w650 fl"> <?php if (CmsObjCategory::SHIPIN == $category) {
public function showList($request, $response) { /*{{{*/ $nowPage = $request->getRequest('page', 1); $response->nowPage = $nowPage; $response->nowPage = $nowPage; $pageSize = 20; $category = $request->category; $response->category = $category; $searchType = $request->searchType; $response->searchType = $searchType; if ('onlinetime' == $searchType) { $searchParam = $request->onlinetimeParam; $response->onlinetimeParam = $searchParam; } else { $searchParam = $request->normalParam; $response->normalParam = $searchParam; } $options = array('nowPage' => $nowPage, 'pageSize' => $pageSize); if (false == empty($category) && empty($searchType) && empty($searchParam)) { if (false == array_key_exists($category, CmsObjCategory::getDescArray4Thesis())) { $options['relateType'] = CmsTagType::PAPER; } list($thesisList, $pageInfo) = ThesisClient::getInstance()->queryThesisListByType($category, $options); } else { list($thesisList, $pageInfo) = ThesisClient::getInstance()->queryThesisListByAttr($category, $searchType, $searchParam, $nowPage, $pageSize); } $response->thesisList = $thesisList; $response->pageLink = empty($thesisList) ? array() : PageNav::getNavLink(PageNav::getPageNavTemplate("showlist?searchType={$searchType}&normalParam={$searchParam}&category={$category}&page="), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']); }
<div class="mt15"></div> <!-- start dd-nav --> <div class="dd-nav clearfix"> <div class="dd-nav-l fl"> <span>当前位置:</span> <a href="http://www.<?=URL_PREFIX?>haodf.com">好大夫在线</a> > <?php if($masterObject->getLinkObjectType() == 'Paper') { ?> <a href="/thesis/showtaglist?searchType=tagId&searchParam=<?=$thesis->getMasterObjRef()->getRelateObj()->getMasterTag()->relateObjId?>" target="_blank"><?=CmsObjCategory::getDesc($thesis->getMasterObjRef()->getRelateObj()->getMasterTag()->relateObjId)?></a> > <?php } ?> <a href="<?=$masterObject->getUrl()?>"><?=$masterObject->getTitle()?></a> > <a href="#" class="green"><?=$thesis->title?></a> </div> <?php if ($disease instanceof Disease){?> <div class="dd-nav-r fr"> <a href="<?=$disease->getUrl()?>" class="blue">了解知识</a> | <a href="<?=$disease->getDoctorUrl()?>" class="blue">寻找大夫</a> | <a href="<?=$disease->getZixunUrl()?>" class="blue">咨询医生</a> </div> <?php } ?> </div> <!-- end dd-nav -->
{ $a++; ?> <li class="thirdList clearfix"> <span class="fl">●</span> <a class="black f14 fl" href="<?php echo $paper->getDetailUrl();?>" target="_blank" ><?=$paper->name?></a> <span class="fr f12 gray2 thirdList ml20"><?=XDateTime::valueOf($paper->onlineTime)->getDateTime()?></span> </li> <?php if (!fmod($a, 5)) { ?> <li class="mt20"></li> <?php } ?> <?php } } ?> <li class="clearfix"><?=$pageLink ? $pageLink : ''?></li> <?php } else { ?> <?php foreach(CmsObjCategory::getDescArray4Paper() as $key=>$value) { ?> <li class="clearfix"> <span class="fl thirdList"> <a href="/thesis/showtaglist?searchType=<?=$searchType?>&searchParam=<?=$key?>" class="black f14"><?=$value?></a> </span> </li> <?php } ?> <?php }?> </ul> </div> <!-- end dd-article --> </div> <div class="w300 fr"> <?php include_once dirname(__file__).'/search.php' ?> <?php if ($category != CmsObjCategory::HAOWEN && false == empty($haowenList)) { include_once dirname(__file__).'/goodrecommend.php';} ?> <?php include_once dirname(__file__).'/askonline.php' ?>
public function showList($request, $response) {/*{{{*/ //$response->keywords = ''; //$response->description = ''; $response->csss = array( 'http://i1.hdfimg.com/www/cms/css/content_thesis.css?20140722', 'http://i1.hdfimg.com/www/cms/css/thesis.css?20140722' ); $nowPage = $request->getRequest('page', 1); $pageSize = 50; $category = $request->category; if (CmsObjCategory::SHIPIN == $category) { $pageSize = 36; } $paperId = $request->paperId; $tagId = $request->tagId; $diseaseId = $request->diseaseId; if(false == empty($category)) { $pageTitle = CmsObjCategory::getDesc($category) . '_好大夫在线'; if (isset($diseaseId) && false == (empty($diseaseId))) { $disease = DAL::get()->find('disease', $diseaseId); if (false == $disease->isNull()) { $pageTitle = $disease->name."_".$pageTitle; } $response->diseaseName = $disease->name; } $response->title = $pageTitle; } elseif(false == empty($paperId)) { $paper = DAL::get()->find('Paper', $paperId); $response->paper = $paper; $response->paperTag = CmsObjCategory::getDesc($paper->getMasterTag()->relateObjId); $response->paperTagId = $paper->getMasterTag()->relateObjId; $response->title = $paper->title. '文章列表_好大夫在线'; $response->paperTitle = $paper->title; } $response->searchWords = $this->getHotSearchWords(); //thesis列表 $cmsList = array(); $options = array('nowPage' => $nowPage, 'pageSize' => $pageSize); if (false == empty($category) && array_key_exists($category, CmsObjCategory::getDescArray4Paper())) { $options['status'] = Paper::STATUS_ONLINE; list($cmsList, $pageInfo) = PaperClient::getInstance()->queryValidPaperListByCategory($category, $options); } else if (false == empty($category) && array_key_exists($category, CmsObjCategory::getDescArray4Thesis())) { $options['status'] = Thesis::STATUS_ONLINE; if (isset($diseaseId)) { $options['diseaseId'] = $diseaseId; } list($cmsList, $pageInfo) = ThesisClient::getInstance()->queryThesisListByType($category, $options); } else if (false == empty($paperId) && empty($category)) { $options['status'] = Thesis::STATUS_ONLINE; $options['relateType'] = CmsTagType::PAPER; list($cmsList, $pageInfo) = ThesisClient::getInstance()->queryThesisListByType($paperId, $options); } else if (empty($paperId) && empty($category) && false == empty($tagId)) { $options['status'] = Thesis::STATUS_ONLINE; $options['tagId'] = $tagId; list($cmsList, $pageInfo) = ThesisClient::getInstance()->queryThesisListByType($tagId, $options); } $response->cmsList = $cmsList; $response->pageLink = empty($cmsList) ? array() : PageNav::getNavLink(PageNav::getPageNavTemplate("showlist?category=$category&paperId=$paperId&tagId=$tagId&page="),$pageInfo['nowpage'],$pageInfo['pagesize'],$pageInfo['total']); $response->category = $category; $response->tagId = $tagId; if (isset($diseaseId) && false == (empty($diseaseId))) { $response->diseaseId = $diseaseId; } //咨询列表 if (isset($diseaseId) && false == (empty($diseaseId))) { $disease = DAL::get()->find('disease', $diseaseId); if (false == $disease->isNull()) { $flowList = RelationSearchClient::getInstance()->getFlowListFromRelevantSearch($disease->name, 8); $flowList = array_slice($flowList, 0, 8); $response->flowList = $flowList; } else { $response->flowList = FlowClient::getInstance()->getLatestFlowList(8); } } else { $response->flowList = FlowClient::getInstance()->getLatestFlowList(8); } if (isset($diseaseId) && false == (empty($diseaseId))) { $this->getPhoneList($diseaseId, $response); } else { //电话咨询 $diseaseIds_shuffle = self::$diseaseIds; shuffle($diseaseIds_shuffle); $this->getPhoneList(array_pop($diseaseIds_shuffle), $response); } //好文推荐 if ($category != CmsObjCategory::HAOWEN) { $this->getHaowenList($request, $response); } }/*}}}*/
<span class="red">*</span> </li> <?php $cmsObjRef = $realThesis->getCategoryObjRef(); if (false == $cmsObjRef->isNull()) { $power = $cmsObjRef->power; $isTop = $cmsObjRef->isTop; $relateObjId = $cmsObjRef->relateObjId; $cmsObjId = $cmsObjRef->id; $categoryDesc = CmsObjCategory::getDesc($cmsObjRef->relateObjId); ?> <li> 父对象: <select name="relateObjId" id="parentid"> <?php foreach (CmsObjCategory::getDescArray4Thesis() as $categoryKey => $categoryDesc) { ?> <option value="<?php echo $categoryKey; ?> " <?php if ($categoryKey == $relateObjId) { ?> selected="selected" <?php } ?> ><?php echo $categoryDesc; ?> </option>
.easyDialog_content {height:100%;} .easyDialog_wrapper {height:130px;} .suggestion_ul li {display:block;height:25px; padding:5px 0 0 10px; cursor:pointer;} .li_selected {background:orange;} </style> <div> <form id="myform" action="/paper/addpost4papertpl" method="post"> <input type="hidden" id="usepaper" name="usepaper" value="0" /> <table class="table_sty1" width="100%"> <tr><th class="bg_gray">英文名</th><td><input type="text" name="ename" style="width:300px" /> 用于url</td></tr> <tr><th width="20%" class="bg_gray">标题</th><td><input type="text" name="title" style="width:300px"/></td></tr> <tr><th class="bg_gray">关键词</th><td><textarea name="keywords" cols=80 rows=2 ></textarea> <span class="gray" style="padding-left:10px;">逗号或空格分隔</span></td></tr> <tr><th class="bg_gray">Tag</th><td> <select name="relateObjId"> <?php foreach (CmsObjCategory::getDescArray4Paper() as $key => $a) { ?> <option value="<?php echo $key; ?> "><?php echo $a; ?> </option> <?php } ?> </select> </td></tr> <tr><th class="bg_gray">模板</th><td> <p class="tip gray" style="display:none;">注意:请直接搜索专题标题并选中,手工输入无效</p>
ID</th> <th style="width:10%">置顶</th> <th style="width:10%">权重</th> <th style="width:10%">主标签</th> <th style="width:20%">操作</th> <th style="width:10%"></th> </tr> <?php foreach ($refArr[$key] as $ref) { ?> <tr> <td> <?php switch (ucfirst($ref->relateObjType)) { case CmsTagType::CATEGORY: echo CmsObjCategory::getDesc($ref->relateObjId); break; case CmsTagType::PAPER: echo $ref->getRelateObj()->title; break; case CmsTagType::DISEASE: echo $ref->getRelateObj()->name; break; case CmsTagType::DOCTOR: echo $ref->getRelateObj()->name; break; case CmsTagType::HOSPITAL: echo $ref->getRelateObj()->name; break; case CmsTagType::FACULTY: echo $ref->getRelateObj()->name;
<a href="/thesis/showtaglist?searchType=tagId&searchParam=<?=$new->getMasterTag()->relateObjId?>" target = "_blank" class="blue">[<?=CmsObjCategory::getDesc($new->getMasterTag()->relateObjId)?>]</a> <?php } ?> <?php if($new instanceof Thesis) { $isPaper = ($new->getParentLinkObject()->getLinkObjectType() == 'Paper') ? true : false; $thesisUrl = $isPaper==false ? $new->getMasterObjRef()->getLinkObject()->getUrl() : "/thesis/showtaglist?searchType=tagId&searchParam=".$new->getMasterObjRef()->getRelateObj()->getMasterTag()->relateObjId; ?> <a href="<?=$thesisUrl?>" target="_blank" class="blue"> <?php if($isPaper) { echo "[".CmsObjCategory::getDesc($new->getMasterObjRef()->getRelateObj()->getMasterTag()->relateObjId)."]"; } else if(CmsObjCategory::getDesc($new->getMasterObjRef()->relateObjId) != '') { echo "[".CmsObjCategory::getDesc($new->getMasterObjRef()->relateObjId)."]"; } else{ echo "[".$new->getParentLinkObject()->getTitle()."]"; }?> </a> <?php } ?> </td> <td class="topic_content"> <a href="<?=$new->getUrl()?>" target="_blank" class="blue"><?=XString::truncate($new->title, 58, "...")?></a> </td> <td> <?php if ($new instanceof ZhuanTi) {?> <a href="http://www.haodf.com" target="_blank" class="blue"> 好大夫在线 <?php }?>
public function diseasePageZhuanti($request, $response) {/*{{{*/ $diseasePage = DiseasePage::getByDiseaseId($this->disease->id); $response->diseasePage = $diseasePage; $queryType = $request->getRequest('queryType', self::ZHUANTI_QUERYTYPE_LABLE); $response->queryType = $queryType; $options = array(); $options['diseaseId'] = $this->disease->id; if (false == empty($queryType)) { $options['queryType'] = $queryType; } $rootLableKey = $request->getRequest('rootLableKey', ''); $response->rootLableKey = $rootLableKey; if (false == empty($rootLableKey)) { $options['rootLableKey'] = $rootLableKey; } $leafLableKey = $request->getRequest('leafLableKey', ''); $response->leafLableKey = $leafLableKey; if (false == empty($leafLableKey)) { $options['leafLableKey'] = $leafLableKey; } $cmsCategory = $request->getRequest('cmsCategory', ''); $response->cmsCategory = $cmsCategory; if (false == empty($cmsCategory)) { $options['cmsCategory'] = $cmsCategory; } $lableName = "专家观点"; if ($rootLableKey) { $lableList = LableDefine::getRootLableList(); $lableName = $lableList[$rootLableKey]; } else if ($leafLableKey) { $lableName = LableDefine::getLableTitle($leafLableKey); } else if ($cmsCategory) { $lableName = CmsObjCategory::getDesc($cmsCategory); } $response->lableName = $lableName; $page = $request->getRequest('page', 1); $response->page = $page; $pageSize = $request->getRequest('pageSize', 10); if(stripos($_SERVER['REQUEST_URI'], 'leafLableKey=') || stripos($_SERVER['REQUEST_URI'], 'rootLableKey=') || stripos($_SERVER['REQUEST_URI'], 'queryType=') || stripos($_SERVER['REQUEST_URI'], 'cmsCategory=') ) { $jumpUrl = DiseasePage::getZhuantiUrl($diseasePage->disease->key, $queryType, $rootLableKey, $leafLableKey, $cmsCategory); if ($page > 1) { $jumpUrl .= "?page=$page"; } $response->exitJump($jumpUrl, 301); } $res = $diseasePage->getPaperAndZhuantiList4ZhuantiPage($page, $pageSize, $options); $response->id2Types = $res['id2Types']; $response->pageLink = PageNav::getNavLink( PageNav::getPageNavTemplate4DiseasePage(DiseasePage::getZhuantiUrl($this->disease->key, $queryType, $rootLableKey, $leafLableKey, $cmsCategory).'&page='), $page, $pageSize, $res['total']); $disease=$this->disease; $ddCnt = DiseaseClient::getInstance()->getDiseaseDoctorCnt($this->disease->id); // $title=$disease->name."专题_".$disease->name."_专家观点_好大夫在线"; $keywords=$disease->name."专题,".$disease->name."专家观点"; $description="中国最大的医疗网站-好大夫在线为您提供".$disease->name."详细介绍,".$disease->name."症状,".$disease->name."治疗,".$disease->name."吃什么等。更多".$disease->name."知识,".$ddCnt."位".$disease->name."专家观点,".$res['total']."篇".$disease->name."专题"; // $response->title=$title; $response->keywords=$keywords; $response->description=$description; }/*}}}*/
<?php $csss = array(); $csss[] = "/css/cms/cms.css"; $csss[] = "/css/cms/cmsreset.css"; $csss[] = "http://i1.hdfimg.com/css/new_base.css"; $title = CmsObjCategory::getDesc($category) . "--" . $disease->name; include dirname(__FILE__) . '/../cmsheader.php'; ?> <div style="clear:both;"> <table class="table_sty1" width="100%"> <tr class="bg_gray"> <th>id</th> <th>title</th> <th>创建人</th> <th>创建时间</th> <?if (CmsObjCategory::SHIPIN == $category){?> <th>焦点图</th> <?}?> <th>状态</th> <th>权重</th> <th>操作</th> <?if (CmsObjCategory::SHIPIN == $category){?> <th>置顶</th> <?} else {?> <th>置顶|排序</th> <?}?> </tr> <?php if (false == empty($cmsObjRefList)) { foreach ($cmsObjRefList as $cmsObjRef) {