Skip to content Skip to sidebar Skip to footer

Tutorial on Creating a Course Website Using Codeigniter: Admin Dashboard [Bagian 15]

The previous article has discussed how to display the page login. When the admin has successfully logged in using username and password it will automatically display dashboard admin.

Well, now is the time for the author to discuss how to make dashboard admin. Previously, readers who missed this information could review the previous article again.

Read also:

HOW TO MAKE A DASHBOARD ADMIN

1. Create a file named welcome.php in the folder C:\xampp\htdocs\inwepo\application\controllers\admin. Then type the following program snippet:

load->model(array('m_admin','admin_kursus','admin_peserta'));  $this->load->database();  }  function index()  {       if($this->session->userdata('level') != 2){            redirect('login');        }else{            $this->load->model('m_admin');            $user = $this->session->userdata('username');            $this->data['level'] = $this->session->userdata('level');                    $this->data['pengguna'] = $this->m_admin->data($user);            $this->load->view('admin/header',$this->data);            $this->load->view('admin/index',$this->data);            $this->load->view('admin/footer');        }        }}

2. Make files header.php in the folder C:\xampp\htdocs\inwepo\application\views then type the following program snippet:

3. Make files index.php in the folder C:\xampp\htdocs\inwepo\application\views then type the following program snippet:

4. Make files footer.php in the folder C:\xampp\htdocs\inwepo\application\views then type the following program snippet:

Website : inwepo.co

If so, now is the time for the testing phase. Type URL http://localhost/inwepo/sadmin/ then enter username admin and password admin. It will appear later dashboard admin like this:

Because script program in folder views which is quite a lot, then the author only gives a few snippets of the program. you candownload source code which the author has provided at the end of this article.

DOWNLOAD

header.php

index.php

footer.php