<?php

class Home extends MY_Controller {

    public $newsletter = array();
    public $flash_news = array();
    
    function __construct() {
        parent::__construct();
        $this->title = $this->lang->line('Economistas-consultores');
        parent::addScriptFile('home.js');
    }

    function index() {
        
        $this->load->model('newsletter_model');
        $news_data = $this->newsletter_model->get_newsletters(1,0);
        if($news_data->num_rows > 0) {
            $this->newsletter = $news_data->row_array();
        }
        
        $this->load->model('link_documento_model');
        $flash_data = $this->link_documento_model->get_links(1,0);
        if($flash_data->num_rows > 0) {
            $this->flash_news = $flash_data->row_array();
        }
        
        parent::renderPage("home_view");
    }
    
    function show_info() {
        parent::renderPage("info_view");
    }
    

}

