tazpanel diff index.cgi @ rev 56

Add a file view CASE so we can displa any file on the system (ex at boot.cgi with rcS.conf)
author Christophe Lincoln <pankso@slitaz.org>
date Sun Apr 10 20:20:19 2011 +0200 (2011-04-10)
parents eef817291804
children 92ad1f0612db
line diff
     1.1 --- a/index.cgi	Sun Apr 10 22:01:15 2011 +0200
     1.2 +++ b/index.cgi	Sun Apr 10 20:20:19 2011 +0200
     1.3 @@ -12,6 +12,7 @@
     1.4  # Common functions from libtazpanel
     1.5  . lib/libtazpanel
     1.6  get_config
     1.7 +query_string_parser
     1.8  
     1.9  # Include gettext helper script.
    1.10  . /usr/bin/gettext.sh
    1.11 @@ -36,9 +37,18 @@
    1.12  #
    1.13  
    1.14  case "$QUERY_STRING" in
    1.15 +	file=*)
    1.16 +		#
    1.17 +		# Handle files (may have an edit function, will see)
    1.18 +		#
    1.19 +		TITLE="- File"
    1.20 +		xhtml_header
    1.21 +		echo "<h2>$WANT</h2>"
    1.22 +		echo '<pre>'
    1.23 +		cat $WANT
    1.24 +		echo '</pre>' ;;
    1.25  	debug*)
    1.26  		TITLE="- Debug"
    1.27 -		query_string_parser
    1.28  		xhtml_header
    1.29  		cat << EOT
    1.30  <h2>QUERY_STRING</h2>