Loading...
 
Gmail / Facebook Style Chat Application


Posted: Saturday 3rd of August 2013

Set Website To and From Maintenance Mode using Ajax, Jquery and PHP



This tutorial helps and teaches you how to design a nice system where you can set your websites to maintenance mode so as to carry out your maintenance activities and also remove your websites from maintenance mode when you are done with your maintenance work using Ajax, Jquery and PHP.

The system works with MYSQL Database and uses a simple and nice looking switch that triggers two radio buttons within a div for turning On and Off your websites mode for maintenance work.

If JavaScript is disabled on your browser, the script will just display the two radio buttons with their labels which are On and Off.

The word "On" means to set the website to maintenance mode and "Off" means to remove the website from maintenance mode.

When you set your website to maintenance mode by clicking on the On option of the switch or radio button, the system will auto take the IP Address of your computer being the Administrator of your website and save it in the database along with your website status which is maintenance mode so as to allow you alone being the administrator of the system to access any part of the website to carry out your maintenance work while any other user or visitor that visits the website is redirected to a page set with nice information telling the user or visitor that the website is currently under maintenance and would be right back in a while.

I am sure you guys understand what i am actually talking about, Good!

To configure the system to work on all the pages of your website so as to check when you have set your website to maintenance mode and redirect your users or visitors appropriately to your nicely designed maintenance mode page, simply include the file named "vpb_maintenance_mode.php" on all your website pages as done in the page named "website_test_page.php".

Then, follow the steps taken in the index.php file which is assumed to be your demo admin panel to add the codes in this file to your main website admin panel page to have this feature for your websites.

The steps taken in the index.php file is very simply, to move the codes in this file to your main website admin panel page, just copy the codes which are between the html comment tag that says "Code Begins Here" and "Code Ends Here" to the body section of your main website admin panel page and copy the three links at the head section of this index.php page to the head section of your own main website admin panel page and you are done with this page.

It is very important that you read all the comments i have written in the scripts to understand how the system actually works.

A user of Vasplus whose name is Cian Godwin suggested that we should give a tutorial on Websites Maintenance Mode hence this tutorial.

The system supports all browsers and the scripts are written in a way that any one can easily understand and customize with good programming code comments to ease usability.

To install the system on your server after you must have downloaded the zipped folder containing the required files, please extract the file to your system then, open the file named README.txt and follow the three installation steps given in that file.

To see the system in action, please click on the Live Demo Button below and download if you like what you see.







That's it guys...


Views Today: 0
Total Views: 1428

Comments
0
OUR OBJECTIVE

Our objective is to reach a place where our services will be highly regarded by businesses from various industrial domains for building their innovative busines solutions with our cutting-edge technological expertise, interactive designs and uncompromised quality.

OUR MISSION

We aspire to help businesses ranging from startups to enterprises, who reach out to us with their requirements, in achieving great lengths, expanding their reach, upscaling their products, and generate a large user-base with our outstanding and cost-effective services.

Copyright © 2011 - 2024 | All Rights Reserved