<?
header("Cache-Control: no-cache");

require_once("conf/config.php");
require_once("core/system.php");
require_once("core/controller.php");

$wName = empty($_REQUEST["module"]) ? "" : strtolower($_REQUEST["module"]);
$controllerFile = "widgets/".$wName."/controller.php";
if(!file_exists($controllerFile)) exit;

include($controllerFile);

$module = new module();
$module->init();
$result = $module->run();
$module->done();

echo(getJsCode($result));
?>