- Site Template
- WordPress Theme
- Blogging Theme
- CMS Theme
- Marketing Template
- eCommerce Theme
- Forum Theme
- Flash Template
- PSD Web Template
- .NET Script
- PHP Script
- HTML5 Code
- CSS Style
- Edge Animate Template
- Muse Template
- TypeEngine Theme
- Static Site Generator
- Sketch Template
CodeCanyon SAFE The Login Class 4166206
PHP Script \ Miscellaneous
Script \ Loginsystem \ Login \ Authentication \ Class \ Auth
PHP Script - SAFE The Login Class 4166206 by DaGardner @ CodeCanyon
PHP Script \ Miscellaneous
Last Update: 12 March 13; Compatible Browsers: IE6, IE7, IE8, IE9, IE10, Firefox, Safari, Opera, Chrome; Software Version: PHP 5.0 - 5.2, PHP 5.3; High Resolution: Yes; Files Included: HTML, PHP.
We all know this.
Your just writing a simple to script speed things up or to have a fancy GUI for some tasks. You want to have control over your stuff from everywhere you are. Often the problem is that you have to write a auth-system as well and this can get boring and need a bit of time. To do it once is ok, but what if you have to do this a second time or third? Often you cannot just copy the files, because the links would be broken or whatever…
The solution is a very simple but still customizable login class.
This script has one essential script login.php
All you have to do in order to protect your site is one line of code.
<?php include_once 'login.php'; $login = new login(array('demo', $_POST['password'], 'preset')); ?>
First of all include the file and create a new object from the class.
At this point in time the script is SINGLE USER ONLY! The first element in the array is the ‘correct’ password, the second one is the password entered by the user. The best way is probably to pass the $_POST data directly in the object/class. The 3trd element in the array is for advanced user and them who want to customize their login prompt.
preset will use the default prompt (see Live Preview).
You can point the script to a different login form by typing a URL in.
Make sure, that the form action e.g. ‘process.php’ has the object/class implemented.
In future versions their will be a multi user support, which is already partial implemented as you will see in the code. Since this class uses an array as input var the script will be fully compatible with future versions of the script.
The sessions are named with a semi-unique hash.
I won’ t tell you the hole way it’ s generated, but I can tell you that you can change the salt very easily.
You can also change the default session name by calling the function changeSessionName().
This function won’ t be available when multiuser is implemented and enabled!
To set a cookie is also implemented but not fully. To set a cookie call the function setCookie() .
The class will ignore the cookie in this version of the script v1.0
If you want to be super fancy and don’ t wanna change the password on every site you use with this script you can create a file e.g. ‘login-ctrl.php’ and type the lines above in and include only this file.
To logout simple append ?logout to a url where the class is implemented or call the function logout()
The theme for the login form is based on Twitter Bootstrap and uses the Bootstrap CDN (bootstrapcdn.com) for serving the css.
And that’s it for now.
Very easy to use and customizable. Stay tuned for future free updates and multiuser support.
If you want to read the documentation you can do so be visiting this paste: http://pastebin.com/rE8XW9La
The password for the demo is ‘demo’!
Keywords: auth, authentication, class, login, loginsystem, php, script.
Android, Builder, Business, Clean, Corporate, Creative, Design, Ecommerce, Email, Fashion, Gallery, Image, Iphone, Jquery, Landing, Magazine, Magento, Marketing, Minimal, Mobile, Modern, Multi, Multipurpose, Parallax, Personal, Photography, Plugin, Portfolio, Product, Responsive, Retina, Simple, Slider, Social, Store, Template, Theme, Video, Woocommerce, Wordpress
Show all tags
Show all tags
- ThemeForest CoWork Open Office & Creative Space PSD Template 18401389
- ThemeForest Episode Responsive Multi-Purpose Portfolio Template 18078332
- ThemeForest Barrington Creative Agency HTML5 Template 18351230
- ThemeForest Riva Multipurpose Booking for Small Businesses 18179941
- ThemeForest Applan App Landing Page 18342101
- ThemeForest Carmen Car Dealership WordPress Theme 16266673
- ThemeForest Grayson A Stylish and Versatile Shop Theme 17794719
- ThemeForest Myna A Masonry WordPress Blog Theme 17345471
- ThemeForest Chronicle News and Magazine WordPress Theme 17299719
- ThemeForest Evont Event & Conference WordPress Theme 17497249