コード例 #1
0
 public function accessUser()
 {
     $user = new UserLogin();
     $con = new Controller();
     if ($user->checkUser() === true) {
         return true;
     } else {
         return false;
     }
 }
コード例 #2
0
 public function signinAction()
 {
     $this->email = $_POST['email_id'];
     $this->pass = $_POST['password'];
     $user = $_SESSION['email'];
     $sign = new UserLogin();
     if (isset($_POST['submit'])) {
         $count = 1;
         while ($count < 3) {
             if (empty($this->email) || empty($this->pass)) {
                 echo "*please fill the fields";
             } elseif ($sign->checkUser() === true) {
                 $_SESSION['email_id'] = $this->email;
                 $control->render("userPage");
             } else {
                 $count++;
             }
             $sign->blockUser($user);
             echo "You Are Blocked";
         }
     }
 }
コード例 #3
0
ファイル: signin.php プロジェクト: kapsi44/phpTraining
<?php

include 'header.php';
include_once '../../Config/config.php';
$user = "";
$sign = new UserLogin();
$control = new Controller();
if (isset($_POST['submit'])) {
    $email = $_POST['email_id'];
    $pass = $_POST['password'];
    $_SESSION['count'] = 1;
    while ($_SESSION['count'] < 4) {
        if ($sign->checkUser() === true) {
            //$_SESSION['email'] = $email;
            //$user=$_SESSION['email'];
            $control->render("userPage");
            exit;
        } else {
            $_SESSION['count']++;
            echo $_SESSION['count'];
            $sign->blockUser($email);
        }
        //$sign->blockUser($user);
    }
}
?>
<head>
    <title> Sign In </title>
</head>
<div class="site-wrapper">
<div class="site-wrapper-inner">