#!/bin/sh #------------------------------------------------------------------------------ # index.cgi - startfile for the web administration # # Creation: 12.08.2005 hh # Last Update: $Id$ # #------------------------------------------------------------------------------ # get main helper functions . /srv/www/include/cgi-helper case $FORM_action in logout) case "x$FORM_time" in x) echo "Location: $myname?action=logout&time=`date +%s`" echo ;; *) ta=`date +%s` td=`expr $ta - $FORM_time` # only send 401 if time difference between logout request and entered password is less or equal 3 seconds case $td in 0|1|2|3) echo 'Status: 401 Unauthorized' echo 'WWW-Authenticate: Basic realm="admin"' echo ;; *) echo "Location: $myname" echo ;; esac ;; esac ;; delbootmsg) rm -f /bootmsg.txt reload ;; *) case x$FORM_link in x) show_html_header "$_MN_welc" cat <<-EOF
EOF if [ -f /bootmsg.txt ] then show_error "There are messages in /bootmsg.txt (click to delete)" "
`cat /bootmsg.txt | htmlspecialchars`" echo "
" fi ;; *) show_html_header echo "" ;; esac show_html_footer ;; esac