add_register("cms_modules",true); switch($categ){ case "document" : $doc = new cms_document($id); switch($action){ case "thumbnail" : $doc->render_thumbnail(); break; case "render" : $doc->render_doc(); break; } break; case "module" : switch($action){ case "ajax" : $element = new $elem($id); $response = $element->execute_ajax(); ajax_http_send_response($response['content'],$response['content-type']); break; } break; case "build" : switch($action){ case "set_version" : $_SESSION["build_id_version"]=$value; ajax_http_send_response("ok ".$_SESSION["build_id_version"]); break; } break; }