File: login.php

Recommend this page to a friend!
  Classes of Roman Shneer  >  PHP Web Application Firewall  >  login.php  >  Download  
File: login.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Web Application Firewall
Block malicious requests using a white list
Author: By
Last change: Fixed mobile css
Date: 3 years ago
Size: 1,250 bytes
 

Contents

Download
<?php
/*
 * script for user login
 * License: GNU
 * Copyright 2016 WebAppFirewall RomanShneer <romanshneer@gmail.com>
 */
session_start();
require_once
"libs/db.inc.php";
require_once
"libs/user.class.php";

$WU=new WafUser;

if(isset(
$_POST['email'])&&isset($_POST['pass']))
{
 
    
$WU->auth_user($_POST['email'],$_POST['pass']);
    
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?php require_once "include/head.php"; ?>
</head>
<body>
        <div class='header'></div>
        <h1 class='title'>Wellcome to Web App Firewall</h1>
       
                <div class='box'>
                        <center>
                        <form action="" method='POST' class='login_page'>
                <?php if(!empty($WU->error))echo '<div style="color:red">'.$WU->error.'</div>';
                   
?>
                    <input type='text' name='email' placeholder='Enter email' class='inset'>
                    <input type='password' name='pass' placeholder='Password' class='inset'>
                        <input type='submit' value='login' id='login_button'>
                       
                        </form>
                        <br><a href="remind_password.php" class="add_user">Remind password</a>
                        </center>
                </div>
       
</body>
</html>


For more information send a message to info at phpclasses dot org.