コード例 #1
0
ファイル: UsernhcController.php プロジェクト: nattaphat/cuse2
 /**
  * [userList Show list of user nhc]
  * @return [Array] of user information 
  */
 public function userList()
 {
     $nhcuser = new Usernhc();
     $per_page = Config::get('nhc/site.perpage');
     $datas = $nhcuser->getUsernhc($per_page);
     return View::make('userlist.list')->with('paginator', $datas);
 }
コード例 #2
0
 /**
  * [manReport description]
  * @param  string $flag ['yes' for export to pdf or os on ,'' for pagination]
  * @param  string $id [user id]
  * @param  string $type [type of report]
  * @return [type]       [description]
  */
 public function manReport($id = "", $flag = "", $type = "")
 {
     $training = new UserTraining();
     if ($id == '') {
         $usernhc = new Usernhc();
         $rs = $usernhc->getUsernhc('no');
         return View::make('train.reportman')->with('rs', $rs);
     } else {
         if ($id != '' and $flag == '') {
             $rs = $training->getUserTrainByUserId($id);
             return View::make('train.reportman_ajax')->with('rs', $rs)->with('userid', $id);
         } else {
             $rs = $training->getUserTrainByUserId($id);
             $this->userid = $id;
             $this->exportXls($rs, $type);
         }
     }
 }