- StackContext(NULL, &SubTP, Buf, CTX_STRBUF, 0, NULL);
- {
- DoTemplate(HKEY("aide_display_generic_result"), NULL, &SubTP);
+ // We may have been supplied with instructions regarding the location
+ // to which we must return after posting. If found, go there.
+ if (havebstr("return_to")) {
+ http_redirect(bstr("return_to"));
+ }
+
+ // Otherwise, do the generic result screen.
+ else {
+ begin_burst();
+ output_headers(1, 0, 0, 0, 1, 0);
+
+ StackContext(NULL, &SubTP, Buf, CTX_STRBUF, 0, NULL);
+ {
+ DoTemplate(HKEY("aide_display_generic_result"), NULL, &SubTP);
+ }
+ UnStackContext(&SubTP);
+ wDumpContent(1);