<?php



class Admin_model extends CI_Model{

	

	public function userexist($username,$password){

		

	  $query = $this->db->get_where( 'shop_user',array('uname'=>$username,'pword'=>md5($password)) );

		

		 if($query->num_rows() == 0)

		  return false;

		  

		 else

		  return true ;

	

	}

	

	public function checkout_userexist($username,$password){

		

	  $query = $this->db->get_where( 'shop_checkoutusers',array('email'=>$username,'password'=>$password,'active'=>1) );

		

		 if($query->num_rows() == 0)

		  return false;

		  

		 else

		  return true ;

	

	}

	

	

	public function is_deactived_user($username,$password){

		

	  $query = $this->db->get_where( 'shop_checkoutusers',array('username'=>$username,'password'=>$password,'active'=>0) );

		

		 if($query->num_rows() == 1)

		  return true;

		  

		 else

		  return false ;

	

	}



	



}



?>