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

prepa for release
author Christophe Lincoln <pankso@slitaz.org>
date Thu May 24 12:38:33 2012 +0200 (2012-05-24)
parents cd043522cb43
children b2311939ad7e
line source
1 #!/bin/sh
3 # Internationalization.
4 . /usr/bin/gettext.sh
5 TEXTDOMAIN='slitaz-base'
6 . /etc/locale.conf
7 export TEXTDOMAIN LANG
9 . /usr/lib/slitaz/httphelper.sh
10 header
12 cat << EOT
13 <!DOCTYPE html>
14 <html xmlns="http://www.w3.org/1999/xhtml">
15 <head>
16 <meta charset="utf-8" />
17 <title>$(gettext "CGI SHell Environment")</title>
18 <link rel="stylesheet" type="text/css" href="../style.css" />
19 </head>
20 <body>
22 <!-- Header -->
23 <div id="header">
24 <h1>$(gettext "CGI SHell Environment")</h1>
25 </div>
27 <!-- Content -->
28 <div id="content">
30 <p>$(gettext "Welcome to the SliTaz web server CGI Shell environment. Let the \
31 power of SHell script meet the web! Here you can check HTTP info and try some \
32 requests.")</p>
34 <p>$(gettext "Including /usr/lib/slitaz/httphelper.sh in your scripts lets you \
35 use PHP-like syntax such as: \$(GET var)")</p>
37 <p>$(gettext "QUERY_STRING test:")
38 <a href="$SCRIPT_NAME?var=value">$SCRIPT_NAME?var=value</a>
39 </p>
42 <h2>$(gettext "HTTP Info")</h2>
44 <pre>$(httpinfo)</pre>
47 <h2>$(gettext "HTTP Helper")</h2>
49 <pre>$(httphelper)</pre>
51 <!-- End content -->
52 </div>
54 </body>
55 </html>
56 EOT
58 exit 0