34 lines
1.0 KiB
PHP
34 lines
1.0 KiB
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Home extends CI_Controller {
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
|
|
$this->load->model('User_model');
|
|
is_logged_in();
|
|
}
|
|
public function index()
|
|
{
|
|
$data['nama'] = "Beranda";
|
|
$id_user=$this->session->userdata('id_user');
|
|
$data['user']=$this->User_model->get_user($id_user);
|
|
|
|
$this->db->select('*');
|
|
$this->db->from('jumlah_forecasting');
|
|
$this->db->where('id',1);
|
|
$data['forecasting'] = $this->db->get()->row_array();
|
|
$data['jenis'] = $this->db->get('jenis_kopi')->num_rows();
|
|
$data['data'] = $this->db->get('data_kopi')->num_rows();
|
|
|
|
|
|
$this->load->view('Templates/header.php',$data);
|
|
$this->load->view('Templates/navbar.php',$data);
|
|
$this->load->view('Templates/leftmenu.php',$data);
|
|
$this->load->view('Beranda/index.php',$data);
|
|
$this->load->view('Templates/footer.php',$data);
|
|
}
|
|
}
|