# Admin Lite V4 User and Developer Guide

- Created: December 15, 2017
- Updated: June 30, 2022
- By: CodeGlamour
- Email: codeglamourofficial@gmail.com

We would like to thank you for purchasing this script ! We are very pleased you to have chosen our script as a strong basis for your future projects, you will not be disappointed! Before you get started, please be sure to always check out these documentation files. We outline all kinds of good information, and provide you with all the details you need to use.If you have any questions that are beyond the scope of this help file, please feel free to contact us on codeglamourofficial@gmail.com, we will try to answer as soon as possible.

## Note: Customizing code and other design related work can be done as freelance work on a $20-30 hourly rate only with Paypal and/or Payoneer.

### Overview

ADMIN LITE is powerfull Codeigniter Admin Panel for starting a new project with Codeigniter 3 Framework.
2 versions are supplied in the package : the MVC (regular) and HMVC version.
It is developed for custom codeigniter projects. It’s cover most common features needed for nowadays projects. It will make your development task more easier then before. We are working hard to create many premium features on this project
The main objective is to speed up web development effort by providing configurable and ready modules. Configurations can be made easily using the Control Panel, or programmatically. Use Admin Lite Admin Panel’ to create your own web application with the following benefits:

- Speed up web development by using ready modules.
- Make changes quickly and easily using control panel.
- Source code available for further modifications.

### Features

- Built with CodeIgniter Latest Version 3
- Structured & Clean Code
- Easy to Integrate (Only copy & paste)
- Easy customization
- Well documented and commented code
- W3C validated HTML & CSS
- Responsive Design with Bootstrap v3.3.7
- AdminLTE Template Integrated
- Responsive and nice admin interface
- CodeIgniter Ready Project
- Complete backend and Many More…

### Functionalities

- Multilanguage Supported
- Login Authentication
- Email Verification
- Forget/ Reset/ Change Password
- Google Recaptcha
- User Roles and Permissions
- Dynamic Side Meny
- Specific module access to Admins
- Dynamic Graphs
- Admin Profile Management (View, Edit & Update)
- Members or users management (View, Add, Edit & Update, Active & Inactive, Delete)
- Simple Datatables
- Server-side Processing (Datatables)
- Pagination Example
- Ajax Base Pagination & Search
- Advanced Search Filter
- Export Data in PDF Formate
- Export Data in CSV Formate
- Invoicing System
- Generation Invoices in PDF Formate
- Sending Invoices with Email Attachment
- Custom Email Templates
- Multiple file upload example
- User Activity Log
- Country, state, city example
- Database Backup
- Access Denied Page

### Security

- SQL Injection
- XSS Clean
- CSRF Protection
- Password Hashing

### System Requirements

To installing Admin Lite Integration with Codeigniter, Your web server must be running PHP 5.6 or higher, and Mysql 5 or higher. Below are a list of items you should ensure your host can comply with.

- PHP 7.*+
- PHP 5.6+
- MYSQLi 5.1+
- Mcrypt Extension
- MBString Extension
- MYSQLi Extension
- CURL Extension (recommended)

*In most hosting accounts these extensions are enabled by default. But you should check with your hosting provider.

### Install Quickstart

##### Upload Files & Install

The zip contains the MVC (adminlite folder) and HMVC version (adminlite.HMVC folder) - see below; extract the version you want to install and upload the files to the server folder where Admin Lite will be installed.

Keep in mind that you can adjust the URL based on where you uploaded the files.

##### Configure Database Connection

You need to have previously setup database from the cPanel.

Here is a good tutorial how to setup MySQL database in cPanel if you are not familiar with this.

1. Login to cPanel by accessing www.yourdomain.com/cpanel and navigate to MySQL Databases.
2. Create database first (we suggest adminlite_db as initially defined in the configuration file).
3. Create user and setup your password.
4. Add the user to database by selecting the database and the username.
5. Open the file adminlite_db.sql in database folder of the files package and Import the Database. This will create all the required database tables and sample content (the superadmin user will be created with the password set to 12345).

Make sure you have checked All privileged when adding the user to database.

##### Setup Base URL

Note: You dont need to add your base url, System will takes automatically. In some case you want to add please follow the lines below.

Go to application/config/config.php and setup $config['base_url'] where Admin Lite will be installed.

You need to add your base url to this line:

                  $config['base_url'] = '';

Ex. If you are installing on subdomain you will set http://www.adminlite.domain.com/

Ex. If you are installing on subfolder you will set http://www.domain.com/adminlite/

Ex. If you are installing on the main domain you need to set just http://www.domain.com/

                  $config['base_url'] = 'http://www.domain.com/adminlite/';

NOTE:The url must end with a slash (/)

### Site Configuration

##### Change Database Settings

Open your site main root folder then open: application/config/database.php (both in MVC and HMVC versions) and change your database name, username and password here,

##### General Setting

You can change your site setting in "www.domain.com/admin/general_settings/" link.

##### Change Email Setting

Change the SMTP Username and Password in "domain.com/admin/general_settings/" link.
Note: You need to use a valid domain email address. And Email will work only on live server not on localhost.

##### Google Recaptcha Setting

After login to admin panel click on the Setting tab in the left menu and then click on the recaptch settign. Here you can add your Site & Secrit Key

### Add Module Setting

If you want to add extra modules in the admin panel, you have to follow the following rules :

1. The controller name fields must be your controller name and the Operations files must be your Functions or Method names.

2. If you want to access the following controller please call this function in your constructon method $this->rbac->check_module_access(); for more details please open the users.php file in controllers/admin directory for the MVC version or in modules\users\controllers for the HMVC version

3. For the operation permission write $this->rbac->check_operation_access(); in your function source code; ; for more details please open the users.php file in controllers/admin directory for the MVC version or in modules\users\controllers for the HMVC version

4. you can re-organize the module (and the order in which they appear in the left sidebar menu) using the drag/drop method; use 'Update Positions' to save the order :

MVC:

### Customization

##### Sidebar Adjustment

MVC: go to the site folder adminlite and open the file application\views\admin\include\_sidebar.php to set the logo, sidebar, naviation and Account Buttons.

HMVC: go to the site folder adminlite and open the file application\modules\template\views\_sidebar.php to set the logo, sidebar, naviation and Account Buttons.

##### Navbar/Header Adjustment

MVC: go to the site folder adminlite and open the file application\views\admin\include\_header.php to add/remove/edit the main-menu/navbar, the search box and the buttons on the top right.

HMVC: go to the site folder adminlite and open the file application\modules\template\views\_header.php to add/remove/edit the main-menu/navbar, the search box and the buttons on the top right.

##### Routes File

If you want to change the Route file goto adminlite/application/config/route.php to change the route according to your requirements

##### My Controller File

If you want to change the MY Controller file goto adminlite/application/core/MY_Controller.php and edit it according to your needs.

##### Add a Module / Test Module

We have provided a test module as an example; as you can see (Test/!Test one!) it's not translated that's why the menu entry appears between '!' (exclamation point).

It can serve as a base for your future modules.

MVC: location :
Controler : application\controllers\admin\Test.php
Model : application\models\admin\Test_model.php
View : application\views\admin\test\test.php

HMVC: location :
Controler : application\modules\test\controllers\Test.php
Model : application\modules\test\models\Test_model.php
View : application\modules\test\views\test.php

### Third Party Libraries

##### mPDF (For PDF Generation)

mPDF is a PHP library which generates PDF files from UTF-8 encoded HTML. It is based on FPDF and HTML2FPDF (see CREDITS), with a number of enhancements. mPDF was written by Ian Back and is released under the GNU GPL v2 licence.

mPDF 7.0 requires PHP ^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0. PHP mbstring and gd extensions have to be loaded.

* For more information visit this link https://github.com/phpclicks/mpdf

### Admin Section

The administrator module has all the privileges about this entire project.

##### Admin URL / Access

###### yoursitename.com/adminlite

###### Username: superadmin

###### Password: 12345

1. This is the main Dashboard overview. you can see all your information about the user.

2. To see and change your user profile and you can add , edit and delete the user from this option.

3. To see and change your admin profile and password you can update the admin profile from this option.

4. To see and change your invoices you can add, edit and delete the invoice the from this option.

4. You can view the Invoice form this option and can also download the invoice in pdf formate and can also send email through attachment.

### Changelogs

##### Version v4.0 (30 Juni 2022)

- New - Admin Lite is now supplied with both the MVC and HMVC version.
- New - the main modules (menu) can now re-orderd by drag/drop, no need to specify 'manually' the position.
- New - the messages which are not translated are now display as '!msg_fieldname!' instead of '' (blank/null).
- New - in modules/sub-modules list, the name of the parent module is displayed in the title; ex: "Sub Module Setting (Codeingiter Examples)".
- New - possibility to log either by username or by email.
- New - in invoices/invoice_lis, the columns can be re-ordered with up/down.
- Updated - in user/list, buttons have been resized to btn-xs (inc. css style) to fir small screen.
- Updated - admin/list - no longer possible to delete the 'superadmin'.
- Fixed - selection - missing 'or' clause.
- Fixed - crashed when clicking on Permissions in role/permission.
- Fixed - crashed when trying to register a new user.
- Fixed - in modules/sub-modules, the delete/edit/create new works now fine.
- Fixed - the invoices/view referrenced admin/invoices/ instead of invoices/ (MVC version).
- Fixed - Small Bugs

##### Version v3.0 (21 January 2021)

- Updated - PHP version 7.2 and later.
- Updated - PDF Library for php version 7.2 or greater.
- Updated - Codeigniter Latest Version 3.1.11.
- Added - User Login functionality.
- Fixed - Export PDF File issue.
- Fixed - Invoice PDF Generation PDF issue.
- Fixed - Invoice Deletion issue.
- Fixed - Small Bugs.

##### Version v2.0 (20 January 2020)

- Fixed - File Upload 404 Error.
- Fixed - DB Prefix.
- Fixed - Dashboard Access Error.
- Fixed - Users Status Sort Error.
- Fixed - Small Bugs.

##### Version v1.5 (2 December 2019)

- Updated to latest verison 3.1.10.
- Added - Multilanguage.
- Added - Dynamic Admin Side Menu.
- Added - Custom Email Templates.
- Added - Multiple file upload example.
- Added - User Activity Log.
- Added - Dynamic Graph.
- Added - Dynamic Modules.
- Added - Country, State, City example.
- Added - General Settings, Email Setting, Recaptch Setting.
- Added - Language Setting.
- Fixed - Small Bugs.

##### Version v1.3

- Improve Design.
- Added User Roles.
- Added User Permission.
- Added advanced search in Admin List.
- Ajaxbased active inactive users.

##### Version v1.2

- Fixed Small Bugs

### Support

For any query or problem feel free to contact us on Email: codeglamourofficial@gmail.com

<