tazpanel diff index.cgi @ rev 8
Implement system upgrade: faster than ever now!!!
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Apr 02 13:55:29 2011 +0200 (2011-04-02) |
parents | 4a672cf82ad2 |
children | 64f564036b88 |
line diff
1.1 --- a/index.cgi Sat Apr 02 10:20:17 2011 +0200 1.2 +++ b/index.cgi Sat Apr 02 13:55:29 2011 +0200 1.3 @@ -7,8 +7,10 @@ 1.4 1.5 . tazpanel.conf 1.6 1.7 -# xHTML 5 header 1.8 -cat $HEADER | sed s'/- %TITLE%//' 1.9 +xhtml_header() { 1.10 + # xHTML 5 header 1.11 + cat $HEADER | sed s/'- %TITLE%'/"$TITLE"/ 1.12 +} 1.13 1.14 [ $DEBUG == "1" ] && echo "<p class='debug'>DEBUG on</p>" 1.15 1.16 @@ -17,9 +19,9 @@ 1.17 # 1.18 1.19 case "$QUERY_STRING" in 1.20 - sysinfo) 1.21 - echo "TODO" ;; 1.22 users) 1.23 + TITLE="- Users" 1.24 + xhtml_header 1.25 echo '<ul>' 1.26 fgrep /home /etc/passwd | while read line 1.27 do 1.28 @@ -29,15 +31,20 @@ 1.29 done 1.30 echo '</ul>' ;; 1.31 network) 1.32 + TITLE="- Network" 1.33 + xhtml_header 1.34 echo '<pre>' 1.35 ifconfig 1.36 echo '</pre>' ;; 1.37 hardware) 1.38 + TITLE="- Hardware" 1.39 + xhtml_header 1.40 echo '<pre>' 1.41 lspci 1.42 echo '</pre>' ;; 1.43 *) 1.44 # Default xHTML content 1.45 + xhtml_header 1.46 cat << EOT 1.47 <p> 1.48 Uptime: `uptime`