Advertisement
Guest User

PHPINFO

a guest
Jun 15th, 2016
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.95 KB | None | 0 0
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3.  
  4. /**
  5.  * CMS Sekolahku | CMS (Content Management System) dan PPDB Online GRATIS untuk sekolah SD, SMP/Sederajat, SMA/Sederajat
  6.  * @version    1.4.7
  7.  * @author     Anton Sofyan | https://facebook.com/antonsofyan
  8.  * @copyright  (c) 2014-2016
  9.  * @link       http://sekolahku.web.id
  10.  * @since      Version 1.4.7
  11.  *
  12.  * PERINGATAN :
  13.  * 1. TIDAK DIPERKENANKAN MEMPERJUALBELIKAN APLIKASI INI TANPA SEIZIN DARI PIHAK PENGEMBANG APLIKASI.
  14.  * 2. TIDAK DIPERKENANKAN MENGHAPUS KODE SUMBER APLIKASI.
  15.  * 3. TIDAK MENYERTAKAN LINK KOMERSIL (JASA LAYANAN HOSTING DAN DOMAIN) YANG MENGUNTUNGKAN SEPIHAK.
  16.  */
  17.  
  18. class Login extends CI_Controller {
  19.  
  20.    public function __construct() {
  21.       parent::__construct();
  22.    }
  23.  
  24.    public function index() {
  25.       if ($this->auth->is_logged_in() == TRUE) {
  26.          redirect('dashboard');
  27.       }
  28.       if ($_POST) {
  29.          sleep(1);
  30.          if ($this->validation()) {
  31.             $username = $this->input->post('username');
  32.             $password = $this->input->post('password');
  33.             echo $this->auth->login($username, $password) ? 1 : 0;
  34.          } else {
  35.             echo 0;
  36.          }
  37.       } else {
  38.          $query = $this->db->select('value')->limit(1)->where('variable', 'nama_sekolah')->get('options')->row();
  39.          $data['nama_sekolah'] = $query->value;
  40.          $data['action'] = site_url(uri_string());
  41.          $this->load->view('users/form_login', $data);
  42.       }
  43.    }
  44.  
  45.    private function validation() {
  46.       $this->load->library('form_validation');
  47.       $this->form_validation->set_rules('username', 'Nama Akun', 'trim|required');
  48.       $this->form_validation->set_rules('password', 'Kata Sandi', 'trim|required');
  49.       $this->form_validation->set_error_delimiters('<i class="icon-remove-sign"></i> ', '<br>');
  50.       return $this->form_validation->run();
  51.    }
  52.  
  53.    public function php_version() {
  54.       phpinfo();
  55.    }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement