tazpanel diff utils/template.cgi @ rev 139

pkgs.cgi: fix repository names
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Apr 17 01:10:18 2011 +0200 (2011-04-17)
parents 8837cdc7c1c5
children 4a32da860faf
line diff
     1.1 --- a/utils/template.cgi	Tue Apr 05 01:33:54 2011 +0200
     1.2 +++ b/utils/template.cgi	Sun Apr 17 01:10:18 2011 +0200
     1.3 @@ -1,27 +1,19 @@
     1.4  #!/bin/sh
     1.5  #
     1.6 -# CGI template interface for TazPanel (must go in $PANEL root to work).
     1.7 +# CGI template interface for TazPanel.
     1.8  #
     1.9 -echo "Content-Type: text/html"
    1.10 -echo ""
    1.11  
    1.12  # Common functions from libtazpanel
    1.13  . lib/libtazpanel
    1.14 +header
    1.15  get_config
    1.16  
    1.17 -# Include gettext helper script.
    1.18 -. /usr/bin/gettext.sh
    1.19 -
    1.20 -# Export package name for gettext.
    1.21 -TEXTDOMAIN='tazpanel-template'
    1.22 -export TEXTDOMAIN
    1.23 -
    1.24  #
    1.25  # Commands
    1.26  #
    1.27  
    1.28 -case "$QUERY_STRING" in
    1.29 -	cmd)
    1.30 +case " $(GET) " in
    1.31 +	*\ cmd\ *)
    1.32  		echo "" ;;
    1.33  	*)
    1.34  		#
    1.35 @@ -30,11 +22,11 @@
    1.36  		xhtml_header
    1.37  		cat << EOT
    1.38  <div id="wrapper">
    1.39 -	<h2>`gettext "Page title - Template"`</h2>
    1.40 -	<p>`gettext "Page information"`<p>
    1.41 +	<h2>$(gettext "Page title - Template")</h2>
    1.42 +	<p>$(gettext "Page information")<p>
    1.43  </div>
    1.44  
    1.45 -<h3>`gettext "h3 title"`</h3>
    1.46 +<h3>$(gettext "h3 title"`</h3>
    1.47  
    1.48  <pre>
    1.49  Preformated output