getLinkList(); /** * 整理图片链接 */ if (is_array($link_list)) { foreach ($link_list as $k => $v) { if (!empty($v['link_pic'])) { $link_list[$k]['link_pic'] = ds_get_pic( DIR_ADMIN . '/link' , $v['link_pic']); } } } $article_model = model('article'); $condition = array(); $condition[]=array('article_show','=','1'); $condition[]=array('ac_id','=','9'); $article_list = $article_model->getAllArticle($condition, 10); foreach ($article_list as &$val) { $val['article_date'] = date('Y-m-d H:i:s',$val['article_time']); preg_match_all('/[\x{4e00}-\x{9fff}]+/u', $val['article_content'], $matches); $str = join('', $matches[0]); $val['article'] = mb_substr($str,0,200); } View::assign('article',$article_list); View::assign('link_list', $link_list); View::assign('link', 'index'); return View::fetch($this->template_dir . 'link'); } //学员详情 public function show() { $article_id = input('article_id'); $article_model = model('article'); $article = $article_model->getOneArticle(['article_id' => $article_id]); $article['article_date'] = date('Y-m-d H:i:s',$article['article_time']); View::assign('article',$article); return View::fetch($this->template_dir . 'link_show'); } } ?>