Initial baseline WACloud CI3 production
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class Device extends CI_Controller
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// Hanya admin yang bisa akses
|
||||
if (!$this->session->userdata('is_logged_in') || $this->session->userdata('role') != 'admin') {
|
||||
redirect('auth');
|
||||
}
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('templates/header');
|
||||
// Buat view untuk add device jika diperlukan
|
||||
echo '<div class="container mt-4"><h1>Halaman Tambah Device</h1><p>Halaman ini hanya bisa diakses oleh admin.</p></div>';
|
||||
$this->load->view('templates/footer');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user