Sign up for Bulldog News Alerts so you don't miss a thing!

donate

/** * $Id: gmapspro2.php,v 1.9 2009/09/05 09:58:06 cs1559 Exp $ */ // No direct access defined( '_JEXEC' ) or die( 'Restricted access' ); // SET VARIABLE TO USER MAPPING LIBRARY define( '_MAPLIB_INCLUDE', 1 ); // Require the base controller require_once( JPATH_COMPONENT.DS.'controller.php' ); define( '_GMAPS_LIB_DIR', JPATH_SITE . '/components/com_gmapspro2/lib/maps/' ); define( '_GMAPS_GEOCODE_LIB_DIR', JPATH_SITE . '/components/com_gmapspro2/lib/geocoder/' ); define( '_GMAPS_DIR', JPATH_SITE . '/components/com_gmapspro2/' ); define( '_GMAPS_CLASSES_DIR', JPATH_SITE . '/components/com_gmapspro2/classes/' ); define( '_GMAPS_DEBUG', false); define( '_GMAPS_USER_DIR', JPATH_SITE . DS. "gmapspro2" . DS); // Instantiate (if necessary) the Map Library configuration require_once(_GMAPS_CLASSES_DIR . 'gmapsutil.class.php'); require_once(_GMAPS_CLASSES_DIR . 'config.class.php'); require_once(_GMAPS_LIB_DIR.'config.class.php'); $gmconfig = GmapConfig::getInstance(); $config = fsMapsConfig::getInstance(_GMAPS_USER_DIR . "maplib.config.ini"); $config->setProperty("library_folder",$gmconfig->getPropertyValue("library_folder")); $config->setProperty("library_url_folder",$gmconfig->getPropertyValue("library_url_folder")); $config->setProperty("library_templates_folder",$gmconfig->getPropertyValue("library_templates_folder")); $config->setProperty("user_templates_folder",$gmconfig->getPropertyValue("user_templates_folder")); $config->setProperty("icon_folder",$gmconfig->getPropertyValue("icon_folder")); $config->setProperty("icon_folder_url",$gmconfig->getPropertyValue("icon_folder_url")); // Require specific controller if requested if($controller = JRequest::getWord('controller')) { $path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php'; if (file_exists($path)) { require_once $path; } else { $controller = ''; } } // Create the controller $classname = 'GMapsController'.$controller; $controller = new $classname( ); // Perform the Request task $controller->execute( JRequest::getVar( 'task' ) ); // Redirect if set by the controller $controller->redirect(); ?>