*/ if (isset($_REQUEST['io'])) { require $config->base . 'php/gateway.php'; Gateway::handle_request(); exit; } /* Handles the upload of a HyperCard stack and initial preparation for the import of it's content, structure and art in co-operation with the client. */ if (isset($_REQUEST['hcimport'])) { Util::response_is_ajax_only(); require $config->base . 'php/hcimport.php'; HCImport::handle_upload(); exit; } /* Returns a static page for the specified stack, along with appropriate data and instructions to invoke the client-side application if the environment is sufficient. The static page is search-engine-friendly. */ if (isset($_REQUEST['stack'])) { require $config->base . 'php/application.php'; Application::open_stack(); exit; } /* If the request is anything else, the client has err'd. */ Util::respond_with_http_error(400, 'Bad Request');