Wednesday, 17 November 2021

Library Management System Project in PHP with Source Code



This post is on PHP Project on Library Management System. So if you are looking for any educational project on PHP with complete source code then you have come on the right place because from here you can able to download library management system in PHP source code and here you can also learn How to build or developed Online Library Management System in PHP from scratch.

This Library Management System Project has been developed using PHP language with MySQL Database, JavaScript and Bootstrap 5 library. Under this Library Management System there are main two user, one is Admin or Librarian and Other is Student or User who will borrowed book from Library. In this Library Management System Admin or Librarian can maintain all data like add or manage category, authors, books, issued book returned book etc. Here Admin or Library is the key role in the management of this Library Management System Online.

This Library Management System is the Simple Library System which we can easily implement for any type of library. Under this Library Management System, we can track records of books, number of issued books, number of pending of not returned book after due date, how many fines has been collected on return book due date. This Library Management System is the Web based System, so we can manage all data everything which are associated with Library because from any device and from any place we can access this Library System because it is web based Library Management System.

Under this Library System, Issuing of book is very simple, in just one click we can easily issue book to user. This is completely dynamic Library Management System, because under this system we can configured a day limit to keep a book, how many fines charge late return of book per day, how many book can be issue by single user etc. So with the help of this Library Management System, we can efficiently manage Library.


Library Management System Project in PHP with Source Code




Features of Library Management System


Admin or Librarian Side


  1. Manage Book Records
  2. Manage Register User Records
  3. Enable or Disable Register User Login
  4. Issue Book
  5. Returned Book
  6. Calculate Fine on Late Returned Book
  7. Manage Category Data
  8. Manage Authors Data
  9. Manage Location Rack Data
  10. Dynamically Configured Library System
  11. Admin Login Page
  12. Admin Change Password

User or Student Side


  1. User or Student Login Page
  2. New User or Student Registration with Email Verification
  3. Search Available Books
  4. View Issued Book Data
  5. Manage Profile

Web Technology used in Library Management System


Server Side


  • PHP
  • MySQL Database

Front-end Side


  • JavaScript
  • HTML 5
  • Bootstrap 5




MySQL Database


For Create Libraru Management System Database, you have to run following SQL script in you local phpmyadmin. But before run this script, you have to create one blank database in it and then after you have run below script, which will create required table for Library Management System.


--
-- Database: `lms`
--

-- --------------------------------------------------------

--
-- Table structure for table `lms_admin`
--

CREATE TABLE `lms_admin` (
  `admin_id` int(11) NOT NULL,
  `admin_email` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `admin_password` varchar(100) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `lms_admin`
--

INSERT INTO `lms_admin` (`admin_id`, `admin_email`, `admin_password`) VALUES
(1, 'johnsmith1@gmail.com', 'password');

-- --------------------------------------------------------

--
-- Table structure for table `lms_author`
--

CREATE TABLE `lms_author` (
  `author_id` int(11) NOT NULL,
  `author_name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `author_status` enum('Enable','Disable') COLLATE utf8_unicode_ci NOT NULL,
  `author_created_on` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `author_updated_on` varchar(30) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `lms_author`
--

INSERT INTO `lms_author` (`author_id`, `author_name`, `author_status`, `author_created_on`, `author_updated_on`) VALUES
(1, 'Alan Forbes', 'Enable', '2021-11-11 15:45:14', '2021-11-11 15:46:24'),
(2, 'Tom Butler', 'Enable', '2021-11-12 12:48:40', ''),
(3, 'Lynn Beighley', 'Enable', '2021-11-12 12:49:00', ''),
(4, 'Vikram Vaswani', 'Enable', '2021-11-12 12:49:18', ''),
(5, 'Daginn Reiersol', 'Enable', '2021-11-12 12:49:38', ''),
(6, 'Joel Murach', 'Enable', '2021-11-12 12:49:54', ''),
(7, 'Robin Nixon', 'Enable', '2021-11-12 12:50:09', ''),
(8, 'Kevin Tatroe', 'Enable', '2021-11-12 12:50:24', ''),
(9, 'Laura Thompson', 'Enable', '2021-11-12 12:50:42', ''),
(10, 'Brett McLaughlin', 'Enable', '2021-11-12 12:50:55', ''),
(11, 'Sanjib Sinha', 'Enable', '2021-11-12 12:51:16', ''),
(12, 'Brian Messenlehner', 'Enable', '2021-11-12 12:51:42', ''),
(13, 'Dayle Rees', 'Enable', '2021-11-12 12:52:02', ''),
(14, 'Carlos Buenosvinos', 'Enable', '2021-11-12 12:52:20', ''),
(15, 'Bruce Berke', 'Enable', '2021-11-12 12:52:35', ''),
(16, 'Laura Thomson', 'Enable', '2021-11-17 10:39:36', '');

-- --------------------------------------------------------

--
-- Table structure for table `lms_category`
--

CREATE TABLE `lms_category` (
  `category_id` int(11) NOT NULL,
  `category_name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `category_status` enum('Enable','Disable') COLLATE utf8_unicode_ci NOT NULL,
  `category_created_on` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `category_updated_on` varchar(30) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `lms_category`
--

INSERT INTO `lms_category` (`category_id`, `category_name`, `category_status`, `category_created_on`, `category_updated_on`) VALUES
(1, 'Programming', 'Enable', '2021-11-10 19:02:37', '2021-11-27 11:56:18'),
(2, 'Database', 'Enable', '2021-11-17 10:36:53', '2021-11-27 12:27:05'),
(3, 'Web Design', 'Enable', '2021-11-26 16:14:18', '2021-11-27 12:28:03'),
(4, 'Web Development', 'Enable', '2021-11-26 16:15:38', '2021-11-27 12:28:11');

-- --------------------------------------------------------

--
-- Table structure for table `lms_setting`
--

CREATE TABLE `lms_setting` (
  `setting_id` int(11) NOT NULL,
  `library_name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `library_address` text COLLATE utf8_unicode_ci NOT NULL,
  `library_contact_number` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `library_email_address` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `library_total_book_issue_day` int(5) NOT NULL,
  `library_one_day_fine` decimal(4,2) NOT NULL,
  `library_issue_total_book_per_user` int(3) NOT NULL,
  `library_currency` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `library_timezone` varchar(100) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `lms_setting`
--

INSERT INTO `lms_setting` (`setting_id`, `library_name`, `library_address`, `library_contact_number`, `library_email_address`, `library_total_book_issue_day`, `library_one_day_fine`, `library_issue_total_book_per_user`, `library_currency`, `library_timezone`) VALUES
(1, 'ABC Library', 'Business Street 105, NY 0256', '7539518521', 'abc_library@gmail.com', 10, '1.00', 3, 'INR', 'Asia/Calcutta');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `lms_admin`
--
ALTER TABLE `lms_admin`
  ADD PRIMARY KEY (`admin_id`);

--
-- Indexes for table `lms_author`
--
ALTER TABLE `lms_author`
  ADD PRIMARY KEY (`author_id`);

--
-- Indexes for table `lms_category`
--
ALTER TABLE `lms_category`
  ADD PRIMARY KEY (`category_id`);

--
-- Indexes for table `lms_setting`
--
ALTER TABLE `lms_setting`
  ADD PRIMARY KEY (`setting_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `lms_admin`
--
ALTER TABLE `lms_admin`
  MODIFY `admin_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `lms_author`
--
ALTER TABLE `lms_author`
  MODIFY `author_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `lms_category`
--
ALTER TABLE `lms_category`
  MODIFY `category_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `lms_setting`
--
ALTER TABLE `lms_setting`
  MODIFY `setting_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;


Source Code


header.php


This is commaon header section file of this library management system. This file we will use for both admin or librarian side area and user or student side area for display header of the file. This file we will use dynamically for both admin and user side.


<?php

//header.php

?>

<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">
        <meta name="author" content="">
        <meta name="generator" content="">
        <title>Online Library Management System in PHP</title>
        <link rel="canonical" href="">
        <!-- Bootstrap core CSS -->
        <link href="<?php echo base_url(); ?>asset/css/simple-datatables-style.css" rel="stylesheet" />
        <link href="<?php echo base_url(); ?>asset/css/styles.css" rel="stylesheet" />
        <script src="<?php echo base_url(); ?>asset/js/font-awesome-5-all.min.js" crossorigin="anonymous"></script>
        <!-- Favicons -->
        <link rel="apple-touch-icon" href="" sizes="180x180">
        <link rel="icon" href="" sizes="32x32" type="image/png">
        <link rel="icon" href="" sizes="16x16" type="image/png">
        <link rel="manifest" href="">
        <link rel="mask-icon" href="" color="#7952b3">
        <link rel="icon" href="">
        <meta name="theme-color" content="#7952b3">
        <style>
            .bd-placeholder-img {
                font-size: 1.125rem;
                text-anchor: middle;
                -webkit-user-select: none;
                -moz-user-select: none;
                user-select: none;
            }
            @media (min-width: 768px) {
                .bd-placeholder-img-lg {
                    font-size: 3.5rem;
                }
            }
        </style>
    </head>

    <?php 

    if(is_admin_login())
    {

    ?>
    <body class="sb-nav-fixed">

        <nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
            <!-- Navbar Brand-->
            <a class="navbar-brand ps-3" href="index.php">Library System</a>
            <!-- Sidebar Toggle-->
            <button class="btn btn-link btn-sm order-1 order-lg-0 me-4 me-lg-0" id="sidebarToggle" href="#!"><i class="fas fa-bars"></i></button>
            <form class="d-none d-md-inline-block form-inline ms-auto me-0 me-md-3 my-2 my-md-0">
                
            </form>
            <!-- Navbar-->
            <ul class="navbar-nav ms-auto ms-md-0 me-3 me-lg-4">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" id="navbarDropdown" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"><i class="fas fa-user fa-fw"></i></a>
                    <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
                        <li><a class="dropdown-item" href="profile.php">Profile</a></li>
                        <li><a class="dropdown-item" href="setting.php">Setting</a></li>
                        <li><a class="dropdown-item" href="logout.php">Logout</a></li>
                    </ul>
                </li>
            </ul>
        </nav>

        <div id="layoutSidenav">
            <div id="layoutSidenav_nav">
                <nav class="sb-sidenav accordion sb-sidenav-dark" id="sidenavAccordion">
                    <div class="sb-sidenav-menu">
                        <div class="nav">
                            <a class="nav-link" href="category.php">Category</a>
                            <a class="nav-link" href="author.php">Author</a>
                            <a class="nav-link" href="logout.php">Logout</a>

                        </div>
                    </div>
                    <div class="sb-sidenav-footer">
                       
                    </div>
                </nav>
            </div>
            <div id="layoutSidenav_content">
                <main>


    <?php 
    }
    else
    {

    ?>

    <body>

    	<main>

    		<div class="container py-4">

    			<header class="pb-3 mb-4 border-bottom">

    				<a href="index.php" class="d-flex align-items-center text-dark text-decoration-none">
    					<span class="fs-4">Library Management System</span>
    				</a>

    			</header>
    <?php 
    }
    ?>
    			


index.php


This is main index or home page of Library Management System. So when we have directly access this Web based Library System then it has load this file. On this file you can find basic introduction of Library system and below it you can fine admin login button, user login button and user registration button link on it. So for both user and admin can go to login page from this page.


<?php

include 'header.php';

?>

<div class="p-5 mb-4 bg-light rounded-3">

	<div class="container-fluid py-5">

		<h1 class="display-5 fw-bold">Library Management System</h1>

		<p class="fs-4">This is simple Library Management System which use for maintain the record of the library. This Library Managment System has been made by using PHP script, MySQL Database, Vanilla JavaScript and Bootstrap 5 framework. This is PHP Project on Online Library Management System.</p>

	</div>

</div>

<div class="row align-items-md-stretch">

	<div class="col-md-6">

		<div class="h-100 p-5 text-white bg-dark rounded-3">

			<h2>Admin Login</h2>
			<p></p>
			<a href="admin_login.php" class="btn btn-outline-light">Admin Login</a>

		</div>

	</div>

	<div class="col-md-6">

		<div class="h-100 p-5 bg-light border rounded-3">

			<h2>User Login</h2>

			<p></p>

			<a href="user_login.php" class="btn btn-outline-secondary">User Login</a>

			<a href="user_registration.php" class="btn btn-outline-primary">User Sign Up</a>

		</div>

	</div>

</div>

<?php

include 'footer.php';

?>


database_connection.php


This file has been used for make database connection with MySQL lms database using PDO() class object. Under this file, we have also start session variable by using session_start() function.


<?php

//database_connection.php

$connect = new PDO("mysql:host=localhost; dbname=lms", "root", "");

session_start();

?>


function.php


Under this file, we will make function which will be used for multiple time under this system. So for this, we have make all function under this function.php file, so by simply include this file any PHP file we can use that function.


<?php

//function.php

function base_url()
{
	return 'http://localhost/tutorial/library_management_system/';
}

function is_admin_login()
{
	if(isset($_SESSION['admin_id']))
	{
		return true;
	}
	return false;
}

function set_timezone($connect)
{
	$query = "
	SELECT library_timezone FROM lms_setting 
	LIMIT 1
	";

	$result = $connect->query($query);

	foreach($result as $row)
	{
		date_default_timezone_set($row["library_timezone"]);
	}
}

function get_date_time($connect)
{
	set_timezone($connect);

	return date("Y-m-d H:i:s",  STRTOTIME(date('h:i:sa')));
}

function convert_data($string, $action = 'encrypt')
{
	$encrypt_method = "AES-256-CBC";
	$secret_key = 'AA74CDCC2BBRT935136HH7B63C27'; // user define private key
	$secret_iv = '5fgf5HJ5g27'; // user define secret key
	$key = hash('sha256', $secret_key);
	$iv = substr(hash('sha256', $secret_iv), 0, 16); // sha256 is hash_hmac_algo
	if ($action == 'encrypt') 
	{
		$output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);
	    $output = base64_encode($output);
	} 
	else if ($action == 'decrypt') 
	{
		$output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);
	}
	return $output;
}

function currency_array()
	{
		$currencies = array(
			array('code'=> 'ALL',
			'countryname'=> 'Albania',
			'name'=> 'Albanian lek',
			'symbol'=> 'L'),

			array('code'=> 'AFN',
			    'countryname'=> 'Afghanistan',
			    'name'=> 'Afghanistan Afghani',
			    'symbol'=> '&#1547;'),

			array('code'=> 'ARS',
			    'countryname'=> 'Argentina',
			    'name'=> 'Argentine Peso',
			    'symbol'=> '&#36;'),

			array('code'=> 'AWG',
			    'countryname'=> 'Aruba',
			    'name'=> 'Aruban florin',
			    'symbol'=> '&#402;'),

			array('code'=> 'AUD',
			    'countryname'=> 'Australia',
			    'name'=> 'Australian Dollar',
			    'symbol'=> '&#65;&#36;'),

			array('code'=> 'AZN',
			    'countryname'=> 'Azerbaijan',
			    'name'=> 'Azerbaijani Manat',
			    'symbol'=> '&#8380;'),

			array('code'=> 'BSD',
			    'countryname'=> 'The Bahamas',
			    'name'=> 'Bahamas Dollar',
			    'symbol'=> '&#66;&#36;'),

			array('code'=> 'BBD',
			    'countryname'=> 'Barbados',
			    'name'=> 'Barbados Dollar',
			    'symbol'=> '&#66;&#100;&#115;&#36;'),

			array('code'=> 'BDT',
			    'countryname'=> 'People\'s Republic of Bangladesh',
			    'name'=> 'Bangladeshi taka',
			    'symbol'=> '&#2547;'),

			array('code'=> 'BYN',
			    'countryname'=> 'Belarus',
			    'name'=> 'Belarus Ruble',
			    'symbol'=> '&#66;&#114;'),

			array('code'=> 'BZD',
			    'countryname'=> 'Belize',
			    'name'=> 'Belize Dollar',
			    'symbol'=> '&#66;&#90;&#36;'),

			array('code'=> 'BMD',
			    'countryname'=> 'British Overseas Territory of Bermuda',
			    'name'=> 'Bermudian Dollar',
			    'symbol'=> '&#66;&#68;&#36;'),

			array('code'=> 'BOP',
			    'countryname'=> 'Bolivia',
			    'name'=> 'Boliviano',
			    'symbol'=> '&#66;&#115;'),

			array('code'=> 'BAM',
			    'countryname'=> 'Bosnia and Herzegovina',
			    'name'=> 'Bosnia-Herzegovina Convertible Marka',
			    'symbol'=> '&#75;&#77;'),

			array('code'=> 'BWP',
			    'countryname'=> 'Botswana',
			    'name'=> 'Botswana pula',
			    'symbol'=> '&#80;'),

			array('code'=> 'BGN',
			    'countryname'=> 'Bulgaria',
			    'name'=> 'Bulgarian lev',
			    'symbol'=> '&#1083;&#1074;'),

			array('code'=> 'BRL',
			    'countryname'=> 'Brazil',
			    'name'=> 'Brazilian real',
			    'symbol'=> '&#82;&#36;'),

			array('code'=> 'BND',
			    'countryname'=> 'Sultanate of Brunei',
			    'name'=> 'Brunei dollar',
			    'symbol'=> '&#66;&#36;'),

			array('code'=> 'KHR',
			    'countryname'=> 'Cambodia',
			    'name'=> 'Cambodian riel',
			    'symbol'=> '&#6107;'),

			array('code'=> 'CAD',
			    'countryname'=> 'Canada',
			    'name'=> 'Canadian dollar',
			    'symbol'=> '&#67;&#36;'),

			array('code'=> 'KYD',
			    'countryname'=> 'Cayman Islands',
			    'name'=> 'Cayman Islands dollar',
			    'symbol'=> '&#36;'),

			array('code'=> 'CLP',
			    'countryname'=> 'Chile',
			    'name'=> 'Chilean peso',
			    'symbol'=> '&#36;'),

			array('code'=> 'CNY',
			    'countryname'=> 'China',
			    'name'=> 'Chinese Yuan Renminbi',
			    'symbol'=> '&#165;'),

			array('code'=> 'COP',
			    'countryname'=> 'Colombia',
			    'name'=> 'Colombian peso',
			    'symbol'=> '&#36;'),

			array('code'=> 'CRC',
			    'countryname'=> 'Costa Rica',
			    'name'=> 'Costa Rican colón',
			    'symbol'=> '&#8353;'),

			array('code'=> 'HRK',
			    'countryname'=> 'Croatia',
			    'name'=> 'Croatian kuna',
			    'symbol'=> '&#107;&#110;'),

			array('code'=> 'CUP',
			    'countryname'=> 'Cuba',
			    'name'=> 'Cuban peso',
			    'symbol'=> '&#8369;'),

			array('code'=> 'CZK',
			    'countryname'=> 'Czech Republic',
			    'name'=> 'Czech koruna',
			    'symbol'=> '&#75;&#269;'),

			array('code'=> 'DKK',
			    'countryname'=> 'Denmark, Greenland, and the Faroe Islands',
			    'name'=> 'Danish krone',
			    'symbol'=> '&#107;&#114;'),

			array('code'=> 'DOP',
			    'countryname'=> 'Dominican Republic',
			    'name'=> 'Dominican peso',
			    'symbol'=> '&#82;&#68;&#36;'),

			array('code'=> 'XCD',
			    'countryname'=> 'Antigua and Barbuda, Commonwealth of Dominica, Grenada, Montserrat, St. Kitts and Nevis, Saint Lucia and St. Vincent and the Grenadines',
			    'name'=> 'Eastern Caribbean dollar',
			    'symbol'=> '&#36;'),

			array('code'=> 'EGP',
			    'countryname'=> 'Egypt',
			    'name'=> 'Egyptian pound',
			    'symbol'=> '&#163;'),

			array('code'=> 'SVC',
			    'countryname'=> 'El Salvador',
			    'name'=> 'Salvadoran colón',
			    'symbol'=> '&#36;'),

			array('code'=> 'EEK',
			    'countryname'=> 'Estonia',
			    'name'=> 'Estonian kroon',
			    'symbol'=> '&#75;&#114;'),

			array('code'=> 'EUR',
			    'countryname'=> 'European Union, Italy, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden',
			    'name'=> 'Euro',
			    'symbol'=> '&#8364;'),

			array('code'=> 'FKP',
			    'countryname'=> 'Falkland Islands',
			    'name'=> 'Falkland Islands (Malvinas) Pound',
			    'symbol'=> '&#70;&#75;&#163;'),

			array('code'=> 'FJD',
			    'countryname'=> 'Fiji',
			    'name'=> 'Fijian dollar',
			    'symbol'=> '&#70;&#74;&#36;'),

			array('code'=> 'GHC',
			    'countryname'=> 'Ghana',
			    'name'=> 'Ghanaian cedi',
			    'symbol'=> '&#71;&#72;&#162;'),

			array('code'=> 'GIP',
			    'countryname'=> 'Gibraltar',
			    'name'=> 'Gibraltar pound',
			    'symbol'=> '&#163;'),

			array('code'=> 'GTQ',
			    'countryname'=> 'Guatemala',
			    'name'=> 'Guatemalan quetzal',
			    'symbol'=> '&#81;'),

			array('code'=> 'GGP',
			    'countryname'=> 'Guernsey',
			    'name'=> 'Guernsey pound',
			    'symbol'=> '&#81;'),

			array('code'=> 'GYD',
			    'countryname'=> 'Guyana',
			    'name'=> 'Guyanese dollar',
			    'symbol'=> '&#71;&#89;&#36;'),

			array('code'=> 'HNL',
			    'countryname'=> 'Honduras',
			    'name'=> 'Honduran lempira',
			    'symbol'=> '&#76;'),

			array('code'=> 'HKD',
			    'countryname'=> 'Hong Kong',
			    'name'=> 'Hong Kong dollar',
			    'symbol'=> '&#72;&#75;&#36;'),

			array('code'=> 'HUF',
			    'countryname'=> 'Hungary',
			    'name'=> 'Hungarian forint',
			    'symbol'=> '&#70;&#116;'),

			array('code'=> 'ISK',
			    'countryname'=> 'Iceland',
			    'name'=> 'Icelandic króna',
			    'symbol'=> '&#237;&#107;&#114;'),

			array('code'=> 'INR',
			    'countryname'=> 'India',
			    'name'=> 'Indian rupee',
			    'symbol'=> '&#8377;'),

			array('code'=> 'IDR',
			    'countryname'=> 'Indonesia',
			    'name'=> 'Indonesian rupiah',
			    'symbol'=> '&#82;&#112;'),

			array('code'=> 'IRR',
			    'countryname'=> 'Iran',
			    'name'=> 'Iranian rial',
			    'symbol'=> '&#65020;'),

			array('code'=> 'IMP',
			    'countryname'=> 'Isle of Man',
			    'name'=> 'Manx pound',
			    'symbol'=> '&#163;'),

			array('code'=> 'ILS',
			    'countryname'=> 'Israel, Palestinian territories of the West Bank and the Gaza Strip',
			    'name'=> 'Israeli Shekel',
			    'symbol'=> '&#8362;'),

			array('code'=> 'JMD',
			    'countryname'=> 'Jamaica',
			    'name'=> 'Jamaican dollar',
			    'symbol'=> '&#74;&#36;'),

			array('code'=> 'JPY',
			    'countryname'=> 'Japan',
			    'name'=> 'Japanese yen',
			    'symbol'=> '&#165;'),

			array('code'=> 'JEP',
			    'countryname'=> 'Jersey',
			    'name'=> 'Jersey pound',
			    'symbol'=> '&#163;'),

			array('code'=> 'KZT',
			    'countryname'=> 'Kazakhstan',
			    'name'=> 'Kazakhstani tenge',
			    'symbol'=> '&#8376;'),

			array('code'=> 'KPW',
			    'countryname'=> 'North Korea',
			    'name'=> 'North Korean won',
			    'symbol'=> '&#8361;'),

			array('code'=> 'KPW',
			    'countryname'=> 'South Korea',
			    'name'=> 'South Korean won',
			    'symbol'=> '&#8361;'),

			array('code'=> 'KGS',
			    'countryname'=> 'Kyrgyz Republic',
			    'name'=> 'Kyrgyzstani som',
			    'symbol'=> '&#1083;&#1074;'),

			array('code'=> 'LAK',
			    'countryname'=> 'Laos',
			    'name'=> 'Lao kip',
			    'symbol'=> '&#8365;'),

			array('code'=> 'LAK',
			    'countryname'=> 'Laos',
			    'name'=> 'Latvian lats',
			    'symbol'=> '&#8364;'),

			array('code'=> 'LVL',
			    'countryname'=> 'Laos',
			    'name'=> 'Latvian lats',
			    'symbol'=> '&#8364;'),

			array('code'=> 'LBP',
			    'countryname'=> 'Lebanon',
			    'name'=> 'Lebanese pound',
			    'symbol'=> '&#76;&#163;'),

			array('code'=> 'LRD',
			    'countryname'=> 'Liberia',
			    'name'=> 'Liberian dollar',
			    'symbol'=> '&#76;&#68;&#36;'),

			array('code'=> 'LTL',
			    'countryname'=> 'Lithuania',
			    'name'=> 'Lithuanian litas',
			    'symbol'=> '&#8364;'),

			array('code'=> 'MKD',
			    'countryname'=> 'North Macedonia',
			    'name'=> 'Macedonian denar',
			    'symbol'=> '&#1076;&#1077;&#1085;'),

			array('code'=> 'MYR',
			    'countryname'=> 'Malaysia',
			    'name'=> 'Malaysian ringgit',
			    'symbol'=> '&#82;&#77;'),

			array('code'=> 'MUR',
			    'countryname'=> 'Mauritius',
			    'name'=> 'Mauritian rupee',
			    'symbol'=> '&#82;&#115;'),

			array('code'=> 'MXN',
			    'countryname'=> 'Mexico',
			    'name'=> 'Mexican peso',
			    'symbol'=> '&#77;&#101;&#120;&#36;'),

			array('code'=> 'MNT',
			    'countryname'=> 'Mongolia',
			    'name'=> 'Mongolian tögrög',
			    'symbol'=> '&#8366;'),

			array('code'=> 'MZN',
			    'countryname'=> 'Mozambique',
			    'name'=> 'Mozambican metical',
			    'symbol'=> '&#77;&#84;'),

			array('code'=> 'NAD',
			    'countryname'=> 'Namibia',
			    'name'=> 'Namibian dollar',
			    'symbol'=> '&#78;&#36;'),

			array('code'=> 'NPR',
			    'countryname'=> 'Federal Democratic Republic of Nepal',
			    'name'=> 'Nepalese rupee',
			    'symbol'=> '&#82;&#115;&#46;'),

			array('code'=> 'ANG',
			    'countryname'=> 'Curaçao and Sint Maarten',
			    'name'=> 'Netherlands Antillean guilder',
			    'symbol'=> '&#402;'),

			array('code'=> 'NZD',
			    'countryname'=> 'New Zealand, the Cook Islands, Niue, the Ross Dependency, Tokelau, the Pitcairn Islands',
			    'name'=> 'New Zealand dollar',
			    'symbol'=> '&#36;'),
			
			array('code'=> 'NIO',
			    'countryname'=> 'Nicaragua',
			    'name'=> 'Nicaraguan córdoba',
			    'symbol'=> '&#67;&#36;'),

			array('code'=> 'NGN',
			    'countryname'=> 'Nigeria',
			    'name'=> 'Nigerian naira',
			    'symbol'=> '&#8358;'),

			array('code'=> 'NOK',
			    'countryname'=> 'Norway and its dependent territories',
			    'name'=> 'Norwegian krone',
			    'symbol'=> '&#107;&#114;'),

			array('code'=> 'OMR',
			    'countryname'=> 'Oman',
			    'name'=> 'Omani rial',
			    'symbol'=> '&#65020;'),

			array('code'=> 'PKR',
			    'countryname'=> 'Pakistan',
			    'name'=> 'Pakistani rupee',
			    'symbol'=> '&#82;&#115;'),

			array('code'=> 'PAB',
			    'countryname'=> 'Panama',
			    'name'=> 'Panamanian balboa',
			    'symbol'=> '&#66;&#47;&#46;'),

			array('code'=> 'PYG',
			    'countryname'=> 'Paraguay',
			    'name'=> 'Paraguayan Guaraní',
			    'symbol'=> '&#8370;'),

			array('code'=> 'PEN',
			    'countryname'=> 'Peru',
			    'name'=> 'Sol',
			    'symbol'=> '&#83;&#47;&#46;'),

			array('code'=> 'PHP',
			    'countryname'=> 'Philippines',
			    'name'=> 'Philippine peso',
			    'symbol'=> '&#8369;'),

			array('code'=> 'PLN',
			    'countryname'=> 'Poland',
			    'name'=> 'Polish złoty',
			    'symbol'=> '&#122;&#322;'),

			array('code'=> 'QAR',
			    'countryname'=> 'State of Qatar',
			    'name'=> 'Qatari Riyal',
			    'symbol'=> '&#65020;'),

			array('code'=> 'RON',
			    'countryname'=> 'Romania',
			    'name'=> 'Romanian leu (Leu românesc)',
			    'symbol'=> '&#76;'),

			array('code'=> 'RUB',
			    'countryname'=> 'Russian Federation, Abkhazia and South Ossetia, Donetsk and Luhansk',
			    'name'=> 'Russian ruble',
			    'symbol'=> '&#8381;'),

			array('code'=> 'SHP',
			    'countryname'=> 'Saint Helena, Ascension and Tristan da Cunha',
			    'name'=> 'Saint Helena pound',
			    'symbol'=> '&#163;'),

			array('code'=> 'SAR',
			    'countryname'=> 'Saudi Arabia',
			    'name'=> 'Saudi riyal',
			    'symbol'=> '&#65020;'),

			array('code'=> 'RSD',
			    'countryname'=> 'Serbia',
			    'name'=> 'Serbian dinar',
			    'symbol'=> '&#100;&#105;&#110;'),

			array('code'=> 'SCR',
			    'countryname'=> 'Seychelles',
			    'name'=> 'Seychellois rupee',
			    'symbol'=> '&#82;&#115;'),

			array('code'=> 'SGD',
			    'countryname'=> 'Singapore',
			    'name'=> 'Singapore dollar',
			    'symbol'=> '&#83;&#36;'),

			array('code'=> 'SBD',
			    'countryname'=> 'Solomon Islands',
			    'name'=> 'Solomon Islands dollar',
			    'symbol'=> '&#83;&#73;&#36;'),

			array('code'=> 'SOS',
			    'countryname'=> 'Somalia',
			    'name'=> 'Somali shilling',
			    'symbol'=> '&#83;&#104;&#46;&#83;&#111;'),

			array('code'=> 'ZAR',
			    'countryname'=> 'South Africa',
			    'name'=> 'South African rand',
			    'symbol'=> '&#82;'),

			array('code'=> 'LKR',
			    'countryname'=> 'Sri Lanka',
			    'name'=> 'Sri Lankan rupee',
			    'symbol'=> '&#82;&#115;'),
		
			array('code'=> 'SEK',
			    'countryname'=> 'Sweden',
			    'name'=> 'Swedish krona',
			    'symbol'=> '&#107;&#114;'),


			array('code'=> 'CHF',
			    'countryname'=> 'Switzerland',
			    'name'=> 'Swiss franc',
			    'symbol'=> '&#67;&#72;&#102;'),

			array('code'=> 'SRD',
			    'countryname'=> 'Suriname',
			    'name'=> 'Suriname Dollar',
			    'symbol'=> '&#83;&#114;&#36;'),

			array('code'=> 'SYP',
			    'countryname'=> 'Syria',
			    'name'=> 'Syrian pound',
			    'symbol'=> '&#163;&#83;'),

			array('code'=> 'TWD',
			    'countryname'=> 'Taiwan',
			    'name'=> 'New Taiwan dollar',
			    'symbol'=> '&#78;&#84;&#36;'),

			array('code'=> 'THB',
			    'countryname'=> 'Thailand',
			    'name'=> 'Thai baht',
			    'symbol'=> '&#3647;'),


			array('code'=> 'TTD',
			    'countryname'=> 'Trinidad and Tobago',
			    'name'=> 'Trinidad and Tobago dollar',
			    'symbol'=> '&#84;&#84;&#36;'),

			array('code'=> 'TRY',
			    'countryname'=> 'Turkey, Turkish Republic of Northern Cyprus',
			    'name'=> 'Turkey Lira',
			    'symbol'=> '&#8378;'),

			array('code'=> 'TVD',
			    'countryname'=> 'Tuvalu',
			    'name'=> 'Tuvaluan dollar',
			    'symbol'=> '&#84;&#86;&#36;'),

			array('code'=> 'UAH',
			    'countryname'=> 'Ukraine',
			    'name'=> 'Ukrainian hryvnia',
			    'symbol'=> '&#8372;'),

			array('code'=> 'GBP',
			    'countryname'=> 'United Kingdom, Jersey, Guernsey, the Isle of Man, Gibraltar, South Georgia and the South Sandwich Islands, the British Antarctic Territory, and Tristan da Cunha',
			    'name'=> 'Pound sterling',
			    'symbol'=> '&#163;'),

			array('code'=> 'UGX',
			    'countryname'=> 'Uganda',
			    'name'=> 'Ugandan shilling',
			    'symbol'=> '&#85;&#83;&#104;'),

			array('code'=> 'USD',
			    'countryname'=> 'United States',
			    'name'=> 'United States dollar',
			    'symbol'=> '&#36;'),

			array('code'=> 'UYU',
			    'countryname'=> 'Uruguayan',
			    'name'=> 'Peso Uruguayolar',
			    'symbol'=> '&#36;&#85;'),

			array('code'=> 'UZS',
			    'countryname'=> 'Uzbekistan',
			    'name'=> 'Uzbekistani soʻm',
			    'symbol'=> '&#1083;&#1074;'),

			array('code'=> 'VEF',
			    'countryname'=> 'Venezuela',
			    'name'=> 'Venezuelan bolívar',
			    'symbol'=> '&#66;&#115;'),

			array('code'=> 'VND',
			    'countryname'=> 'Vietnam',
			    'name'=> 'Vietnamese dong (Đồng)',
			    'symbol'=> '&#8363;'),

			array('code'=> 'VND',
			    'countryname'=> 'Yemen',
			    'name'=> 'Yemeni rial',
			    'symbol'=> '&#65020;'),

			array('code'=> 'ZWD',
			    'countryname'=> 'Zimbabwe',
			    'name'=> 'Zimbabwean dollar',
			    'symbol'=> '&#90;&#36;'),
		);
		
		return $currencies;
	}

	function Currency_list()
	{
		$html = '
			<option value="">Select Currency</option>
		';
		$data = currency_array();
		foreach($data as $row)
		{
			$html .= '<option value="'.$row["code"].'">'.$row["name"].'</option>';
		}
		return $html;
	}

	function Timezone_list()
	{
		$timezones = array(
		    'America/Adak' => '(GMT-10:00) America/Adak (Hawaii-Aleutian Standard Time)',
			'America/Atka' => '(GMT-10:00) America/Atka (Hawaii-Aleutian Standard Time)',
			'America/Anchorage' => '(GMT-9:00) America/Anchorage (Alaska Standard Time)',
			'America/Juneau' => '(GMT-9:00) America/Juneau (Alaska Standard Time)',
			'America/Nome' => '(GMT-9:00) America/Nome (Alaska Standard Time)',
			'America/Yakutat' => '(GMT-9:00) America/Yakutat (Alaska Standard Time)',
			'America/Dawson' => '(GMT-8:00) America/Dawson (Pacific Standard Time)',
			'America/Ensenada' => '(GMT-8:00) America/Ensenada (Pacific Standard Time)',
			'America/Los_Angeles' => '(GMT-8:00) America/Los_Angeles (Pacific Standard Time)',
			'America/Tijuana' => '(GMT-8:00) America/Tijuana (Pacific Standard Time)',
			'America/Vancouver' => '(GMT-8:00) America/Vancouver (Pacific Standard Time)',
			'America/Whitehorse' => '(GMT-8:00) America/Whitehorse (Pacific Standard Time)',
			'Canada/Pacific' => '(GMT-8:00) Canada/Pacific (Pacific Standard Time)',
			'Canada/Yukon' => '(GMT-8:00) Canada/Yukon (Pacific Standard Time)',
			'Mexico/BajaNorte' => '(GMT-8:00) Mexico/BajaNorte (Pacific Standard Time)',
			'America/Boise' => '(GMT-7:00) America/Boise (Mountain Standard Time)',
			'America/Cambridge_Bay' => '(GMT-7:00) America/Cambridge_Bay (Mountain Standard Time)',
			'America/Chihuahua' => '(GMT-7:00) America/Chihuahua (Mountain Standard Time)',
			'America/Dawson_Creek' => '(GMT-7:00) America/Dawson_Creek (Mountain Standard Time)',
			'America/Denver' => '(GMT-7:00) America/Denver (Mountain Standard Time)',
			'America/Edmonton' => '(GMT-7:00) America/Edmonton (Mountain Standard Time)',
			'America/Hermosillo' => '(GMT-7:00) America/Hermosillo (Mountain Standard Time)',
			'America/Inuvik' => '(GMT-7:00) America/Inuvik (Mountain Standard Time)',
			'America/Mazatlan' => '(GMT-7:00) America/Mazatlan (Mountain Standard Time)',
			'America/Phoenix' => '(GMT-7:00) America/Phoenix (Mountain Standard Time)',
			'America/Shiprock' => '(GMT-7:00) America/Shiprock (Mountain Standard Time)',
			'America/Yellowknife' => '(GMT-7:00) America/Yellowknife (Mountain Standard Time)',
			'Canada/Mountain' => '(GMT-7:00) Canada/Mountain (Mountain Standard Time)',
			'Mexico/BajaSur' => '(GMT-7:00) Mexico/BajaSur (Mountain Standard Time)',
			'America/Belize' => '(GMT-6:00) America/Belize (Central Standard Time)',
			'America/Cancun' => '(GMT-6:00) America/Cancun (Central Standard Time)',
			'America/Chicago' => '(GMT-6:00) America/Chicago (Central Standard Time)',
			'America/Costa_Rica' => '(GMT-6:00) America/Costa_Rica (Central Standard Time)',
			'America/El_Salvador' => '(GMT-6:00) America/El_Salvador (Central Standard Time)',
			'America/Guatemala' => '(GMT-6:00) America/Guatemala (Central Standard Time)',
			'America/Knox_IN' => '(GMT-6:00) America/Knox_IN (Central Standard Time)',
			'America/Managua' => '(GMT-6:00) America/Managua (Central Standard Time)',
			'America/Menominee' => '(GMT-6:00) America/Menominee (Central Standard Time)',
			'America/Merida' => '(GMT-6:00) America/Merida (Central Standard Time)',
			'America/Mexico_City' => '(GMT-6:00) America/Mexico_City (Central Standard Time)',
			'America/Monterrey' => '(GMT-6:00) America/Monterrey (Central Standard Time)',
			'America/Rainy_River' => '(GMT-6:00) America/Rainy_River (Central Standard Time)',
			'America/Rankin_Inlet' => '(GMT-6:00) America/Rankin_Inlet (Central Standard Time)',
			'America/Regina' => '(GMT-6:00) America/Regina (Central Standard Time)',
			'America/Swift_Current' => '(GMT-6:00) America/Swift_Current (Central Standard Time)',
			'America/Tegucigalpa' => '(GMT-6:00) America/Tegucigalpa (Central Standard Time)',
			'America/Winnipeg' => '(GMT-6:00) America/Winnipeg (Central Standard Time)',
			'Canada/Central' => '(GMT-6:00) Canada/Central (Central Standard Time)',
			'Canada/East-Saskatchewan' => '(GMT-6:00) Canada/East-Saskatchewan (Central Standard Time)',
			'Canada/Saskatchewan' => '(GMT-6:00) Canada/Saskatchewan (Central Standard Time)',
			'Chile/EasterIsland' => '(GMT-6:00) Chile/EasterIsland (Easter Is. Time)',
			'Mexico/General' => '(GMT-6:00) Mexico/General (Central Standard Time)',
			'America/Atikokan' => '(GMT-5:00) America/Atikokan (Eastern Standard Time)',
			'America/Bogota' => '(GMT-5:00) America/Bogota (Colombia Time)',
			'America/Cayman' => '(GMT-5:00) America/Cayman (Eastern Standard Time)',
			'America/Coral_Harbour' => '(GMT-5:00) America/Coral_Harbour (Eastern Standard Time)',
			'America/Detroit' => '(GMT-5:00) America/Detroit (Eastern Standard Time)',
			'America/Fort_Wayne' => '(GMT-5:00) America/Fort_Wayne (Eastern Standard Time)',
			'America/Grand_Turk' => '(GMT-5:00) America/Grand_Turk (Eastern Standard Time)',
			'America/Guayaquil' => '(GMT-5:00) America/Guayaquil (Ecuador Time)',
			'America/Havana' => '(GMT-5:00) America/Havana (Cuba Standard Time)',
			'America/Indianapolis' => '(GMT-5:00) America/Indianapolis (Eastern Standard Time)',
			'America/Iqaluit' => '(GMT-5:00) America/Iqaluit (Eastern Standard Time)',
			'America/Jamaica' => '(GMT-5:00) America/Jamaica (Eastern Standard Time)',
			'America/Lima' => '(GMT-5:00) America/Lima (Peru Time)',
			'America/Louisville' => '(GMT-5:00) America/Louisville (Eastern Standard Time)',
			'America/Montreal' => '(GMT-5:00) America/Montreal (Eastern Standard Time)',
			'America/Nassau' => '(GMT-5:00) America/Nassau (Eastern Standard Time)',
			'America/New_York' => '(GMT-5:00) America/New_York (Eastern Standard Time)',
			'America/Nipigon' => '(GMT-5:00) America/Nipigon (Eastern Standard Time)',
			'America/Panama' => '(GMT-5:00) America/Panama (Eastern Standard Time)',
			'America/Pangnirtung' => '(GMT-5:00) America/Pangnirtung (Eastern Standard Time)',
			'America/Port-au-Prince' => '(GMT-5:00) America/Port-au-Prince (Eastern Standard Time)',
			'America/Resolute' => '(GMT-5:00) America/Resolute (Eastern Standard Time)',
			'America/Thunder_Bay' => '(GMT-5:00) America/Thunder_Bay (Eastern Standard Time)',
			'America/Toronto' => '(GMT-5:00) America/Toronto (Eastern Standard Time)',
			'Canada/Eastern' => '(GMT-5:00) Canada/Eastern (Eastern Standard Time)',
			'America/Caracas' => '(GMT-4:-30) America/Caracas (Venezuela Time)',
			'America/Anguilla' => '(GMT-4:00) America/Anguilla (Atlantic Standard Time)',
			'America/Antigua' => '(GMT-4:00) America/Antigua (Atlantic Standard Time)',
			'America/Aruba' => '(GMT-4:00) America/Aruba (Atlantic Standard Time)',
			'America/Asuncion' => '(GMT-4:00) America/Asuncion (Paraguay Time)',
			'America/Barbados' => '(GMT-4:00) America/Barbados (Atlantic Standard Time)',
			'America/Blanc-Sablon' => '(GMT-4:00) America/Blanc-Sablon (Atlantic Standard Time)',
			'America/Boa_Vista' => '(GMT-4:00) America/Boa_Vista (Amazon Time)',
			'America/Campo_Grande' => '(GMT-4:00) America/Campo_Grande (Amazon Time)',
			'America/Cuiaba' => '(GMT-4:00) America/Cuiaba (Amazon Time)',
			'America/Curacao' => '(GMT-4:00) America/Curacao (Atlantic Standard Time)',
			'America/Dominica' => '(GMT-4:00) America/Dominica (Atlantic Standard Time)',
			'America/Eirunepe' => '(GMT-4:00) America/Eirunepe (Amazon Time)',
			'America/Glace_Bay' => '(GMT-4:00) America/Glace_Bay (Atlantic Standard Time)',
			'America/Goose_Bay' => '(GMT-4:00) America/Goose_Bay (Atlantic Standard Time)',
			'America/Grenada' => '(GMT-4:00) America/Grenada (Atlantic Standard Time)',
			'America/Guadeloupe' => '(GMT-4:00) America/Guadeloupe (Atlantic Standard Time)',
			'America/Guyana' => '(GMT-4:00) America/Guyana (Guyana Time)',
			'America/Halifax' => '(GMT-4:00) America/Halifax (Atlantic Standard Time)',
			'America/La_Paz' => '(GMT-4:00) America/La_Paz (Bolivia Time)',
			'America/Manaus' => '(GMT-4:00) America/Manaus (Amazon Time)',
			'America/Marigot' => '(GMT-4:00) America/Marigot (Atlantic Standard Time)',
			'America/Martinique' => '(GMT-4:00) America/Martinique (Atlantic Standard Time)',
			'America/Moncton' => '(GMT-4:00) America/Moncton (Atlantic Standard Time)',
			'America/Montserrat' => '(GMT-4:00) America/Montserrat (Atlantic Standard Time)',
			'America/Port_of_Spain' => '(GMT-4:00) America/Port_of_Spain (Atlantic Standard Time)',
			'America/Porto_Acre' => '(GMT-4:00) America/Porto_Acre (Amazon Time)',
			'America/Porto_Velho' => '(GMT-4:00) America/Porto_Velho (Amazon Time)',
			'America/Puerto_Rico' => '(GMT-4:00) America/Puerto_Rico (Atlantic Standard Time)',
			'America/Rio_Branco' => '(GMT-4:00) America/Rio_Branco (Amazon Time)',
			'America/Santiago' => '(GMT-4:00) America/Santiago (Chile Time)',
			'America/Santo_Domingo' => '(GMT-4:00) America/Santo_Domingo (Atlantic Standard Time)',
			'America/St_Barthelemy' => '(GMT-4:00) America/St_Barthelemy (Atlantic Standard Time)',
			'America/St_Kitts' => '(GMT-4:00) America/St_Kitts (Atlantic Standard Time)',
			'America/St_Lucia' => '(GMT-4:00) America/St_Lucia (Atlantic Standard Time)',
			'America/St_Thomas' => '(GMT-4:00) America/St_Thomas (Atlantic Standard Time)',
			'America/St_Vincent' => '(GMT-4:00) America/St_Vincent (Atlantic Standard Time)',
			'America/Thule' => '(GMT-4:00) America/Thule (Atlantic Standard Time)',
			'America/Tortola' => '(GMT-4:00) America/Tortola (Atlantic Standard Time)',
			'America/Virgin' => '(GMT-4:00) America/Virgin (Atlantic Standard Time)',
			'Antarctica/Palmer' => '(GMT-4:00) Antarctica/Palmer (Chile Time)',
			'Atlantic/Bermuda' => '(GMT-4:00) Atlantic/Bermuda (Atlantic Standard Time)',
			'Atlantic/Stanley' => '(GMT-4:00) Atlantic/Stanley (Falkland Is. Time)',
			'Brazil/Acre' => '(GMT-4:00) Brazil/Acre (Amazon Time)',
			'Brazil/West' => '(GMT-4:00) Brazil/West (Amazon Time)',
			'Canada/Atlantic' => '(GMT-4:00) Canada/Atlantic (Atlantic Standard Time)',
			'Chile/Continental' => '(GMT-4:00) Chile/Continental (Chile Time)',
			'America/St_Johns' => '(GMT-3:-30) America/St_Johns (Newfoundland Standard Time)',
			'Canada/Newfoundland' => '(GMT-3:-30) Canada/Newfoundland (Newfoundland Standard Time)',
			'America/Araguaina' => '(GMT-3:00) America/Araguaina (Brasilia Time)',
			'America/Bahia' => '(GMT-3:00) America/Bahia (Brasilia Time)',
			'America/Belem' => '(GMT-3:00) America/Belem (Brasilia Time)',
			'America/Buenos_Aires' => '(GMT-3:00) America/Buenos_Aires (Argentine Time)',
			'America/Catamarca' => '(GMT-3:00) America/Catamarca (Argentine Time)',
			'America/Cayenne' => '(GMT-3:00) America/Cayenne (French Guiana Time)',
			'America/Cordoba' => '(GMT-3:00) America/Cordoba (Argentine Time)',
			'America/Fortaleza' => '(GMT-3:00) America/Fortaleza (Brasilia Time)',
			'America/Godthab' => '(GMT-3:00) America/Godthab (Western Greenland Time)',
			'America/Jujuy' => '(GMT-3:00) America/Jujuy (Argentine Time)',
			'America/Maceio' => '(GMT-3:00) America/Maceio (Brasilia Time)',
			'America/Mendoza' => '(GMT-3:00) America/Mendoza (Argentine Time)',
			'America/Miquelon' => '(GMT-3:00) America/Miquelon (Pierre & Miquelon Standard Time)',
			'America/Montevideo' => '(GMT-3:00) America/Montevideo (Uruguay Time)',
			'America/Paramaribo' => '(GMT-3:00) America/Paramaribo (Suriname Time)',
			'America/Recife' => '(GMT-3:00) America/Recife (Brasilia Time)',
			'America/Rosario' => '(GMT-3:00) America/Rosario (Argentine Time)',
			'America/Santarem' => '(GMT-3:00) America/Santarem (Brasilia Time)',
			'America/Sao_Paulo' => '(GMT-3:00) America/Sao_Paulo (Brasilia Time)',
			'Antarctica/Rothera' => '(GMT-3:00) Antarctica/Rothera (Rothera Time)',
			'Brazil/East' => '(GMT-3:00) Brazil/East (Brasilia Time)',
			'America/Noronha' => '(GMT-2:00) America/Noronha (Fernando de Noronha Time)',
			'Atlantic/South_Georgia' => '(GMT-2:00) Atlantic/South_Georgia (South Georgia Standard Time)',
			'Brazil/DeNoronha' => '(GMT-2:00) Brazil/DeNoronha (Fernando de Noronha Time)',
			'America/Scoresbysund' => '(GMT-1:00) America/Scoresbysund (Eastern Greenland Time)',
			'Atlantic/Azores' => '(GMT-1:00) Atlantic/Azores (Azores Time)',
			'Atlantic/Cape_Verde' => '(GMT-1:00) Atlantic/Cape_Verde (Cape Verde Time)',
			'Africa/Abidjan' => '(GMT+0:00) Africa/Abidjan (Greenwich Mean Time)',
			'Africa/Accra' => '(GMT+0:00) Africa/Accra (Ghana Mean Time)',
			'Africa/Bamako' => '(GMT+0:00) Africa/Bamako (Greenwich Mean Time)',
			'Africa/Banjul' => '(GMT+0:00) Africa/Banjul (Greenwich Mean Time)',
			'Africa/Bissau' => '(GMT+0:00) Africa/Bissau (Greenwich Mean Time)',
			'Africa/Casablanca' => '(GMT+0:00) Africa/Casablanca (Western European Time)',
			'Africa/Conakry' => '(GMT+0:00) Africa/Conakry (Greenwich Mean Time)',
			'Africa/Dakar' => '(GMT+0:00) Africa/Dakar (Greenwich Mean Time)',
			'Africa/El_Aaiun' => '(GMT+0:00) Africa/El_Aaiun (Western European Time)',
			'Africa/Freetown' => '(GMT+0:00) Africa/Freetown (Greenwich Mean Time)',
			'Africa/Lome' => '(GMT+0:00) Africa/Lome (Greenwich Mean Time)',
			'Africa/Monrovia' => '(GMT+0:00) Africa/Monrovia (Greenwich Mean Time)',
			'Africa/Nouakchott' => '(GMT+0:00) Africa/Nouakchott (Greenwich Mean Time)',
			'Africa/Ouagadougou' => '(GMT+0:00) Africa/Ouagadougou (Greenwich Mean Time)',
			'Africa/Sao_Tome' => '(GMT+0:00) Africa/Sao_Tome (Greenwich Mean Time)',
			'Africa/Timbuktu' => '(GMT+0:00) Africa/Timbuktu (Greenwich Mean Time)',
			'America/Danmarkshavn' => '(GMT+0:00) America/Danmarkshavn (Greenwich Mean Time)',
			'Atlantic/Canary' => '(GMT+0:00) Atlantic/Canary (Western European Time)',
			'Atlantic/Faeroe' => '(GMT+0:00) Atlantic/Faeroe (Western European Time)',
			'Atlantic/Faroe' => '(GMT+0:00) Atlantic/Faroe (Western European Time)',
			'Atlantic/Madeira' => '(GMT+0:00) Atlantic/Madeira (Western European Time)',
			'Atlantic/Reykjavik' => '(GMT+0:00) Atlantic/Reykjavik (Greenwich Mean Time)',
			'Atlantic/St_Helena' => '(GMT+0:00) Atlantic/St_Helena (Greenwich Mean Time)',
			'Europe/Belfast' => '(GMT+0:00) Europe/Belfast (Greenwich Mean Time)',
			'Europe/Dublin' => '(GMT+0:00) Europe/Dublin (Greenwich Mean Time)',
			'Europe/Guernsey' => '(GMT+0:00) Europe/Guernsey (Greenwich Mean Time)',
			'Europe/Isle_of_Man' => '(GMT+0:00) Europe/Isle_of_Man (Greenwich Mean Time)',
			'Europe/Jersey' => '(GMT+0:00) Europe/Jersey (Greenwich Mean Time)',
			'Europe/Lisbon' => '(GMT+0:00) Europe/Lisbon (Western European Time)',
			'Europe/London' => '(GMT+0:00) Europe/London (Greenwich Mean Time)',
			'Africa/Algiers' => '(GMT+1:00) Africa/Algiers (Central European Time)',
			'Africa/Bangui' => '(GMT+1:00) Africa/Bangui (Western African Time)',
			'Africa/Brazzaville' => '(GMT+1:00) Africa/Brazzaville (Western African Time)',
			'Africa/Ceuta' => '(GMT+1:00) Africa/Ceuta (Central European Time)',
			'Africa/Douala' => '(GMT+1:00) Africa/Douala (Western African Time)',
			'Africa/Kinshasa' => '(GMT+1:00) Africa/Kinshasa (Western African Time)',
			'Africa/Lagos' => '(GMT+1:00) Africa/Lagos (Western African Time)',
			'Africa/Libreville' => '(GMT+1:00) Africa/Libreville (Western African Time)',
			'Africa/Luanda' => '(GMT+1:00) Africa/Luanda (Western African Time)',
			'Africa/Malabo' => '(GMT+1:00) Africa/Malabo (Western African Time)',
			'Africa/Ndjamena' => '(GMT+1:00) Africa/Ndjamena (Western African Time)',
			'Africa/Niamey' => '(GMT+1:00) Africa/Niamey (Western African Time)',
			'Africa/Porto-Novo' => '(GMT+1:00) Africa/Porto-Novo (Western African Time)',
			'Africa/Tunis' => '(GMT+1:00) Africa/Tunis (Central European Time)',
			'Africa/Windhoek' => '(GMT+1:00) Africa/Windhoek (Western African Time)',
			'Arctic/Longyearbyen' => '(GMT+1:00) Arctic/Longyearbyen (Central European Time)',
			'Atlantic/Jan_Mayen' => '(GMT+1:00) Atlantic/Jan_Mayen (Central European Time)',
			'Europe/Amsterdam' => '(GMT+1:00) Europe/Amsterdam (Central European Time)',
			'Europe/Andorra' => '(GMT+1:00) Europe/Andorra (Central European Time)',
			'Europe/Belgrade' => '(GMT+1:00) Europe/Belgrade (Central European Time)',
			'Europe/Berlin' => '(GMT+1:00) Europe/Berlin (Central European Time)',
			'Europe/Bratislava' => '(GMT+1:00) Europe/Bratislava (Central European Time)',
			'Europe/Brussels' => '(GMT+1:00) Europe/Brussels (Central European Time)',
			'Europe/Budapest' => '(GMT+1:00) Europe/Budapest (Central European Time)',
			'Europe/Copenhagen' => '(GMT+1:00) Europe/Copenhagen (Central European Time)',
			'Europe/Gibraltar' => '(GMT+1:00) Europe/Gibraltar (Central European Time)',
			'Europe/Ljubljana' => '(GMT+1:00) Europe/Ljubljana (Central European Time)',
			'Europe/Luxembourg' => '(GMT+1:00) Europe/Luxembourg (Central European Time)',
			'Europe/Madrid' => '(GMT+1:00) Europe/Madrid (Central European Time)',
			'Europe/Malta' => '(GMT+1:00) Europe/Malta (Central European Time)',
			'Europe/Monaco' => '(GMT+1:00) Europe/Monaco (Central European Time)',
			'Europe/Oslo' => '(GMT+1:00) Europe/Oslo (Central European Time)',
			'Europe/Paris' => '(GMT+1:00) Europe/Paris (Central European Time)',
			'Europe/Podgorica' => '(GMT+1:00) Europe/Podgorica (Central European Time)',
			'Europe/Prague' => '(GMT+1:00) Europe/Prague (Central European Time)',
			'Europe/Rome' => '(GMT+1:00) Europe/Rome (Central European Time)',
			'Europe/San_Marino' => '(GMT+1:00) Europe/San_Marino (Central European Time)',
			'Europe/Sarajevo' => '(GMT+1:00) Europe/Sarajevo (Central European Time)',
			'Europe/Skopje' => '(GMT+1:00) Europe/Skopje (Central European Time)',
			'Europe/Stockholm' => '(GMT+1:00) Europe/Stockholm (Central European Time)',
			'Europe/Tirane' => '(GMT+1:00) Europe/Tirane (Central European Time)',
			'Europe/Vaduz' => '(GMT+1:00) Europe/Vaduz (Central European Time)',
			'Europe/Vatican' => '(GMT+1:00) Europe/Vatican (Central European Time)',
			'Europe/Vienna' => '(GMT+1:00) Europe/Vienna (Central European Time)',
			'Europe/Warsaw' => '(GMT+1:00) Europe/Warsaw (Central European Time)',
			'Europe/Zagreb' => '(GMT+1:00) Europe/Zagreb (Central European Time)',
			'Europe/Zurich' => '(GMT+1:00) Europe/Zurich (Central European Time)',
			'Africa/Blantyre' => '(GMT+2:00) Africa/Blantyre (Central African Time)',
			'Africa/Bujumbura' => '(GMT+2:00) Africa/Bujumbura (Central African Time)',
			'Africa/Cairo' => '(GMT+2:00) Africa/Cairo (Eastern European Time)',
			'Africa/Gaborone' => '(GMT+2:00) Africa/Gaborone (Central African Time)',
			'Africa/Harare' => '(GMT+2:00) Africa/Harare (Central African Time)',
			'Africa/Johannesburg' => '(GMT+2:00) Africa/Johannesburg (South Africa Standard Time)',
			'Africa/Kigali' => '(GMT+2:00) Africa/Kigali (Central African Time)',
			'Africa/Lubumbashi' => '(GMT+2:00) Africa/Lubumbashi (Central African Time)',
			'Africa/Lusaka' => '(GMT+2:00) Africa/Lusaka (Central African Time)',
			'Africa/Maputo' => '(GMT+2:00) Africa/Maputo (Central African Time)',
			'Africa/Maseru' => '(GMT+2:00) Africa/Maseru (South Africa Standard Time)',
			'Africa/Mbabane' => '(GMT+2:00) Africa/Mbabane (South Africa Standard Time)',
			'Africa/Tripoli' => '(GMT+2:00) Africa/Tripoli (Eastern European Time)',
			'Asia/Amman' => '(GMT+2:00) Asia/Amman (Eastern European Time)',
			'Asia/Beirut' => '(GMT+2:00) Asia/Beirut (Eastern European Time)',
			'Asia/Damascus' => '(GMT+2:00) Asia/Damascus (Eastern European Time)',
			'Asia/Gaza' => '(GMT+2:00) Asia/Gaza (Eastern European Time)',
			'Asia/Istanbul' => '(GMT+2:00) Asia/Istanbul (Eastern European Time)',
			'Asia/Jerusalem' => '(GMT+2:00) Asia/Jerusalem (Israel Standard Time)',
			'Asia/Nicosia' => '(GMT+2:00) Asia/Nicosia (Eastern European Time)',
			'Asia/Tel_Aviv' => '(GMT+2:00) Asia/Tel_Aviv (Israel Standard Time)',
			'Europe/Athens' => '(GMT+2:00) Europe/Athens (Eastern European Time)',
			'Europe/Bucharest' => '(GMT+2:00) Europe/Bucharest (Eastern European Time)',
			'Europe/Chisinau' => '(GMT+2:00) Europe/Chisinau (Eastern European Time)',
			'Europe/Helsinki' => '(GMT+2:00) Europe/Helsinki (Eastern European Time)',
			'Europe/Istanbul' => '(GMT+2:00) Europe/Istanbul (Eastern European Time)',
			'Europe/Kaliningrad' => '(GMT+2:00) Europe/Kaliningrad (Eastern European Time)',
			'Europe/Kiev' => '(GMT+2:00) Europe/Kiev (Eastern European Time)',
			'Europe/Mariehamn' => '(GMT+2:00) Europe/Mariehamn (Eastern European Time)',
			'Europe/Minsk' => '(GMT+2:00) Europe/Minsk (Eastern European Time)',
			'Europe/Nicosia' => '(GMT+2:00) Europe/Nicosia (Eastern European Time)',
			'Europe/Riga' => '(GMT+2:00) Europe/Riga (Eastern European Time)',
			'Europe/Simferopol' => '(GMT+2:00) Europe/Simferopol (Eastern European Time)',
			'Europe/Sofia' => '(GMT+2:00) Europe/Sofia (Eastern European Time)',
			'Europe/Tallinn' => '(GMT+2:00) Europe/Tallinn (Eastern European Time)',
			'Europe/Tiraspol' => '(GMT+2:00) Europe/Tiraspol (Eastern European Time)',
			'Europe/Uzhgorod' => '(GMT+2:00) Europe/Uzhgorod (Eastern European Time)',
			'Europe/Vilnius' => '(GMT+2:00) Europe/Vilnius (Eastern European Time)',
			'Europe/Zaporozhye' => '(GMT+2:00) Europe/Zaporozhye (Eastern European Time)',
			'Africa/Addis_Ababa' => '(GMT+3:00) Africa/Addis_Ababa (Eastern African Time)',
			'Africa/Asmara' => '(GMT+3:00) Africa/Asmara (Eastern African Time)',
			'Africa/Asmera' => '(GMT+3:00) Africa/Asmera (Eastern African Time)',
			'Africa/Dar_es_Salaam' => '(GMT+3:00) Africa/Dar_es_Salaam (Eastern African Time)',
			'Africa/Djibouti' => '(GMT+3:00) Africa/Djibouti (Eastern African Time)',
			'Africa/Kampala' => '(GMT+3:00) Africa/Kampala (Eastern African Time)',
			'Africa/Khartoum' => '(GMT+3:00) Africa/Khartoum (Eastern African Time)',
			'Africa/Mogadishu' => '(GMT+3:00) Africa/Mogadishu (Eastern African Time)',
			'Africa/Nairobi' => '(GMT+3:00) Africa/Nairobi (Eastern African Time)',
			'Antarctica/Syowa' => '(GMT+3:00) Antarctica/Syowa (Syowa Time)',
			'Asia/Aden' => '(GMT+3:00) Asia/Aden (Arabia Standard Time)',
			'Asia/Baghdad' => '(GMT+3:00) Asia/Baghdad (Arabia Standard Time)',
			'Asia/Bahrain' => '(GMT+3:00) Asia/Bahrain (Arabia Standard Time)',
			'Asia/Kuwait' => '(GMT+3:00) Asia/Kuwait (Arabia Standard Time)',
			'Asia/Qatar' => '(GMT+3:00) Asia/Qatar (Arabia Standard Time)',
			'Europe/Moscow' => '(GMT+3:00) Europe/Moscow (Moscow Standard Time)',
			'Europe/Volgograd' => '(GMT+3:00) Europe/Volgograd (Volgograd Time)',
			'Indian/Antananarivo' => '(GMT+3:00) Indian/Antananarivo (Eastern African Time)',
			'Indian/Comoro' => '(GMT+3:00) Indian/Comoro (Eastern African Time)',
			'Indian/Mayotte' => '(GMT+3:00) Indian/Mayotte (Eastern African Time)',
			'Asia/Tehran' => '(GMT+3:30) Asia/Tehran (Iran Standard Time)',
			'Asia/Baku' => '(GMT+4:00) Asia/Baku (Azerbaijan Time)',
			'Asia/Dubai' => '(GMT+4:00) Asia/Dubai (Gulf Standard Time)',
			'Asia/Muscat' => '(GMT+4:00) Asia/Muscat (Gulf Standard Time)',
			'Asia/Tbilisi' => '(GMT+4:00) Asia/Tbilisi (Georgia Time)',
			'Asia/Yerevan' => '(GMT+4:00) Asia/Yerevan (Armenia Time)',
			'Europe/Samara' => '(GMT+4:00) Europe/Samara (Samara Time)',
			'Indian/Mahe' => '(GMT+4:00) Indian/Mahe (Seychelles Time)',
			'Indian/Mauritius' => '(GMT+4:00) Indian/Mauritius (Mauritius Time)',
			'Indian/Reunion' => '(GMT+4:00) Indian/Reunion (Reunion Time)',
			'Asia/Kabul' => '(GMT+4:30) Asia/Kabul (Afghanistan Time)',
			'Asia/Aqtau' => '(GMT+5:00) Asia/Aqtau (Aqtau Time)',
			'Asia/Aqtobe' => '(GMT+5:00) Asia/Aqtobe (Aqtobe Time)',
			'Asia/Ashgabat' => '(GMT+5:00) Asia/Ashgabat (Turkmenistan Time)',
			'Asia/Ashkhabad' => '(GMT+5:00) Asia/Ashkhabad (Turkmenistan Time)',
			'Asia/Dushanbe' => '(GMT+5:00) Asia/Dushanbe (Tajikistan Time)',
			'Asia/Karachi' => '(GMT+5:00) Asia/Karachi (Pakistan Time)',
			'Asia/Oral' => '(GMT+5:00) Asia/Oral (Oral Time)',
			'Asia/Samarkand' => '(GMT+5:00) Asia/Samarkand (Uzbekistan Time)',
			'Asia/Tashkent' => '(GMT+5:00) Asia/Tashkent (Uzbekistan Time)',
			'Asia/Yekaterinburg' => '(GMT+5:00) Asia/Yekaterinburg (Yekaterinburg Time)',
			'Indian/Kerguelen' => '(GMT+5:00) Indian/Kerguelen (French Southern & Antarctic Lands Time)',
			'Indian/Maldives' => '(GMT+5:00) Indian/Maldives (Maldives Time)',
			'Asia/Calcutta' => '(GMT+5:30) Asia/Calcutta (India Standard Time)',
			'Asia/Colombo' => '(GMT+5:30) Asia/Colombo (India Standard Time)',
			'Asia/Kolkata' => '(GMT+5:30) Asia/Kolkata (India Standard Time)',
			'Asia/Katmandu' => '(GMT+5:45) Asia/Katmandu (Nepal Time)',
			'Antarctica/Mawson' => '(GMT+6:00) Antarctica/Mawson (Mawson Time)',
			'Antarctica/Vostok' => '(GMT+6:00) Antarctica/Vostok (Vostok Time)',
			'Asia/Almaty' => '(GMT+6:00) Asia/Almaty (Alma-Ata Time)',
			'Asia/Bishkek' => '(GMT+6:00) Asia/Bishkek (Kirgizstan Time)',
			'Asia/Dacca' => '(GMT+6:00) Asia/Dacca (Bangladesh Time)',
			'Asia/Dhaka' => '(GMT+6:00) Asia/Dhaka (Bangladesh Time)',
			'Asia/Novosibirsk' => '(GMT+6:00) Asia/Novosibirsk (Novosibirsk Time)',
			'Asia/Omsk' => '(GMT+6:00) Asia/Omsk (Omsk Time)',
			'Asia/Qyzylorda' => '(GMT+6:00) Asia/Qyzylorda (Qyzylorda Time)',
			'Asia/Thimbu' => '(GMT+6:00) Asia/Thimbu (Bhutan Time)',
			'Asia/Thimphu' => '(GMT+6:00) Asia/Thimphu (Bhutan Time)',
			'Indian/Chagos' => '(GMT+6:00) Indian/Chagos (Indian Ocean Territory Time)',
			'Asia/Rangoon' => '(GMT+6:30) Asia/Rangoon (Myanmar Time)',
			'Indian/Cocos' => '(GMT+6:30) Indian/Cocos (Cocos Islands Time)',
			'Antarctica/Davis' => '(GMT+7:00) Antarctica/Davis (Davis Time)',
			'Asia/Bangkok' => '(GMT+7:00) Asia/Bangkok (Indochina Time)',
			'Asia/Ho_Chi_Minh' => '(GMT+7:00) Asia/Ho_Chi_Minh (Indochina Time)',
			'Asia/Hovd' => '(GMT+7:00) Asia/Hovd (Hovd Time)',
			'Asia/Jakarta' => '(GMT+7:00) Asia/Jakarta (West Indonesia Time)',
			'Asia/Krasnoyarsk' => '(GMT+7:00) Asia/Krasnoyarsk (Krasnoyarsk Time)',
			'Asia/Phnom_Penh' => '(GMT+7:00) Asia/Phnom_Penh (Indochina Time)',
			'Asia/Pontianak' => '(GMT+7:00) Asia/Pontianak (West Indonesia Time)',
			'Asia/Saigon' => '(GMT+7:00) Asia/Saigon (Indochina Time)',
			'Asia/Vientiane' => '(GMT+7:00) Asia/Vientiane (Indochina Time)',
			'Indian/Christmas' => '(GMT+7:00) Indian/Christmas (Christmas Island Time)',
			'Antarctica/Casey' => '(GMT+8:00) Antarctica/Casey (Western Standard Time (Australia))',
			'Asia/Brunei' => '(GMT+8:00) Asia/Brunei (Brunei Time)',
			'Asia/Choibalsan' => '(GMT+8:00) Asia/Choibalsan (Choibalsan Time)',
			'Asia/Chongqing' => '(GMT+8:00) Asia/Chongqing (China Standard Time)',
			'Asia/Chungking' => '(GMT+8:00) Asia/Chungking (China Standard Time)',
			'Asia/Harbin' => '(GMT+8:00) Asia/Harbin (China Standard Time)',
			'Asia/Hong_Kong' => '(GMT+8:00) Asia/Hong_Kong (Hong Kong Time)',
			'Asia/Irkutsk' => '(GMT+8:00) Asia/Irkutsk (Irkutsk Time)',
			'Asia/Kashgar' => '(GMT+8:00) Asia/Kashgar (China Standard Time)',
			'Asia/Kuala_Lumpur' => '(GMT+8:00) Asia/Kuala_Lumpur (Malaysia Time)',
			'Asia/Kuching' => '(GMT+8:00) Asia/Kuching (Malaysia Time)',
			'Asia/Macao' => '(GMT+8:00) Asia/Macao (China Standard Time)',
			'Asia/Macau' => '(GMT+8:00) Asia/Macau (China Standard Time)',
			'Asia/Makassar' => '(GMT+8:00) Asia/Makassar (Central Indonesia Time)',
			'Asia/Manila' => '(GMT+8:00) Asia/Manila (Philippines Time)',
			'Asia/Shanghai' => '(GMT+8:00) Asia/Shanghai (China Standard Time)',
			'Asia/Singapore' => '(GMT+8:00) Asia/Singapore (Singapore Time)',
			'Asia/Taipei' => '(GMT+8:00) Asia/Taipei (China Standard Time)',
			'Asia/Ujung_Pandang' => '(GMT+8:00) Asia/Ujung_Pandang (Central Indonesia Time)',
			'Asia/Ulaanbaatar' => '(GMT+8:00) Asia/Ulaanbaatar (Ulaanbaatar Time)',
			'Asia/Ulan_Bator' => '(GMT+8:00) Asia/Ulan_Bator (Ulaanbaatar Time)',
			'Asia/Urumqi' => '(GMT+8:00) Asia/Urumqi (China Standard Time)',
			'Australia/Perth' => '(GMT+8:00) Australia/Perth (Western Standard Time (Australia))',
			'Australia/West' => '(GMT+8:00) Australia/West (Western Standard Time (Australia))',
			'Australia/Eucla' => '(GMT+8:45) Australia/Eucla (Central Western Standard Time (Australia))',
			'Asia/Dili' => '(GMT+9:00) Asia/Dili (Timor-Leste Time)',
			'Asia/Jayapura' => '(GMT+9:00) Asia/Jayapura (East Indonesia Time)',
			'Asia/Pyongyang' => '(GMT+9:00) Asia/Pyongyang (Korea Standard Time)',
			'Asia/Seoul' => '(GMT+9:00) Asia/Seoul (Korea Standard Time)',
			'Asia/Tokyo' => '(GMT+9:00) Asia/Tokyo (Japan Standard Time)',
			'Asia/Yakutsk' => '(GMT+9:00) Asia/Yakutsk (Yakutsk Time)',
			'Australia/Adelaide' => '(GMT+9:30) Australia/Adelaide (Central Standard Time (South Australia))',
			'Australia/Broken_Hill' => '(GMT+9:30) Australia/Broken_Hill (Central Standard Time (South Australia/New South Wales))',
			'Australia/Darwin' => '(GMT+9:30) Australia/Darwin (Central Standard Time (Northern Territory))',
			'Australia/North' => '(GMT+9:30) Australia/North (Central Standard Time (Northern Territory))',
			'Australia/South' => '(GMT+9:30) Australia/South (Central Standard Time (South Australia))',
			'Australia/Yancowinna' => '(GMT+9:30) Australia/Yancowinna (Central Standard Time (South Australia/New South Wales))',
			'Antarctica/DumontDUrville' => '(GMT+10:00) Antarctica/DumontDUrville (Dumont-d\'Urville Time)',
			'Asia/Sakhalin' => '(GMT+10:00) Asia/Sakhalin (Sakhalin Time)',
			'Asia/Vladivostok' => '(GMT+10:00) Asia/Vladivostok (Vladivostok Time)',
			'Australia/ACT' => '(GMT+10:00) Australia/ACT (Eastern Standard Time (New South Wales))',
			'Australia/Brisbane' => '(GMT+10:00) Australia/Brisbane (Eastern Standard Time (Queensland))',
			'Australia/Canberra' => '(GMT+10:00) Australia/Canberra (Eastern Standard Time (New South Wales))',
			'Australia/Currie' => '(GMT+10:00) Australia/Currie (Eastern Standard Time (New South Wales))',
			'Australia/Hobart' => '(GMT+10:00) Australia/Hobart (Eastern Standard Time (Tasmania))',
			'Australia/Lindeman' => '(GMT+10:00) Australia/Lindeman (Eastern Standard Time (Queensland))',
			'Australia/Melbourne' => '(GMT+10:00) Australia/Melbourne (Eastern Standard Time (Victoria))',
			'Australia/NSW' => '(GMT+10:00) Australia/NSW (Eastern Standard Time (New South Wales))',
			'Australia/Queensland' => '(GMT+10:00) Australia/Queensland (Eastern Standard Time (Queensland))',
			'Australia/Sydney' => '(GMT+10:00) Australia/Sydney (Eastern Standard Time (New South Wales))',
			'Australia/Tasmania' => '(GMT+10:00) Australia/Tasmania (Eastern Standard Time (Tasmania))',
			'Australia/Victoria' => '(GMT+10:00) Australia/Victoria (Eastern Standard Time (Victoria))',
			'Australia/LHI' => '(GMT+10:30) Australia/LHI (Lord Howe Standard Time)',
			'Australia/Lord_Howe' => '(GMT+10:30) Australia/Lord_Howe (Lord Howe Standard Time)',
			'Asia/Magadan' => '(GMT+11:00) Asia/Magadan (Magadan Time)',
			'Antarctica/McMurdo' => '(GMT+12:00) Antarctica/McMurdo (New Zealand Standard Time)',
			'Antarctica/South_Pole' => '(GMT+12:00) Antarctica/South_Pole (New Zealand Standard Time)',
			'Asia/Anadyr' => '(GMT+12:00) Asia/Anadyr (Anadyr Time)',
			'Asia/Kamchatka' => '(GMT+12:00) Asia/Kamchatka (Petropavlovsk-Kamchatski Time)'
		);

		$html = '<option value="">Select Timezone</option>';
		foreach($timezones as $keys => $values)
		{
			$html .= '<option value="'.$keys.'">'.$values.'</option>';
		}
		
		return $html;
	}

?>


admin_login.php


In Library Management System, Admin can Login from this page. Under this file, we have use PHP script from validate Admin login details and once login details is correct then it will redirect web page to Admin area. So here for validate Admin Login, we have store admin_id value under $_SESSION variable, which we can access from any web page for check admin has login or not under this system.


<?php

//admin_login.php


include 'database_connection.php';

include 'function.php';


$message = '';

if(isset($_POST["login_button"]))
{

	$formdata = array();

	if(empty($_POST["admin_email"]))
	{
		$message .= '<li>Email Address is required</li>';
	}
	else
	{
		if(!filter_var($_POST["admin_email"], FILTER_VALIDATE_EMAIL))
		{
			$message .= '<li>Invalid Email Address</li>';
		}
		else
		{
			$formdata['admin_email'] = $_POST['admin_email'];
		}
	}

	if(empty($_POST['admin_password']))
	{
		$message .= '<li>Password is required</li>';
	}
	else
	{
		$formdata['admin_password'] = $_POST['admin_password'];
	}

	if($message == '')
	{
		$data = array(
			':admin_email'		=>	$formdata['admin_email']
		);

		$query = "
		SELECT * FROM lms_admin 
        WHERE admin_email = :admin_email
		";

		$statement = $connect->prepare($query);

		$statement->execute($data);

		if($statement->rowCount() > 0)
		{
			foreach($statement->fetchAll() as $row)
			{
				if($row['admin_password'] == $formdata['admin_password'])
				{
					$_SESSION['admin_id'] = $row['admin_id'];

					header('location:admin/index.php');
				}
				else
				{
					$message = '<li>Wrong Password</li>';
				}
			}
		}	
		else
		{
			$message = '<li>Wrong Email Address</li>';
		}
	}

}

include 'header.php';

?>

<div class="d-flex align-items-center justify-content-center" style="min-height:700px;">

	<div class="col-md-6">

		<?php 
		if($message != '')
		{
			echo '<div class="alert alert-danger"><ul>'.$message.'</ul></div>';
		}
		?>

		<div class="card">

			<div class="card-header">Admin Login</div>

			<div class="card-body">

				<form method="POST">

					<div class="mb-3">
						<label class="form-label">Email address</label>

						<input type="text" name="admin_email" id="admin_email" class="form-control" />

					</div>

					<div class="mb-3">
						<label class="form-label">Password</label>

						<input type="password" name="admin_password" id="admin_password" class="form-control" />

					</div>

					<div class="d-flex align-items-center justify-content-between mt-4 mb-0">

						<input type="submit" name="login_button" class="btn btn-primary" value="Login" />

					</div>

				</form>

			</div>

		</div>

	</div>

</div>

<?php

include 'footer.php';

?>


admin/index.php


This is main index page of Admin, and here we have check admin has been login or not. If Admin is not login then it will be directly redirect to admin_login.php file. But if Admin has login under this system, then Admin can access any web page of this Library Management system.


<?php

//index.php

include '../database_connection.php';

include '../function.php';

if(!is_admin_login())
{
	header('location:../admin_login.php');
}


include '../header.php';

?>

<?php

include '../footer.php';

?>


admin/logout.php


If Admin has click on logout link, then this page code has been execute, and under this page, it has delete all $_SESSION variable value by using session_destroy() function and after this it will redirect to admin_login.php file.


<?php

//logout.php

session_start();

session_destroy();

header('location:../admin_login.php');

?>


admin/profile.php


Under this "admin/profile.php" file, admin can change his or her login details like email address or password details. This web page only access by admin only and when admin has click on profile link then this "admin/profile.php" web page has been load in browser and admin can change their login details.


<?php

//profile.php

include '../database_connection.php';

include '../function.php';

if(!is_admin_login())
{
	header('location:../admin_login.php');
}

$message = '';

$error = '';

if(isset($_POST['edit_admin']))
{

	$formdata = array();

	if(empty($_POST['admin_email']))
	{
		$error .= '<li>Email Address is required</li>';
	}
	else
	{
		if(!filter_var($_POST["admin_email"], FILTER_VALIDATE_EMAIL))
		{
			$error .= '<li>Invalid Email Address</li>';
		}
		else
		{
			$formdata['admin_email'] = $_POST['admin_email'];
		}
	}

	if(empty($_POST['admin_password']))
	{
		$error .= '<li>Password is required</li>';
	}
	else
	{
		$formdata['admin_password'] = $_POST['admin_password'];
	}

	if($error == '')
	{
		$admin_id = $_SESSION['admin_id'];

		$data = array(
			':admin_email'		=>	$formdata['admin_email'],
			':admin_password'	=>	$formdata['admin_password'],
			':admin_id'			=>	$admin_id
		);

		$query = "
		UPDATE lms_admin 
            SET admin_email = :admin_email,
            admin_password = :admin_password 
            WHERE admin_id = :admin_id
		";

		$statement = $connect->prepare($query);

		$statement->execute($data);

		$message = 'User Data Edited';
	}
}

$query = "
	SELECT * FROM lms_admin 
    WHERE admin_id = '".$_SESSION["admin_id"]."'
";

$result = $connect->query($query);


include '../header.php';

?>

<div class="container-fluid px-4">
	<h1 class="mt-4">Profile</h1>
	<ol class="breadcrumb mt-4 mb-4 bg-light p-2 border">
		<li class="breadcrumb-item"><a href="index.php">Dashboard</a></li>
		<li class="breadcrumb-item active">Profile</a></li>
	</ol>
	<div class="row">
		<div class="col-md-6">
			<?php 

			if($error != '')
			{
				echo '<div class="alert alert-danger alert-dismissible fade show" role="alert"><ul class="list-unstyled">'.$error.'</ul> <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button></div>';
			}

			if($message != '')
			{
				echo '<div class="alert alert-success alert-dismissible fade show" role="alert">'.$message.' <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button></div>';
			}

			?>
			<div class="card mb-4">
				<div class="card-header">
					<i class="fas fa-user-edit"></i> Edit Profile Details
				</div>
				<div class="card-body">

				<?php 

				foreach($result as $row)
				{
				?>

					<form method="post">
						<div class="mb-3">
							<label class="form-label">Email Address</label>
							<input type="text" name="admin_email" id="admin_email" class="form-control" value="<?php echo $row['admin_email']; ?>" />
						</div>
						<div class="mb-3">
							<label class="form-label">Password</label>
							<input type="password" name="admin_password" id="admin_password" class="form-control" value="<?php echo $row['admin_password']; ?>" />
						</div>
						<div class="mt-4 mb-0">
							<input type="submit" name="edit_admin" class="btn btn-primary" value="Edit" />
						</div>
					</form>

				<?php 
				}

				?>

				</div>
			</div>

		</div>
	</div>
</div>

<?php 

include '../footer.php';

?>





admin/setting.php


This setting page Admin can access from admin area and this page will be only access by Admin. The main functionality of this Setting page is that Admin can set library basic details like name, address, contact number and email address, and library function details like how many books must be issued to single user, in how many day user has to return book, what is the fine for one day for late return book, and how many books at a time single user can issue. So this all detail admin can set by this setting page and this feature has convert static library system to dynamic library management system.


<?php

//setting.php

include '../database_connection.php';

include '../function.php';

if(!is_admin_login())
{
	header('location:../admin_login.php');
}

$message = '';

if(isset($_POST['edit_setting']))
{
	$data = array(
		':library_name'					=>	$_POST['library_name'],
		':library_address'				=>	$_POST['library_address'],
		':library_contact_number'		=>	$_POST['library_contact_number'],
		':library_email_address'		=>	$_POST['library_email_address'],
		':library_total_book_issue_day'	=>	$_POST['library_total_book_issue_day'],
		':library_one_day_fine'			=>	$_POST['library_one_day_fine'],
		':library_currency'				=>	$_POST['library_currency'],
		':library_timezone'				=>	$_POST['library_timezone'],
		':library_issue_total_book_per_user'	=>	$_POST['library_issue_total_book_per_user']
	);

	$query = "
	UPDATE lms_setting 
        SET library_name = :library_name,
        library_address = :library_address, 
        library_contact_number = :library_contact_number, 
        library_email_address = :library_email_address, 
        library_total_book_issue_day = :library_total_book_issue_day, 
        library_one_day_fine = :library_one_day_fine, 
        library_currency = :library_currency, 
        library_timezone = :library_timezone, 
        library_issue_total_book_per_user = :library_issue_total_book_per_user
	";

	$statement = $connect->prepare($query);

	$statement->execute($data);

	$message = '
	<div class="alert alert-success alert-dismissible fade show" role="alert">Data Edited <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button></div>
	';
}

$query = "
SELECT * FROM lms_setting 
LIMIT 1
";

$result = $connect->query($query);

include '../header.php';

?>

<div class="container-fluid px-4">
	<h1 class="mt-4">Setting</h1>

	<ol class="breadcrumb mt-4 mb-4 bg-light p-2 border">
		<li class="breadcrumb-item"><a href="index.php">Dashboard</a></li>
		<li class="breadcrumb-item active">Setting</a></li>
	</ol>
	<?php 

	if($message != '')	
	{
		echo $message;
	}

	?>
	<div class="card mb-4">
		<div class="card-header">
			<i class="fas fa-user-edit"></i> Library Setting
		</div>
		<div class="card-body">

			<form method="post">
				<?php 
				foreach($result as $row)
				{
				?>
				<div class="row">
					<div class="col-md-12">
						<div class="mb-3">
							<label class="form-label">Library Name</label>
							<input type="text" name="library_name" id="library_name" class="form-control" value="<?php echo $row['library_name']; ?>" />
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<div class="mb-3">
							<label class="form-label">Address</label>
							<textarea name="library_address" id="library_address" class="form-control"><?php echo $row["library_address"]; ?></textarea>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-6">
						<div class="mb-3">
							<label class="form-label">Contact Number</label>
							<input type="text" name="library_contact_number" id="library_contact_number" class="form-control" value="<?php echo $row['library_contact_number']; ?>" />
						</div>
					</div>
					<div class="col-md-6">
						<div class="mb-3">
							<label class="form-label">Email Address</label>
							<input type="text" name="library_email_address" id="library_email_address" class="form-control" value="<?php echo $row['library_email_address']; ?>" />
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-6">
						<div class="mb-3">
							<label class="form-label">Book Return Day Limit</label>
							<input type="number" name="library_total_book_issue_day" id="library_total_book_issue_day" class="form-control" value="<?php echo $row['library_total_book_issue_day']; ?>" />
						</div>
					</div>
					<div class="col-md-6">
						<div class="mb-3">
							<label class="form-label">Book Late Return One Day Fine</label>
							<input type="number" name="library_one_day_fine" id="library_one_day_fine" class="form-control" value="<?php echo $row['library_one_day_fine']; ?>" />
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-6">
						<div class="mb-3">
							<label class="form-label">Currency</label>
							<select name="library_currency" id="library_currency" class="form-control">
								<?php echo Currency_list(); ?>
							</select>
						</div>
					</div>
					<div class="col-md-6">
						<div class="mb-3">
							<label class="form-label">Timezone</label>
							<select name="library_timezone" id="library_timezone" class="form-control">
								<?php echo Timezone_list(); ?>
							</select>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-6">
						<label class="form-label">Per User Book Issue Limit</label>
						<input type="number" name="library_issue_total_book_per_user" id="library_issue_total_book_per_user" class="form-control" value="<?php echo $row['library_issue_total_book_per_user']; ?>" />
					</div>
				</div>
				<div class="mt-4 mb-0">
					<input type="submit" name="edit_setting" class="btn btn-primary" value="Save" />
				</div>
				<script type="text/javascript">

				document.getElementById('library_currency').value = "<?php echo $row['library_currency']; ?>";

				document.getElementById('library_timezone').value="<?php echo $row['library_timezone']; ?>"; 

				</script>
				<?php 
				}
				?>
			</form>

		</div>
	</div>
</div>

<?php 

include '../footer.php';

?>





admin/category.php


Admin can manage Library Book Category from this admin/category.php file. Under this module Admin can add, update and remove Category data by using PHP script with MySQL database. For display Category data on web page, here we have use Vanilla JavaScript Simple-DataTables library, which purely based on JavaScript not any third party library. By using this JavaScript DataTable, we can perform searching, filtering, sorting of data and pagination which we can perform in jQuery DataTable.


<?php

//category.php

include '../database_connection.php';

include '../function.php';

if(!is_admin_login())
{
	header('location:../admin_login.php');
}

$message = '';

$error = '';

if(isset($_POST['add_category']))
{
	$formdata = array();

	if(empty($_POST['category_name']))
	{
		$error .= '<li>Category Name is required</li>';
	}
	else
	{
		$formdata['category_name'] = trim($_POST['category_name']);
	}

	if($error == '')
	{
		$query = "
		SELECT * FROM lms_category 
        WHERE category_name = '".$formdata['category_name']."'
		";

		$statement = $connect->prepare($query);

		$statement->execute();

		if($statement->rowCount() > 0)
		{
			$error = '<li>Category Name Already Exists</li>';
		}
		else
		{
			$data = array(
				':category_name'			=>	$formdata['category_name'],
				':category_status'			=>	'Enable',
				':category_created_on'		=>	get_date_time($connect)
			);

			$query = "
			INSERT INTO lms_category 
            (category_name, category_status, category_created_on) 
            VALUES (:category_name, :category_status, :category_created_on)
			";

			$statement = $connect->prepare($query);

			$statement->execute($data);

			header('location:category.php?msg=add');
		}
	}
}

if(isset($_POST["edit_category"]))
{
	$formdata = array();

	if(empty($_POST["category_name"]))
	{
		$error .= '<li>Category Name is required</li>';
	}
	else
	{
		$formdata['category_name'] = $_POST['category_name'];
	}

	if($error == '')
	{
		$category_id = convert_data($_POST['category_id'], 'decrypt');

		$query = "
		SELECT * FROM lms_category 
        WHERE category_name = '".$formdata['category_name']."' 
        AND category_id != '".$category_id."'
		";

		$statement = $connect->prepare($query);

		$statement->execute();

		if($statement->rowCount() > 0)
		{
			$error = '<li>Category Name Already Exists</li>';
		}
		else
		{
			$data = array(
				':category_name'		=>	$formdata['category_name'],
				':category_updated_on'	=>	get_date_time($connect),
				':category_id'			=>	$category_id
			);

			$query = "
			UPDATE lms_category 
            SET category_name = :category_name, 
            category_updated_on = :category_updated_on  
            WHERE category_id = :category_id
			";

			$statement = $connect->prepare($query);

			$statement->execute($data);

			header('location:category.php?msg=edit');
		}
	}
}

if(isset($_GET["action"], $_GET["code"], $_GET["status"]) && $_GET["action"] == 'delete')
{
	$category_id = $_GET["code"];
	$status = $_GET["status"];
	$data = array(
		':category_status'			=>	$status,
		':category_updated_on'		=>	get_date_time($connect),
		':category_id'				=>	$category_id
	);
	$query = "
	UPDATE lms_category 
    SET category_status = :category_status, 
    category_updated_on = :category_updated_on 
    WHERE category_id = :category_id
	";

	$statement = $connect->prepare($query);

	$statement->execute($data);

	header('location:category.php?msg='.strtolower($status).'');
}


$query = "
SELECT * FROM lms_category 
    ORDER BY category_name ASC
";

$statement = $connect->prepare($query);

$statement->execute();

include '../header.php';

?>

<div class="container-fluid py-4" style="min-height: 700px;">
	<h1>Category Management</h1>
	<?php 

	if(isset($_GET['action']))
	{
		if($_GET['action'] == 'add')
		{
	?>

	<ol class="breadcrumb mt-4 mb-4 bg-light p-2 border">
		<li class="breadcrumb-item"><a href="index.php">Dashboard</a></li>
		<li class="breadcrumb-item"><a href="category.php">Category Management</a></li>
		<li class="breadcrumb-item active">Add Category</li>
	</ol>
	<div class="row">
		<div class="col-md-6">
			<?php 

			if($error != '')
			{
				echo '<div class="alert alert-danger alert-dismissible fade show" role="alert"><ul class="list-unstyled">'.$error.'</ul> <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button></div>';
			}

			?>
			<div class="card mb-4">
				<div class="card-header">
					<i class="fas fa-user-plus"></i> Add New Category
                </div>
                <div class="card-body">

                	<form method="POST">

                		<div class="mb-3">
                			<label class="form-label">Category Name</label>
                			<input type="text" name="category_name" id="category_name" class="form-control" />
                		</div>

                		<div class="mt-4 mb-0">
                			<input type="submit" name="add_category" value="Add" class="btn btn-success" />
                		</div>

                	</form>

                </div>
            </div>
		</div>
	</div>


	<?php 
		}
		else if($_GET["action"] == 'edit')
		{
			$category_id = convert_data($_GET["code"],'decrypt');

			if($category_id > 0)
			{
				$query = "
				SELECT * FROM lms_category 
                WHERE category_id = '$category_id'
				";

				$category_result = $connect->query($query);

				foreach($category_result as $category_row)
				{
				?>
	
	<ol class="breadcrumb mt-4 mb-4 bg-light p-2 border">
		<li class="breadcrumb-item"><a href="index.php">Dashboard</a></li>
		<li class="breadcrumb-item"><a href="category.php">Category Management</a></li>
		<li class="breadcrumb-item active">Edit Category</li>
	</ol>
	<div class="row">
		<div class="col-md-6">
			<div class="card mb-4">
				<div class="card-header">
					<i class="fas fa-user-edit"></i> Edit Category Details
				</div>
				<div class="card-body">

					<form method="post">

						<div class="mb-3">
							<label class="form-label">Category Name</label>
							<input type="text" name="category_name" id="category_name" class="form-control" value="<?php echo $category_row['category_name']; ?>" />
						</div>

						<div class="mt-4 mb-0">
							<input type="hidden" name="category_id" value="<?php echo $_GET['code']; ?>" />
							<input type="submit" name="edit_category" class="btn btn-primary" value="Edit" />
						</div>

					</form>

				</div>
			</div>

		</div>
	</div>

				<?php 
				}
			}
		}
	}
	else
	{	

	?>
	<ol class="breadcrumb mt-4 mb-4 bg-light p-2 border">
		<li class="breadcrumb-item"><a href="index.php">Dashboard</a></li>
		<li class="breadcrumb-item active">Category Management</li>
	</ol>

	<?php 

	if(isset($_GET['msg']))
	{
		if($_GET['msg'] == 'add')
		{
			echo '<div class="alert alert-success alert-dismissible fade show" role="alert">New Category Added<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button></div>';
		}

		if($_GET["msg"] == 'edit')
		{
			echo '<div class="alert alert-success alert-dismissible fade show" role="alert">Category Data Edited <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button></div>';
		}
		if($_GET["msg"] == 'disable')
		{
			echo '<div class="alert alert-success alert-dismissible fade show" role="alert">Category Status Change to Disable <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button></div>';
		}

		if($_GET['msg'] == 'enable')
		{
			echo '<div class="alert alert-success alert-dismissible fade show" role="alert">Category Status Change to Enable <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button></div>';
		}
	}	

	?>

	<div class="card mb-4">
		<div class="card-header">
			<div class="row">
				<div class="col col-md-6">
					<i class="fas fa-table me-1"></i> Category Management
				</div>
				<div class="col col-md-6" align="right">
					<a href="category.php?action=add" class="btn btn-success btn-sm">Add</a>
				</div>
			</div>
		</div>
		<div class="card-body">

			<table id="datatablesSimple">
				<thead>
					<tr>
						<th>Category Name</th>
						<th>Status</th>
						<th>Created On</th>
						<th>Updated On</th>
						<th>Action</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<th>Category Name</th>
						<th>Status</th>
						<th>Created On</th>
						<th>Updated On</th>
						<th>Action</th>
					</tr>
				</tfoot>
				<tbody>
				<?php 

				if($statement->rowCount() > 0)
				{
					foreach($statement->fetchAll() as $row)
					{
						$category_status = '';
						if($row['category_status'] == 'Enable')
						{
							$category_status = '<div class="badge bg-success">Enable</div>';
						}
						else
						{
							$category_status = '<div class="badge bg-danger">Disable</div>';
						}

						echo '
						<tr>
							<td>'.$row["category_name"].'</td>
							<td>'.$category_status.'</td>
							<td>'.$row["category_created_on"].'</td>
							<td>'.$row["category_updated_on"].'</td>
							<td>
								<a href="category.php?action=edit&code='.convert_data($row["category_id"]).'" class="btn btn-sm btn-primary">Edit</a>
								<button name="delete_button" class="btn btn-danger btn-sm" onclick="delete_data(`'.$row["category_id"].'`, `'.$row["category_status"].'`)">Delete</button>
							</td>
						</tr>
						';
					}
				}
				else
				{
					echo '
					<tr>
						<td colspan="4" class="text-center">No Data Found</td>
					</tr>
					';
				}

				?>
				</tbody>
			</table>

			<script>

				function delete_data(code, status)
				{
					var new_status = 'Enable';

					if(status == 'Enable')
					{
						new_status = 'Disable';
					}

					if(confirm("Are you sure you want to "+new_status+" this Category?"))
					{
						window.location.href="category.php?action=delete&code="+code+"&status="+new_status+"";
					}
				}

			</script>

		</div>
	</div>
	<?php 
	}
	?>

</div>

<?php 

include '../footer.php';

?>





admin/author.php


Admin can manage Library Book Author from this admin/author.php file. Under this module Admin can insert, edit and delete Author data by using PHP script with MySQL database. For display author data on web page, here we have use Vanilla JavaScript Simple-DataTables library, which purely based on JavaScript and not depend any third party library. By using this JavaScript DataTables, we can perform searching, filtering, sorting of data and pagination which we can perform in jQuery DataTable.


<?php

//author.php

include '../database_connection.php';

include '../function.php';

if(!is_admin_login())
{
	header('location:../admin_login.php');
}


$query = "
	SELECT * FROM lms_author 
    ORDER BY author_name ASC
";

$statement = $connect->prepare($query);

$statement->execute();

include '../header.php';

?>

<div class="container-fluid py-4" style="min-height: 700px;">
	<h1>Author Management</h1>
	<div class="card mb-4">
		<div class="card-header">
			<div class="row">
				<div class="col col-md-6">
					<i class="fas fa-table me-1"></i> Author Management
				</div>
				<div class="col col-md-6" align="right">

				</div>
			</div>
		</div>
		<div class="card-body">
			<table id="datatablesSimple">
				<thead>
					<tr>
						<th>Author Name</th>
						<th>Status</th>
						<th>Created On</th>
						<th>Updated On</th>
						<th>Action</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<th>Author Name</th>
						<th>Status</th>
						<th>Created On</th>
						<th>Updated On</th>
						<th>Action</th>
					</tr>
				</tfoot>
				<tbody>
				<?php
				if($statement->rowCount() > 0)
				{
					foreach($statement->fetchAll() as $row)
					{
						$author_status = '';
						if($row['author_status'] == 'Enable')
						{
							$author_status = '<div class="badge bg-success">Enable</div>';
						}
						else
						{
							$author_status = '<div class="badge bg-danger">Disable</div>';
						}
						
						echo '
						<tr>
							<td>'.$row["author_name"].'</td>
							<td>'.$author_status.'</td>
							<td>'.$row["author_created_on"].'</td>
							<td>'.$row["author_updated_on"].'</td>
							<td></td>
						</tr>
						';
					}
				}
				else
				{
					echo '
					<tr>
						<td colspan="4" class="text-center">No Data Found</td>
					</tr>
					';
				}
				?>
				</tbody>
			</table>
		</div>
	</div>
</div>

<?php 

include '../footer.php';

?>


In this area source code will be updated on every publish part of this Library Management System. You can download required stylesheet and javascript file from below link, so you can run this library management system in you local computer.