From 5f37c9ae4672a2eac20127b8b24fbd96695cf5ec Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Thu, 5 Aug 2010 18:01:15 +0000 Subject: [PATCH] ajax version --- powersensordaemon/switch.cgi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/powersensordaemon/switch.cgi b/powersensordaemon/switch.cgi index 1565c53..58147d9 100755 --- a/powersensordaemon/switch.cgi +++ b/powersensordaemon/switch.cgi @@ -10,6 +10,10 @@ for QUERY in `echo $QUERY_STRING | tr '&' ' '`; do POWER='?' elif [ "$POWER" == "?" ]; then POWER=$VALUE + elif [ "$VALUE" == "ajax" ]; then + AJAX='?' + elif [ "$AJAX" == "?" ]; then + AJAX=$VALUE fi i=$i+1 done @@ -76,6 +80,15 @@ echo "" echo "" echo "" echo "Realraum rf433ctl" +echo '' echo "" echo "" #echo "

Realraum rf433ctl

" @@ -83,6 +96,8 @@ echo "
" for DISPID in $VALID_ONOFF_IDS; do NAME="$(eval echo \$DESC_$DISPID)" [ -z "$NAME" ] && NAME=$DISPID + if [ -z "$AJAX" ]; then + echo "
" echo "" echo "
$NAME
" @@ -90,18 +105,37 @@ for DISPID in $VALID_ONOFF_IDS; do echo " " echo "
" echo "
" + + else + + echo "
$NAME
" + echo " " + echo " " + echo "
" + + fi done echo "
" echo "
" for DISPID in $VALID_SEND_IDS; do NAME="$(eval echo \$DESC_$DISPID)" [ -z "$NAME" ] && NAME=$DISPID + if [ -z "$AJAX" ]; then + echo "
" echo "" echo "
$NAME
" echo " " echo "
" echo "
" + + else + + echo "
$NAME
" + echo " " + echo "
" + + fi done echo "
" echo "" -- 1.7.10.4