Parse error: syntax error, unexpected end of file in cook.php on line 1
<?php /** * @version 1.0 * */ defined('_JEXEC') or die('Restricted access'); function DJTabsBuildRoute(&$query) { $segments = array(); $app = JFactory::getApplication(); $menu = $app->getMenu('site'); if (empty($query['Itemid'])) { $menuItem = $menu->getActive(); } else { $menuItem = $menu->getItem($query['Itemid']); } $mView = (empty($menuItem->query['view'])) ? null : $menuItem->query['view']; $mId = (empty($menuItem->query['id'])) ? null : $menuItem->query['id']; if(isset($query['view'])) { switch ($query['view']) { case 'category': { if ($mView && $query['view'] == $mView && isset($query['id'])) { unset($query['view']); if (intval($query['id']) == $mId) { unset($query['id']); } else { $segments[] = $query['id']; unset($query['id']); } } else { $segments[] = $query['view']; $segments[] = $query['id']; unset($query['view']); unset($query['id']); } break; } case 'categories': { if ($query['view'] == $mView && isset($query['id'])) { unset($query['view']); if (intval($query['id']) == $mId) { unset($query['id']); } else { $segments[] = $query['id'] ? $query['id'] : 'all'; unset($query['id']); } } else { $segments[] = $query['view']; $segments[] = $query['id'] ? $query['id'] : 'all'; unset($query['view']); unset($query['id']); } break; } } } return $segments; } function DJTabsParseRoute($segments) { $app = JFactory::getApplication(); $menu = $app->getMenu(); $activemenu = $menu->getActive(); $db = JFactory::getDBO(); //$app->enqueueMessage(print_r($segments, true)); $query=array(); if (isset($segments[0])) { switch($segments[0]) { case 'categories': { $query['view'] = 'categories'; if (isset($segments[1])) { $query['id'] = ($segments[1] == 'all') ? 0 : $segments[1]; } break; } case 'category': { $query['view'] = 'category'; if (isset($segments[1])) { $query['id']= $segments[1]; } break; } default: { $query['view'] = 'category'; if (isset($segments[0])) { $query['id']= $segments[0]; } break; } } } return $query; } ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)