2017 © Pedro Peláez
 

library easy-login

A material design layer added before any webpage to request login with password

image

qinst64/easy-login

A material design layer added before any webpage to request login with password

  • Saturday, January 7, 2017
  • by qinst64
  • Repository
  • 1 Watchers
  • 1 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 10 % Grown

The README.md

easy-login

A material design layer added before any webpage to request login with password., (*1)

Very easy to use with only several lines of code., (*2)

Features

  • Light and easy to use with only several lines of code
  • Material design interface, friendly to both pc and phone
  • Support multiple users, valid durations, background image etc

How to use

  1. prepare php library, (*3)

    • method 1, (*4)

      Copy "EasyLogin.php" to your local, (*5)

      Then use:, (*6)

      php include 'folder-to-file/EasyLogin.php';, (*7)

    • method 2, (*8)

      Install through composer, (*9)

      composer require qinst64/easy-login dev-master, (*10)

      Then use:, (*11)

      php require 'folder-to-file/autoload.php';, (*12)

  2. add the following code at the top of your entry php (e.g. index.php), (*13)

    //config options
    $opts = array(
        'id_entry' => 'duSWnS1sW',
        'title' => 'Login',
        'usr_pwd' => array('usr1'=>'pwd1','usr2'=>'pwd2'), 
        'duration' => 5,
        'background_img'=> 'login_bg.jpg',
    );
    //request EasyLogin
    (new EasyLogin($opts))->login();//or (new EasyLogin())->set($opts)->login();
    
    

Options explained, (*14)

id_entry differentiate multiple entries, use random string (required), (*15)

title Title shown in page, default is 'Login', (*16)

usr_pwd username and password pairs (at least one required), (*17)

duration how long (hours) to make it valid (default: 72 ), (*18)

background_img background image (default: NULL), (*19)

Tips:

  • Two webpages with the same 'id_entry' if you want to visit both pages by only login once
  • Change 'id_entry' vaule to make existing login invalid

Live demo

demo here, (*20)

note: users and passwords as above., (*21)

The Versions

07/01 2017

dev-master

9999999-dev http://qinst64.duckdns.org/easy-login/

A material design layer added before any webpage to request login with password

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar qinst64