#!/usr/bin/perl require "cgi-lib.cgi"; &ReadParse(); $f1 = $in{'name'}; $f2 = $in{'mail'}; $f3 = $in{'mail2'}; $f4 = $in{'reason'}; $f5 = $in{'message'}; &head; &foot; #seperate# if ($f1 eq ""){ &error; exit; } if ($f2 eq ""){ &error; exit; } if ($f4 eq ""){ &error; exit; } if ($f5 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 - Contact Us : Error $head


Contact Us : Error

Please make sure complete the form on the previous page.

$foot ~; print "Content-type: text/html\n\n"; print "$page2"; } sub go{ $maillocation = "/usr/sbin/sendmail"; open (MAIL, "| $maillocation -t"); print MAIL "To: support\@inonesearch.com\n"; print MAIL "Reply-to: $f2\n"; print MAIL "From: $f2\n"; print MAIL "Subject: Contact Us : Form\n"; print MAIL "Message sent thru the Contact Form...\n\n"; print MAIL "Name: $f1\n"; print MAIL "E-mail: $f2\n"; print MAIL "E-mail Confirm: $f3\n"; print MAIL "Reason for contact: $f4\n"; print MAIL "Message: $f5\n"; close (MAIL); $page2 = qq~ InOneSearch - Contact Us : Sent $head


Contact Us : 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"; }