slitaz-base-files view rootfs/var/www/cgi-bin/cgi-env.sh @ rev 124

Roolback last commit
author Christophe Lincoln <pankso@slitaz.org>
date Thu Apr 12 21:52:41 2012 +0200 (2012-04-12)
parents eb82a783ff60
children bffd6c0e7c5b
line source
1 #!/bin/sh
2 . /usr/lib/slitaz/httphelper.sh
3 header
5 cat << EOT
6 <!DOCTYPE html>
7 <html xmlns="http://www.w3.org/1999/xhtml">
8 <head>
9 <title>CGI SHell Environment</title>
10 <meta charset="utf-8" />
11 <link rel="stylesheet" type="text/css" href="../style.css" />
12 </head>
13 <body>
15 <!-- Header -->
16 <div id="header">
17 <h1>CGI SHell Environment</h1>
18 </div>
20 <!-- Content -->
21 <div id="content">
23 <p>
24 Welcome to the SliTaz web server CGI Shell environment. Let the power of
25 SHell script meet the web! Here you can check HTTP info and try some
26 requests.
27 </p>
28 <p>
29 Including /usr/lib/slitaz/httphelper.sh in your scripts lets you
30 use PHP-like syntax such as: \$(GET var)
31 </p>
32 <p>
33 QUERY_STRING test:
34 <a href="$SCRIPT_NAME?var=value">$SCRIPT_NAME?var=value</a>
35 </p>
37 <h2>HTTP Info</h2>
38 <pre>
39 $(httpinfo)
40 </pre>
42 <h2>HTTP Helper</h2>
43 <pre>
44 $(httphelper)
45 </pre>
47 <!-- End content -->
48 </div>
50 </body>
51 </html>
52 EOT
54 exit 0