// no direct access defined('_JEXEC') or die; // Get application $application = JFactory::getApplication(); // Check user is logged in $user = JFactory::getUser(); if ($user->guest) { JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR')); $application->redirect('index.php'); } // Load admin language $language = JFactory::getLanguage(); $language->load('com_sigpro', JPATH_ADMINISTRATOR); // Load the helper and initialize JLoader::register('SigProHelper', JPATH_COMPONENT_ADMINISTRATOR . '/helper.php'); SigProHelper::initialize(); // Add model path if (version_compare(JVERSION, '3.0', 'ge')) { JModelLegacy::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/models'); } else { JModel::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/models'); } // Check some variables for security reasons $view = JRequest::getCmd('view', 'galleries'); if ($view == 'media' || $view == 'info' || $view == 'settings') { JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR')); $application->redirect('index.php'); } $type = JRequest::getCmd('type'); if ($type != 'site' && $type != 'k2') { JRequest::setVar('type', 'site');