Files
SRCMS/Application/Home/Controller/BlogController.class.php
Martin Zhou 684da35950 SRCMS V2 开发版
唯一的改变就是万变,重新定义安全应急响应中心。
2017-02-03 12:34:39 +08:00

38 lines
863 B
PHP

<?php
/**
* @Author: Zhou Yuyang <1009465756@qq.com> 10:28 2017/02/02
* @Copyright 2015-2020 SISMO
* @Project homepage https://github.com/CNSISMO
* @Version 2.0
*/
namespace Home\Controller;
use Think\Controller;
class BlogController extends Controller{
public function index()
{
$model = M('blog');
$tmodel= M('setting');
$pages = $model->limit(15)->select();
$title = $tmodel->where('id=1')->select();
$this->assign('title', $title);
$this->assign('model', $pages);
$this->display();
}
public function view(){
$id = I('get.id',0,'number_int');
$model = M('blog')->where(array('id'=>$id))->find();
$tmodel= M('setting');
$title = $tmodel->where('id=1')->select();
$this->assign('title', $title);
$this->assign('model',$model);
$this->display();
}
}