tazpanel rev 21

Add utils/template.cgi for testing and new pages
author Christophe Lincoln <pankso@slitaz.org>
date Tue Apr 05 01:33:54 2011 +0200 (2011-04-05)
parents efedaf66f864
children c630f623ac7c
files utils/template.cgi
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/utils/template.cgi	Tue Apr 05 01:33:54 2011 +0200
     1.3 @@ -0,0 +1,47 @@
     1.4 +#!/bin/sh
     1.5 +#
     1.6 +# CGI template interface for TazPanel (must go in $PANEL root to work).
     1.7 +#
     1.8 +echo "Content-Type: text/html"
     1.9 +echo ""
    1.10 +
    1.11 +# Common functions from libtazpanel
    1.12 +. lib/libtazpanel
    1.13 +get_config
    1.14 +
    1.15 +# Include gettext helper script.
    1.16 +. /usr/bin/gettext.sh
    1.17 +
    1.18 +# Export package name for gettext.
    1.19 +TEXTDOMAIN='tazpanel-template'
    1.20 +export TEXTDOMAIN
    1.21 +
    1.22 +#
    1.23 +# Commands
    1.24 +#
    1.25 +
    1.26 +case "$QUERY_STRING" in
    1.27 +	cmd)
    1.28 +		echo "" ;;
    1.29 +	*)
    1.30 +		#
    1.31 +		# Default xHTML content
    1.32 +		#
    1.33 +		xhtml_header
    1.34 +		cat << EOT
    1.35 +<div id="wrapper">
    1.36 +	<h2>`gettext "Page title - Template"`</h2>
    1.37 +	<p>`gettext "Page information"`<p>
    1.38 +</div>
    1.39 +
    1.40 +<h3>`gettext "h3 title"`</h3>
    1.41 +
    1.42 +<pre>
    1.43 +Preformated output
    1.44 +</pre>
    1.45 +EOT
    1.46 +		;;
    1.47 +esac
    1.48 +
    1.49 +xhtml_footer
    1.50 +exit 0