Exemple #1
0
                if (empty($rootLableKey) && empty($leafLableKey) && empty($cmsCategory) && (1 == $page))
                {
                    include_once dirname(__file__).'/zhuanti/_center_jingpinzhuanti_inner.php'; 
                }
            ?>
        <!--精华文章 end--> 

        <!--文章列表 start-->
            <? 
            if (0 < count($id2Types))
            {
                include_once dirname(__file__).'/zhuanti/_center_zhuantis_inner.php'; 
            }
            else
            {
                $roots =  LableDefine::getRootLableList();
                $leafs = LableDefine::getLableList();
                $leafLableStr = isset($leafs[$leafLableKey]) ? $leafs[$leafLableKey] : '';
                $rootLableStr = isset($roots[$rootLableKey]) ? $roots[$rootLableKey] : '';

                $array4Paper = CmsObjCategory::getDescArray4Paper();
                $cmsCategoryDes = isset($array4Paper[$cmsCategory]) ? $array4Paper[$cmsCategory] : '';
                $emptyInfo = '"'.$rootLableStr.$leafLableStr.$cmsCategoryDes.'" 相关专题';
                include_once dirname(__file__).'/common/_noresult_inner.php'; 
            }
            ?>
        <!--文章列表 end-->
    </div>
</div>
<!--中间区域文章 end-->
<!--左侧导航 start-->
<div class="fl">
        <div class="left_bar" id="left_bar">
            <div class="left_bar_menu fs">
            <h3 class="total"><a href="<?=DiseasePage::getZhuantiUrl($disease->key, DiseaseController::ZHUANTI_QUERYTYPE_LABLE)?>">全部专题</a></h3>
                <ul class="menu_cate">
<?php 
    $lableInfos = $diseasePage->getPaperAndZhuantiLableInfo();
    foreach($lableInfos as $rootKey =>$lableInfo){ 
?>
                    <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>
    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;

    }/*}}}*/