You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
574 B

<?php
/**
* @file ajax.php
* @brief Most ajax-requests call this file, it calls the specified function.
*/
?>
<?php include "conf.php"; /* load a local configuration */ ?>
<?php session_start(); ?>
<?php include "modulekit/loader.php"; /* loads all php-includes */ ?>
<?php
call_hooks("ajax_start");
function error($msg) {
/// Do something with this error
}
Header("Content-Type: application/json; charset=UTF-8");
$postdata = file_get_contents("php://input");
$fun = "ajax_{$_REQUEST['__func']}";
$return = $fun($_REQUEST, $postdata);
print json_encode($return);