<?php
/*************************
Cobbled together by Billy Bullock
Tested on Coppermine 1.4.4
Reference link for code = "http://www.ibdhost.com/contact/"
**************************/
/*************************
Побългарена версия поради загуба
на част от кода.
**************************/
$visitor = $_REQUEST['visitor'] ;
$visitormail = $_REQUEST['visitormail'] ;
$subject = $_REQUEST['subject'] ;
$notes = $_REQUEST['notes'] ;
$visitor=trim($visitor);
$visitormail=trim($visitormail);
$subject=trim($subject);
$notes=trim($notes);
$notes = addslashes($notes);
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
/* Променете на 4-те места за адреси на файлове, така че да сочат местата,
където сте ги поставили. */
if (!isset($_REQUEST['visitormail'])) {
header( "Location: http://localhost/contact/contact.html" );
}
elseif(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) {
header( "Location: http://localhost/contact/contacterror.html" );
}
elseif (empty($visitor) || empty($visitormail) || empty($notes)) {
header( "Location: http://localhost/contact/contacterror.html" );
}
else {
$todayis = date("l, F j, Y, g:i a") ;
$message = " $todayis [EST] \n
From: $visitor ($visitormail)\n
Subject: $subject \n
Message: $notes \n
Additional Info : IP = $ipi \n
Browser Info: $httpagenti \n
Referral : $httprefi \n
";
$from = "From: $visitormail\r\n";
// Променете с Вашия email .
mail("tizian@cat.com", $subject, $message, $from);
header( "Location: http://localhost/contact/thankyou.html" );
}
?>