header('Content-type: text/html; charset=UTF-8');
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
include_once('__config.php');
foreach($_GET as $k=>$v){
$_POST[$k]=$v;
}
$file_name = str_replace(':','/',str_replace(' ','_',$_POST['action'])).'.php';
$file_name_plugin = '--plugins/'.reset(explode(':',$_POST['action'])).'/ajax/'.end(explode(':',$_POST['action'])).'.php';
$func_name = str_replace(' ','_',str_replace('.','_',str_replace('.php','',end(explode('/',$file_name)))));
$file = file_exists($file_name_plugin)
? $file_name_plugin
: '--application/ajax/'.$file_name;
if(!file_exists($file)){
$file='--application/ajax/todo/'.$file_name;
create_dir(str_replace(end(explode('/',$file)),'',$file));
file_put_contents($file,' function ajax() {'."\n \n".'}; ?>' );
chmod($file,0777);
}
include($file);
if(function_exists('ajax')){
ajax();
}
die();