%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/ugotscom/www/boniface/application/modules/Welcome/models/
Upload File :
Create Path :
Current File : /home/ugotscom/www/boniface/application/modules/Welcome/models/Welcome_model.php

<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Welcome_model extends CI_Model {

   

    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }
	/////////////Check User//////////////////////
public function location_list(){
		$this->db->select('location_id,location');
		$this->db->from('locations');
		$this->db->where('status','1');
		$query = $this->db->get();
		$row = $query->result_array();
		return $row;	
	}
	public function cities(){
		$this->db->select('id,cities');
		$this->db->from('cities');
		$this->db->where('status','1');
		$query = $this->db->get();
		$row = $query->result_array();
		return $row;	
	}

	public function offers(){
		$this->db->select('*');
		$this->db->from('offers');
		$this->db->where('status','1');
		$query = $this->db->get();
		$row = $query->result_array();
		return $row;	
	}

		public function icities(){
		$this->db->select('id,cities');
		$this->db->from('international');
		$this->db->where('status','1');
		$query = $this->db->get();
		$row = $query->result_array();
		return $row;	
	}
		public function hospitals(){
		$this->db->select('hospital_id,hospital_name');
		$this->db->from('hospitals');
		$this->db->where('status','1');
		$query = $this->db->get();
		$row = $query->result_array();
		return $row;	
	}
	    function search_city($title){
        $this->db->like('cities', $title , 'both');
        $this->db->order_by('cities', 'ASC');
        $this->db->limit(10);
        return $this->db->get('cities')->result();
    }
    	 function getUsers($postData){
 
    $response = array();
  
    $this->db->select('*');

    if($postData['search'] ){
 

      // Select record
      $this->db->where("cities like '%".$postData['search']."%' ");
      
      $records = $this->db->get('cities')->result();

      foreach($records as $row ){
        $response[] = array("value"=>$row->id,"label"=>$row->cities);
      }
 

    }
    
    return $response;
  }
}
	

Zerion Mini Shell 1.0