diff --git a/application/config/autoload.php b/application/config/autoload.php index 4efddb0..4c77b6a 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -90,7 +90,7 @@ | $autoload['helper'] = array('url', 'file'); */ // $autoload['helper'] = array('url', 'utility_helper'); -$autoload['helper'] = array('url'); +$autoload['helper'] = array('url', 'file'); /* | ------------------------------------------------------------------- diff --git a/application/config/config.php b/application/config/config.php index 731ca1c..778ccff 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -23,7 +23,7 @@ | a PHP script and you can easily do that on your own. | */ -$config['base_url'] = 'http://localhost:8080/siakad_ma/'; +$config['base_url'] = 'http://localhost/siakad-ma/'; /* |-------------------------------------------------------------------------- diff --git a/application/config/routes.php b/application/config/routes.php index e8e2296..c4b0ea0 100644 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -1,5 +1,5 @@ my_controller/index | my-controller/my-method -> my_controller/my_method */ -$route['default_controller'] = 'welcome'; +// $route['default_controller'] = 'welcome'; +$route['default_controller'] = 'auth'; $route['404_override'] = ''; $route['translate_uri_dashes'] = FALSE; diff --git a/application/controllers/Auth.php b/application/controllers/Auth.php index 726fada..b40e85a 100644 --- a/application/controllers/Auth.php +++ b/application/controllers/Auth.php @@ -1,16 +1,47 @@ -load->model('Auth_model'); + // $this->load->library('form_validation'); } public function index() { + $this->load->view('login_form'); + // echo "test auth controller"; + } + + + public function login_aksi() + { + $this->form_validation->set_rules('username', 'Username', 'required'); + $this->form_validation->set_rules('password', 'Password', 'required'); + // digunakan untuk validasi dari inputan user dan dibuatkan session di tiap masing masing hak akses + // query di tiap tiap hak akses + if ($this->form_validation->run() != false) { + $username = $this->input->post('username'); + $password = $this->input->post('password'); + $where = array( + 'username' => $username, + 'password' => md5($password) + ); + var_dump($where); + } else { + echo "gak ada data yang masuk"; + } + } + + public function logout() + { } } diff --git a/application/controllers/Dashboard.php b/application/controllers/Dashboard.php new file mode 100644 index 0000000..8a34d68 --- /dev/null +++ b/application/controllers/Dashboard.php @@ -0,0 +1,25 @@ +load->view('templates/header'); + // letak if else bagian partial dashboard disesuaikan masing masing level ex if siswa daftar siswa elseif guru dashboard guru dll. + $this->load->view('partials/admin/dashboard_admin'); + $this->load->view('templates/footer'); + + // untuk siswa nanti if else lewat session level yang login lakukan dan sesuaikan dashboard tiap masing masing hak akses + } + +} + +/* End of file Dashboard.php and path \application\controllers\Dashboard.php */ diff --git a/application/controllers/Test_session.php b/application/controllers/Test_session.php new file mode 100644 index 0000000..0d75b29 --- /dev/null +++ b/application/controllers/Test_session.php @@ -0,0 +1,17 @@ +load->view('welcome_message'); } + + + public function cok() + { + echo "hello cok"; + } } diff --git a/application/helpers/utility_helper.php b/application/helpers/utility_helper.php new file mode 100644 index 0000000..8fc1497 --- /dev/null +++ b/application/helpers/utility_helper.php @@ -0,0 +1,10 @@ +session->userdata('status') == "telah_login" ? true : false; +// if ($redirect && $status === true) { +// redirect($redirect); +// } +// return $status; +// } diff --git a/application/models/Auth_model.php b/application/models/Auth_model.php new file mode 100644 index 0000000..201067b --- /dev/null +++ b/application/models/Auth_model.php @@ -0,0 +1,13 @@ +db->get_where($table, $where); + } +} + + +/* End of file Auth_model.php and path \application\models\Auth_model.php */ diff --git a/application/views/login_form.php b/application/views/login_form.php new file mode 100644 index 0000000..95b4e3e --- /dev/null +++ b/application/views/login_form.php @@ -0,0 +1,104 @@ + + + + + Login - SIAKAD MA HIDAYATULLAH - Bondowoso + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ IMG +
+ +
+ + Login SIAKAD + + +
+ + + + + +
+ +
+ + + + + +
+ +
+ +
+ +
+ + + + + + +
+ + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/templates/footer.php b/application/views/templates/footer.php index 35321d7..d9f7119 100644 --- a/application/views/templates/footer.php +++ b/application/views/templates/footer.php @@ -2,7 +2,7 @@ diff --git a/application/views/templates/header.php b/application/views/templates/header.php index b7fba99..7d58755 100644 --- a/application/views/templates/header.php +++ b/application/views/templates/header.php @@ -12,11 +12,11 @@ Admin - + - + @@ -30,10 +30,12 @@ -