Exemple #1
0
 function checklogin()
 {
     $login = new login();
     if (isset($_SESSION['user']) and isset($_SESSION['loged']) and isset($_SESSION['session']) and $_SESSION['loged'] == true) {
         include "body.php";
     } else {
         $login->logwindow();
     }
     if (isset($_GET['login']) and $_GET['login'] == "logout" and $_SESSION['loged'] == true) {
         $login->logout();
     }
     if (isset($_POST['usuario']) and isset($_POST['senha']) and $_POST['usuario'] != "" and $_POST['senha'] != "" and isset($_SESSION['cod_usuario']) == false) {
         $login->login();
     }
 }
Exemple #2
0
<?php

require "base.php";
global $_base;
// kontroller link
if (getval("sid") != login::$info['ses_id']) {
    $_base->page->add_message("Ugyldig inntasting. Prøv på nytt.", "error");
    $_base->page->load();
}
// loggmelding
putlog("NOTICE", "%c5%bLOGG UT%b%c: (%u{$_SERVER['REMOTE_ADDR']}%u) %u" . login::$user->player->data['up_name'] . "%u (" . login::$user->data['u_email'] . ") ({$_SERVER['HTTP_USER_AGENT']})");
// logg ut
login::logout();
redirect::handle("");
Exemple #3
0
<?php

$model = $_REQUEST['model'];
$action = $_REQUEST['action'];
include_once MODELS . "/" . $model . "_model.php";
switch (strtoupper($action)) {
    case 'LOGIN':
        $objLogin = new login();
        $objLogin->checkLogin();
        break;
    case 'LOGOUT':
        $objLogin = new login();
        $objLogin->logout();
        break;
    default:
        #$objLogin = new login();
        break;
}
Exemple #4
0
 /**
  * Process already logged in
  *
  * @return bool Logged in as correct user?
  */
 protected function processLoggedIn()
 {
     // correct user?
     if (\login::$user->id == $this->getUser()->id) {
         $this->setUsed();
         $this->log("Allerede logget inn");
         return true;
     }
     // correct user is deactivated?
     if ($this->getUser()->data['u_access_level'] == 0) {
         $this->setUsed();
         $this->log("Logget inn som annen bruker; Bruker deaktivert");
         $this->messages[] = "Lenken du forsøkte å åpne var ment for en annen bruker som er deaktivert.";
         return false;
     }
     // we can switch user
     \login::logout();
     if (\login::do_login_handle($this->getUser()->id)) {
         $this->setUsed(\login::$info['ses_id']);
         $this->log("Logget ut og logget inn med korrekt bruker");
         $this->messages[] = sprintf('Du har blitt automatisk logget ut av den forrige brukeren og logget inn med <user id="%s" />.<br />Du blir automatisk logget ut etter 15 minutter uten aktivitet.', $this->getUser()->player->id);
         return true;
     }
     // failed
     $this->setUsed();
     $this->log("Logget ut; Innlogging mislykket");
     $this->messages[] = "Automatisk innlogging ble mislykket.";
     return false;
 }
Exemple #5
0
<?php

/**
 * @author Steven
 * Führt den Logout durch, löscht die aktuelle Session durch Aufruf der entsprechenden function
 * in der login class.
 */
# inclusions:
include "login.class.php";
# Aufruf der Class
$doTheLogout = new login();
# Aufruf der function
$doTheLogout->logout();
$petugas = new petugasController();
$kas = new kasController();
$zakatFitrah = new zakatFitrahController();
$zakatMal = new zakatMalController();
$report = new reportController();
$user = new userController();
$hitung = new hitungZakatController();
$page = @$_GET['page'];
$act = @$_GET['act'];
$id = @$_GET['id'];
if (@$_SESSION['level'] == 'admin') {
    if ($page == '') {
        include "view/beranda.php";
    } else {
        if ($page == 'logout') {
            $login->logout();
        } else {
            if ($page == 'struktur_jabatan') {
                //Struktur Jabatan
                if ($act == '') {
                    $jabatan->view();
                } else {
                    if ($act == 'tambah_jabatan') {
                        $jabatan->viewInsert();
                    } else {
                        if ($act == 'edit_jabatan') {
                            $jabatan->viewEdit($id);
                        } else {
                            if ($act == 'hapus_jabatan') {
                                $jabatan->delete($id);
                            } else {