> * * ----------------------------------------------------------------------------- * * 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); if(!defined('AJAX_CALL')) define('AJAX_CALL', 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; GPCAjax::checkToken(); // check if asked function is valid if(!($_REQUEST[GPC_AJAX]=='admin.config.setConfig' )) $_REQUEST[GPC_AJAX]=''; if(preg_match('/^admin\./i', $_REQUEST[GPC_AJAX]) and !is_admin()) $_REQUEST[GPC_AJAX]=''; if($_REQUEST[GPC_AJAX]!='') { } } //checkRequest /** * return ajax content */ protected function returnAjaxContent() { $result="

An error has occured

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