<file_sep><?php

$menu00 = '';
$menu01 = '';
$menu02 = '';

if ($menu != null){
        if ($menu == 'dashboard') $menu00 = 'active';
        if ($menu == 'company') $menu01 = 'active';
		if ($menu == 'user') $menu02 = 'active';
}

?><file_sep><!doctype html>
<html>
    <head>
        <title><?php echo $title; ?></title>
        <link rel="stylesheet" href="<?php echo base_url().'/css/bootstrap.css'?>" />
    </head>

    <body>
      <center>
        <div class="row">
          <div class="col-sm-12">
            <nav aria-label="breadcrumb">
              <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="#">Ratwareid</a></li>
                <li class="breadcrumb-item active" aria-current="page"> <?php echo $judul; ?></li>
              </ol>
            </nav>
          </div>
        </div>
        <div class="col-sm-12">
          <h2>Selamat datang di <span class="badge badge-secondary">Ratwareid - HRMS</span></h2></br>
        </div>

        </center>
        <div class="row">
<file_sep>
<div class="col-sm-12 col-md-6">
<div class="row">
  <a href="<?php echo base_url() ?>user/tambah" class="btn btn-primary" role="button" aria-pressed="true">Tambah User</a>
</div>
<div class="row">
<table class="table table-striped">
  <thead>
    <tr>
      <th scope="col">#</th>
      <th scope="col">Username</th>
      <th scope="col">Password</th>
      <th scope="col">Action</th>
    </tr>
  </thead>
  <tbody>
    <?php
      $nourut = 1;
      foreach ($rows as $row) {
    ?>
    <tr>
      <th scope="row"><?php echo $nourut++; ?></th>
      <td><?php echo $row->username; ?></td>
      <td><?php echo $row->password; ?></td>
      <td>
        <a href="<?php echo base_url() ?>user/ubah/<?php echo $row->id; ?>">Edit</a>
        <a href="<?php echo base_url() ?>user/delete/<?php echo $row->id; ?>">Delete</a>
      </td>
    </tr>
    <?php
      }
    ?>
  </tbody>
</table>
</div>
</div>
<file_sep><?php
/**
 * Created by IntelliJ IDEA.
 * User: jerry
 * Date: 25/01/19
 * Time: 11:17
 */

class Admin_model extends CI_Model {

//    nama tabel dan primary key
    private $table = 'userdata';
    private $pk = 'id';

    public function showall() {
        $q = $this->db->order_by($this->pk);
        $q = $this->db->get($this->table);
        return $q;
    }

}
?><file_sep><style>
   .border{
	height: 700px;   
   }
</style>
<div class="border">
<div class="content-wrapper">
    <?php $this->load->view('user/signpost'); ?>
    <div class="col-lg-12">
    <div class="panel panel-default">
      <div class="panel-heading"><?php echo $heading ?></div>
      <div class="panel-body">
          <form action="<?php echo $action; ?>" method="post">
          <input type="hidden" name="userid" value="<?php echo $userid; ?>" />
          <div class="form-group">
            <label for="LabelName">Username</label>
            <input type="text" class="form-control" name="username" id="username" placeholder="Username" value="<?php echo $username; ?>">
          </div>
          <div class="form-group">
            <label for="LabelPassword">Fullname</label>
            <input type="text" class="form-control" name="fullname" id="fullname" placeholder="Fullname" value="<?php echo $fullname; ?>">
          </div>
          <div class="form-group">
            <label for="Label">Email</label>
            <input type="text" class="form-control" name="email" id="email" placeholder="Email" value="<?php echo $email; ?>">
          </div>
		  <div class="form-group">
            <label for="Label">Password</label>
            <input type="<PASSWORD>" class="form-control" name="password" id="password" placeholder="<PASSWORD>" value="<?php echo $password; ?>">
          </div>
            <button type="submit" class="btn btn-default">
                    Submit
            </button>
            <a href="<?php echo base_url() ?>user/">
                <button type="button" class="btn btn-default">
                    Cancel
                </button>
            </a>
        </form>
          <?php if ($error != ''){ ?>
            <br/>
            <div class="alert alert-danger" role="alert">
              <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
              <span class="sr-only">Error:</span>
              <?php echo $error; ?>
            </div>
          <?php }?>
          
        </div>
      </div>
    </div>
</div>
</div><file_sep><style>
   .border{
	height: 700px;   
   }
</style>
<div class="border">
	<div class="col-lg-12">
<div class="panel panel-default">
<!-- Default panel contents -->
<div class="panel-heading">User List</div>
<table class="table table-striped ">
  <thead>
    <tr>
      <th scope="col">No.</th>
      <th scope="col">Username</th>
	  <th scope="col">Full Name</th>
	  <th scope="col">Email</th>
      <th scope="col">Action</th>
    </tr>
  </thead>
  <tbody>
    <?php
      $nourut = 1;
      foreach ($rows as $row) {
    ?>
    <tr>
      <th scope="row"><?php echo $nourut++; ?></th>
      <td><?php echo $row->username; ?></td>
	  <td><?php echo $row->fullname; ?></td>
      <td><?php echo $row->email; ?></td>
      <td>
        <a href="<?php echo base_url() ?>user/edit/<?php echo $row->userid; ?>">Edit</a>
        <a href="<?php echo base_url() ?>user/delete/<?php echo $row->userid; ?>">Delete</a>
      </td>
    </tr>
    <?php
      }
    ?>
  </tbody>
</table>
</div><!-- /.col-lg-6 -->
</div>

</div><file_sep><!-- jQuery 3 -->
<script src="<?php echo base_url().'bower_components/jquery/dist/jquery.min.js'?>"></script>
<!-- jQuery UI 1.11.4 -->
<script src="<?php echo base_url().'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().'bower_components/bootstrap/dist/js/bootstrap.min.js'?>"></script>
<!-- Morris.js charts -->
<script src="<?php echo base_url().'bower_components/raphael/raphael.min.js'?>"></script>
<script src="<?php echo base_url().'bower_components/morris.js/morris.min.js'?>"></script>
<!-- Sparkline -->
<script src="<?php echo base_url().'bower_components/jquery-sparkline/dist/jquery.sparkline.min.js'?>"></script>
<!-- jvectormap -->
<script src="<?php echo base_url().'plugins/jvectormap/jquery-jvectormap-1.2.2.min.js'?>"></script>
<script src="<?php echo base_url().'plugins/jvectormap/jquery-jvectormap-world-mill-en.js'?>"></script>
<!-- jQuery Knob Chart -->
<script src="<?php echo base_url().'bower_components/jquery-knob/dist/jquery.knob.min.js'?>"></script>
<!-- daterangepicker -->
<script src="<?php echo base_url().'bower_components/moment/min/moment.min.js'?>"></script>
<script src="<?php echo base_url().'bower_components/bootstrap-daterangepicker/daterangepicker.js'?>"></script>
<!-- datepicker -->
<script src="<?php echo base_url().'bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js'?>"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="<?php echo base_url().'plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js'?>"></script>
<!-- Slimscroll -->
<script src="<?php echo base_url().'bower_components/jquery-slimscroll/jquery.slimscroll.min.js'?>"></script>
<!-- FastClick -->
<script src="<?php echo base_url().'bower_components/fastclick/lib/fastclick.js'?>"></script>
<!-- AdminLTE App -->
<script src="<?php echo base_url().'dist/js/adminlte.min.js'?>"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="<?php echo base_url().'dist/js/pages/dashboard.js'?>"></script>
<!-- AdminLTE for demo purposes -->
<script src="<?php echo base_url().'dist/js/demo.js'?>"></script>

<script src="<?php echo base_url().'bower_components/chart.js/Chart.js'?>"></script>

<script>
  $(function () {
    /* ChartJS
     * -------
     * Here we will create a few charts using ChartJS
     */

    //BAR CHART
    var bar = new Morris.Bar({
      element: 'bar-chart',
      resize: true,
      data: [
        {y: '2006', a: 100, b: 90},
        {y: '2007', a: 75, b: 65},
        {y: '2008', a: 50, b: 40},
        {y: '2009', a: 75, b: 65},
        {y: '2010', a: 50, b: 40},
        {y: '2011', a: 75, b: 65},
        {y: '2012', a: 100, b: 90}
      ],
      barColors: ['#00a65a', '#f56954'],
      xkey: 'y',
      ykeys: ['a', 'b'],
      labels: ['CPU', 'DISK'],
      hideHover: 'auto'
    });
  })
</script>

</body>
</html>
<file_sep><style>
   .border{
	height: 700px;   
   }
</style>
<div class="border">
	<div class="col-lg-12">
<div class="panel panel-default">
<!-- Default panel contents -->
<div class="panel-heading">Company List</div>
<table class="table table-striped ">
  <thead>
    <tr>
      <th scope="col">No.</th>
      <th scope="col">Company Name</th>
      <th scope="col">Address</th>
      <th scope="col">Phone Number</th>
      <th scope="col">Action</th>
    </tr>
  </thead>
  <tbody>
    <?php
      $nourut = 1;
      if ($page != null) $nourut = $nourut + $page;
    
      foreach ($data->result() as $row) {
    ?>
    <tr>
      <th scope="row"><?php echo $nourut++; ?></th>
      <td><?php echo $row->company_name; ?></td>
      <td><?php echo $row->company_address; ?></td>
      <td><?php echo $row->company_phone; ?></td>
      <td>
        <a href="<?php echo base_url() ?>company/edit/<?php echo $row->company_id; ?>">Edit</a>
        <a href="<?php echo base_url() ?>company/delete/<?php echo $row->company_id; ?>">Delete</a>
      </td>
    </tr>
    <?php
      }
    ?>
  </tbody>
</table>
</div><!-- /.col-lg-6 -->
</div>

</div><file_sep><?php

class User_model extends CI_Model {

//    nama tabel dan primary key
    private $table = 'm_user';
    private $pk = 'userid';

//    tampilkan semua data
    public function tampilkanSemua() {
        $q = $this->db->order_by($this->pk);
        $q = $this->db->get($this->table);
        return $q;
    }

    public function getById($userid) {
        $q = $this->db->where($this->pk,$userid);
        $q = $this->db->get($this->table);
        return $q;
    }

    public function tambah($data) {
        $this->db->insert($this->table, $data);
    }

    public function ubah($userid,$data) {

        $this->db->where($this->pk, $userid);
        $this->db->update($this->table, $data);
    }

    public function hapus($userid) {
        $this->db->where($this->pk, $userid);
        $this->db->delete($this->table);
    }

}
<file_sep><style>
   .border{
	height: 700px;   
   }
</style>
<div class="border">
<div class="content-wrapper">
    <?php $this->load->view('company/signpost'); ?>
    <div class="col-lg-12">
    <div class="panel panel-default">
      <div class="panel-heading"><?php echo $heading ?></div>
      <div class="panel-body">
          <form action="<?php echo $action; ?>" method="post">
          <input type="hidden" name="company_id" value="<?php echo $company_id; ?>" />
          <div class="form-group">
            <label for="LabelName">Company Name</label>
            <input type="text" class="form-control" name="company_name" id="company_name" placeholder="Company Name" value="<?php echo $company_name; ?>">
          </div>
          <div class="form-group">
            <label for="LabelPassword">Company Address</label>
            <input type="text" class="form-control" name="company_address" id="company_address" placeholder="Address" value="<?php echo $company_address; ?>">
          </div>
          <div class="form-group">
            <label for="Label">Number Contact</label>
            <input type="number" class="form-control" name="company_phone" id="company_phone" placeholder="Phone Number" value="<?php echo $company_phone; ?>">
          </div>
            <button type="submit" class="btn btn-default">
                    Submit
            </button>
            <a href="<?php echo base_url() ?>company/">
                <button type="button" class="btn btn-default">
                    Cancel
                </button>
            </a>
        </form>
          <?php if ($error != ''){ ?>
            <br/>
            <div class="alert alert-danger" role="alert">
              <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
              <span class="sr-only">Error:</span>
              <?php echo $error; ?>
            </div>
          <?php }?>
          
        </div>
      </div>
    </div>
</div>
</div><file_sep><?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Auth extends CI_Controller {

    public function index($error = NULL) {
        $data = array(
            'title' => 'Welcome to Ratwareid Networks',
            'action' => site_url('auth/login'),
            'error' => $error,
            'judul' => 'Login Panel'
        );
        $this->load->view('login', $data);
    }

    public function login() {
        $this->load->model('auth_model');
        $login = $this->auth_model->login($this->input->post('username'),md5($this->input->post('password')));

        if ($login == 1) {
//          ambil detail data
            $row = $this->auth_model->data_login($this->input->post('username'), md5($this->input->post('password')));

//          daftarkan session
            $data = array(
                'logged' => TRUE,
                'username' => $row->username
            );
            $this->session->set_userdata($data);

//            redirect ke halaman sukses
            redirect(site_url('home'));
        } else {
//            tampilkan pesan error
            $error = 'username / password salah';
            $this->index($error);
            redirect(site_url(''));
        }
    }

    function logout() {
//        destroy session
        $this->session->sess_destroy();

//        redirect ke halaman login
        redirect(site_url('auth'));
    }

}

/* End of file auth.php */
/* Location: ./application/controllers/auth.php */
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Admin extends CI_Controller
{

    function __construct()
    {
        parent::__construct();
//            jika belum login redirect ke login
        if ($this->session->userdata('logged') <> 1) {
            redirect(site_url('auth'));
        }
    }


    public function index()
    {

        $this->load->model('admin_model');
        $rows = $this->admin_model->showall()->result();

        $data = array(
            'title' => 'Ratwareid.com',
            'judul' => 'Halaman Admin',
            'content' => 'admin/index',
            'rows' => $rows
        );

        $this->load->view('admin',$data);
    }
}<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Company extends CI_Controller {

        function __construct()
        {
            parent::__construct();
//            jika belum login redirect ke login
            if ($this->session->userdata('logged')<>1) {
                redirect(site_url('auth'));
            }
            //load libary pagination
            $this->load->library('pagination');
            $this->load->model('company_model');
        }

        public function index()
      	{
        
        $config['base_url'] = site_url('company/index'); //site url
        $config['total_rows'] = $this->db->count_all('m_company'); //total row
        $config['per_page'] = 10;  //show record per halaman
        $config["uri_segment"] = 3;  // uri parameter
        $choice = $config["total_rows"] / $config["per_page"];
        $config["num_links"] = floor($choice);
 
        // Membuat Style pagination untuk BootStrap v4
      $config['first_link']       = 'First';
        $config['last_link']        = 'Last';
        $config['next_link']        = 'Next';
        $config['prev_link']        = 'Prev';
        $config['full_tag_open']    = '<div class="pagging text-center"><nav><ul class="pagination justify-content-center">';
        $config['full_tag_close']   = '</ul></nav></div>';
        $config['num_tag_open']     = '<li class="page-item"><span class="page-link">';
        $config['num_tag_close']    = '</span></li>';
        $config['cur_tag_open']     = '<li class="page-item active"><span class="page-link">';
        $config['cur_tag_close']    = '<span class="sr-only">(current)</span></span></li>';
        $config['next_tag_open']    = '<li class="page-item"><span class="page-link">';
        $config['next_tagl_close']  = '<span aria-hidden="true">&raquo;</span></span></li>';
        $config['prev_tag_open']    = '<li class="page-item"><span class="page-link">';
        $config['prev_tagl_close']  = '</span>Next</li>';
        $config['first_tag_open']   = '<li class="page-item"><span class="page-link">';
        $config['first_tagl_close'] = '</span></li>';
        $config['last_tag_open']    = '<li class="page-item"><span class="page-link">';
        $config['last_tagl_close']  = '</span></li>';
 
        $this->pagination->initialize($config);
        $data['page'] = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
 
        //panggil function get_mahasiswa_list yang ada pada mmodel mahasiswa_model. 
        $data['data'] = $this->company_model->getlist_paging($config["per_page"], $data['page']);           
 
        $data['pagination'] = $this->pagination->create_links();
        $data['content'] = 'company/content';
        $data['menu'] = 'company';
 
        //load view mahasiswa view
        $this->load->view('company',$data);
                
      	}
    
        public function create() {
            $data = array(
                'title' => 'Ratwareid.com',
                'menu' => 'company',
                'heading' => 'Company / Add New Company',
                'error' => '',
                'action' => base_url().'company/docreate',
                'content' => 'company/form-input',
                'company_id' => '',
                'company_name' => '',
                'company_address' => '',
                'company_phone' => '',
                'button' => 'Create'
            );

            $this->load->view('company',$data);
        }
    
        public function docreate() {
            $data = array(
                'company_name' => $this->input->post('company_name'),
                'company_address' => $this->input->post('company_address'),
                'company_phone' => $this->input->post('company_phone')
            );
            
            if ($data['company_name'] != null && $data['company_address'] != null){
                $this->load->model('company_model');
                $this->company_model->create($data);
                redirect(base_url().'company');
            }else{
                $data = array(
                'error' => 'Please fill all empty field',
                'action' => base_url().'company/docreate',
                'content' => 'company/form-input',
                'company_name' => '',
                'company_address' => '',
                'company_phone' => '',
                'button' => 'Create'
                );
                $this->load->view('company',$data);
            }
        }
    
        public function edit($company_id) {

            $this->load->model('user_model');
            $row = $this->company_model->getById($company_id)->row();

            $data = array(
                'title' => 'Ratwareid.com',
                'menu' => 'company',
                'heading' => 'Edit Company',
                'error' => '',
                'action' => base_url().'company/doedit',
                'content' => 'company/form-input',
                'company_id' => $row->company_id,
                'company_name' => $row->company_name,
                'company_address' => $row->company_address,
                'company_phone' => $row->company_phone,
                'button' => 'Change Data'
            );

            $this->load->view('company',$data);
        }

        public function doedit() {
//            
            $data = array(
                'company_name' => $this->input->post('company_name'),
                'company_address' => $this->input->post('company_address'),
                'company_phone' => $this->input->post('company_phone')
            );
            $this->load->model('company_model');
            $this->company_model->edit($this->input->post('company_id'),$data);
            redirect(base_url().'company');
        }

        public function delete($company_id) {

            $this->load->model('company_model');
            $this->company_model->delete($company_id);

            redirect(base_url().'company');
        }
    
}
<file_sep># HRMS
Human Resource Management System <br/>
Supported and Thanks to : Codeigniter, Bootstrap , PHP , MYSQLI , AdminLTE <br/>

How to Install :<br/>
 
  - Please open <a href="https://github.com/ratwareid/hrms/blob/master/hrms.sql">hrms.sql</a> and use that for creating table<br/>
  - Please setup database on file database.php (application/config/database.php) <br/>
  - Please setup config.php (application/config/config.php) change $config['base_url'] = ''; into $config['base_url'] =     'http://localhost/hrms/'; or change hrms into your project folder name <br/>
  - Do Login using username : admin , password : <PASSWORD>
  
<br/>/////////////////////////////////////////////////////////////// <br/>

#Version : 0.0.1 <br/>
Date Commit : 13/2/2019 <br/>
Notes : <br/>
  - First Commit <br/>
  - Please setup database on file database.php (application/config/database.php) <br/>
  - Please open hrms.sql and use that for creating table<br/>
 
Best Regards Ratwareid <br/>
<br/>///////////////////////////////////////////////////////////////<br/>
<br/>///////////////////////////////////////////////////////////////<br/>
#Version : 0.0.2 <br/>
Date Commit : 15/2/2019 <br/>
Notes : <br/>
  - Fixing Menu <br/>
  - Added Master Company <br/>
<br/>///////////////////////////////////////////////////////////////<br/>
<br/>///////////////////////////////////////////////////////////////<br/>
#Version : 0.0.3 <br/>
Date Commit : 29/4/2019 <br/>
Notes : <br/>
  - Remove unused file <br/>
  - Add Pagination master company <br/>
  - Added Master User <br/>
<br/>///////////////////////////////////////////////////////////////<br/>
 
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class User extends CI_Controller {

        function __construct()
        {
            parent::__construct();
//            jika belum login redirect ke login
            if ($this->session->userdata('logged')<>1) {
                redirect(site_url('auth'));
            }
        }


	public function index()
	{
            $this->load->model('user_model');

            $rows = $this->user_model->tampilkanSemua()->result();

            $data = array(
                'title' => 'Ratwareid.com',
				'menu' => 'user',
                'judul' => 'Halaman User',
                'content' => 'user/content',
                'rows' => $rows
            );
//		echo 'ini adalah controller user';

            $this->load->view('user',$data);
	}

        public function create() {
            $data = array(
                'title' => 'Ratwareid.com',
				'menu' => 'user',
                'heading' => 'User / Add New User',
                'action' => base_url().'user/docreate',
                'content' => 'user/form-input',
				'userid' => '',
                'username' => '',
				'fullname' => '',
				'email' => '',
                'password' => '',
				'error' => ''
            );

            $this->load->view('user',$data);
        }

        public function docreate() {

//            warning : aksi ini tanpa ada validasi form
            $data = array(
                'username' => $this->input->post('username'),
				'fullname' => $this->input->post('fullname'),
				'email' => $this->input->post('email'),
                'password' => md5($this->input->post('password'))
            );

            $this->load->model('user_model');
            $this->user_model->tambah($data);

            redirect(base_url().'user');
        }

        public function edit($userid) {

            $this->load->model('user_model');
            $row = $this->user_model->getById($userid)->row();

            $data = array(
                'title' => 'Ratwareid.com',
                'menu' => 'company',
                'heading' => 'Edit Company',
				'error' => '',
                'action' => base_url().'user/doedit',
                'content' => 'user/form-input',
                'username' => $row->username,
				'fullname' => $row->fullname,
				'email' => $row->email,
                'password' => '',
                'userid' => $row->userid,
            );

            $this->load->view('user',$data);
        }

        public function doedit() {
//            warning : aksi ini tanpa ada validasi form
            $updatepassword = array(
				'username' => $this->input->post('username'),
                'fullname' => $this->input->post('fullname'),
				'email' => $this->input->post('email'),
                'password' => md5($this->input->post('password'))
            );

            $tidakupdatepassword = array(
			'username' => $this->input->post('username'),
                'fullname' => $this->input->post('fullname'),
				'email' => $this->input->post('email'),
                'username' => $this->input->post('username'),
            );

            $data = trim($this->input->post('password'))<>''?$updatepassword:$tid<PASSWORD>password;

            $this->load->model('user_model');
            $this->user_model->ubah($this->input->post('userid'),$data);

            redirect(base_url().'user');
        }

        public function delete($userid) {

            $this->load->model('user_model');
            $this->user_model->hapus($userid);

            redirect(base_url().'user');
        }
}

/* End of file user.php */
/* Location: ./application/controllers/user.php */
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Home extends CI_Controller {

        function __construct()
        {
            parent::__construct();
//            jika belum login redirect ke login
            if ($this->session->userdata('logged')<>1) {
                redirect(site_url('auth'));
            }
        }

        public function index()
      	{
                  $this->load->model('user_model');

                  $rows = $this->user_model->tampilkanSemua()->result();

                  $data = array(
                      'title' => 'Ratwareid.com',
                      'menu' => 'dashboard',
                      'judul' => 'Halaman Home',
                      'content' => 'home/content',
                      'rows' => $rows
                  );
      //		echo 'ini adalah controller user';

                  $this->load->view('home',$data);
      	}
}
<file_sep><?php
$this->load->view('resource/ratwareid/v1/header');
$this->load->view('resource/ratwareid/v1/footer');
?>
  <center>
    <div class="col-sm-4 " align="left">
      <form method="post" action="<?php echo $action ?>">
        <div class="form-group">
          <label for="exampleInputuserid1">Your username</label>
          <input type="username" class="form-control" name="username" aria-describedby="usernameHelp" placeholder="Enter Username">
          <small id="usernameHelp" class="form-text text-muted">We'll never share your data with anyone else.</small>
        </div>
        <div class="form-group" method="post" action="">
          <label for="exampleInputPassword1">Password</label>
          <input type="<PASSWORD>" class="form-control" name="password" placeholder="<PASSWORD>">
        </div>
        <div class="form-group form-check">
          <input type="checkbox" class="form-check-input" id="exampleCheck1">
          <label class="form-check-label" for="remember">Remember me</label>
        </div>
        <button name="submit" type="submit" value="Login" class="btn btn-primary">Login</button>
      </form>
      <? echo $error; ?>
    </div>
  </center>
<file_sep>-- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 02 Mei 2019 pada 10.30
-- Versi Server: 5.7.17-log
-- PHP Version: 5.6.30

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `hrms`
--

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

--
-- Struktur dari tabel `m_company`
--

CREATE TABLE `m_company` (
  `company_id` int(20) NOT NULL,
  `company_name` varchar(40) NOT NULL,
  `company_address` varchar(40) NOT NULL,
  `company_phone` varchar(20) NOT NULL,
  `company_logo` varchar(128) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data untuk tabel `m_company`
--

INSERT INTO `m_company` (`company_id`, `company_name`, `company_address`, `company_phone`, `company_logo`) VALUES
(4, 'PT. Mustibisa Corp', 'Jl. <NAME>', '0213213213', ''),
(5, 'PT Apapun Jadi', 'Jalan Cipinang Raya', '08123123123123', ''),
(6, 'PT. Sumber Makmur', 'Jl. Jatinegara timur IV ', '0', ''),
(10, 'PT Apapun Jadiin Kuy', 'Jl. merdeka 6', '0', ''),
(11, 'PT. Sumber berkah', 'Jl. jatinegara timur 3', '2147483647', ''),
(12, 'PT. Tembang kenangan', 'Jl. tubagus angke ', '2147483647', ''),
(13, 'PT. Berkahilah', 'Jl. Kebembeng 3', '089984343434', '');

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

--
-- Struktur dari tabel `m_library`
--

CREATE TABLE `m_library` (
  `lib_id` int(11) NOT NULL,
  `lib_name` varchar(255) NOT NULL,
  `lib_header` varchar(255) NOT NULL,
  `lib_detail` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Struktur dari tabel `m_user`
--

CREATE TABLE `m_user` (
  `userid` int(20) NOT NULL,
  `username` varchar(10) NOT NULL,
  `fullname` varchar(40) NOT NULL,
  `email` varchar(40) NOT NULL,
  `password` varchar(40) NOT NULL,
  `f_active` tinyint(1) DEFAULT NULL,
  `f_delete` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data untuk tabel `m_user`
--

INSERT INTO `m_user` (`userid`, `username`, `fullname`, `email`, `password`, `f_active`, `f_delete`) VALUES
(21, 'admin', 'Administrator', '<EMAIL>', '<PASSWORD>', NULL, NULL);

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
<file_sep><div class="content-wrapper">
<?php $this->load->view('user/signpost'); ?>
<?php $this->load->view('resource/search-bar'); ?>
<div class="col-lg-12">
    <a href="<?php echo base_url() ?>user/create">
        <button type="button" class="btn btn-default">
          <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> 
            Create
        </button>
    </a>
</div><br/><br/>
<?php $this->load->view('user/list_box'); ?>
<center>
<div class="col-lg-12">
        <div class="col">
            <!--Tampilkan pagination-->
            
        </div>
</div>
</center>
</div>

</div>

<file_sep><div class="content-wrapper">
  <?php $this->load->view('home/signpost'); ?>
  <?php $this->load->view('home/alert'); ?>
  <div class="panel panel-default">
    <div class="panel-body">
      <?php $this->load->view('home/chart_bar'); ?>
      <?php $this->load->view('home/announce'); ?>
    </div>
  </div>
</div>
<file_sep><?php

class Company_model extends CI_Model {

//  nama tabel dan primary key
    private $table = 'm_company';
    private $pk = 'company_id';

//    tampilkan semua data
//    public function getlist() {
//        $q = $this->db->order_by($this->pk);
//        $q = $this->db->get($this->table);
//        return $q;
//    }
    
    public function getlist_paging($limit, $start){
        $q = $this->db->get('m_company', $limit, $start);
        return $q;
    }
    

    public function getById($company_id) {
        $q = $this->db->where($this->pk,$company_id);
        $q = $this->db->get($this->table);
        return $q;
    }

    public function create($data) {
         $this->db->insert($this->table, $data);
    }

    public function edit($company_id,$data) {
        $this->db->where($this->pk, $company_id);
        $this->db->update($this->table, $data);
    }

    public function delete($company_id) {
        $this->db->where($this->pk, $company_id);
        $this->db->delete($this->table);
    }

}
<file_sep><div class="content-wrapper">
  <?php $this->load->view('admin/signpost'); ?>
</div>
<file_sep><?php
if ($this->session->userdata('logged')<>1) {
    redirect(site_url('auth'));
}
//header
$this->load->view('resource/ratwareid/v2/header_admin');
$this->load->view('resource/ratwareid/v2/sidepanel');

//body
//$this->load->view($content);
$this->load->view('resource/ratwareid/v2/example_admin');
//$this->load->view('resource/ratwareid/v2/example_main');
//$this->load->view('resource/ratwareid/v2/example_blank');

//footer
$this->load->view('resource/ratwareid/v2/copyright');
$this->load->view('resource/ratwareid/v2/sidebar_setting');
$this->load->view('resource/ratwareid/v2/footer_admin');
?>
<file_sep><?php
if ($this->session->userdata('logged')<>1) {
    redirect(site_url('auth'));
}
//header
$this->load->view('resource/header_admin');
$this->load->view('resource/sidepanel-header');
$this->load->view('resource/sidepanel-menu');
//body
$this->load->view($content);

//footer
$this->load->view('resource/copyright');
$this->load->view('resource/sidebar_setting');
$this->load->view('home/footer_home');
?>
