<?php

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

class Logo_model extends CI_Model{

    function insert_logo($data){

        $query = $this->db->insert('logos',$data);

        if($query){
            return TRUE;
        }
        else{
            return FALSE;
        }

    }

    function show_logo(){

		$query = $this->db->get_where('logos', array('type' => 'client&partner'));
		$res = $query->result_array();
	 	return $res;

    }


    function delete_logo($data){
        unlink(FCPATH . $data['picture_path']);
        $query = $this->db->delete('logos', array('logoid' => $data['logoid']));

        if($query){
            return TRUE;
        }
        else{
            return FALSE;
        }
    }
    
    // function update_front_countdown($data){
    //     $array = array(
    //         'total_experience' => $data['total_experience'],
    //         'happy_clients' => $data['happy_clients'],
    //         'projects_done' => $data['projects_done']
    //     );
    
    //     $this->db->where('front_countdownid', $data['front_countdownid']);
    //     $query = $this->db->update('front_countdown', $array);

    //     if($query){
    //         return TRUE;
    //     }
    //     else{
    //         return FALSE;
    //     }
    // }

}

?>