SRCMS·轻响应 V1.8正式版
修复: 1. 后台无法查看生成的工单 2. 前端页面JS远程资源失效问题 3. 前台用户密码修改设计缺陷(Issued By 藏形匿影) 优化: 1. 多处代码提升二次开发可读性 新增: 1. 安全工单模块中动态更新功能
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author Zhou Yuyang <1009465756@qq.com> 12:28 2016/1/23
|
||||
* @copyright 2105-2018 SRCMS
|
||||
* @homepage http://www.src.pw
|
||||
* @version 1.5
|
||||
* @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;
|
||||
@@ -13,32 +13,20 @@ use Think\Controller;
|
||||
|
||||
class BlogController extends Controller{
|
||||
|
||||
public function index($key="")
|
||||
public function index()
|
||||
{
|
||||
if($key == ""){
|
||||
$model = M('blog');
|
||||
}else{
|
||||
$where['title'] = array('like',"%$key%");
|
||||
$where['name'] = array('like',"%$key%");
|
||||
$where['_logic'] = 'or';
|
||||
$model = M('blog')->where($where);
|
||||
}
|
||||
|
||||
$count = $model->where($where)->count();// 查询满足要求的总记录数
|
||||
$Page = new \Extend\Page($count,15);// 实例化分页类 传入总记录数和每页显示的记录数(25)
|
||||
$show = $Page->show();// 分页显示输出
|
||||
$pages = $model->limit($Page->firstRow.','.$Page->listRows)->where($where)->order('id DESC')->select();
|
||||
$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->assign('page',$show);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
public function view(){
|
||||
$id = I('get.id',0,'intval');
|
||||
$id = I('get.id',0,'number_int');
|
||||
$model = M('blog')->where('id='.$id)->find();
|
||||
$tmodel= M('setting');
|
||||
$title = $tmodel->where('id=1')->select();
|
||||
|
||||
Reference in New Issue
Block a user