#!/bin/sh

# disable filename globbing

 echo Content-type: text/html
 echo


BASE=`pwd`
APPLDIR=$BASE/appl
DATADIR=$BASE/data
PATH=$PATH:$BASE/ihd/bin:.
export PATH APPLDIR DATADIR

T=/tmp/K
echo $QUERY_STRING | awk -F"&" ' { for (i=1;i<=NF;i++) print $i } ' >$T

QRY=`awk -F= ' $1== "B1" {print $2} ' $T `
FIL=`awk -F= ' $1== "F1" {print $2} ' $T `
FRM=`awk -F= ' $1== "B2" {print $2} ' $T `
[ "$QRY" = Continuar ] && cat ../$FRM
[ "$QRY" = Excel ] && ./exp1  $FRM $FIL
