#! /bin/sh cd /usr/local/apache/htdocs/www.promillerechner.de/cgi-promille eval `/usr/local/apache/cgi-bin/cgiparse -init` eval `/usr/local/apache/cgi-bin/cgiparse -form` if [ "$FORM_alt" = "0" ] || [ "$FORM_alt" = "" ]; then FORM_alt=30 fi if [ "$FORM_gro" = "0" ] || [ "$FORM_gro" = "" ]; then FORM_gro=180 fi if [ "$FORM_gew" = "0" ] || [ "$FORM_gew" = "" ]; then FORM_gew=80 fi if [ "$FORM_v1" = "" ]; then FORM_v1=0 fi if [ "$FORM_v2" = "" ]; then FORM_v2=0 fi if [ "$FORM_v3" = "" ]; then FORM_v3=0 fi if [ "$FORM_v4" = "" ]; then FORM_v4=0 fi if [ "$FORM_vol1" = "" ]; then FORM_vol1=0 fi if [ "$FORM_vol2" = "" ]; then FORM_vol2=0 fi if [ "$FORM_vol3" = "" ]; then FORM_vol3=0 fi if [ "$FORM_vol4" = "" ]; then FORM_vol4=0 fi if [ "$FORM_pro1" = "" ]; then FORM_pro1=0 fi if [ "$FORM_pro2" = "" ]; then FORM_pro2=0 fi if [ "$FORM_pro3" = "" ]; then FORM_pro3=0 fi if [ "$FORM_pro4" = "" ]; then FORM_pro4=0 fi if [ "$FORM_p1" = "0,2 l Bier" ]; then FORM_p1=1.06 fi if [ "$FORM_p1" = "0,33 l Bier" ]; then FORM_p1=1.749 fi if [ "$FORM_p1" = "0,5 l Bier" ]; then FORM_p1=2.65 fi if [ "$FORM_p1" = "0,1 l Wein" ]; then FORM_p1=1.25 fi if [ "$FORM_p1" = "0,2 l Wein" ]; then FORM_p1=2.5 fi if [ "$FORM_p1" = "0,25 l Wein" ]; then FORM_p1=3.125 fi if [ "$FORM_p1" = "0,02 l Schnaps" ]; then FORM_p1=0.8 fi if [ "$FORM_p1" = "0,04 l Schnaps" ]; then FORM_p1=1.6 fi if [ "$FORM_p2" = "0,2 l Bier" ]; then FORM_p2=1.06 fi if [ "$FORM_p2" = "0,33 l Bier" ]; then FORM_p2=1.749 fi if [ "$FORM_p2" = "0,5 l Bier" ]; then FORM_p2=2.65 fi if [ "$FORM_p2" = "0,1 l Wein" ]; then FORM_p2=1.25 fi if [ "$FORM_p2" = "0,2 l Wein" ]; then FORM_p2=2.5 fi if [ "$FORM_p2" = "0,25 l Wein" ]; then FORM_p2=3.125 fi if [ "$FORM_p2" = "0,02 l Schnaps" ]; then FORM_p2=0.8 fi if [ "$FORM_p2" = "0,04 l Schnaps" ]; then FORM_p2=1.6 fi if [ "$FORM_p3" = "0,2 l Bier" ]; then FORM_p3=1.06 fi if [ "$FORM_p3" = "0,33 l Bier" ]; then FORM_p3=1.749 fi if [ "$FORM_p3" = "0,5 l Bier" ]; then FORM_p3=2.65 fi if [ "$FORM_p3" = "0,1 l Wein" ]; then FORM_p3=1.25 fi if [ "$FORM_p3" = "0,2 l Wein" ]; then FORM_p3=2.5 fi if [ "$FORM_p3" = "0,25 l Wein" ]; then FORM_p3=3.125 fi if [ "$FORM_p3" = "0,02 l Schnaps" ]; then FORM_p3=0.8 fi if [ "$FORM_p3" = "0,04 l Schnaps" ]; then FORM_p3=1.6 fi if [ "$FORM_p4" = "0,2 l Bier" ]; then FORM_p4=1.06 fi if [ "$FORM_p4" = "0,33 l Bier" ]; then FORM_p4=1.749 fi if [ "$FORM_p4" = "0,5 l Bier" ]; then FORM_p4=2.65 fi if [ "$FORM_p4" = "0,1 l Wein" ]; then FORM_p4=1.25 fi if [ "$FORM_p4" = "0,2 l Wein" ]; then FORM_p4=2.5 fi if [ "$FORM_p4" = "0,25 l Wein" ]; then FORM_p4=3.125 fi if [ "$FORM_p4" = "0,02 l Schnaps" ]; then FORM_p4=0.8 fi if [ "$FORM_p4" = "0,04 l Schnaps" ]; then FORM_p4=1.6 fi if [ "$FORM_pro1" != "0" ]; then FORM_p1=`expr $FORM_pro1` FORM_p1=`echo $FORM_p1|sed -e s/","/"."/g` FORM_v1=`echo $FORM_vol1|sed -e s/","/"."/g` fi if [ "$FORM_pro2" != "0" ]; then FORM_p2=`expr $FORM_pro2` FORM_p2=`echo $FORM_p2|sed -e s/","/"."/g` FORM_v2=`echo $FORM_vol2|sed -e s/","/"."/g` fi if [ "$FORM_pro3" != "0" ]; then FORM_p3=`expr $FORM_pro3` FORM_p3=`echo $FORM_p3|sed -e s/","/"."/g` FORM_v3=`echo $FORM_vol3|sed -e s/","/"."/g` fi if [ "$FORM_pro4" != "0" ]; then FORM_p4=`expr $FORM_pro4` FORM_p4=`echo $FORM_p4|sed -e s/","/"."/g` FORM_v4=`echo $FORM_vol4|sed -e s/","/"."/g` fi if [ "$FORM_mag" = "leer" ]; then FORM_mag=1 fi if [ "$FORM_mag" = "1/4 voll" ]; then FORM_mag=2 fi if [ "$FORM_mag" = "1/2 voll" ]; then FORM_mag=3 fi if [ "$FORM_mag" = "3/4 voll" ]; then FORM_mag=4 fi if [ "$FORM_mag" = "voll" ]; then FORM_mag=5 fi echo "Content-type: text/html" echo if [ "$FORM_astd" = "" ] || [ "$FORM_amin" = "" ] || [ "$FORM_estd" = "" ] || [ "$FORM_emin" = "" ] || [ "$FORM_gro" = "" ] || [ "$FORM_gew" = "" ] || [ "$FORM_alt" = "" ] || [ "$FORM_v1" = "" ] || [ "$FORM_v2" = "" ] || [ "$FORM_v3" = "" ] || [ "$FORM_v4" = "" ] ; then echo "n/a" #cat ~huck/www/htdocs/www.promillerechner.de/fehlt.html else echo "" echo "" ./rechner.php $FORM_astd $FORM_amin $FORM_estd $FORM_emin $FORM_gro $FORM_gew $FORM_alt $FORM_mag $FORM_ges $FORM_v1 $FORM_p1 $FORM_v2 $FORM_p2 $FORM_v3 $FORM_p3 $FORM_v4 $FORM_p4 echo "" echo "" fi