<?php
/**
 * @author QuanticaLabs - http://codecanyon.net/user/QuanticaLabs/portfolio?ref=QuanticaLabs
 *
 * @link			http://codecanyon.net/item/timetable-responsive-schedule-for-joomla/9749539?ref=QuanticaLabs
 * @copyright		Copyright (C) 2008 - 2014 quanticalabs.com . All rights reserved.
 * @license			GNU General Public License version 2 or later; see LICENSE under Licensing/ directory
 */
 
defined('_JEXEC') or die('Restricted access');

// import Joomla modelform library
jimport('joomla.application.component.controller');

class TimetableControllerEvent extends JControllerLegacy
{
  public function load_event_hour() {
    try {
		$event_id = JFactory::getApplication()->input->get('event_id');
		$event_hour_id = JFactory::getApplication()->input->get('event_hour_d');
		$event_hour = $this->getModel("Event")->load_event_hour($event_hour_id);
		echo new JResponseJson($event_hour);
    } catch(Exception $e) {
		echo new JResponseJson($e);
    }
  }
}