示例#1
0
//If session exist exit
if (MReq::tp('check') == 1) {
    $message = "";
    $class = "";
    $output = "<div class=\"alert {$class} \"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><i class=\"icon-remove\"></i></button><strong><i class=\"icon-remove\"></i>Erreur! </strong>{$message}</div>";
    global $db;
    model::load('login', 'login');
    //check user exist
    if (!login_check_user_exist(MReq::tp('user'))) {
        $message = "Ce nom d'utilisateur n'exist pas";
        $class = "alert-error";
        $output = "<div class=\"alert {$class} \"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><i class=\"icon-remove\"></i></button><strong><i class=\"icon-remove\"></i>Erreur! </strong>{$message}</div>";
        exit("1# {$output}");
    }
    //check user CRC
    if (!login_check_user_crc(MReq::tp('user'))) {
        $message = "Le nombre des tentatives est écoulé </br> Contactez l'administrateur";
        $class = "alert-error";
        $output = "<div class=\"alert {$class} \"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><i class=\"icon-remove\"></i></button><strong><i class=\"icon-remove\"></i>Erreur! </strong>{$message}</div>";
        exit("2# {$output}");
    }
    //Check user signature
    if (!login_check_user_sign(MReq::tp('user'), MReq::tp('pass'))) {
        $message = "Votre signature n'est pas enregistrée </br> Contactez l'administrateur";
        $class = "alert-error";
        $output = "<div class=\"alert {$class} \"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><i class=\"icon-remove\"></i></button><strong><i class=\"icon-remove\"></i>Erreur! </strong>{$message}</div>";
        exit("3# {$output}");
    }
    //Password ok and validat login
    if (!login_check_user_pass(MReq::tp('user'), MReq::tp('pass'), MReq::tp('token'))) {
        global $db;
示例#2
0
//If session exist exit
if (tp('check') == 1) {
    $message = "";
    $class = "";
    $output = "<div class=\"alert {$class} \"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><i class=\"icon-remove\"></i></button><strong><i class=\"icon-remove\"></i>Erreur! </strong>{$message}</div>";
    global $db;
    model::load('login', 'login');
    //check user exist
    if (!login_check_user_exist(tp('user'))) {
        $message = "Ce nom d'utilisateur n'exist pas";
        $class = "alert-error";
        $output = "<div class=\"alert {$class} \"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><i class=\"icon-remove\"></i></button><strong><i class=\"icon-remove\"></i>Erreur! </strong>{$message}</div>";
        exit("1# {$output}");
    }
    //check user CRC
    if (!login_check_user_crc(tp('user'))) {
        $message = "Le nombre des tentatives est écoulé </br> Contactez l'administrateur";
        $class = "alert-error";
        $output = "<div class=\"alert {$class} \"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><i class=\"icon-remove\"></i></button><strong><i class=\"icon-remove\"></i>Erreur! </strong>{$message}</div>";
        exit("2# {$output}");
    }
    //Check user signature
    if (!login_check_user_sign(tp('user'), tp('pass'))) {
        $message = "Votre signature n'est pas enregistrée </br> Contactez l'administrateur";
        $class = "alert-error";
        $output = "<div class=\"alert {$class} \"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><i class=\"icon-remove\"></i></button><strong><i class=\"icon-remove\"></i>Erreur! </strong>{$message}</div>";
        exit("3# {$output}");
    }
    //Password ok and validat login
    if (!login_check_user_pass(tp('user'), tp('pass'), tp('token'))) {
        global $db;