> * * ----------------------------------------------------------------------------- * * See main.inc.php for release information * * manage all the ajax requests * ----------------------------------------------------------------------------- */ define('PHPWG_ROOT_PATH',dirname(dirname(dirname(__FILE__))).'/'); /* * set ajax module in admin mode if request is used for admin interface */ if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']=''; if(preg_match('/^admin\./i', $_REQUEST['ajaxfct'])) { define('IN_ADMIN', true); } // the common.inc.php file loads all the main.inc.php plugins files include_once(PHPWG_ROOT_PATH.'include/common.inc.php' ); include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCAjax.class.inc.php'); include_once('ase_root.class.inc.php'); load_language('plugin.lang', ASE_PATH); class ASE_Ajax extends ASE_root { /** * constructor */ public function __construct($prefixeTable, $filelocation) { parent::__construct($prefixeTable, $filelocation); $this->loadConfig(); $this->checkRequest(); $this->returnAjaxContent(); } /** * check the $_REQUEST values and set default values * */ protected function checkRequest() { global $user; if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']=''; // check if asked function is valid if(!($_REQUEST['ajaxfct']=='admin.maps.getList' //$_REQUEST['ajaxfct']=='public.maps.getMarkerInfos' )) $_REQUEST['ajaxfct']=''; if(preg_match('/^admin\./i', $_REQUEST['ajaxfct']) and !is_admin()) $_REQUEST['ajaxfct']=''; if($_REQUEST['ajaxfct']!='') { /* * no check for admin.maps.getList & admin.assoc.getList requests */ } } //checkRequest /** * return ajax content */ protected function returnAjaxContent() { $result="

An error has occured

"; /* switch($_REQUEST['ajaxfct']) { case 'admin.maps.getList': $result=$this->ajax_gmaps_admin_mapsGetList(); break; } */ GPCAjax::returnResult($result); } /*------------------------------------------------------------------------* * * ADMIN FUNCTIONS * *----------------------------------------------------------------------- */ } //class $returned=new ASE_Ajax($prefixeTable, __FILE__); ?>