#!/usr/bin/perl
require "sm.pl";
require "sm_html.pl";
require "sm-lib.pl";
require "cookie-lib.pl";
require "Date.pl";
&formdata;
$uid=$FORM{'uid'};
$mbr_id=$FORM{'i'};
$mode=$FORM{'m'};
&chkuid;
if ($cookieset eq "N"){
&sh_header;
}
&sh_title ("$title");
&sh_body ($bg);
&tabs();
&menubar;
&leftbar;
if ($mode eq ""){
&contactform;
}
elsif($mode eq "1"){
&chkmand;
if ($errflg == 0){
$contact_email=inputchk($FORM{'m_contact_email'});
&chkemail($contact_email);
if ($errflg == 0){
$contact_fname=inputchk($FORM{'m_contact_fname'});
$contact_lname=inputchk($FORM{'m_contact_lname'});
$contact_address=inputchk($FORM{'contact_address'});
$contact_city=inputchk($FORM{'contact_city'});
$contact_county=inputchk($FORM{'contact_county'});
$contact_pcode=inputchk($FORM{'contact_pcode'});
$contact_country=inputchk($FORM{'contact_country'});
$contact_text=inputchk($FORM{'m_contact_text'});
&sndmsgin;
¶(1);
&sh_fmttext ($font2, $fsize, "Thank you
If your message requires a response we will get back to you as soon as possible.");
¶(5);
}
else{
¶(1);
&sh_fmttext ($font2, $fsize, "Whoops!
The email address which you have entered appears to be an incorrect format. Please press the back button on your browser.");
¶(6);
}
}
else{
¶(1);
&sh_fmttext ($font2, $fsize, "Whoops!
All fields marked Required must be completed. Please press the back button on your browser.");
¶(6);
}
}
&rightbar;
&sh_mainpg4;
&sh_footer;
#************************************************************************
sub contactform{
print <
Contact Us
Please submit your comments/questions etc using the form below. If you prefer you can
contact us by telephone, fax, email or post - our details appear at bottom of each page of the
web site.
(If you experience a problem using the form you can contact us by sending an email to admin\@sallymitchell.com)
HTML } sub showcomp{ print <$comp_heading
HTML } sub sndmsgin{ open (MAIL, "|$mailprog $emailcentraladmin") || die "Can't open $mailprog!\n"; print MAIL "Reply-to: $contact_email\n"; print MAIL "From: $contact_email\n"; print MAIL "To: $emailcentraladmin\n"; print MAIL "Subject: Feedback\n\n"; print MAIL "Submitted By:\n"; print MAIL "$contact_fname $contact_lname\n"; print MAIL "$contact_email\n"; print MAIL "$contact_address\n"; print MAIL "$contact_city\n"; print MAIL "$contact_county\n"; print MAIL "$contact_pcode\n"; print MAIL "$contact_country\n\n"; print MAIL "Comments/Feedback/Question\n"; print MAIL "$contact_text\n"; print MAIL "\n\n\n"; close (MAIL); }