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

44 lines
1.0 KiB
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 HallController extends Controller{
public function index()
{
$xuhao = 1;
$model = M('member');
$user = $model->order('jifen ASC')->where('jifen>0')->select();
$this ->assign('xuhao',$xuhao);
$this->assign('user',$user);
$this->display();
}
public function view()
{
$pid = I('get.pid',0,'number_int');
$model = M('member');
$report = M('post');
$user = $model -> where(array('pid'=>$pid)) -> select();
$uid = $user[0]['id'];
if ($uid != null){
$reportnum = $report->where(array('user_id'=>$uid))->count();
$highranknum = $report->where(array('user_id'=>$uid))->where('rank=4')->count();
$this->assign('num',$reportnum);
$this->assign('highranknum',$highranknum);
};
$this->assign('user',$user);
$this->display();
}
}