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

libtaz.sh: add (and use) short gettext aliases: _ and _n
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Aug 09 15:38:43 2013 +0300 (2013-08-09)
parents bffd6c0e7c5b
children 91fcb259b3bf
line source
1 #!/bin/sh
2 . /lib/libtaz.sh
4 # Internationalization.
5 TEXTDOMAIN='slitaz-base'
6 . /etc/locale.conf
7 export TEXTDOMAIN LANG
9 . /usr/lib/slitaz/httphelper.sh
10 header
12 title=$(_ "CGI SHell Environment")
13 cat << EOT
14 <!DOCTYPE html>
15 <html xmlns="http://www.w3.org/1999/xhtml">
16 <head>
17 <meta charset="utf-8" />
18 <title>$title</title>
19 <link rel="stylesheet" type="text/css" href="../style.css" />
20 </head>
21 <body>
23 <!-- Header -->
24 <div id="header">
25 <h1>$title</h1>
26 </div>
28 <!-- Content -->
29 <div id="content">
31 <p>$(_ "Welcome to the SliTaz web server CGI Shell environment. Let the \
32 power of SHell script meet the web! Here you can check HTTP info and try some \
33 requests.")</p>
35 <p>$(_ "Including /usr/lib/slitaz/httphelper.sh in your scripts lets you \
36 use PHP-like syntax such as: \$(GET var)")</p>
38 <p>$(_ "QUERY_STRING test:")
39 <a href="$SCRIPT_NAME?var=value">$SCRIPT_NAME?var=value</a>
40 </p>
43 <h2>$(_ "HTTP Info")</h2>
45 <pre>$(httpinfo)</pre>
48 <!-- End content -->
49 </div>
51 </body>
52 </html>
53 EOT
55 exit 0