with CGI, Text_IO; use CGI, Text_IO; procedure Demo is -- Demonstrate CGI interface. See the examples at -- http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/fill-out-forms/overview.html -- To run this program directly (without an HTTP server), set the -- environment variable REQUEST_METHOD to "GET" and the variable -- QUERY_STRING to either "" or "name=David&topping=anchovies&callfirst=no". begin Put_CGI_Header; if CGI.Input_Received then Put_HTML_Head("Form Result of Demo Ada 95 Binding to CGI"); Put_HTML_Heading("Form Result of Demo", 1); Put_Line("

Your name is " & HTML_Encode(Value("name")) & ""); Put_Line("

The keys and values sent were:

"); Put_Variables; else Put_HTML_Head("Demonstration of Ada 95 Binding to CGI"); Put_HTML_Heading("AdaCGI Demonstration Form", 1); Put_Line("

This form demonstrates an Ada 95 binding to CGI.

"); Put_Line("

"); Put_Line("What is your name: "); Put_Line("

What topping would you like on your pizza?

    "); Put_Line("
  1. Pepperoni."); Put_Line("
  2. Sausage."); Put_Line("
  3. Anchovies."); Put_Line("
"); Put_Line("Would you like us to call ahead?"); Put_Line("
"); Put_Line("
Yes."); Put_Line("
" & "No."); Put_Line("
"); Put_Line("

"); Put_Line("

"); end if; Put_HTML_Tail; end Demo;