"></a></div>
                    <div class="doc_writ fl">
                        <p class="pagename"><?php 
        echo $truename;
        ?>
</p>
                        <p class="grat pagna12"><?php 
        echo $v['doc_keshi'];
        ?>
 <?php 
        echo $v['zhicheng'];
        ?>
</p>
                        <?php 
        if (!empty($v['best_dis'])) {
            echo '<p class="pagna12">擅长:' . String::cutString($v['best_dis'], 8, '...') . '<a href="' . Url::to('@community/user/?uid=' . $v['uid']) . '"> [详情]</a></p>';
        }
        ?>
                        <p class="ruser_ques89"><a href="<?php 
        echo Url::to('@ask/asking/index?uid=' . $v['uid']);
        ?>
">向TA提问</a></p>
                    </div>
                </div>
                <?php 
    }
}
?>
 
    </div>
</div>
        $url = '/article/' . date('Y/md', $art['inputtime']) . '/' . $art['id'] . '.shtml';
        ?>
            <a href="<?php 
        echo $url;
        ?>
" title="<?php 
        echo $art['title'];
        ?>
">
                <h3><?php 
        echo \librarys\helpers\utils\String::cutString($art['title'], 14);
        ?>
</h3>
                <p>
                    <?php 
        echo \librarys\helpers\utils\String::cutString($art['description'], 45);
        ?>
                </p>
            </a>
    <?php 
    }
}
?>
</article>
<section class="sechoi">
    <div class="lasp">
        <?php 
echo $paging->view();
?>
    </div>
</section>
        ?>
                            <li>
                                <span class="kmo5" <?php 
        echo $style;
        ?>
><?php 
        echo $lkey + 1;
        ?>
</span>
                                <span>
                                    <a href="<?php 
        echo $url;
        ?>
">
                                        <?php 
        echo \librarys\helpers\utils\String::cutString($lastestArticle['title'], 16);
        ?>
                                    </a>
                                </span>
                            </li>
                    <?php 
    }
}
?>
                </ul>
            </div>
            <div class="tabbox">
                <dl>
                <?php 
//如果是文章列表页:
if (isset($isartlist)) {
Example #4
0
                echo $short_title = preg_replace("'({$keyList['explain_words']})'", "<font style='color:red;'>\$0</font>", $val['name']);
            } else {
                echo $val['name'];
            }
            ?>
                                                                </a>
							</h3>
							<span class="lookwik fl">症状</span>
						</div>
                   </div>
                   <div class="drawall">
                      <div class="doctext">
                        <p class="dst  f14m">
							<i></i><?php 
            $content = Html::encode($val['description']);
            echo String::cutString($content, 70, '...');
            ?>
<a href="<?php 
            echo Url::to('@jb_domain/zhengzhuang/' . $val['pinyin_initial'] . '/', true);
            ?>
">[详细]</a>
						</p>
                      <div class="h20 mT19">
                        <div class="xgtag mT10 fl">
							<a class="txtno cor999">相关疾病:</a>
							<?php 
            foreach ($val['relevance'] as $k1 => $val1) {
                ?>
								<a href="<?php 
                echo Url::to('@jb_domain/' . $val1['pinyin_initial'] . '/', true);
                ?>
Example #5
0
    $letter_name = strtoupper($k);
    $letter_url = sprintf('%s%s/', $URL->letterurl, $letter_name);
    ?>
            <div class="specon">
                <div class="morela"><a href="<?php 
    echo $letter_url;
    ?>
">更多>></a><span><?php 
    echo $letter_name;
    ?>
</span></div>
                <ul class="spin">
                    <?php 
    foreach ($v as $kk => $kv) {
        $name = $kv['keywords'];
        $short_name = String::cutString($name, 12, 0);
        $url = sprintf('%s%s/', $URL->searchurl, str_replace(' ', '', $kv['pinyin']));
        ?>
                        <li><a href="<?php 
        echo $url;
        ?>
 " title="<?php 
        echo $name;
        ?>
"><?php 
        echo $short_name;
        ?>
</a></li>
                    <?php 
    }
    ?>
Example #6
0
        <div class="lasp">
            <?php 
echo $model['paging']->view();
?>
        </div>
    </section>

<div class="thre"></div>

<ul class="askan">
    <?php 
foreach ($model['questions'] as $k => $v) {
    $answer = array_key_exists('answer', $v) ? empty($v['answer']['content']) ? $v['answer']['suggest'] : $v['answer']['content'] : '暂无回复';
    $askTitle = str_replace($selectSymptom, "<span>{$selectSymptom}</span>", $v['ask']['title']);
    $answerContent = String::cutString($answer, 50, '...');
    $askUrl = 'http://ask.9939.com/id/' . $v['ask']['id'];
    $doctorid = $v['doctor']['uid'];
    $doctor = $v['doctor']['truename'] ? $v['doctor']['truename'] : $v['doctor']['nickname'];
    $zhicheng = $v['doctor']['zhicheng'];
    $avatar = $v['doctor']['pic'] ? Url::to('@community/upload/pic/' . $v['doctor']['pic']) : Url::to('@community/upload/pic/' . 'default.jpg');
    ?>
        <li>
            <h3><q><?php 
    echo $askTitle;
    ?>
</q></h3>
            <div class="spabs">
                <h4><img src="<?php 
    echo $avatar;
    ?>
Example #7
0
    echo $k1;
    ?>
">[<?php 
    echo $k1;
    ?>
]</a></span>
						<a href="<?php 
    echo $val1[0]['url'];
    ?>
" title="<?php 
    echo $val1[0]['title'];
    ?>
">
							<?php 
    $content = Html::encode($val1[0]['title']);
    echo String::cutString($content, 12, '...');
    ?>
						</a>
					</li>
					<?php 
}
?>
               </ul>
            </div>
        </div>
           <?php 
echo $this->render('seek_zhuanti');
?>
            <div class="clumn">
				<?php 
echo $this->render('ads_right_center');
Example #8
0
                                [<a href="/<?php 
    echo $v['pinyin_initial'];
    ?>
/zz/">症状</a>] 
                                [<a href="/<?php 
    echo $v['pinyin_initial'];
    ?>
/lcjc/">检查</a>] 
                                [<a href="/<?php 
    echo $v['pinyin_initial'];
    ?>
/zl/">治疗</a>]
                            </span>
                        </div>
                        <p class="detatxt"><?php 
    echo String::cutString($v['description'], 130, '...');
    ?>
[<a href="/<?php 
    echo $v['pinyin_initial'];
    ?>
/jianjie/">查看详情</a>]</p>
                        <div class="possib"><b>可能性:</b><span class="mres"><i class="lbar"></i></span></div>
                    </li>
                    <?php 
}
?>

                </ul>
            </div>
        </div>
    </div>
 /**
  * 根据疾病的拼音简写,得到疾病的信息
  * @author gaoqing
  * @date 2016-03-23
  * @param String $pyInitial 疾病的拼音简写
  * @return array 疾病的信息集
  */
 public function getDiseasesByPinyin($pyInitial)
 {
     $disease = [];
     if ($this->isNotNull($pyInitial)) {
         //疾病基本信息
         $diseaseBasic = Disease::find()->where(['pinyin_initial' => $pyInitial])->asArray(true)->one();
         //疾病详细信息
         $diseaseContent = [];
         if ($this->isNotNull($diseaseBasic)) {
             $diseaseContent = DiseaseContent::find()->where(['id' => $diseaseBasic['id']])->asArray(true)->one();
         }
         if ($this->isNotNull($diseaseBasic) && $this->isNotNull($diseaseContent)) {
             $diseaseContentApp = $diseaseContent;
             foreach ($diseaseContentApp as $key => $content) {
                 $diseaseContentApp[$key] = String::cutString($content, 35);
             }
             $disease = array_merge($diseaseBasic, $diseaseContent);
             $disease['content_app'] = $diseaseContentApp;
         }
     }
     if (!isset($disease) || empty($disease)) {
         throw new NotFoundHttpException("当前访问的页面不存在!");
     }
     return $disease;
 }
?>
        </div>
    </div>
    <div class="expres fr" style="margin-top:0;">
        <div class="conpa rannu">
            <h3 class="dise">疾病排行榜</h3>
            <ul class="diran">
                <?php 
$n = 0;
foreach ($topDisease as $key => $val) {
    $num = $n + 1;
    $cls = $n == 0 ? ' ranb' : '';
    $dis = $n == 0 ? ' style="display:block;"' : '';
    $title = $val['name'];
    $description = $val['description'];
    $shortDescription = String::cutString($description, 26, '...');
    $click = $val['click'];
    $url = Url::to("@jb_domain/{$val['pinyin_initial']}/");
    ?>
                <li>
                    <div class="rand_01<?php 
    echo $cls;
    ?>
">
                        <span class="sran"><?php 
    echo $click;
    ?>
</span>
                        <span class="srt"><?php 
    echo $num;
    ?>
Example #11
0
        echo $doctor['zhicheng'];
        ?>
</span></p>
                    <p>
                        <a href="<?php 
        echo Url::to('@ask/asking/index?uid=' . $doctor['uid']);
        ?>
">免费问诊</a>
                        问诊量:<span><?php 
        echo $doctor['totalanswer'];
        ?>
</span>
                    </p>
                </div>
                <p>
                    <span>擅长:</span>
                    <?php 
        if (isset($doctor['best_dis']) && !empty($doctor['best_dis'])) {
            echo \librarys\helpers\utils\String::cutString($doctor['best_dis'], 36);
        } else {
            echo '暂无';
        }
        ?>
                </p>
                <div class="triag"></div>
            </li>
    <?php 
    }
}
?>
</ul>
            <div class="spabs">
                <h4>
                    <img src="<?php 
        echo Url::to('@community/upload/pic/' . $v['answer']['pic']);
        ?>
" alt="">
                    <b><?php 
        echo $v['answer']['truename'];
        ?>
</b>
                    <span><?php 
        echo $v['answer']['doc_keshi'];
        ?>
</span>
                </h4>
                <p><?php 
        echo String::cutString($v['answer']['content'], 80);
        ?>
</p>
                <a href="<?php 
        echo Url::to('@wapask/ask/doctor/' . $v['answer']['userid'], true);
        ?>
" class="ask">向TA提问</a>
            </div>
        </li>
        <?php 
    }
}
?>

Example #13
0
                    </a>
                </h3>
                <p>
                    <span>A</span>
                    <?php 
        if (isset($ask['answer']) && !empty($ask['answer'])) {
            if (!empty($ask['answer']['content'])) {
                ?>
                            <?php 
                echo \librarys\helpers\utils\String::cutString($ask['answer']['content'], 92);
                ?>
                    <?php 
            } else {
                ?>
                            <?php 
                echo \librarys\helpers\utils\String::cutString($ask['answer']['suggest'], 92);
                ?>
                    <?php 
            }
        }
        ?>
                </p>
                <div></div>
            </li>
    <?php 
    }
}
?>
</ul>
<div class="main_i capture">
    <ul>
Example #14
0
 public static function getListByDiseaseid($condition = [], $offset = 0, $limit = 10, $orderBy = 'id DESC')
 {
     $article = new Article();
     $articles = Article::find()->select(['id', 'title', 'description', 'inputtime', 'content'])->where($condition)->offset($offset)->limit($limit)->asArray()->all();
     if (isset($articles) && !empty($articles)) {
         foreach ($articles as $key => &$article) {
             if (empty($article['description'])) {
                 $article['description'] = String::cutString($article['content'], 66);
             } else {
                 $article['description'] = String::cutString($article['description'], 66);
             }
             $article['url'] = '/article/' . date("Y/md", $article["inputtime"]) . '/' . $article['id'] . '.shtml';
         }
     }
     return $articles;
 }
<!-- 栏目关注 -->
<?php 
if (isset($disease) && !empty($disease)) {
    $dname = \librarys\helpers\utils\String::cutString($disease['name'], 4, 0);
    $dpinyin = $disease['pinyin_initial'];
    if ($isSymptom == 1) {
        ?>
        <p class="a_pso">
            <span>栏目关注:</span>
            <a href="/zhengzhuang/<?php 
        echo $dpinyin;
        ?>
/zzqy/"><?php 
        echo $dname;
        ?>
的原因</a>
            <a href="/zhengzhuang/<?php 
        echo $dpinyin;
        ?>
/zzqy/"><?php 
        echo $dname;
        ?>
怎么回事</a>
            <a href="/zhengzhuang/<?php 
        echo $dpinyin;
        ?>
/shiliao/"><?php 
        echo $dname;
        ?>
吃什么好</a>
            <a href="/zhengzhuang/<?php 
Example #16
0
use yii\helpers\Url;
use librarys\helpers\utils\String;
?>
<!--第六屏 疾病资讯 开始-->
<div class="content-one">
    <div class="peopl fl">
        <h2 class="dians diin"><a href="http://jb.9939.com/article_list.shtml" class="morl">更多>></a><span></span>疾病资讯</h2>
        <ul class="akna donp" id="diseaseArticle">
            <?php 
if (isset($data['news'])) {
    foreach ($data['news'] as $k => $v) {
        $words = $k;
        $wordsUrl = Url::to("@jb_domain/{$data['newsWords'][$k]['pinyin_initial']}/");
        if (isset($v['title'])) {
            $title = (new String())->filter_html($v['title']);
            $shortTitle = String::cutString($title, 17);
            $newUrl = '/article/' . date("Y/md", $v["inputtime"]) . '/' . $v['id'] . '.shtml';
            $newsDate = date("m-d", $v['inputtime']);
            ?>
                    <li>
                        <span class="dat"><?php 
            echo $newsDate;
            ?>
</span>
                        <div>
                            <span class="circ">[<a href="<?php 
            echo $wordsUrl;
            ?>
" title="<?php 
            echo $words;
            ?>
Example #17
0
<?php 
use librarys\helpers\utils\String;
$this->title = $article['title'] . "_久久健康网";
$keywords = implode(',', $article['keywords']);
$content = strip_tags($article['content']);
$desc = empty($article['description']) ? String::cutString($content, 80, 0) : $article['description'];
$this->metaTags = ['keywords' => $keywords, 'description' => $desc];
?>

<!-- 文章页导航 Start -->
<?php 
echo $this->render('detail_nav', ['disease' => $disease, 'isSymptom' => $isSymptom]);
?>
<!-- 文章页导航 End -->

<div class="art_wra camat">
    <div class="art_l">
        <div class="art_t"><h1><?php 
echo $article['title'];
?>
</h1>
            <p>
                <span>时间 : <?php 
echo $article['inputtime'];
?>
</span>
                <span>来源:<?php 
echo $article['copyfrom'];
?>
</span>
Example #18
0
                    <a href="<?php 
        echo \yii\helpers\Url::to('@wapask/id/' . $outerAsk['ask']['id'] . '.html');
        ?>
" title="<?php 
        echo $ask_title;
        ?>
">
                        <?php 
        echo String::cutString($ask_title, 18);
        ?>
                    </a>
                </h3>
                <p>
                    <span>A</span>
                    <?php 
        echo String::cutString($answer_content, 40);
        ?>
                </p>
                <div></div>
            </li>

            <?php 
    }
}
?>
</ul>
<a href="<?php 
echo Url::to('/' . $disease['pinyin_initial'] . '/zixun/', true);
?>
" class="fimor">点击查看更多<span>></span></a>
<div class="thre"></div>
Example #19
0
        echo String::cutString($disease['examine'], 100);
        ?>
                            <a href="/zhengzhuang/<?php 
        echo $disease['pinyin_initial'];
        ?>
/jiancha/">详细</a>
                        </p>
                <?php 
    } else {
        ?>
                        <h3><?php 
        echo $disease['name'];
        ?>
<span>疾病</span></h3>
                        <p><?php 
        echo String::cutString($disease['inspect'], 100);
        ?>
                            <a href="/<?php 
        echo $disease['pinyin_initial'];
        ?>
/lcjc/">详细</a>
                        </p>
                <?php 
    }
    ?>
            </div>
        </div>
    <?php 
}
?>
    <div class="a_rea a_hop inpc" style="background: none;">
Example #20
0
    }
}
?>
        
    </ul>
       
    <div class="tost nickn reart"><h2><span><?php 
echo $symptomName;
?>
</span>的相关文章</h2>
        <ul class="artcl">
            <?php 
if (isset($model['articles'])) {
    foreach ($model['articles'] as $k => $v) {
        $articleTitle = $v['title'];
        $articleShortTitle = String::cutString($articleTitle, 30, '...');
        $date_path = date('Y/md', $v['inputtime']);
        $article_path = sprintf("%s/%s/%d.shtml", 'article', $date_path, $v['id']);
        $articleUrl = sprintf('%s/%s', Yii::getAlias('@jb_domain'), $article_path);
        ?>
            <li><a href="<?php 
        echo $articleUrl;
        ?>
" title="<?php 
        echo $articleTitle;
        ?>
"><?php 
        echo $articleShortTitle;
        ?>
</a></li>
            <?php 
if (isset($disease['reldis']) && !empty($disease['reldis'])) {
    $len = 0;
    $max = 11;
    foreach ($disease['reldis'] as $reldisease) {
        $currentLen = $len + mb_strlen($reldisease['name'], 'utf-8');
        if ($currentLen > $max) {
            ?>
                                    <a href="/<?php 
            echo $reldisease['pinyin_initial'];
            ?>
/" title="<?php 
            echo $reldisease['name'];
            ?>
">
                                        <?php 
            echo \librarys\helpers\utils\String::cutString($reldisease['name'], $max - $len, 0);
            ?>
                                    </a>
                                    <?php 
            break;
        } else {
            ?>
                                    <a href="/<?php 
            echo $reldisease['pinyin_initial'];
            ?>
/" title="<?php 
            echo $reldisease['name'];
            ?>
"><?php 
            echo $reldisease['name'];
            ?>
Example #22
0
        if (isset($outerAsk['ask']) && !empty($outerAsk['ask'])) {
            ?>
                                            <?php 
            echo $outerAsk['ask']['title'];
            ?>
                                            <?php 
        }
        ?>
                                    </a>
                                </dt>
                                <dd>
                                    <?php 
        if (isset($outerAsk['answer']) && !empty($outerAsk['answer'])) {
            echo \librarys\helpers\utils\String::cutString($outerAsk['answer']['content'], 32);
        } else {
            echo \librarys\helpers\utils\String::cutString($outerAsk['answer']['suggest'], 32);
        }
        ?>
                                    <a href="<?php 
        echo \yii\helpers\Url::to('@ask/id/' . $outerAsk['ask']['id']);
        ?>
">[详情]</a>
                                </dd>
                            </dl>
                        </li>
                <?php 
    }
}
?>
                <li>
                    <dl class="onla newan">
Example #23
0
    ?>
" class="lett-tab-<?php 
    echo $letter;
    ?>
 hotwor <?php 
    echo $k !== 0 ? 'curro' : '';
    ?>
">
                    <li>
                    <?php 
    $symptoms = $model['letterSymptoms'];
    if (in_array($letter, $existLetter)) {
        $i = 1;
        foreach ($symptoms[$letter] as $v) {
            $title = $v['name'];
            $shortTitle = String::cutString($v['name'], 7, '...');
            $url = '/zicha/jbzc_jg/?symptomid=' . $v['id'];
            echo '<a href="' . $url . '" title="' . $title . '">' . $shortTitle . '</a>';
            if ($i % 6 == 0 && count($symptoms[$letter]) % 6 !== 0) {
                echo '</li><li>';
            }
            $i++;
        }
    } else {
        echo '<a href="javascript:void(0);">暂无数据</a>';
    }
    ?>
                    </li>
                </div>
                <?php 
}
<?php

use yii\helpers\Url;
use librarys\helpers\utils\String;
if (!empty($article)) {
    foreach ($article as $k => $v) {
        $url = '/article/' . date("Y/md", $v["inputtime"]) . '/' . $v['id'] . '.shtml';
        ?>
        <a href="<?php 
        echo Url::to($url);
        ?>
">
            <h3><?php 
        echo String::cutString($v['title'], 22);
        ?>
</h3>
            <p><?php 
        echo !empty($v['description']) ? String::cutString($v['description'], 42) : String::cutString(strip_tags($v['content']), 42);
        ?>
</p>
        </a>
        <?php 
    }
}
?>

            ?>
</a></li>
                <?php 
        }
        $n++;
    }
    ?>
            </ul>
            <?php 
}
?>
            <dl class="hotdis deas"><dt>热门疾病</dt>
                <?php 
foreach ($hotDisease as $k => $v) {
    $diseaseTitle = $v['name'];
    $diseaseShortTitle = String::cutString($diseaseTitle, 7, '...');
    $url = Url::to("@jb_domain/{$v['pinyin_initial']}/");
    echo '<dd><a href="' . $url . '" title="' . $diseaseTitle . '">' . $diseaseTitle . '</a></dd>';
}
?>
            </dl>
        </div>

    </div>
    <div class="expres fr" style="margin-top:0;">
        <div class="conpa expan">
            <h3 class="dise">最近热门科室</h3>
            <div class="provi">
                <a href="/tnb/" title="糖尿病"><img src="/images/clin_01.jpg" alt="糖尿病" title="糖尿病"></a>
                <h4><a href="/tnb/" title="糖尿病">糖尿病</a></h4>
                <p><a href="http://jb.9939.com/sec/1665.shtml" title="内分泌科">内分泌科</a></p><p><a href="http://hospital.9939.com/hosp/19925/index.shtml" title="北京大学人民医院">北京大学人民医院</a></p>
Example #26
0
<?php

use yii\helpers\Url;
use librarys\helpers\utils\String;
if (isset($articles) && !empty($articles)) {
    foreach ($articles as $k => $v) {
        $url = '/article/' . date("Y/md", $v["inputtime"]) . '/' . $v['id'] . '.shtml';
        $title = String::cutString($v['title'], 20);
        $content = !empty($v['description']) ? strip_tags($v['description']) : strip_tags($v['content']);
        ?>

        <a href="<?php 
        echo $url;
        ?>
"><h3><?php 
        echo $title;
        ?>
</h3><p><?php 
        echo $content;
        ?>
</p></a>
        <?php 
    }
}
Example #27
0
                                <dd><a href="http://ask.9939.com/classid/8" title="饮食营养">饮食营养</a></dd> 
                        </dl></li>
                </ul>
                <?php 
echo $this->render("inc_mid_ask_search");
?>
            </div>
            <div class="hosfa disn">
                <ul class="donam">
                    <?php 
foreach ($medicine as $k => $v) {
    $title = $v['title'];
    $img = Url::to($v['img']);
    $url = $v['url'];
    $useful = $v['useful'];
    $shortUseful = String::cutString($useful, 12, '...');
    $address = $v['address'];
    ?>
                    <li>
                        <a href="<?php 
    echo $url;
    ?>
" title="<?php 
    echo $title;
    ?>
"><img src="<?php 
    echo $img;
    ?>
" alt="<?php 
    echo $title;
    ?>
Example #28
0
</p>
        <div></div>
    </a>
    <a href="/zhengzhuang/<?php 
echo $symptom['pinyin_initial'];
?>
/shiliao/">
        <img src="/images/sp_07.png" alt="">
        <h3>
            <?php 
echo $symptom['info']['name'];
?>
            <span>食疗</span>
        </h3>
        <p><?php 
echo \librarys\helpers\utils\String::cutString($symptom['symptomContent']['content']['goodfood'], 17);
?>
</p>
        <div></div>
    </a>
</article>
<div class="thre"></div>

<article class="dissy">
    <a href="/zicha/">
        <p>
            <img src="/images/disc.png"></p>
        <p>
            病急不再乱投医,
            <span>马上开始自查></span>
        </p>
Example #29
0
}
?>
            </ul>
        </div>
        <div class="borin paval">
            <h3><span></span>相关疾病资讯</h3>
            <?php 
if (!empty($arr_art_splice)) {
    ?>
                <ul class="medi">
                    <?php 
    foreach ($arr_art_splice as $k => $v) {
        $title = $v['title'];
        $url = $v['url'];
        $descp = String::cutString($v['description'], 90, 1);
        $short_title = String::cutString($title, 18, 0);
        ?>
                        <li><a href="<?php 
        echo $url;
        ?>
" title="<?php 
        echo $title;
        ?>
"><?php 
        echo $short_title;
        ?>
</a></li>
                    <?php 
    }
    ?>
                </ul>