コード例 #1
0
ファイル: settings.php プロジェクト: phpox/LetsBBS
 public function __construct()
 {
     parent::__construct();
     $this->load->model('user_m');
     $this->load->helper('auth');
     is_login_exit();
 }
コード例 #2
0
ファイル: comment.php プロジェクト: phpox/LetsBBS
 public function __construct()
 {
     parent::__construct();
     $this->load->model('comment_m');
     $this->load->model('topic_m');
     $this->load->model('notification_m');
     $this->load->model('user_m');
     $this->load->helper('auth');
     is_login_exit();
     is_user_active_exit();
 }
コード例 #3
0
ファイル: node.php プロジェクト: phpox/LetsBBS
 /**
  * 取消收藏
  * @param   $nid 节点id
  */
 public function unfollow($nid)
 {
     $this->load->helper('auth');
     is_login_exit("注册用户请先登录");
     $this->load->model('node_m');
     $this->node_m->unfollow($nid);
     //更新用户表
     $this->db->set('node_follow', 'node_follow-1', FALSE)->where('uid', $this->session->userdata('uid'))->update('letsbbs_user');
     //更新显示的收藏数
     $this->session->set_userdata('node_follow', $this->session->userdata('node_follow') - 1);
     redirect($this->input->server('HTTP_REFERER'));
 }