PHP Classes

File: examples/material-design/config.php

Recommend this page to a friend!
  Classes of Subin Siby   Secure PHP Login System   examples/material-design/config.php   Download  
File: examples/material-design/config.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Secure PHP Login System
Register and login users using a database via PDO
Author: By
Last change: Update of examples/material-design/config.php
Date: 4 months ago
Size: 2,886 bytes


Class file image Download
 * For Development Purposes
ini_set('display_errors', 'on');

__DIR__ . '/../../vendor/autoload.php';


$config = array(
'basic' => array(
'company' => 'My Site',
'email' => '',

'db' => array(
'host' => 'localhost',
'port' => 3306,
'username' => 'root',
'password' => '',
'name' => 'test',
'table' => 'users',

'features' => array(
'auto_init' => true,
'two_step_login' => true,

     * These are my localhost paths, change it to yours
'pages' => array(
'no_login' => array(
'everyone' => array(
'login_page' => '/examples/material-design/login.php',
'home_page' => '/examples/material-design/home.php',

'two_step_login' => array(
'instruction' => 'A token was sent to your E-Mail Address. Please see the mail in your inbox and paste the token found in the textbox below :',
'send_callback' => function (&$LS, $userID, $token) {
$email = $LS->getUser('email', $userID);
$LS->sendMail($email, 'Verify Yourself', 'Someone tried to login to your account. If it was you, then use the following token to complete logging in : <blockquote>' . $token . "</blockquote>If it was not you, then ignore this email and please consider to change your account's password.");

$LS = new \Fr\LS($config);

printHead($title = 'My Site')
<!-- Compiled and minified CSS -->
    <link rel="stylesheet" href="">

    <script src=""></script>

    <!-- Compiled and minified JavaScript -->
    <script src=""></script>

    <script src="js/jquery.router.js"></script>
    <script src="js/app.js"></script>

    <!--Let browser know website is optimized for mobile-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

    <title><?php echo $title; ?></title>

    <meta name="page-path" content="<?php echo basename($_SERVER['REQUEST_URI']); ?>">

            padding-bottom: 40px;