Documentation
[CGIscriptor.git] / Hello.html
blobbe7bafb3e265be9232b414152444567850cf13c5
1 <HTML>
2 <HEAD><META HTTP-EQUIV=REFRESH CONTENT=100>
3 <TITLE>Hello World</TITLE>
4 <BODY>
5 <!--- An example CGIscriptor program/HTML file --!>
7 <META CONTENT='text/ssperl; CGI="$CGI_Decoded_QS $CGI_Date
8 $Input=(Type Something Here) $Button=4"'>
10 <center>
11 <H1><SCRIPT TYPE="text/ssperl">"Hello World"</SCRIPT></H1>
15 <A HREF="philosophical-gnu-sm.jpg"><IMG SRC="philosophical-gnu-sm.jpg"
16 ALT=" [philosophical-gnu] "
17 WIDTH="160" HEIGHT="200"></A>
18 <H2><SCRIPT TYPE="text/ssperl">$CGI_Date</SCRIPT></H2>
19 </center>
20 <hr>
22 <SCRIPT TYPE="text/ssperl">
23 # CGI_Decoded_QS can be used as a simple variable as it is declared
24 # in a META tag (if there is a query-string)
25 print "<h2>Query: $CGI_Decoded_QS</h2><hr>\n" if $CGI_Decoded_QS;
26 "";
27 </SCRIPT>
29 <h2>Environment:</h2>
30 <ul>
31 <SCRIPT TYPE="text/ssperl">
32 # A list with public (safe) environment information
33 @KeyList = ('SERVER_PROTOCOL', 'SERVER_SOFTWARE', 'GATEWAY_INTERFACE',
34 'SERVER_PORT', 'PATH_INFO', 'REMOTE_HOST',
35 'REMOTE_ADDR', 'REQUEST_METHOD',
36 'SERVER_PROTOCOL', 'CONTENT_LENGTH', 'HTTP_USER_AGENT',
37 'HTTP_ACCEPT', 'CONTENT_TYPE', 'AUTH_TYPE', 'REMOTE_IDENT',
38 'HTTP_REFERER', 'REMOTE_USER', 'HTTP_HOST','HTTP_ACCEPT_CHARSET');
39 # Print them all
40 foreach $item (@KeyList)
42 print "<li>$item: $ENV{$item}\n" if $ENV{$item};
44 "";
45 </SCRIPT>
46 </ul>
48 <form action="Hello.html" method="POST">
49 <INPUT TYPE=TEXT NAME="Input"
50 VALUE="<SCRIPT TYPE="text/ssperl">"$Input"</SCRIPT>">
51 <INPUT TYPE="RADIO" NAME="Button" VALUE=1
52 <SCRIPT TYPE="text/ssperl">'CHECKED' if $Button==4</SCRIPT>>
53 <INPUT TYPE="RADIO" NAME="Button" VALUE=2
54 <SCRIPT TYPE="text/ssperl">'CHECKED' if $Button==1</SCRIPT>>
55 <INPUT TYPE="RADIO" NAME="Button" VALUE=3
56 <SCRIPT TYPE="text/ssperl">'CHECKED' if $Button==2</SCRIPT>>
57 <INPUT TYPE="RADIO" NAME="Button" VALUE=4
58 <SCRIPT TYPE="text/ssperl">'CHECKED' if $Button==3</SCRIPT>>
59 <br>
60 <center><INPUT TYPE=SUBMIT VALUE=GO></center>
61 </form>
62 <hr>
63 <META CONTENT='text/osshell; CGI="$PATH_INFO"'>
64 <h3>This is visit number <SCRIPT TYPE="text/osshell">
65 grep $PATH_INFO ~/Client.log | wc -l</SCRIPT> of this page</h3>
66 </BODY></HTML>