add_register("cms_modules",true); switch($categ){ case "document" : $doc = new cms_document($id); switch($action){ case "thumbnail" : $doc->render_thumbnail(); break; case "render" : if($doc->get_num_storage()) { if($pmb_logs_activate) { generate_log(); } session_write_close(); $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; case "css" : case "js" : session_write_close(); $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; }