Advertisement
bayu_pangestoe

login

Aug 10th, 2017
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3.  
  4. class Login extends CI_Controller {
  5.    
  6.     // Index login
  7.     public function index() {
  8.         // Fungsi Login
  9.         $valid = $this->form_validation;
  10.         $username = $this->input->post('username');
  11.         $password = $this->input->post('password');
  12.         $valid->set_rules('username','Username','required');
  13.         $valid->set_rules('password','Password','required');
  14.         if($valid->run()) {
  15.             $this->simple_login->webbps($username,$password, base_url('admin/berita'), base_url('admin/login_view'));
  16.         }
  17.         // End fungsi login
  18.         $data = array(  'title' => 'Halaman Login Administrator');
  19.         $this->load->view('admin/login_view',$data);
  20.     }
  21.    
  22.     // Logout di sini
  23.     public function logout() {
  24.         $this->simple_login->logout(); 
  25.     }  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement