GRAYBYTE WORDPRESS FILE MANAGER2922

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/public_html/Barga/application/modules/customers/models/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/public_html/Barga/application/modules/customers/models//Customers_model.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Customers_model extends CI_Model
{
	var $table_app_customer = TABLE_CUSTOMER;
	var $table_app_users = TABLE_USERS;
	// var $table_app_settings = TABLE_APP_SETTINGS;
	// var $table_customer = TABLE_APP_USERS;
	// var $table_app_user_addresses = TABLE_APP_USER_ADDRESSES;
	// var $table_customer_ratings = TABLE_CUSTOMER_RATINGS;
	// var $table_job_posts = TABLE_JOB_POSTS;
	// var $table_services = TABLE_SERVICES;
	// var $table_service_provider_ratings = TABLE_SERVICE_PROVIDER_RATINGS;
	public function __construct()
    {
        parent::__construct();
    }

	public function getCustomerList($params = array())
	{
		$this->db->select('*');
        $this->db->from($this->table_app_customer);

        if(!empty($params['search']['name'])){
            $this->db->like('name',$params['search']['name']);
        }
		$this->db->order_by('dom','DESC');
		//set start and limit
        if(array_key_exists("start",$params) && array_key_exists("limit",$params)) {
            $this->db->limit($params['limit'],$params['start']);
        } elseif(!array_key_exists("start",$params) && array_key_exists("limit",$params)) {
            $this->db->limit($params['limit']);
        }
		return $this->db->get()->result();
    }

	public function customerSave($data_array, $id = 0)
	{
		if($id == 0) {
			$this->db->insert($this->table_app_customer,$data_array);
			$last_id = $this->db->insert_id();
		} else {
			$this->db->where('id', $id);
			$this->db->update($this->table_app_customer,$data_array);
			$last_id = $id;
		}
		return $last_id;
	}


	public function getCustomerData($customer_id)
	{
		$this->db->select('*');
		$this->db->where('id', $customer_id);
		$this->db->limit(1);
		return $this->db->get($this->table_app_customer)->row();
	}

	public function getAllCustomerData()
	{
		$this->db->select('*');
		$this->db->order_by('dom','DESC');
		return $this->db->get($this->table_app_customer)->result();
	}


	public function getAllWaiterData()
	{
		$this->db->select('*');
		$this->db->where('user_role_id',4);
		$this->db->order_by('dom','DESC');
		return $this->db->get($this->table_app_users)->result();
	}
			
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 27 2024 00:19:25
giriqfky / giriqfky
0755
Customers_model.php
2.221 KB
July 27 2024 00:19:25
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF