Membuat Website Sederhana Dengan Codeigniter

Membuat Website Sederhana Dengan Codeigniter..

Tampilan Project Kampus



Catatan :

Untuk project yang sudah jadi silahkan Download Di
https://drive.google.com/open?id=1Dul7noVgjDN98wCNNfZAOB_5ED-ota6P


Youtube Vidio dari 1 - 19 
1. https://www.youtube.com/watch?v=r2ONZZrYk8c&list=PLce3Eyp7oY9_5lzhkUtrV6ygriYcttMlg

Jika Error saat akses pdf
ganti warna merah jadi warna hijau pada
third_party\dompdf\dompdf.config.inc
/**
   Settingan umum menggunakan autoload
   * Default __autoload() function
   Jika  error gunakan
   function spl_autoload_register($class) {
    DOMPDF_autoload($class);
  }
   *
   * @param string $class
*/
Cari kode berikut pada third_party\dompdf\dompdf.config.inc
  function __autoload($class) {
    DOMPDF_autoload($class);
  }


PDF UNTUK CI
alamt web donwload = https://github.com/iamfiscus/Codeigniter-DOMPDF
=>kopi dompdf_get di libraries
=>kopi dompdf di third_party
Pada Project Kampus Codeigniter
EXCEL UNTUK CI
alamt web download = https://github.com/PHPOffice/PHPExcel
=>kopi didalam folder aplication
atau untuk mengdownload Excel Dan PDF Click here

==================================================================
Untuk Upload Gambar bisa juga menggunakan 
$gambar = $_FILES['gambar']['name'];
if($gambar=''){}else{
    $config['upload_path'] = './uploads';  //kopas aja namanya dari folder
    $config['allowed_types'] = 'jpg|png|gif';

   $this->load->library('upload',$config);
   if(!$this->upload->do_upload('gambar')){//foto nama file pada view
    echo "upload gagal";die();
   }else{
    $gambarz = $this->upload->data('file_name');
   }
}
$data = array(
'nama_brg' => $nama_brg,
'keterangan' => $keterangan,
'kategori' =>$kategori,
'harga' => $harga,
'stok' =>$stok,
'gambar' => $gambarz
);
$this->model_barang->tambah_barang($data,'tb_barang');

redirect('admin/data_barang/index');
==================================================================
RANGKUMAN JUDUL

HTACCESS
=> .htaccess

SETINGAN DASAR 
=> Config/autoload.php
=> Config/config.php
=> Config/database.php 
=> Config/routes.php

 PROJECT MVC
=> Controllers/mahasiswa.php
=> Models/m_mahasiswa.php
View/Template
=> View/template/header.php
=> View/template/side.php
=> view/template/dashboard.php
=> View/template/footer.php
View
=> View/detail.php
=> View/edit.php
=> View/laporan_pdf.php
=> View/mahasiswa.php
=> View/print_mahasiswa.php
==================================================================
HTACCESS

.htaccess
RewriteEngine On
RewriteBase /kampus/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php/$1 [L]

==================================================================

SETINGAN DASAR 

Config/autoload.php
$autoload['libraries'] = array('database','session');
$autoload['helper'] = array('url','form');
$autoload['model'] = array('m_mahasiswa');
Config/config.php
$config['base_url'] = 'http://localhost/kampus/';
$config['encryption_key'] = 'Sance bro';
Config/database.php
$active_group = 'default';
$active_record = TRUE;

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'siakad';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;//TRUE
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;

$db['default']['stricton'] = FALSE;
Config/routes.php
$route['default_controller'] = "mahasiswa";
==================================================================
PROJECT MVC

Controllers/mahasiswa.php
<?php   if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Mahasiswa extends CI_Controller {


public function index()
{
$data['mahasiswa'] = $this->m_mahasiswa->tampil_data()->result();
$this->load->view('template\header');
$this->load->view('template\side');
$this->load->view('Mahasiswa',$data);
$this->load->view('template\footer');
}
public function tambah_aksi()
{
$nama = $this->input->post('nama');
$nim = $this->input->post('nim');
$tgl_lahir = $this->input->post('tgl_lahir');
$jurusan = $this->input->post('jurusan');
$alamat = $this->input->post('alamat');
$email = $this->input->post('email');
$no_telp = $this->input->post('no_telp');
//$foto = $_FILES['foto'];//boleh dihapus//kopi yang warna ijo
//if($foto=''){}else{
$config['upload_path'] = './assets/foto';
$config['allowed_types'] = 'jpg|png|gif';

$this->load->library('upload',$config);
if(!$this->upload->do_upload('foto')){//foto nama file pada view
echo "upload gagal";die();
}else{

$imagess = array('gam' => $this->upload->data());
$fotos = $imagess['gam']['file_name'];
}
//}
$fotos =

$data = array(
'nama' => $nama,
'nim' => $nim,
'tgl_lahir' => $tgl_lahir,
'jurusan' => $jurusan,
'alamat' => $alamat,
'email' => $email,
'no_telp' => $no_telp,
'foto' => $fotos
);

$this->db->insert('tb_mahasiswa',$data);
$this->session->set_flashdata('message','<div class="alert alert-success alert-dismissible" role="alert">
  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
Data Berhasil Ditambahkan
</div>');
redirect('mahasiswa/index');

}
public function hapus($id)
{
$where = array('id' => $id );
$this->m_mahasiswa->hapus_data($where,'tb_mahasiswa');
$this->session->set_flashdata('message','<div class="alert alert-danger alert-dismissible" role="alert">
  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
Data Berhasil Dihapus
</div>');
redirect('mahasiswa/index');
}
public function edit($id)
{
$where = array('id' =>$id);
$data['mahasiswa'] = $this->m_mahasiswa->edit_data($where,'tb_mahasiswa')->result();
$this->load->view('template\header');
$this->load->view('template\side');
$this->load->view('edit',$data);
$this->load->view('template\footer');
}
public function update()
{
if($this->input->post('reset1')){
recdirect('mahasiswa/index');
}
$id = $this->input->post('id');
$nama = $this->input->post('nama');
$nim = $this->input->post('nim');
$tgl_lahir = $this->input->post('tgl_lahir');
$jurusan = $this->input->post('jurusan');
$alamat = $this->input->post('alamat');
$email = $this->input->post('email');
$no_telp = $this->input->post('no_telp');

$data = array(
'nama' => $nama,
'nim' => $nim,
'tgl_lahir' => $tgl_lahir,
'jurusan' => $jurusan,
'alamat' => $alamat,
'email' => $email,
'no_telp' => $no_telp
  );
$where =  array('id' => $id );
$this->m_mahasiswa->update_data($where,$data,'tb_mahasiswa');
$this->session->set_flashdata('message','<div class="alert alert-info alert-dismissible" role="alert">
  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
Data Berhasil Diupdate
</div>');
redirect('mahasiswa/index');



}
public function detail($id)
{
$this->load->model('m_mahasiswa');
$detail = $this->m_mahasiswa->detail_data($id);
$data['detail'] = $detail;
$this->load->view('template\header');
$this->load->view('template\side');
$this->load->view('detail',$data);
$this->load->view('template\footer');
}
public function CetakPrint()
{
$data['mahasiswa'] = $this->m_mahasiswa->tampil_data("tb_mahasiswa")->result();
$this->load->view('print_mahasiswa',$data);
}
public function pdf()
{
$this->load->library('dompdf_gen');
$data['mahasiswa'] = $this->m_mahasiswa->tampil_data('tb_mahasiswa')->result();
$this->load->view('laporan_pdf',$data);
$paper_size = 'A4' ;
$orientation = 'landscape';
$html = $this->output->get_output();
$this->dompdf->set_paper($paper_size,$orientation);

$this->dompdf->load_html($html);
$this->dompdf->render();
$this->dompdf->stream('laporan_mahasiswa.pdf', array('Attachment' => 0 ));
}
public function excel()
{
$data['mahasiswa'] = $this->m_mahasiswa->tampil_data('tb_mahasiswa')->result();
require(APPPATH.'PHPExcel-1.8/Classes/PHPExcel.php');
require(APPPATH.'PHPExcel-1.8/Classes/PHPExcel/Writer/Excel2007.php');
$object = new PHPExcel();

$object->getProperties()->setCreator("Sance");
$object->getProperties()->setLastModifiedBy("Sance");
$object->getProperties()->setTitle("ini untuk judul");

$object->setActiveSheetIndex(0);

$object->getActiveSheet()->setCellValue('A1','NO');
$object->getActiveSheet()->setCellValue('B1','Nama Mahasiswa ');
$object->getActiveSheet()->setCellValue('C1','Nim');
$object->getActiveSheet()->setCellValue('D1','Tgl Lahir');
$object->getActiveSheet()->setCellValue('E1','JURUSAN');
$object->getActiveSheet()->setCellValue('F1','ALAMAT');
$object->getActiveSheet()->setCellValue('G1','EMAIL');
$object->getActiveSheet()->setCellValue('H1','No Telpon');

$baris = 2;
$no = 1;
foreach ($data['mahasiswa'] as $mhs) {
# code...
$object->getActiveSheet()->setCellValue('A'.$baris,$no++);
$object->getActiveSheet()->setCellValue('B'.$baris,$mhs->nama);
$object->getActiveSheet()->setCellValue('C'.$baris,$mhs->nim);
$object->getActiveSheet()->setCellValue('D'.$baris,$mhs->tgl_lahir);
$object->getActiveSheet()->setCellValue('E'.$baris,$mhs->jurusan);
$object->getActiveSheet()->setCellValue('F'.$baris,$mhs->alamat);
$object->getActiveSheet()->setCellValue('G'.$baris,$mhs->email);
$object->getActiveSheet()->setCellValue('H'.$baris,$mhs->no_telp);

$baris++;
}
$filename="Data_Mahasiswa".'.xlsx';
$object->getActiveSheet()->setTitle("Data Mahasiswa");
header('Content-type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="'.$filename.'"');
header('Cache-Control: max-age=0');

$Writer=PHPExcel_IOFactory::createwriter($object,'Excel2007');
$Writer->save('php://output');
exit;
}
public function search()
{
$keyword = $this->input->post('keyword');
$data['mahasiswa'] = $this->m_mahasiswa->get_keyword($keyword);
$this->load->view('template\header');
$this->load->view('template\side');
$this->load->view('mahasiswa',$data);
$this->load->view('template\footer');

}

}

/* End of file welcome.php */

/* Location: ./application/controllers/welcome.php */

Models/m_mahasiswa.php
<?php
class M_mahasiswa extends CI_Model {


public function tampil_data()
{
return $this->db->get('tb_mahasiswa');
}
public function hapus_data($where,$tasble)
{
$this->db->where($where);
$this->db->delete($tasble);
}
public function edit_data($where,$table)
{
return $this->db->get_where($table,$where);
}
public function update_data($where,$data,$tablesss)
{
$this->db->where($where);
$this->db->update($tablesss,$data);
}
public function detail_data($id = null)
{
$query = $this->db->get_where('tb_mahasiswa',array('id' => $id))->row();
return $query;
}
public function get_keyword($keyword)
{
$this->db->select('*');
$this->db->from('tb_mahasiswa');
$this->db->like('nama',$keyword);
$this->db->or_like('nim',$keyword);
$this->db->or_like('tgl_lahir',$keyword);
$this->db->or_like('jurusan',$keyword);
$this->db->or_like('alamat',$keyword);
$this->db->or_like('email',$keyword);
$this->db->or_like('no_telp',$keyword);
/*
$this->db->select('*');
$this->db->from('tb_mahasiswa');
$this->db->where('nama',$keyword);
untuk pencarian gunakan
$this->db->select('*');
$this->db->from('tb_mahasiswa');
$this->db->like('nama',$keyword);
$this->db->or_like('nim',$keyword);
$this->db->or_like('tgl_lahir',$keyword);
$this->db->or_like('jurusan',$keyword);
$this->db->or_like('alamat',$keyword);
$this->db->or_like('email',$keyword);
$this->db->or_like('no_telp',$keyword);
*/
return $this->db->get()->result();

}
}

/* End of file welcome.php */

/* Location: ./application/controllers/welcome.php */

view/template/dashboard.php


  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        Dashboard
        <small>Control panel</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="<?php echo base_url()?>assets/#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li class="active">Dashboard</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
      <!-- Small boxes (Stat box) -->
      <div class="row">
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box bg-aqua">
            <div class="inner">
              <h3>150</h3>

              <p>New Orders</p>
            </div>
            <div class="icon">
              <i class="ion ion-bag"></i>
            </div>
            <a href="<?php echo base_url()?>assets/#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
          </div>
        </div>
        <!-- ./col -->
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box bg-green">
            <div class="inner">
              <h3>53<sup style="font-size: 20px">%</sup></h3>

              <p>Bounce Rate</p>
            </div>
            <div class="icon">
              <i class="ion ion-stats-bars"></i>
            </div>
            <a href="<?php echo base_url()?>assets/#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
          </div>
        </div>
        <!-- ./col -->
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box bg-yellow">
            <div class="inner">
              <h3>44</h3>

              <p>User Registrations</p>
            </div>
            <div class="icon">
              <i class="ion ion-person-add"></i>
            </div>
            <a href="<?php echo base_url()?>assets/#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
          </div>
        </div>
        <!-- ./col -->
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box bg-red">
            <div class="inner">
              <h3>65</h3>

              <p>Unique Visitors</p>
            </div>
            <div class="icon">
              <i class="ion ion-pie-graph"></i>
            </div>
            <a href="<?php echo base_url()?>assets/#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
          </div>
        </div>
        <!-- ./col -->
      </div>
      <!-- /.row -->
      <!-- Main row -->
      <div class="row">
        <!-- Left col -->
        <section class="col-lg-7 connectedSortable">
          <!-- Custom tabs (Charts with tabs)-->
          <div class="nav-tabs-custom">
            <!-- Tabs within a box -->
            <ul class="nav nav-tabs pull-right">
              <li class="active"><a href="<?php echo base_url()?>assets/#revenue-chart" data-toggle="tab">Area</a></li>
              <li><a href="<?php echo base_url()?>assets/#sales-chart" data-toggle="tab">Donut</a></li>
              <li class="pull-left header"><i class="fa fa-inbox"></i> Sales</li>
            </ul>
            <div class="tab-content no-padding">
              <!-- Morris chart - Sales -->
              <div class="chart tab-pane active" id="revenue-chart" style="position: relative; height: 300px;"></div>
              <div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>
            </div>
          </div>
          <!-- /.nav-tabs-custom -->

          <!-- Chat box -->
          <div class="box box-success">
            <div class="box-header">
              <i class="fa fa-comments-o"></i>

              <h3 class="box-title">Chat</h3>

              <div class="box-tools pull-right" data-toggle="tooltip" title="Status">
                <div class="btn-group" data-toggle="btn-toggle">
                  <button type="button" class="btn btn-default btn-sm active"><i class="fa fa-square text-green"></i>
                  </button>
                  <button type="button" class="btn btn-default btn-sm"><i class="fa fa-square text-red"></i></button>
                </div>
              </div>
            </div>
            <div class="box-body chat" id="chat-box">
              <!-- chat item -->
              <div class="item">
                <img src="<?php echo base_url()?>assets/dist/img/user4-128x128.jpg" alt="user image" class="online">

                <p class="message">
                  <a href="<?php echo base_url()?>assets/#" class="name">
                    <small class="text-muted pull-right"><i class="fa fa-clock-o"></i> 2:15</small>
                    Mike Doe
                  </a>
                  I would like to meet you to discuss the latest news about
                  the arrival of the new theme. They say it is going to be one the
                  best themes on the market
                </p>
                <div class="attachment">
                  <h4>Attachments:</h4>

                  <p class="filename">
                    Theme-thumbnail-image.jpg
                  </p>

                  <div class="pull-right">
                    <button type="button" class="btn btn-primary btn-sm btn-flat">Open</button>
                  </div>
                </div>
                <!-- /.attachment -->
              </div>
              <!-- /.item -->
              <!-- chat item -->
              <div class="item">
                <img src="<?php echo base_url()?>assets/dist/img/user3-128x128.jpg" alt="user image" class="offline">

                <p class="message">
                  <a href="<?php echo base_url()?>assets/#" class="name">
                    <small class="text-muted pull-right"><i class="fa fa-clock-o"></i> 5:15</small>
                    Alexander Pierce
                  </a>
                  I would like to meet you to discuss the latest news about
                  the arrival of the new theme. They say it is going to be one the
                  best themes on the market
                </p>
              </div>
              <!-- /.item -->
              <!-- chat item -->
              <div class="item">
                <img src="<?php echo base_url()?>assets/dist/img/user2-160x160.jpg" alt="user image" class="offline">

                <p class="message">
                  <a href="<?php echo base_url()?>assets/#" class="name">
                    <small class="text-muted pull-right"><i class="fa fa-clock-o"></i> 5:30</small>
                    Susan Doe
                  </a>
                  I would like to meet you to discuss the latest news about
                  the arrival of the new theme. They say it is going to be one the
                  best themes on the market
                </p>
              </div>
              <!-- /.item -->
            </div>
            <!-- /.chat -->
            <div class="box-footer">
              <div class="input-group">
                <input class="form-control" placeholder="Type message...">

                <div class="input-group-btn">
                  <button type="button" class="btn btn-success"><i class="fa fa-plus"></i></button>
                </div>
              </div>
            </div>
          </div>
          <!-- /.box (chat box) -->

          <!-- TO DO List -->
          <div class="box box-primary">
            <div class="box-header">
              <i class="ion ion-clipboard"></i>

              <h3 class="box-title">To Do List</h3>

              <div class="box-tools pull-right">
                <ul class="pagination pagination-sm inline">
                  <li><a href="<?php echo base_url()?>assets/#">&laquo;</a></li>
                  <li><a href="<?php echo base_url()?>assets/#">1</a></li>
                  <li><a href="<?php echo base_url()?>assets/#">2</a></li>
                  <li><a href="<?php echo base_url()?>assets/#">3</a></li>
                  <li><a href="<?php echo base_url()?>assets/#">&raquo;</a></li>
                </ul>
              </div>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
              <!-- See dist/js/pages/dashboard.js to activate the todoList plugin -->
              <ul class="todo-list">
                <li>
                  <!-- drag handle -->
                  <span class="handle">
                        <i class="fa fa-ellipsis-v"></i>
                        <i class="fa fa-ellipsis-v"></i>
                      </span>
                  <!-- checkbox -->
                  <input type="checkbox" value="">
                  <!-- todo text -->
                  <span class="text">Design a nice theme</span>
                  <!-- Emphasis label -->
                  <small class="label label-danger"><i class="fa fa-clock-o"></i> 2 mins</small>
                  <!-- General tools such as edit or delete-->
                  <div class="tools">
                    <i class="fa fa-edit"></i>
                    <i class="fa fa-trash-o"></i>
                  </div>
                </li>
                <li>
                      <span class="handle">
                        <i class="fa fa-ellipsis-v"></i>
                        <i class="fa fa-ellipsis-v"></i>
                      </span>
                  <input type="checkbox" value="">
                  <span class="text">Make the theme responsive</span>
                  <small class="label label-info"><i class="fa fa-clock-o"></i> 4 hours</small>
                  <div class="tools">
                    <i class="fa fa-edit"></i>
                    <i class="fa fa-trash-o"></i>
                  </div>
                </li>
                <li>
                      <span class="handle">
                        <i class="fa fa-ellipsis-v"></i>
                        <i class="fa fa-ellipsis-v"></i>
                      </span>
                  <input type="checkbox" value="">
                  <span class="text">Let theme shine like a star</span>
                  <small class="label label-warning"><i class="fa fa-clock-o"></i> 1 day</small>
                  <div class="tools">
                    <i class="fa fa-edit"></i>
                    <i class="fa fa-trash-o"></i>
                  </div>
                </li>
                <li>
                      <span class="handle">
                        <i class="fa fa-ellipsis-v"></i>
                        <i class="fa fa-ellipsis-v"></i>
                      </span>
                  <input type="checkbox" value="">
                  <span class="text">Let theme shine like a star</span>
                  <small class="label label-success"><i class="fa fa-clock-o"></i> 3 days</small>
                  <div class="tools">
                    <i class="fa fa-edit"></i>
                    <i class="fa fa-trash-o"></i>
                  </div>
                </li>
                <li>
                      <span class="handle">
                        <i class="fa fa-ellipsis-v"></i>
                        <i class="fa fa-ellipsis-v"></i>
                      </span>
                  <input type="checkbox" value="">
                  <span class="text">Check your messages and notifications</span>
                  <small class="label label-primary"><i class="fa fa-clock-o"></i> 1 week</small>
                  <div class="tools">
                    <i class="fa fa-edit"></i>
                    <i class="fa fa-trash-o"></i>
                  </div>
                </li>
                <li>
                      <span class="handle">
                        <i class="fa fa-ellipsis-v"></i>
                        <i class="fa fa-ellipsis-v"></i>
                      </span>
                  <input type="checkbox" value="">
                  <span class="text">Let theme shine like a star</span>
                  <small class="label label-default"><i class="fa fa-clock-o"></i> 1 month</small>
                  <div class="tools">
                    <i class="fa fa-edit"></i>
                    <i class="fa fa-trash-o"></i>
                  </div>
                </li>
              </ul>
            </div>
            <!-- /.box-body -->
            <div class="box-footer clearfix no-border">
              <button type="button" class="btn btn-default pull-right"><i class="fa fa-plus"></i> Add item</button>
            </div>
          </div>
          <!-- /.box -->

          <!-- quick email widget -->
          <div class="box box-info">
            <div class="box-header">
              <i class="fa fa-envelope"></i>

              <h3 class="box-title">Quick Email</h3>
              <!-- tools box -->
              <div class="pull-right box-tools">
                <button type="button" class="btn btn-info btn-sm" data-widget="remove" data-toggle="tooltip"
                        title="Remove">
                  <i class="fa fa-times"></i></button>
              </div>
              <!-- /. tools -->
            </div>
            <div class="box-body">
              <form action="#" method="post">
                <div class="form-group">
                  <input type="email" class="form-control" name="emailto" placeholder="Email to:">
                </div>
                <div class="form-group">
                  <input type="text" class="form-control" name="subject" placeholder="Subject">
                </div>
                <div>
                  <textarea class="textarea" placeholder="Message"
                            style="width: 100%; height: 125px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;"></textarea>
                </div>
              </form>
            </div>
            <div class="box-footer clearfix">
              <button type="button" class="pull-right btn btn-default" id="sendEmail">Send
                <i class="fa fa-arrow-circle-right"></i></button>
            </div>
          </div>

        </section>
        <!-- /.Left col -->
        <!-- right col (We are only adding the ID to make the widgets sortable)-->
        <section class="col-lg-5 connectedSortable">

          <!-- Map box -->
          <div class="box box-solid bg-light-blue-gradient">
            <div class="box-header">
              <!-- tools box -->
              <div class="pull-right box-tools">
                <button type="button" class="btn btn-primary btn-sm daterange pull-right" data-toggle="tooltip"
                        title="Date range">
                  <i class="fa fa-calendar"></i></button>
                <button type="button" class="btn btn-primary btn-sm pull-right" data-widget="collapse"
                        data-toggle="tooltip" title="Collapse" style="margin-right: 5px;">
                  <i class="fa fa-minus"></i></button>
              </div>
              <!-- /. tools -->

              <i class="fa fa-map-marker"></i>

              <h3 class="box-title">
                Visitors
              </h3>
            </div>
            <div class="box-body">
              <div id="world-map" style="height: 250px; width: 100%;"></div>
            </div>
            <!-- /.box-body-->
            <div class="box-footer no-border">
              <div class="row">
                <div class="col-xs-4 text-center" style="border-right: 1px solid #f4f4f4">
                  <div id="sparkline-1"></div>
                  <div class="knob-label">Visitors</div>
                </div>
                <!-- ./col -->
                <div class="col-xs-4 text-center" style="border-right: 1px solid #f4f4f4">
                  <div id="sparkline-2"></div>
                  <div class="knob-label">Online</div>
                </div>
                <!-- ./col -->
                <div class="col-xs-4 text-center">
                  <div id="sparkline-3"></div>
                  <div class="knob-label">Exists</div>
                </div>
                <!-- ./col -->
              </div>
              <!-- /.row -->
            </div>
          </div>
          <!-- /.box -->

          <!-- solid sales graph -->
          <div class="box box-solid bg-teal-gradient">
            <div class="box-header">
              <i class="fa fa-th"></i>

              <h3 class="box-title">Sales Graph</h3>

              <div class="box-tools pull-right">
                <button type="button" class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-minus"></i>
                </button>
                <button type="button" class="btn bg-teal btn-sm" data-widget="remove"><i class="fa fa-times"></i>
                </button>
              </div>
            </div>
            <div class="box-body border-radius-none">
              <div class="chart" id="line-chart" style="height: 250px;"></div>
            </div>
            <!-- /.box-body -->
            <div class="box-footer no-border">
              <div class="row">
                <div class="col-xs-4 text-center" style="border-right: 1px solid #f4f4f4">
                  <input type="text" class="knob" data-readonly="true" value="20" data-width="60" data-height="60"
                         data-fgColor="#39CCCC">

                  <div class="knob-label">Mail-Orders</div>
                </div>
                <!-- ./col -->
                <div class="col-xs-4 text-center" style="border-right: 1px solid #f4f4f4">
                  <input type="text" class="knob" data-readonly="true" value="50" data-width="60" data-height="60"
                         data-fgColor="#39CCCC">

                  <div class="knob-label">Online</div>
                </div>
                <!-- ./col -->
                <div class="col-xs-4 text-center">
                  <input type="text" class="knob" data-readonly="true" value="30" data-width="60" data-height="60"
                         data-fgColor="#39CCCC">

                  <div class="knob-label">In-Store</div>
                </div>
                <!-- ./col -->
              </div>
              <!-- /.row -->
            </div>
            <!-- /.box-footer -->
          </div>
          <!-- /.box -->

          <!-- Calendar -->
          <div class="box box-solid bg-green-gradient">
            <div class="box-header">
              <i class="fa fa-calendar"></i>

              <h3 class="box-title">Calendar</h3>
              <!-- tools box -->
              <div class="pull-right box-tools">
                <!-- button with a dropdown -->
                <div class="btn-group">
                  <button type="button" class="btn btn-success btn-sm dropdown-toggle" data-toggle="dropdown">
                    <i class="fa fa-bars"></i></button>
                  <ul class="dropdown-menu pull-right" role="menu">
                    <li><a href="<?php echo base_url()?>assets/#">Add new event</a></li>
                    <li><a href="<?php echo base_url()?>assets/#">Clear events</a></li>
                    <li class="divider"></li>
                    <li><a href="<?php echo base_url()?>assets/#">View calendar</a></li>
                  </ul>
                </div>
                <button type="button" class="btn btn-success btn-sm" data-widget="collapse"><i class="fa fa-minus"></i>
                </button>
                <button type="button" class="btn btn-success btn-sm" data-widget="remove"><i class="fa fa-times"></i>
                </button>
              </div>
              <!-- /. tools -->
            </div>
            <!-- /.box-header -->
            <div class="box-body no-padding">
              <!--The calendar -->
              <div id="calendar" style="width: 100%"></div>
            </div>
            <!-- /.box-body -->
            <div class="box-footer text-black">
              <div class="row">
                <div class="col-sm-6">
                  <!-- Progress bars -->
                  <div class="clearfix">
                    <span class="pull-left">Task #1</span>
                    <small class="pull-right">90%</small>
                  </div>
                  <div class="progress xs">
                    <div class="progress-bar progress-bar-green" style="width: 90%;"></div>
                  </div>

                  <div class="clearfix">
                    <span class="pull-left">Task #2</span>
                    <small class="pull-right">70%</small>
                  </div>
                  <div class="progress xs">
                    <div class="progress-bar progress-bar-green" style="width: 70%;"></div>
                  </div>
                </div>
                <!-- /.col -->
                <div class="col-sm-6">
                  <div class="clearfix">
                    <span class="pull-left">Task #3</span>
                    <small class="pull-right">60%</small>
                  </div>
                  <div class="progress xs">
                    <div class="progress-bar progress-bar-green" style="width: 60%;"></div>
                  </div>

                  <div class="clearfix">
                    <span class="pull-left">Task #4</span>
                    <small class="pull-right">40%</small>
                  </div>
                  <div class="progress xs">
                    <div class="progress-bar progress-bar-green" style="width: 40%;"></div>
                  </div>
                </div>
                <!-- /.col -->
              </div>
              <!-- /.row -->
            </div>
          </div>
          <!-- /.box -->

        </section>
        <!-- right col -->
      </div>
      <!-- /.row (main row) -->

    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

</body>

</html>

View/template/header.php
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Kampus | Dashboard</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.7 -->
  <link rel="stylesheet" href="<?php echo base_url()?>assets/bower_components/bootstrap/dist/css/bootstrap.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="<?php echo base_url()?>assets/bower_components/font-awesome/css/font-awesome.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="<?php echo base_url()?>assets/bower_components/Ionicons/css/ionicons.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="<?php echo base_url()?>assets/dist/css/AdminLTE.min.css">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="<?php echo base_url()?>assets/dist/css/skins/_all-skins.min.css">
  <!-- Morris chart -->
  <link rel="stylesheet" href="<?php echo base_url()?>assets/bower_components/morris.js/morris.css">
  <!-- jvectormap -->
  <link rel="stylesheet" href="<?php echo base_url()?>assets/bower_components/jvectormap/jquery-jvectormap.css">
  <!-- Date Picker -->
  <link rel="stylesheet" href="<?php echo base_url()?>assets/bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
  <!-- Daterange picker -->
  <link rel="stylesheet" href="<?php echo base_url()?>assets/bower_components/bootstrap-daterangepicker/daterangepicker.css">
  <!-- bootstrap wysihtml5 - text editor -->
  <link rel="stylesheet" href="<?php echo base_url()?>assets/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">

  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="<?php echo base_url()?>assets/https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="<?php echo base_url()?>assets/https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->

  <!-- Google Font -->
  <link rel="stylesheet" href="<?php echo base_url()?>assets/https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

  <header class="main-header">
    <!-- Logo -->
    <a href="<?php echo base_url()?>assets/index2.html" class="logo">
      <!-- mini logo for sidebar mini 50x50 pixels -->
      <span class="logo-mini"><b>A</b>LT</span>
      <!-- logo for regular state and mobile devices -->
      <span class="logo-lg"><b>Kampus</b>  Coy</span>
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top">
      <!-- Sidebar toggle button-->
      <a href="<?php echo base_url()?>assets/#" class="sidebar-toggle" data-toggle="push-menu" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>

      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <!-- Messages: style can be found in dropdown.less-->
          <li class="dropdown messages-menu">
            <a href="<?php echo base_url()?>assets/#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-envelope-o"></i>
              <span class="label label-success">4</span>
            </a>
            <ul class="dropdown-menu">
              <li class="header">You have 4 messages</li>
              <li>
                <!-- inner menu: contains the actual data -->
                <ul class="menu">
                  <li><!-- start message -->
                    <a href="<?php echo base_url()?>assets/#">
                      <div class="pull-left">
                        <img src="<?php echo base_url()?>assets/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        Support Team
                        <small><i class="fa fa-clock-o"></i> 5 mins</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
                  <!-- end message -->
                  <li>
                    <a href="<?php echo base_url()?>assets/#">
                      <div class="pull-left">
                        <img src="<?php echo base_url()?>assets/dist/img/user3-128x128.jpg" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        AdminLTE Design Team
                        <small><i class="fa fa-clock-o"></i> 2 hours</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
                  <li>
                    <a href="<?php echo base_url()?>assets/#">
                      <div class="pull-left">
                        <img src="<?php echo base_url()?>assets/dist/img/user4-128x128.jpg" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        Developers
                        <small><i class="fa fa-clock-o"></i> Today</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
                  <li>
                    <a href="<?php echo base_url()?>assets/#">
                      <div class="pull-left">
                        <img src="<?php echo base_url()?>assets/dist/img/user3-128x128.jpg" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        Sales Department
                        <small><i class="fa fa-clock-o"></i> Yesterday</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
                  <li>
                    <a href="<?php echo base_url()?>assets/#">
                      <div class="pull-left">
                        <img src="<?php echo base_url()?>assets/dist/img/user4-128x128.jpg" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        Reviewers
                        <small><i class="fa fa-clock-o"></i> 2 days</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
                </ul>
              </li>
              <li class="footer"><a href="<?php echo base_url()?>assets/#">See All Messages</a></li>
            </ul>
          </li>
          <!-- Notifications: style can be found in dropdown.less -->
          <li class="dropdown notifications-menu">
            <a href="<?php echo base_url()?>assets/#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-bell-o"></i>
              <span class="label label-warning">10</span>
            </a>
            <ul class="dropdown-menu">
              <li class="header">You have 10 notifications</li>
              <li>
                <!-- inner menu: contains the actual data -->
                <ul class="menu">
                  <li>
                    <a href="<?php echo base_url()?>assets/#">
                      <i class="fa fa-users text-aqua"></i> 5 new members joined today
                    </a>
                  </li>
                  <li>
                    <a href="<?php echo base_url()?>assets/#">
                      <i class="fa fa-warning text-yellow"></i> Very long description here that may not fit into the
                      page and may cause design problems
                    </a>
                  </li>
                  <li>
                    <a href="<?php echo base_url()?>assets/#">
                      <i class="fa fa-users text-red"></i> 5 new members joined
                    </a>
                  </li>
                  <li>
                    <a href="<?php echo base_url()?>assets/#">
                      <i class="fa fa-shopping-cart text-green"></i> 25 sales made
                    </a>
                  </li>
                  <li>
                    <a href="<?php echo base_url()?>assets/#">
                      <i class="fa fa-user text-red"></i> You changed your username
                    </a>
                  </li>
                </ul>
              </li>
              <li class="footer"><a href="<?php echo base_url()?>assets/#">View all</a></li>
            </ul>
          </li>
          <!-- Tasks: style can be found in dropdown.less -->
          <li class="dropdown tasks-menu">
            <a href="<?php echo base_url()?>assets/#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-flag-o"></i>
              <span class="label label-danger">9</span>
            </a>
            <ul class="dropdown-menu">
              <li class="header">You have 9 tasks</li>
              <li>
                <!-- inner menu: contains the actual data -->
                <ul class="menu">
                  <li><!-- Task item -->
                    <a href="<?php echo base_url()?>assets/#">
                      <h3>
                        Design some buttons
                        <small class="pull-right">20%</small>
                      </h3>
                      <div class="progress xs">
                        <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar"
                             aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                          <span class="sr-only">20% Complete</span>
                        </div>
                      </div>
                    </a>
                  </li>
                  <!-- end task item -->
                  <li><!-- Task item -->
                    <a href="<?php echo base_url()?>assets/#">
                      <h3>
                        Create a nice theme
                        <small class="pull-right">40%</small>
                      </h3>
                      <div class="progress xs">
                        <div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar"
                             aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                          <span class="sr-only">40% Complete</span>
                        </div>
                      </div>
                    </a>
                  </li>
                  <!-- end task item -->
                  <li><!-- Task item -->
                    <a href="<?php echo base_url()?>assets/#">
                      <h3>
                        Some task I need to do
                        <small class="pull-right">60%</small>
                      </h3>
                      <div class="progress xs">
                        <div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar"
                             aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                          <span class="sr-only">60% Complete</span>
                        </div>
                      </div>
                    </a>
                  </li>
                  <!-- end task item -->
                  <li><!-- Task item -->
                    <a href="<?php echo base_url()?>assets/#">
                      <h3>
                        Make beautiful transitions
                        <small class="pull-right">80%</small>
                      </h3>
                      <div class="progress xs">
                        <div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar"
                             aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                          <span class="sr-only">80% Complete</span>
                        </div>
                      </div>
                    </a>
                  </li>
                  <!-- end task item -->
                </ul>
              </li>
              <li class="footer">
                <a href="<?php echo base_url()?>assets/#">View all tasks</a>
              </li>
            </ul>
          </li>
          <!-- User Account: style can be found in dropdown.less -->
          <li class="dropdown user user-menu">
            <a href="<?php echo base_url()?>assets/#" class="dropdown-toggle" data-toggle="dropdown">
              <img src="<?php echo base_url()?>assets/dist/img/user2-160x160.jpg" class="user-image" alt="User Image">
              <span class="hidden-xs">Alexander Pierce</span>
            </a>
            <ul class="dropdown-menu">
              <!-- User image -->
              <li class="user-header">
                <img src="<?php echo base_url()?>assets/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">

                <p>
                  Alexander Pierce - Web Developer
                  <small>Member since Nov. 2012</small>
                </p>
              </li>
              <!-- Menu Body -->
              <li class="user-body">
                <div class="row">
                  <div class="col-xs-4 text-center">
                    <a href="<?php echo base_url()?>assets/#">Followers</a>
                  </div>
                  <div class="col-xs-4 text-center">
                    <a href="<?php echo base_url()?>assets/#">Sales</a>
                  </div>
                  <div class="col-xs-4 text-center">
                    <a href="<?php echo base_url()?>assets/#">Friends</a>
                  </div>
                </div>
                <!-- /.row -->
              </li>
              <!-- Menu Footer-->
              <li class="user-footer">
                <div class="pull-left">
                  <a href="<?php echo base_url()?>assets/#" class="btn btn-default btn-flat">Profile</a>
                </div>
                <div class="pull-right">
                  <a href="<?php echo base_url()?>assets/#" class="btn btn-default btn-flat">Sign out</a>
                </div>
              </li>
            </ul>
          </li>
          <!-- Control Sidebar Toggle Button -->
          <li>
            <a href="<?php echo base_url()?>assets/#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
          </li>
        </ul>
      </div>
    </nav>
  </header>

View/template/side.php

  <!-- Left side column. contains the logo and sidebar -->
  <aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
      <!-- Sidebar user panel -->
      <div class="user-panel">
        <div class="pull-left image">
          <img src="<?php echo base_url()?>assets/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
        </div>
        <div class="pull-left info">
          <p>Alexander Pierce</p>
          <a href="<?php echo base_url()?>assets/#"><i class="fa fa-circle text-success"></i> Online</a>
        </div>
      </div>
      <!-- search form -->
      <form action="#" method="get" class="sidebar-form">
        <div class="input-group">
          <input type="text" name="q" class="form-control" placeholder="Search...">
          <span class="input-group-btn">
                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
              </span>
        </div>
      </form>
      <!-- /.search form -->
      <!-- sidebar menu: : style can be found in sidebar.less -->
      <ul class="sidebar-menu" data-widget="tree">
        <li class="header">MAIN NAVIGATION</li>
        <li class="active treeview">
          <a href="<?php echo base_url()?>assets/#">
            <i class="fa fa-dashboard"></i> <span>Dashboard</span>            
          </a>          
        </li>
        <li class="active treeview">
          <a href="<?php echo base_url()?>assets/#">
            <i class="fa fa-graduation-cap"></i> <span>Mahasiswa</span>            
          </a>          
        </li>
        <li class="active treeview">
          <a href="<?php echo base_url()?>assets/#">
            <i class="fa fa-user"></i> <span>Dosen</span>            
          </a>          
        </li> <li class="active treeview">
          <a href="<?php echo base_url()?>assets/#">
            <i class="fa fa-book"></i> <span>Jadwal kuliah</span>            
          </a>          
        </li>
        <li class="active treeview">
          <a href="<?php echo base_url()?>assets/#">
            <i class="fa fa-university"></i> <span>Jurusan</span>            
          </a>          
        </li>
        <li class="active treeview">
          <a href="<?php echo base_url()?>assets/#">
            <i class="fa fa-lock"></i> <span>Ganti Password</span>            
          </a>          
        </li>
        <li class="active treeview">
          <a href="<?php echo base_url()?>assets/#">
            <i class="fa fa-sign-out"></i> <span>Logout</span>            
          </a>          
        </li>
      </ul>
    </section>
    <!-- /.sidebar -->
  </aside>

View/template/footer.php
  <footer class="main-footer">
    <div class="pull-right hidden-xs">
      <b>Version</b> 2.4.18
    </div>
    <strong>Copyright &copy; 2014-2019 <a href="<?php echo base_url()?>assets/https://adminlte.io">AdminLTE</a>.</strong> All rights
    reserved.
  </footer>

  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark" style="display: none;">
    <!-- Create the tabs -->
    <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
      <li><a href="<?php echo base_url()?>assets/#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
      <li><a href="<?php echo base_url()?>assets/#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
    </ul>
    <!-- Tab panes -->
    <div class="tab-content">
      <!-- Home tab content -->
      <div class="tab-pane" id="control-sidebar-home-tab">
        <h3 class="control-sidebar-heading">Recent Activity</h3>
        <ul class="control-sidebar-menu">
          <li>
            <a href="<?php echo base_url()?>assets/javascript:void(0)">
              <i class="menu-icon fa fa-birthday-cake bg-red"></i>

              <div class="menu-info">
                <h4 class="control-sidebar-subheading">Langdon's Birthday</h4>

                <p>Will be 23 on April 24th</p>
              </div>
            </a>
          </li>
          <li>
            <a href="<?php echo base_url()?>assets/javascript:void(0)">
              <i class="menu-icon fa fa-user bg-yellow"></i>

              <div class="menu-info">
                <h4 class="control-sidebar-subheading">Frodo Updated His Profile</h4>

                <p>New phone +1(800)555-1234</p>
              </div>
            </a>
          </li>
          <li>
            <a href="<?php echo base_url()?>assets/javascript:void(0)">
              <i class="menu-icon fa fa-envelope-o bg-light-blue"></i>

              <div class="menu-info">
                <h4 class="control-sidebar-subheading">Nora Joined Mailing List</h4>

                <p>nora@example.com</p>
              </div>
            </a>
          </li>
          <li>
            <a href="<?php echo base_url()?>assets/javascript:void(0)">
              <i class="menu-icon fa fa-file-code-o bg-green"></i>

              <div class="menu-info">
                <h4 class="control-sidebar-subheading">Cron Job 254 Executed</h4>

                <p>Execution time 5 seconds</p>
              </div>
            </a>
          </li>
        </ul>
        <!-- /.control-sidebar-menu -->

        <h3 class="control-sidebar-heading">Tasks Progress</h3>
        <ul class="control-sidebar-menu">
          <li>
            <a href="<?php echo base_url()?>assets/javascript:void(0)">
              <h4 class="control-sidebar-subheading">
                Custom Template Design
                <span class="label label-danger pull-right">70%</span>
              </h4>

              <div class="progress progress-xxs">
                <div class="progress-bar progress-bar-danger" style="width: 70%"></div>
              </div>
            </a>
          </li>
          <li>
            <a href="<?php echo base_url()?>assets/javascript:void(0)">
              <h4 class="control-sidebar-subheading">
                Update Resume
                <span class="label label-success pull-right">95%</span>
              </h4>

              <div class="progress progress-xxs">
                <div class="progress-bar progress-bar-success" style="width: 95%"></div>
              </div>
            </a>
          </li>
          <li>
            <a href="<?php echo base_url()?>assets/javascript:void(0)">
              <h4 class="control-sidebar-subheading">
                Laravel Integration
                <span class="label label-warning pull-right">50%</span>
              </h4>

              <div class="progress progress-xxs">
                <div class="progress-bar progress-bar-warning" style="width: 50%"></div>
              </div>
            </a>
          </li>
          <li>
            <a href="<?php echo base_url()?>assets/javascript:void(0)">
              <h4 class="control-sidebar-subheading">
                Back End Framework
                <span class="label label-primary pull-right">68%</span>
              </h4>

              <div class="progress progress-xxs">
                <div class="progress-bar progress-bar-primary" style="width: 68%"></div>
              </div>
            </a>
          </li>
        </ul>
        <!-- /.control-sidebar-menu -->

      </div>
      <!-- /.tab-pane -->
      <!-- Stats tab content -->
      <div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
      <!-- /.tab-pane -->
      <!-- Settings tab content -->
      <div class="tab-pane" id="control-sidebar-settings-tab">
        <form method="post">
          <h3 class="control-sidebar-heading">General Settings</h3>

          <div class="form-group">
            <label class="control-sidebar-subheading">
              Report panel usage
              <input type="checkbox" class="pull-right" checked>
            </label>

            <p>
              Some information about this general settings option
            </p>
          </div>
          <!-- /.form-group -->

          <div class="form-group">
            <label class="control-sidebar-subheading">
              Allow mail redirect
              <input type="checkbox" class="pull-right" checked>
            </label>

            <p>
              Other sets of options are available
            </p>
          </div>
          <!-- /.form-group -->

          <div class="form-group">
            <label class="control-sidebar-subheading">
              Expose author name in posts
              <input type="checkbox" class="pull-right" checked>
            </label>

            <p>
              Allow the user to show his name in blog posts
            </p>
          </div>
          <!-- /.form-group -->

          <h3 class="control-sidebar-heading">Chat Settings</h3>

          <div class="form-group">
            <label class="control-sidebar-subheading">
              Show me as online
              <input type="checkbox" class="pull-right" checked>
            </label>
          </div>
          <!-- /.form-group -->

          <div class="form-group">
            <label class="control-sidebar-subheading">
              Turn off notifications
              <input type="checkbox" class="pull-right">
            </label>
          </div>
          <!-- /.form-group -->

          <div class="form-group">
            <label class="control-sidebar-subheading">
              Delete chat history
              <a href="<?php echo base_url()?>assets/javascript:void(0)" class="text-red pull-right"><i class="fa fa-trash-o"></i></a>
            </label>
          </div>
          <!-- /.form-group -->
        </form>
      </div>
      <!-- /.tab-pane -->
    </div>
  </aside>
  <!-- /.control-sidebar -->
  <!-- Add the sidebar's background. This div must be placed
       immediately after the control sidebar -->
  <div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->

<!-- jQuery 3 -->
<script src="<?php echo base_url()?>assets/bower_components/jquery/dist/jquery.min.js"></script>
<!-- jQuery UI 1.11.4 -->
<script src="<?php echo base_url()?>assets/bower_components/jquery-ui/jquery-ui.min.js"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
  $.widget.bridge('uibutton', $.ui.button);
</script>
<!-- Bootstrap 3.3.7 -->
<script src="<?php echo base_url()?>assets/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- Morris.js charts -->
<script src="<?php echo base_url()?>assets/bower_components/raphael/raphael.min.js"></script>
<script src="<?php echo base_url()?>assets/bower_components/morris.js/morris.min.js"></script>
<!-- Sparkline -->
<script src="<?php echo base_url()?>assets/bower_components/jquery-sparkline/dist/jquery.sparkline.min.js"></script>
<!-- jvectormap -->
<script src="<?php echo base_url()?>assets/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="<?php echo base_url()?>assets/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<!-- jQuery Knob Chart -->
<script src="<?php echo base_url()?>assets/bower_components/jquery-knob/dist/jquery.knob.min.js"></script>
<!-- daterangepicker -->
<script src="<?php echo base_url()?>assets/bower_components/moment/min/moment.min.js"></script>
<script src="<?php echo base_url()?>assets/bower_components/bootstrap-daterangepicker/daterangepicker.js"></script>
<!-- datepicker -->
<script src="<?php echo base_url()?>assets/bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="<?php echo base_url()?>assets/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
<!-- Slimscroll -->
<script src="<?php echo base_url()?>assets/bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="<?php echo base_url()?>assets/bower_components/fastclick/lib/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="<?php echo base_url()?>assets/dist/js/adminlte.min.js"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="<?php echo base_url()?>assets/dist/js/pages/dashboard.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="<?php echo base_url()?>assets/dist/js/demo.js"></script>

View/detail.php
<div class="content-wrapper">
<section class="content">
<h4><strong>Detail Data Mahasiswa</strong></h4>

<table class="table">
<tr>
<th>Nama</th>
<td><?php echo $detail->nama ?></td>
</tr>
<tr>
<th>NIM</th>
<td><?php echo $detail->nim ?></td>
</tr>
<tr>
<th>Tgl Lahir</th>
<td><?php echo $detail->tgl_lahir ?></td>
</tr>
<tr>
<th>Jurusan</th>
<td><?php echo $detail->jurusan?></td>
</tr>
<tr>
<th>ALAMAT</th>
<td><?php echo $detail->alamat ?></td>
</tr>
<tr>
<th>email</th>
<td><?php echo $detail->email ?></td>
</tr>
<tr>
<th>No. telpon</th>
<td><?php echo $detail->no_telp ?></td>
</tr>
<tr>
<td>
<img src="<?php echo base_url(); ?>assets/foto/<?php echo $detail->foto;?>" width="90" height="110">

</td>
<td></td>
</tr>
</table>
<a href="<?php echo base_url('Mahasiswa/index') ?>" class="btn btn-primary">KEMBALI</a>
</section>
</div>

View/edit.php
<div class="content-wrapper">
<section class="content">
<?php foreach ($mahasiswa as $mhs)?>
<form action="<?php echo base_url().'mahasiswa/update'; ?>" method="POST">
<div class="form-group">
<label>Nama mahasiswa </label>
<input type="hidden" name="id" class="form-control"
value="<?php echo $mhs->id ?>">
<input type="text" name="nama" class="form-control"
value="<?php echo $mhs->nama ?>">
</div>
<div class="form-group">
<label>NIM </label>
<input type="text" name="nim" class="form-control"
value="<?php echo $mhs->nim ?>">
</div>
<div class="form-group">
<label>Tanggal lahir </label>
<input type="date" name="tgl_lahir" class="form-control"
value="<?php echo $mhs->tgl_lahir ?>">
</div>
<div class="form-group">
<label>JURUSAN</label>
<select class="form-control" name='jurusan' value="<?php echo $mhs->jurusan ?>">
<option>MANAGEMEN INFORMASI</option>
<option>TEKNIK INFORMATIKA</option>
<option>TEKNIK KOMPUTER</option>
</select>
</div>
  <div class="form-group">
            <label>ALAMAT</label>
            <input type="text" name="alamat" class="form-control" value="<?php echo $mhs->alamat ?>">
          </div>
     
           <div class="form-group">
            <label>Email </label>
            <input type="text" name="email" class="form-control" value="<?php echo $mhs->email ?>">
          </div>
        
           <div class="form-group">
            <label>No.Telepon</label>
            <input type="text" name="no_telp" class="form-control" value="<?php echo $mhs->no_telp ?>">
          </div>
<button type="submit" class="btn btn-danger" name="reset1">RESET </button>

<button type="submit" class="btn btn-primary">SIMPAN</button>
</form>
</section>

</div>

View/laporan_pdf.php
<!DOCTYPE html>
<html><head>
<title></title>
</head><body>
<!--jka error html dan headnya Tidak boleh ada spaci trus =>  third_party\dompdf\dompdf.config.inc
 /**
   * Default __autoload() function
   jika  eror gunakan  
   function spl_autoload_register($class) {
    DOMPDF_autoload($class);
  }
   *
   * @param string $class
   */
  function __autoload($class) {
    DOMPDF_autoload($class);
  }-->
  <h3 style="text-align: center;">DAFTAR MAHASISWA</h3>
  <br><br>
<table>
<tr>
<th>NO</th>
<th>NAMA MAHASISWA</th>
<th>NIM</th>
<th>TANGGAL LAHIR</th>
<th>JURUSAN</th>
<th>ALAMT</th>
<th>EMAIL</th>
<th>NO. TELPON</th>
</tr>
<?php 
$no =1;
foreach ($mahasiswa as $mhs): ?>
<tr>
<td><?php echo $no++ ?></td>
<td><?php echo $mhs->nama ?></td>
<td><?php echo $mhs->nim ?></td>
<td><?php echo $mhs->tgl_lahir ?></td>
<td><?php echo $mhs->jurusan ?></td>
<td><?php echo $mhs->alamat ?></td>
<td><?php echo $mhs->email ?></td>
<td><?php echo $mhs->no_telp ?></td>
</tr>
<?php endforeach; ?>
</table>



</body>
</html>

View/mahasiswa.php
<div class="content-wrapper">
<section class="content-header">
      <h1>
        Data Mahasiswa
        <small>Table Data</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="<?php echo base_url()?>assets/#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li class="active">Data Mahasiswa</li>
      </ol>
    </section>
    <section class="content">
      <?php echo $this->session->flashdata('message'); ?>
      <button class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
        <i class="fa fa-plus"></i> Tambah Data Mahasiswa
      </button>

      <a class="btn btn-danger" href="<?php echo base_url('mahasiswa/CetakPrint') ?>"><i class="fa fa-print"></i> Print</a>
      <!--
      <a class="btn btn-warning" href="<?php echo base_url('mahasiswa/pdf') ?>"><i class="fa fa-file"></i> Export PDF</a>
      -->

      <div class="dropdown inline">
        <button class="btn btn-warning dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
          <i class="fa fa-download"></i>Export
          <span class="caret"></span>
        </button>
        <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
          <li><a href="<?php echo base_url('mahasiswa/pdf') ?>">PDF</a></li>
          <li><a href="<?php echo base_url('mahasiswa/excel') ?>">EXCEL</a></li>          
        </ul>
      </div>

      <div class="navbar-form navbar-right">
        <?php echo form_open('mahasiswa/search') ?>
        <input type="text" name="keyword" class="form-control" placeholder="Search">
        <button type="submit" class="btn btn-success">CARI</button>
        <?php echo form_close()?>
      </div>

      <table class="table">
        <tr>
          <th>No</th>
          <th>NAMA MAHASISWA</th>
          <th>NIM</th>
          <th>TGL LAHIR</th>
          <th>JURUSAN</th>
          <th colspan="2">Aksi</th>
        </tr>
        <?php 
          $no = 1;
          foreach ($mahasiswa as $mhs): 
            ?>
          
        <tr>
          <td><?php echo $no++ ?></td>
          <td><?php echo $mhs->nama ?></td>
          <td><?php echo $mhs->nim ?></td>
          <td><?php echo $mhs->tgl_lahir ?></td>
          <td><?php echo $mhs->jurusan ?></td>
          <td><?php echo anchor('mahasiswa/detail/'.$mhs->id,'<div class="btn btn-success btn-sm"><i class="fa fa-search-plus"></i></div>') ?></td>
          <td onclick="javascript: return confirm('Anda yakin mw hapus?')"><?php echo anchor('mahasiswa/hapus/'.$mhs->id,'<div class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></div>')?></td>
          <td><?php echo anchor('mahasiswa/edit/'.$mhs->id,'<div class="btn btn-primary btn-sm"><i class="fa fa-edit"></i></div>')?></td>
        </tr>
      <?php endforeach; ?>
      </table>
    </section>

    <!-- Button trigger modal -->


<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title" id="exampleModalLabel">Modal Input Data Mahasiswa</h4>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <!--<form method="post" action="<php echo base_url().'mahasiswa/tambah_aksi' ?>">-->
          <?php echo form_open_multipart('mahasiswa/tambah_aksi'); ?>
          <div class="form-group">
            <label>Nama Mahasiswa</label>
            <input type="text" name="nama" class="form-control">
          </div>
           <div class="form-group">
            <label>NIM</label>
            <input type="text" name="nim" class="form-control">
          </div>
           <div class="form-group">
            <label>Tanggal lahir</label>
            <input type="DATE" name="tgl_lahir" class="form-control">
          </div>
           <div class="form-group">
            <label>Jurusan</label>
            <select class="form-control" name='jurusan'>
                <option>TEKNIK INFORMATISI</option>
                <option>TEKNIK KOMPUTER</option>
                <option>MANAGEMEN INFORMATIKA</option>
            </select>           
          </div>
         
           <div class="form-group">
            <label>ALAMAT</label>
            <input type="text" name="alamat" class="form-control">
          </div>
     
           <div class="form-group">
            <label>Email </label>
            <input type="text" name="email" class="form-control">
          </div>
        
           <div class="form-group">
            <label>No.Telepon</label>
            <input type="text" name="no_telp" class="form-control">
          </div>
          <div class="form-group">
            <label>Upload Photo</label>
            <input type="file" name="foto" class="form-control">
          </div>


           <button type="reset" class="btn btn-danger" data-dismiss="modal">Reset</button>
        <button type="submit" class="btn btn-primary">Simpan</button>
        <!--</form>-->
        <?php echo form_close(); ?>
      </div>
      <div class="modal-footer">
       
      </div>
    </div>
  </div>
</div>
</div>

View/print_mahasiswa.php
<!DOCTYPE html>
<html><head>
<title></title>

</head><body>


<table>
<tr>
<th>NO</th>
<th>NAMA MAHASISWA</th>
<th>NIM</th>
<th>TANGGAL LAHIR</th>
<th>JURUSAN</th>
<th>ALAMT</th>
<th>EMAIL</th>
<th>NO. TELPON</th>
</tr>
<?php 
$no =1;
foreach ($mahasiswa as $mhs): ?>
<tr>
<td><?php echo $no++ ?></td>
<td><?php echo $mhs->nama ?></td>
<td><?php echo $mhs->nim ?></td>
<td><?php echo $mhs->tgl_lahir ?></td>
<td><?php echo $mhs->jurusan ?></td>
<td><?php echo $mhs->alamat ?></td>
<td><?php echo $mhs->email ?></td>
<td><?php echo $mhs->no_telp ?></td>
</tr>
<?php endforeach; ?>
</table>

<script type="text/javascript">
window.print();
</script>

</body>
</html>






==================================================================















Membuat Website Sederhana Dengan Codeigniter Membuat Website Sederhana Dengan Codeigniter Reviewed by Leo on 09:42 Rating: 5

No comments