Ejemplo n.º 1
0
 public function __construct()
 {
     TSession::freeSession();
     parent::__construct();
     $this->setTitle("Login");
     $this->setSize(300, 200);
     $this->form = new TQuickForm('login');
     $login = new TEntry('user');
     $senha = new TPassword('senha');
     $this->form->addQuickField('Login', $login, 200, new TRequiredValidator());
     $this->form->addQuickField('Senha', $senha, 200, new TRequiredValidator());
     $this->form->addQuickAction('Logar', new TAction(array($this, 'logar')));
     parent::add($this->form);
 }
Ejemplo n.º 2
0
 public function __construct()
 {
     $session = new TSession(0);
     $session->freeSession();
 }
Ejemplo n.º 3
0
 /**
  * Logout
  */
 public static function onLogout()
 {
     if (TSession::getValue('id_login')) {
         try {
             TTransaction::open('atividade');
             $registroLogin = new RegistroLogin(TSession::getValue('id_login'));
             $registroLogin->hora_final = date('H:i:s');
             $registroLogin->store();
             TTransaction::close();
         } catch (Exception $e) {
             new TMessage('error', $e->getMessage());
         }
     }
     TSession::freeSession();
     TApplication::gotoPage('LoginForm', '');
 }
Ejemplo n.º 4
0
 /**
  * Logout
  */
 function onLogout()
 {
     TSession::freeSession();
     TApplication::gotoPage('LoginForm', '');
 }
Ejemplo n.º 5
0
 public static function logout()
 {
     TSession::freeSession();
     TCoreApplication::executeMethod('FormLogar');
 }
Ejemplo n.º 6
0
 public function logout()
 {
     TSession::freeSession();
     TCoreApplication::executeMethod('Home');
 }
Ejemplo n.º 7
0
 /**
  * Logout
  */
 public static function onLogout()
 {
     SystemAccessLog::registerLogout();
     TSession::freeSession();
     TApplication::gotoPage('LoginForm', '');
 }
Ejemplo n.º 8
0
 public function logout()
 {
     TSession::freeSession();
     AdiantiCoreApplication::gotoPage('Home');
 }