Файл: scripts/xmlHttpRequest.php
Строк: 61
<?php
// change the 4 variables below
$yourName = 'Письмо в Тех.Поддержку';
$yourEmail = 'otvet@upsa.us';
$yourSubject = 'testJax';
$referringPage = 'http://www.example.com/testJax/index.php';
// no need to change the rest unless you want to. You could add more error checking but I'm gonna do that later in the official release
header('Content-Type: text/xml');
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
echo '<resultset>';
function cleanPosUrl ($str) {
$nStr = $str;
$nStr = str_replace("**am**","&",$nStr);
$nStr = str_replace("**pl**","+",$nStr);
$nStr = str_replace("**eq**","=",$nStr);
return stripslashes($nStr);
}
if ( $_GET['contact'] == true && $_GET['xml'] == true && isset($_POST['posText']) ) {
$to = $yourName;
$subject = 'AJAX Mail: '.cleanPosUrl($_POST['posRegard']);
$message = cleanPosUrl($_POST['posText']);
$headers = "From: ".cleanPosUrl($_POST['posName'])." <".cleanPosUrl($_POST['posEmail']).">rn";
$headers .= 'To: '.$yourName.' <'.$yourEmail.'>'."rn";
$mailit = mail($to,$subject,$message,$headers);
if ( @$mailit )
{ $posStatus = 'OK'; $posConfirmation = 'Success! Your Email has been sent. Hope you enjoyed your stay.'; }
else
{ $posStatus = 'NOTOK'; $posConfirmation = 'Your Email could not be sent. Please try back at another time.'; }
if ( $_POST['selfCC'] == 'send' )
{
$ccEmail = cleanPosUrl($_POST['posEmail']);
@mail($ccEmail,$subject,$message,"From: Yourself <".$ccEmail.">rnTo: Yourself");
}
echo '
<status>'.$posStatus.'</status>
<confirmation>'.$posConfirmation.'</confirmation>
<regarding>'.cleanPosUrl($_POST['posRegard']).'</regarding>
';
}
echo' </resultset>';
?>