2008-02-05 17:11:21 +01:00
|
|
|
<?php
|
|
|
|
|
2009-03-25 13:26:32 +01:00
|
|
|
require_once 'core.php';
|
2008-02-05 17:11:21 +01:00
|
|
|
|
2009-02-20 15:05:22 +01:00
|
|
|
if (!isset($_REQUEST['noLSsession'])) {
|
2009-01-24 18:45:14 +01:00
|
|
|
if ( !LSsession :: startLSsession() ) {
|
|
|
|
LSerror :: addErrorCode('LSsession_22');
|
2008-11-10 00:15:49 +01:00
|
|
|
$_ERRORS = true;
|
2008-02-08 18:39:24 +01:00
|
|
|
}
|
2008-02-05 17:11:21 +01:00
|
|
|
}
|
2009-01-24 18:45:14 +01:00
|
|
|
else {
|
|
|
|
LSsession :: initialize() or die('Error during initialization.');
|
|
|
|
}
|
|
|
|
|
2008-02-26 18:40:05 +01:00
|
|
|
$data=NULL;
|
2008-05-14 11:05:06 +02:00
|
|
|
if (!isset($_ERRORS)) {
|
2015-08-12 14:16:25 +02:00
|
|
|
if (isset($_REQUEST['template'])) {
|
|
|
|
$class = $_REQUEST['template'];
|
|
|
|
if (LSsession :: loadLSclass($class)) {
|
|
|
|
$meth = 'ajax_'.$_REQUEST['action'];
|
|
|
|
if (method_exists($class,$meth)) {
|
|
|
|
$class :: $meth($data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
elseif (isset($_REQUEST['addon'])) {
|
|
|
|
$addon = $_REQUEST['addon'];
|
|
|
|
if (LSsession :: loadLSaddon($addon)) {
|
|
|
|
$func = 'ajax_'.$_REQUEST['action'];
|
|
|
|
if (function_exists($func)) {
|
|
|
|
$func = new ReflectionFunction($func);
|
|
|
|
if (basename($func->getFileName())=="LSaddons.$addon.php") {
|
|
|
|
$func->invokeArgs(array(&$data));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
LSerror :: addErrorCode('LSsession_21',array('func' => $func -> getName(),'addon' => $addon));
|
|
|
|
}
|
|
|
|
}
|
2009-02-20 15:05:22 +01:00
|
|
|
}
|
2008-05-14 11:05:06 +02:00
|
|
|
}
|
2008-02-05 17:11:21 +01:00
|
|
|
}
|
|
|
|
|
2009-01-24 18:45:14 +01:00
|
|
|
LSsession :: displayAjaxReturn($data);
|
2019-03-11 22:42:20 +01:00
|
|
|
|