SRCMS·轻响应框架 V1.5正式版
SRCMS是专门为中小企业和互联网产品创业团队打造的应急响应中心网站建站框架
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author Zhou Yuyang <1009465756@qq.com> 2015-07-27
|
||||
* @copyright ©2105-2018 SRCMS
|
||||
* @author Zhou Yuyang <1009465756@qq.com> 12:28 2016/1/23
|
||||
* @copyright 2105-2018 SRCMS
|
||||
* @homepage http://www.src.pw
|
||||
* @version 1.0
|
||||
* @version 1.5
|
||||
*/
|
||||
|
||||
|
||||
namespace Home\Controller;
|
||||
|
||||
use Think\Controller;
|
||||
@@ -28,6 +28,9 @@ class BlogController extends Controller{
|
||||
$Page = new \Extend\Page($count,15);// 实例化分页类 传入总记录数和每页显示的记录数(25)
|
||||
$show = $Page->show();// 分页显示输出
|
||||
$pages = $model->limit($Page->firstRow.','.$Page->listRows)->where($where)->order('id DESC')->select();
|
||||
$tmodel= M('setting');
|
||||
$title = $tmodel->where('id=1')->select();
|
||||
$this->assign('title', $title);
|
||||
$this->assign('model', $pages);
|
||||
$this->assign('page',$show);
|
||||
$this->display();
|
||||
@@ -35,8 +38,11 @@ class BlogController extends Controller{
|
||||
|
||||
|
||||
public function view(){
|
||||
$id = I('get.id',0,'intval'); //对传入数字参数做整数校验,规避SQLinjection漏洞
|
||||
$id = I('get.id',0,'intval');
|
||||
$model = M('blog')->where('id='.$id)->find();
|
||||
$tmodel= M('setting');
|
||||
$title = $tmodel->where('id=1')->select();
|
||||
$this->assign('title', $title);
|
||||
$this->assign('model',$model);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author Zhou Yuyang <1009465756@qq.com> 2015-07-27
|
||||
* @copyright ©2105-2018 SRCMS
|
||||
* @author Zhou Yuyang <1009465756@qq.com> 12:28 2016/1/23
|
||||
* @copyright 2105-2018 SRCMS
|
||||
* @homepage http://www.src.pw
|
||||
* @version 1.0
|
||||
* @version 1.5
|
||||
*/
|
||||
|
||||
namespace Home\Controller;
|
||||
@@ -14,7 +14,10 @@ use Think\Controller;
|
||||
class GiftController extends Controller{
|
||||
|
||||
public function index(){
|
||||
$gift = M('links')->select();
|
||||
$gift = M('links')->select();
|
||||
$tmodel= M('setting');
|
||||
$title = $tmodel->where('id=1')->select();
|
||||
$this->assign('title', $title);
|
||||
$this->assign('gift',$gift);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author Zhou Yuyang <1009465756@qq.com> 2015-07-27
|
||||
* @copyright ©2105-2018 SRCMS
|
||||
* @author Zhou Yuyang <1009465756@qq.com> 12:28 2016/1/23
|
||||
* @copyright 2105-2018 SRCMS
|
||||
* @homepage http://www.src.pw
|
||||
* @version 1.0
|
||||
* @version 1.5
|
||||
*/
|
||||
|
||||
namespace Home\Controller;
|
||||
@@ -25,6 +25,11 @@ class HallController extends Controller{
|
||||
}
|
||||
|
||||
$user = $model->limit($Page->firstRow.','.$Page->listRows)->where($where)->order('jifen ASC')->where('type=1')->select();
|
||||
$xuhao = 1;
|
||||
$tmodel= M('setting');
|
||||
$title = $tmodel->where('id=1')->select();
|
||||
$this->assign('title', $title);
|
||||
$this -> assign('xuhao',$xuhao);
|
||||
$this->assign('user',getSortedCategory($user));
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author Zhou Yuyang <1009465756@qq.com> 2015-07-27
|
||||
* @copyright ©2105-2018 SRCMS
|
||||
* @author Zhou Yuyang <1009465756@qq.com> 12:28 2016/1/23
|
||||
* @copyright 2105-2018 SRCMS
|
||||
* @homepage http://www.src.pw
|
||||
* @version 1.0
|
||||
* @version 1.5
|
||||
*/
|
||||
|
||||
namespace Home\Controller;
|
||||
@@ -14,10 +14,12 @@ use Think\Controller;
|
||||
class IndexController extends Controller{
|
||||
|
||||
public function index(){
|
||||
$model = M('page')->limit(5)->select();
|
||||
$hall = M('hall')->limit(6)->select();
|
||||
$this->assign('model',$model);
|
||||
$this->assign('hall',$hall);
|
||||
$model = M('hall');
|
||||
$tmodel= M('setting');
|
||||
$title = $tmodel->where('id=1')->select();
|
||||
$hall = $model->order('id DESC')->select();
|
||||
$this->assign('model', $hall);
|
||||
$this->assign('title', $title);
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author Zhou Yuyang <1009465756@qq.com> 2015-07-27
|
||||
* @copyright ©2105-2018 SRCMS
|
||||
* @author Zhou Yuyang <1009465756@qq.com> 12:28 2016/1/23
|
||||
* @copyright 2105-2018 SRCMS
|
||||
* @homepage http://www.src.pw
|
||||
* @version 1.0
|
||||
* @version 1.5
|
||||
*/
|
||||
|
||||
namespace Home\Controller;
|
||||
@@ -28,6 +28,9 @@ class PageController extends Controller{
|
||||
$Page = new \Extend\Page($count,15);// 实例化分页类 传入总记录数和每页显示的记录数(25)
|
||||
$show = $Page->show();// 分页显示输出
|
||||
$pages = $model->limit($Page->firstRow.','.$Page->listRows)->where($where)->order('id DESC')->select();
|
||||
$tmodel= M('setting');
|
||||
$title = $tmodel->where('id=1')->select();
|
||||
$this->assign('title', $title);
|
||||
$this->assign('model', $pages);
|
||||
$this->assign('page',$show);
|
||||
$this->display();
|
||||
@@ -37,6 +40,9 @@ class PageController extends Controller{
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user