2015-07-28 15:15:57 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
2017-02-03 12:32:57 +08:00
|
|
|
* @Author: Zhou Yuyang <1009465756@qq.com> 10:28 2017/02/02
|
2016-12-03 21:42:04 +08:00
|
|
|
* @Copyright 2015-2020 SISMO
|
|
|
|
|
* @Project homepage https://github.com/CNSISMO
|
2017-02-03 12:32:57 +08:00
|
|
|
* @Version 2.0
|
2015-07-28 15:15:57 +08:00
|
|
|
*/
|
|
|
|
|
|
2017-02-03 12:32:57 +08:00
|
|
|
|
2015-07-28 15:15:57 +08:00
|
|
|
namespace Home\Controller;
|
|
|
|
|
|
|
|
|
|
use Think\Controller;
|
|
|
|
|
|
|
|
|
|
class HallController extends Controller{
|
|
|
|
|
|
2016-01-26 14:09:59 +08:00
|
|
|
public function index()
|
2015-07-28 15:15:57 +08:00
|
|
|
{
|
2016-12-03 21:42:04 +08:00
|
|
|
$xuhao = 1;
|
|
|
|
|
$model = M('member');
|
2017-05-31 23:03:37 +08:00
|
|
|
$tmodel= M('setting');
|
|
|
|
|
$settings = $tmodel -> where('id=1') -> select();
|
|
|
|
|
$user = $model->order('jifen DESC')->where('jifen>0')->select();
|
|
|
|
|
$this->assign('settings', $settings);
|
2017-02-03 12:32:57 +08:00
|
|
|
$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');
|
2017-07-02 22:50:28 +08:00
|
|
|
$tmodel= M('setting');
|
|
|
|
|
$settings = $tmodel -> where('id=1') -> select();
|
|
|
|
|
$this->assign('settings', $settings);
|
2017-02-03 12:32:57 +08:00
|
|
|
$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);
|
2015-07-28 15:15:57 +08:00
|
|
|
$this->display();
|
|
|
|
|
}
|
|
|
|
|
}
|