Beispiel #1
0
<?php

model::load('login', 'login');
//Stop session
token::delimda();
stop_session();
// Aller Page d'index
//header ('location:./');
view::load('login', 'error');
Beispiel #2
0
 public static function session_autoclosed()
 {
     global $db;
     if (isset($_SESSION['ssid'])) {
         $ssid = $_SESSION['ssid'];
         $expired = $db->QuerySingleValue0("select expir from session where id='{$ssid}'");
         if ($expired != NULL) {
             Cookie::close_session_open();
             model::load('login', 'login');
             //Stop session
             stop_session();
             token::delimda();
             $msg = "Vous êtes déconnecté automatiquement pour inactivité de 5 min {$expired} {$ssid} , redirection vers page login....  ";
             exit(msgbox($msg, 0, './', 5));
         }
     }
 }
Beispiel #3
0
function checkpass($password)
{
    global $db;
    $reqpass = "******" . $_SESSION['userid'] . " and pass='******'";
    $lasession = isset($_SESSION['sign']) && $password == $_SESSION['sign'] ? 1 : 0;
    if (isset($_SESSION['sign']) && $password !== $_SESSION['sign']) {
        token::delimda();
    }
    $lepass = $db->QuerySingleValue0($reqpass) == 1 ? 1 : 0;
    if ($lepass == 1 && !isset($_SESSION['sign'])) {
        token::creatimda();
    }
    $return = $lasession == 1 || $lepass == 1 ? 1 : 0;
    return $return;
}