'noaccess']); } else { include 'general/noaccess.php'; } exit; } // AJAX controller. if (is_ajax()) { $dir = $config['homedir'].'/include/lib/TacticalView/elements/'; $method = get_parameter('method'); $class = get_parameter('class'); $filepath = realpath($dir.'/'.$class.'.php'); if (is_readable($filepath) === false || is_dir($filepath) === true || preg_match('/.*\.php$/', $filepath) === false ) { exit; } include_once $filepath; if (class_exists($class) === true) { $instance = new $class(); if ($instance->ajaxMethod($method) === true) { echo $instance->{$method}(); } else { $instance->error('Unavailable method.'); } } else { $class->error('Class not found. ['.$class.']'); } exit; }