olshop/application/controllers/su/Dashboard.php
2020-01-02 23:12:35 +07:00

39 lines
1.3 KiB
PHP

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Dashboard extends CI_Controller {
function __Construct()
{
parent ::__construct();
if($this->session->userdata('logged_in')==false){
$location = site_url('welcome');
header("Location: ".$location);
}
$this->load->model('Transaction');
}
public function index()
{
// echo "<ul>";
// echo "<li><a href='".site_url('su/user/tambah')."'>Tambah User(general)</a></li>";
// echo "<li><a href=''>View User</a></li>";
// echo "<li><a href=''>Delete User User</a></li>";
// echo "<li><a href=''>Update User User</a></li>";
// echo "<li><a href='".site_url('su/barang')."'>Barang</a></li>";
// echo "<li><a href='".site_url('su/barang/tambah')."'>Tambah Barang</a></li>";
// echo "<li><a href=''>Update Barang</a></li>";
// echo "<li><a href=''>Delete Barang</a></li>";
// echo "</ul>";
//$this->load->view('back/dashboard');
$sb['aktif'] = "Home";
$sb['order'] = $this->Transaction->pending_order();
$hd['title'] = "Dashboard Admin - Toko Dzaky Mulya";
$hd['User'] = $this->session->userdata('username');
$this->load->view('back/header',$hd);
$this->load->view('back/sidebar',$sb);
$this->load->view('back/dashboard');
$this->load->view('back/footer');
}
}