<?php

require_once("_frontend.php");

class Articles extends Frontend {

  function Articles() {
    
    parent::Frontend();
    
    $this->load->model("clanok");
    
    $this->_prepareLangPanel("articles");
  }
  
  function index() {
    
    $this->_assign("clanky", $this->clanok->vyber($this->jazyk));
    
    $this->_setBody("list_clankov");
    
    $this->_assign("articles_lang", $this->language->GetLang("articles"));
    
    $this->_display();
  }
  
  function display() {
    $this->_assign("clanok", $this->clanok->vyber($this->jazyk, $this->uri->segment(4)));
    
    $this->_setBody("text_clanku");
    
    $this->_assign("articles_lang", $this->language->GetLang("articles"));
    
    $this->_display();
  }

}

?>