#!/bin/sh . /usr/share/shlib.sh version webif interface # get strings and eval if [ -n "$QUERY_STRING" ]; then IFS=\& set ${QUERY_STRING%%[^%&=+-:@-_a-z~]*} unset IFS for i in $*; do i_var="${i%=*}" i_val=$(eval echo \${$i_var}) test "$i_val" && i="${i_var}=${i_val},${i#*=}" if [ "$(echo "$i" | sed -e's/[^=]*//g')" = "=" ]; then eval $i fi done fi export DATE="$(version_get_releasedate '$LastChangedDate: 2008-01-13 04:58:13 +0100 (Sun, 13 Jan 2008) $')" export TITLE="Statistik: $STAT" . ${0%/*}/cgi-bin-pre.sh if [ -f /etc/rrdtabs.conf ]; then # config . /etc/rrdtabs.conf # get user-default-settings test -z "$STAT" && STAT="$(nvram get ff_stat_startpage)" selected() { if $(echo $(eval echo \${$1}) | grep -q "^$2\|,$2\|-$2"); then echo ' checked' fi } # output selectbox cat<

Bitte benutze einen W3C-konformen Browser!

EOF # build selectbox-content zindex=10 IFS='#' for stat in $stats; do unset IFS opts="$(eval echo \$${stat%|*})" opt_cnt=0 IFS='#' for opt in $opts; do all_opts="${all_opts:+$all_opts,}${opt%|*}" let opt_cnt=$opt_cnt+1 done [ "$STAT" = "$all_opts" ] && sel=1 || unset sel # gen headmenu echo "
" if [ -n "$opts" ]; then # gen submenu cat<${stat%|*}
EOF for opt in $opts; do cat< ${opt%|*}
EOF done echo '
' else echo "

${stat%|*}

" fi unset all_opts let zindex=$zindex-1 echo '
' done unset IFS # gen submit set $times let zindex=$zindex-1 echo "
" cat<
EOF # gen times-submenu for time in $times; do cat< $time
EOF done cat<

EOF # call rrdcgi with rrd-template IFS=, for ST in $STAT; do test -n "$ST" && { rrd_stat="/www/rrd_${ST}" echo '