Files
SRCMS/Application/Home/Controller/PageController.class.php
Martin Zhou 8e5953cae3 SRCMS V2.0.1开发版
修复 荣誉榜排行顺序问题
修复 站点名称和简介无法配置的问题
修复 荣誉榜团队无法编辑的问题
删除 Ueditor存在漏洞的截屏插件
2017-05-31 23:03:37 +08:00

39 lines
875 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 PageController extends Controller{
public function index()
{
$model = M('page');
$tmodel= M('setting');
$pages = $model->limit(15)->select();
$settings = $tmodel -> where('id=1') -> select();
$this->assign('settings', $settings);
$this->assign('model', $pages);
$this->display();
}
public function view(){
$id = I('get.id',0,'intval');
$model = M('page')->where(array('id'=>$id))->find();
$tmodel= M('setting');
$title = $tmodel->where('id=1')->select();
$this->assign('title', $title);
$this->assign('model',$model);
$this->display();
}
}