public function Check()
 {
     $login_result = $this->model->Check();
     $loaction = UR_MP;
     // check if logined go dashoard or not go back or default login page and show message
     switch ($login_result[0]) {
         // login ssuccess
         case 1:
             // get last page try to do
             $loaction = TMAC::GetSession('request') === true ? TMAC::GetSession('redirect') : UR_MP;
             Redirect($loaction);
             break;
             // login failed
         // login failed
         case 2:
             RedirectNotification($loaction . 'Access/Login', 'Login failed : Username or password is incorrect.', NI_ERROR);
             break;
             // try failed tried more than max
         // try failed tried more than max
         case 3:
             $args = array($login_result['max'], $login_result['time']);
             RedirectNotification($loaction . 'Access/Login', 'You have used up your failed login quota (%d)! Please wait %d minutes before trying again.', NI_ERROR, $args);
             break;
         default:
             if (_DBG_) {
                 echo 'unknow request';
             }
             break;
             return false;
     }
 }