Skip to content

Seattle Unix Group Web Site

Sections
Personal tools
You are here: Home » Meetings » 1995 » Early HTML Request processing

Early HTML Request processing

.tl ""/usr/local/etc/httpd/cgi-bin/celest.req""

#!/bin/sh
#
rm -f /tmp/cgi.err /tmp/line
exec 2> /tmp/cgi.err
set -x
PATH=$PATH:/usr/lib/scohelp/u/rdb/bin
read LINE
echo $LINE > /tmp/line
set `echo $LINE |trhtmlforms|sed -e "s/&/ /g" -e "s/
//g" -e "s/;//g"`
eval $1
eval $2
eval $3
eval $4
eval $5
eval $6
eval $7
eval $8
eval $9
shift
eval $9
BOD=`echo $letter | tr "+" " "| sed -e "s/%20/ /g"`
PER=`echo $Person | tr "+" " "| sed -e "s/%20/ /g"`
COM=`echo $company | tr "+" " "|sed -e "s/%2C/,/g"| sed -e "s/%20/ /g"`
ADD=`echo $address | tr "+" " "| sed -e "s/%20/ /g"`
CSZ=`echo $csz | tr "+" " "|sed -e "s/%2C/,/g"| sed -e "s/%20/ /g"`
PROD=`echo $product | tr "+" " "|sed -e "s/%2C/,/g"| sed -e "s/%20/ /g"`
RESP=`echo $respond | tr "+" " "|sed -e "s/%2C/,/g"| sed -e "s/%20/ /g"`

cat << EOM
Content-type: text/html

<HEAD>
<TITLE>Results for query </TITLE>
</HEAD>
<BODY>
<H1>Your request has been sent</H1>
<P>
Thank you $PER, the information you have requested will be sent or delivered per your request.
<P>
<HR>
</BODY>
EOM
echo "Request for information from a user on $REMOTE_HOST
Please send information on $PROD via
$RESP
Addresss information is:
Name: $PER
Company: $COM
Address: $ADD
$CSZ
Phone: $phone
FAX: $fx
Email address is: $email

" > /tmp/$$let
echo $BOD |sed -e "s/%0A/
/g" |tr "
" "\012" >> /tmp/$$let
mail -s "Information request from the Web" ray < /tmp/$$let
rm -f /tmp/$$let
Created by zoperoot
Last modified 2004-06-20 10:46 AM
« July 2010 »
Su Mo Tu We Th Fr Sa
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
 
 

Powered by Plone

This site conforms to the following standards: