<?php

include_once(dirname(__FILE__).'/../../Base/Controller.php');
include_once(dirname(__FILE__).'/../../Application/View/Page.php');
include_once(dirname(__FILE__).'/View.php');

class TaskController extends Controller
{
  function ItemList()
  {
    $Page = new PageView($this->System);
    if($this->System->Modules['Permission']->Check('Task', 'ItemList'))
    {
      $View = new TaskView($this->System);
      return($Page->GetOutput($View->ItemList()));
    } else return($Page->AccessDenied());
  }    
  
  function ErrorLog()
  {
    $Page = new PageView($this->System);
    if($this->System->Modules['Permission']->Check('Task', 'ErrorLog'))
    {
      $View = new TaskView($this->System);
      return($Page->GetOutput($View->ErrorLog()));
    } else return($Page->AccessDenied());
  }    

  function StandardLog()
  {
    $Page = new PageView($this->System);
    if($this->System->Modules['Permission']->Check('Task', 'StandardLog'))
    {
      $View = new TaskView($this->System);
      return($Page->GetOutput($View->StandardLog()));
    } else return($Page->AccessDenied());
  }    
}
