示例#1
0
 /**
  * @author: lmkhang - skype
  * @date: 2016-01-09
  * DASHBOARD HOME
  */
 public function index(Request $request)
 {
     //set Title for PAGE
     $this->_page_title = 'Channel Management';
     //get
     $gets = $request->all();
     $gets = $this->trim_all($gets);
     $filter = isset($gets['filter']) ? $gets['filter'] : [];
     //unset if dont choose
     $filter_temp = $filter;
     foreach ($filter_temp as $k => $v) {
         if (!$v) {
             unset($filter[$k]);
         }
     }
     //Get channel list
     $channel_get = new \App\Channels();
     $number_pagination = \App\Config::where(['prefix' => 'site', 'name' => 'pagination', 'del_flg' => 1])->get()[0]['value'];
     $channels_paging = $channel_get->getAllPaging($filter, $number_pagination);
     //get URL STATS
     $url_stats = \App\Config::where(['prefix' => 'daily', 'name' => 'url_stats', 'del_flg' => 1])->get()[0]['value'];
     //channel link
     $channel_link = \App\Config::where(['prefix' => 'daily', 'name' => 'channel_link', 'del_flg' => 1])->get()[0]['value'];
     //get user list
     $user_get = new \App\User();
     $users = $user_get->getAllPaging(['status' => 1, 'del_flg' => 1, 'sign_contract' => 1]);
     return view('admin.channels.index', ['admin' => $this->_admin, 'name' => $this->getName(), 'page_title' => $this->_page_title, 'active' => $this->_active, 'number_pagination' => $number_pagination, 'channels_paging' => $channels_paging, 'channel_label_status' => config('constant.channel_label_status'), 'channel_status' => config('constant.channel_status'), 'url_stats' => $url_stats, 'channel_link' => $channel_link, 'users' => $users, 'filter' => $filter]);
 }
示例#2
0
文件: Stats.php 项目: lmkhang/mcntw
 /**
  * @author: lmkhang - skype
  * @date: 2016-01-09
  * STATISTICS HOME
  */
 public function index()
 {
     //set Title for PAGE
     $this->_page_title = 'Statistics';
     //get all channels
     $channel_get = new \App\Channels();
     $channels = $channel_get->getAllPaging(['status' => 1]);
     return view('admin.stats.index', ['admin' => $this->_admin, 'name' => $this->getName(), 'page_title' => $this->_page_title, 'active' => $this->_active, 'channels' => $channels]);
 }
示例#3
0
 /**
  * @author: lmkhang - skype
  * @date: 2016-01-09
  * DASHBOARD HOME
  */
 public function index()
 {
     //Check Status
     if ($this->_stop) {
         return Redirect::intended(url($this->_redirectTo));
     }
     //set Title for PAGE
     $this->_page_title = 'Channel Management';
     //get Info of Dailymotion's API
     $daily['api_key'] = \App\Config::where(['prefix' => 'daily', 'name' => 'api_key_channel', 'del_flg' => 1])->get()[0]['value'];
     $daily['url_callback'] = \App\Config::where(['prefix' => 'daily', 'name' => 'url_callback_channel', 'del_flg' => 1])->get()[0]['value'];
     $daily['url_oauth'] = 'http://www.dailymotion.com/logout?urlback=' . urlencode(str_replace(array('{API_KEY}', '{URL_CALLBACK}'), array($daily['api_key'], url($daily['url_callback'])), \App\Config::where(['prefix' => 'daily', 'name' => 'url_add_channel', 'del_flg' => 1])->get()[0]['value']));
     //Get channel list
     $channel_get = new \App\Channels();
     $number_pagination = \App\Config::where(['prefix' => 'site', 'name' => 'pagination', 'del_flg' => 1])->get()[0]['value'];
     $channels_paging = $channel_get->getAllPaging(['user_id' => $this->_user_id], $number_pagination);
     //get URL STATS
     $url_stats = \App\Config::where(['prefix' => 'daily', 'name' => 'url_stats', 'del_flg' => 1])->get()[0]['value'];
     return view('dashboard.channels.index', ['user' => $this->_user, 'name' => $this->getName(), 'page_title' => $this->_page_title, 'active' => $this->_active, 'daily' => $daily, 'number_pagination' => $number_pagination, 'channels_paging' => $channels_paging, 'channel_label_status' => config('constant.channel_label_status'), 'channel_status' => config('constant.channel_status'), 'url_stats' => $url_stats, 'no' => 1]);
 }