Php if
- 1. <?php if (!defined ('BASEEPATH')) exit ('No direct script acces allowed');
class access
{
public $user;
/**
*constructor
*/
function construct__construct ()
{
$this->CI=& get_instance();
$auth=$this->CI->config->item('auth');
$this->CI->load->helper('cookie');
$this->CI->load->model('users_model');
$this->users_model=& $this->CI->users_model;
}
/**
*cek login user
*/
function login ($username,$password)
{
$result = $this->users_model->get_login_info($username);
if ($result) // result Found
{
$password = md5($password);
if ($password === $result->password)