Example #1
0
 function _actionIndex($page = 1)
 {
     if ($this->post['act'] == 'loginas') {
         $return = $this->auth->LoginAs($this->post['username']);
         if ($return['success']) {
             URL::Redirect('panelbackend');
         } else {
             $this->SetFlash('err_msg', "Login As Gagal !");
             URL::Redirect("{$this->page_ctrl}/index");
         }
     }
     parent::_actionIndex($page);
 }
Example #2
0
 public function _actionIndex($page = 1)
 {
     if ($this->post['act'] == 'goaksi') {
         $user_id_str = "'" . implode("','", $this->post['user']) . "'";
         switch ($this->post['jenisaksi']) {
             case 'aktif':
                 $return = $this->model->Execute("update public_sys_user set is_active = '1' where user_id in ({$user_id_str})");
                 break;
             case 'unaktif':
                 $return = $this->model->Execute("update public_sys_user set is_active = '0' where user_id in ({$user_id_str})");
                 break;
         }
         if ($return) {
             $this->SetFlash('suc_msg', "Data berhasil disimpan");
         } else {
             $this->SetFlash('err_msg', "Data gagal disimpan");
         }
         URL::Redirect($this->page_ctrl);
     }
     parent::_actionIndex($page);
 }