给作者显示打赏记录,控制器怎么写uid 开源系统 更新 2019-03-12 16:19:57 迅睿粉丝 打赏插件只有打赏人看得到自己支出的记录,我们想同时给作者添加打赏收入记录。给打赏人的控制器里是这么写$this->db->where('uid', $this->uid )->order_by('inputtime DESC');那么给作者的控制器怎么写?$this->db->where('uid', $content['uid'] )->order_by('inputtime DESC'); 显示不出来
class Author_Home extends M_Controller { /** * */ public function __construct() { parent::__construct(); } // public function index() { $page = max((int)$this->input->get('page'), 1); $this->db->where('uid', $content['uid'] )->order_by('inputtime DESC'); if ($this->input->get('action') == 'more') { // ajax $data = $this->db->limit($this->pagesize, $this->pagesize * ($page - 1))->get("app_reward")->result_array(); if (!$data) { exit(null); } $this->template->assign('list', $data); $this->template->display('author_records_data.html'); } else { $this->template->assign(array( 'page' => max(2, $page + 1), 'list' => $this->db->limit($page ? $page * $this->pagesize : $this->pagesize)->get("app_reward")->result_array(), 'moreurl' => 'index.php?s=member&app=reward&c='.$this->router->class.'&m='.$this->router->method.'&action=more' )); $this->template->display('author_records.html'); } } }