<?php
  
$webdoc["page_title"].=" - List";

$person_role = 5;
if (!auth($person_role)) 
{
  $webdoc["message"][]=database_get_message("no_permission");
  $template->template_assign("no_display",true);
  return;
}

kernel_get_url($filter,$columns,$pages,$sort); //precte url a podle toho nastavi stranky a razeni.

$url_pages=kernel_create_pages_url($pages); //url pro ostatni odkazy (vcetne aktualni stranky)
$url_sort=kernel_create_sort_url($sort); //url pro razeni

$pages["url"]=$url.$url_sort;
$sort2["url"]=$url.$url_pages;

$url=$url_pages.$url_sort;

$list=database_get_categories_list($rows,$pages["records_total"],$pages,$sort); //vrati seznam pozadavku

kernel_create_pages($pages); //dopocitani dalsich promennych stranky pro sablonu
kernel_create_sort($sort,$sort2); //dopocitani dalsich promennych pro razeni zaznamu

if (count($list)==0) $webdoc["message"][]=database_get_message("list_empty");

$template->template_assign("columns_count",6); //pocet sloupcu 
$template->template_assign("title",array("Name","Time","Person","Description","Parent","Actions"));
$template->template_assign("values",array("name","time","person","description","parent"));
$template->template_assign("actions",array("View"=>"view","Edit"=>"edit","Delete"=>"delete"));
$template->template_assign("role",array("5","1","1"));
$template->template_assign("parametr", array("category_id"));

$template->template_assign("list",$list);
$template->template_assign("pages",$pages); //nastaveni hodnot stranky ve formulari
$template->template_assign("sort",$sort); //nastaveni hodnot razeni ve formulari
$template->template_assign("sort2",$sort2); //nastaveni hodnot razeni ve formulari


?>
