Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- defined('BASEPATH') OR exit('No direct script access allowed');
- class Login extends CI_Controller {
- // Index login
- public function index() {
- // Fungsi Login
- $valid = $this->form_validation;
- $username = $this->input->post('username');
- $password = $this->input->post('password');
- $valid->set_rules('username','Username','required');
- $valid->set_rules('password','Password','required');
- if($valid->run()) {
- $this->simple_login->webbps($username,$password, base_url('admin/berita'), base_url('admin/login_view'));
- }
- // End fungsi login
- $data = array( 'title' => 'Halaman Login Administrator');
- $this->load->view('admin/login_view',$data);
- }
- // Logout di sini
- public function logout() {
- $this->simple_login->logout();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement