#!/usr/bin/perl require "cgi-lib.cgi"; &ReadParse(); $f1 = $in{'name'}; $f2 = $in{'title'}; $f3 = $in{'company'}; $f4 = $in{'address'}; $f4 = $in{'address2'}; $f6 = $in{'city'}; $f7 = $in{'state'}; $f8 = $in{'zip'}; $f9 = $in{'telephone'}; $f10 = $in{'fax'}; $f11 = $in{'mail'}; $f12 = $in{'comments'}; &head; &foot; if ($f1 eq ""){ &error; exit; } if ($f11 eq ""){ &error; exit; } else { &go; } sub head{ open (READIT, "/home/outtel/public_html/inonesearch/includehead.txt"); read (READIT, $head, 20000,0); close (READIT); } sub foot{ open (READIT, "/home/outtel/public_html/inonesearch/includefoot.txt"); read (READIT, $foot, 20000,0); close (READIT); } sub error{ $page2 = qq~ InOneSearch - Advertisting : Error $head


Advertising : Error

Please make sure to enter at lease your name and your e-mail address.

$foot ~; print "Content-type: text/html\n\n"; print "$page2"; } sub go{ $maillocation = "/var/qmail/bin/qmail-inject"; open (MAIL, "|$maillocation"); print MAIL "To: support\@inonesearch.com\n"; print MAIL "Reply-to: $f11\n"; print MAIL "From: $f11\n"; print MAIL "Subject: Advertising : Form\n\n"; print MAIL "Message sent thru the Advertising Form...\n\n"; print MAIL "Name: $f1\n"; print MAIL "Title: $f2\n"; print MAIL "Company: $f3\n"; print MAIL "Address1: $f4\n"; print MAIL "Address2: $f5\n"; print MAIL "City: $f6\n"; print MAIL "State: $f7\n"; print MAIL "Zip: $f8\n"; print MAIL "Phone: $f9\n"; print MAIL "Fax: $f10\n"; print MAIL "Mail: $f11\n"; print MAIL "Comments: $f12\n"; close (MAIL); $page2 = qq~ InOneSearch - Advertising : Sent $head


Advertising : Sent

Thank You!
Your message has been sent and we will contact you as soon as possible.

$foot ~; print "Content-type: text/html\n\n"; print "$page2"; }