'
echo ' DAFCA License Creator'
echo ''
echo ''
echo
echo ''
inputs=$(cat -)
if [[ -n $inputs ]]; then
echo $inputs | /var/www/cgi-bin/create.pl
fi
file="/var/www/html/license/database.txt"
## read each line of database file into line[]:
#echo -n 'Parsing Database...'
let linecount=0
let fieldcount=0
grablines () {
while read line[$linecount]; do
(( linecount++ ))
done
}
grablines < $file
## read each word of the last line into field[]:
(( linecount=0 ))
for current in "${line[@]}"; do
IFS=\|
(( fieldcount=0 ))
unset field
for word in ${line[(( linecount ))]}; do
field[$fieldcount]="$word"
(( fieldcount++ ))
done
if [[ -n "${field[0]}" ]]; then
option[$linecount]="${field[0]} - ${field[20]}"
(( linecount++ ))
fi
done
echo
echo '