<?php

/**
 * 
 * Model pentru tabela 'generale model' din baza de date.
 * 
 */
class Generale_model extends CI_Model{
    
    function __construct() 
    {
        parent::__construct();
    }
    
    /**
     * 
     * Metoda pentru preluarea info email
     * 
     */
    function getInfoEmail()
    {
        $ci = &get_instance();

        //select db oneapp
        $query = 
            "
            SELECT  I.*
            FROM setari_email as I
            WHERE 1 LIMIT 0,1 ";

        $q = $this->db->query($query);
        if(isset($q) && $q!=null)
            if($q->num_rows() > 0)
                return $q->result()[0];
        
        return false;
    }

    function getInfoConfig()
    {
        $ci = &get_instance();

        //select db oneapp
        $query = 
            "
            SELECT  I.*
            FROM setari_config as I
            WHERE 1 LIMIT 0,1 ";

        $q = $this->db->query($query);
        if(isset($q) && $q!=null)
            if($q->num_rows() > 0)
                return $q->result()[0];
        
        return false;
    }
}