Пример #1
0
 public function processItinerary()
 {
     $id = JRequest::getVar('id', 0, 'post', 'int');
     // Check if the user is authorized to do this.
     if (!JFactory::getUser()->authorise('core.edit.state', $option)) {
         echo json_encode(array('type' => 'error', 'msg' => JText::_('JERROR_ALERTNOAUTHOR')));
         JFactory::getApplication()->close();
     }
     JLoader::register('ProcessHelper', JPATH_COMPONENT . DS . 'helpers' . DS . 'process.php');
     $result = ProcessHelper::processItinerary($id);
     echo json_encode($result);
     JFactory::getApplication()->close();
 }