Files
SRCMS/Application/Home/Controller/PageController.class.php
Martin Zhou 9cc8998300 SRCMS·轻响应 V1.8正式版
修复:
1. 后台无法查看生成的工单
2. 前端页面JS远程资源失效问题
3.  前台用户密码修改设计缺陷(Issued By 藏形匿影)
优化:
1. 多处代码提升二次开发可读性
新增:
1. 安全工单模块中动态更新功能
2016-12-03 21:42:04 +08:00

38 lines
923 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* @Author: Zhou Yuyang <1009465756@qq.com> 10:28 2016/12/03
* @Copyright 2015-2020 SISMO
* @Project homepage https://github.com/CNSISMO
* @Version 1.8
*/
namespace Home\Controller;
use Think\Controller;
class PageController extends Controller{
public function index()
{
$model = M('page');
$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,'intval'); //对传入数字参数做整数校验规避SQLinjection漏洞
$model = M('page')->where('id='.$id)->find();
$tmodel= M('setting');
$title = $tmodel->where('id=1')->select();
$this->assign('title', $title);
$this->assign('model',$model);
$this->display();
}
}