ACC SHELL
<?php
if($_POST["antspm"]!="") {$chybovazprava = "Omlouváme se, Váš dotaz se nepodařilo úspěšně odeslat. Zkuste to prosím znovu."; $odeslano=0;}
else {
if ($_FILES["soubor"]["name"] == "") {
// $headers .= "Return-Path: <neco@neco.cz><br>";
$headers .= "From: $email\nX-Mailer: PHP/";
// $headers .= "Reply-To: <".$reply."><br>";
$headers .= "X-Mailer: PHP\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/html; charset=\"utf-8\"\n";
// $headers .= "Content-Transfer-Encoding: base64<br>";
// "From: info@webrex.cz<br>X-Mailer: PHP/, Content-Type: text/plain;<br> charset=\"windows-1250<br>"
$headers1 .= "From: ".$_POST["emailodesli"]."\nX-Mailer: PHP/";
$headers1 .= "X-Mailer: PHP\n";
$headers1 .= "MIME-Version: 1.0\n";
$headers1 .= "Content-Type: text/html; charset=\"utf-8\"\n";
// $headers .= "Content-Transfer-Encoding: base64<br>";
//tvorba dat, ktera se maji odeslat
$data = "INFORMACE O UCHAZEČI<br>******************************<br>
Jméno: $jmeno<br>
Email: $email<br>
Telefon: $telefon<br>";
// if($fakturadresa) { $data = $data."Fakturační adresa: $fakturadresa<br><br>";}
if($text) {
$data = $data."<br>DOPROVODNÝ TEXT<br>******************************<br>$text<br><br><br>";
}
$zpravadopredmetu = "NATE - Poptavka na pozici: $nazev_pozice ";
// if(mail("petr@webrex.cz", $zpravadopredmetu, $data ,$headers))
if(mail($_POST["emailodesli"], $zpravadopredmetu, $data ,$headers))
{$odeslano = 1;
mail($email, $zpravadopredmetu, $data."Děkujeme za Váš zájem. <br>V případě našeho zájmu Vás budeme kontaktovat." ,$headers1)
//mail("petr@webrex.cz", $zpravadopredmetu, $data ,$headers);
}
else {$odeslano = 0;}
}
else
{
//tvorba dat, ktera se maji odeslat
$data = "INFORMACE O UCHAZEČI\n******************************\n
Jméno: $jmeno\n
Email: $email\n
Telefon: $telefon\n";
// if($fakturadresa) { $data = $data."Fakturační adresa: $fakturadresa<br><br>";}
if($text) {
$data = $data."\nDOPROVODNÝ TEXT\n******************************\n$text\n\n\n";
}
$mess = $data; // text emailu
$mailheaders = "From: $email\nX-Mailer: PHP/";
//$mailheaders = "From: ".$email."\n"; // odesilatel
//$mailheaders .= "Reply-To: ".$email."\n";
$msg_body = StripSlashes($mess);
Copy($_FILES["soubor"]["tmp_name"], $_FILES["soubor"]["name"]); // uploadnuty soubor zkopirujeme z docasneho adresare
$file = fopen ($_FILES["soubor"]["name"], "r"); // otevren pro cteni
//$file = fread ($f, filesize($soubor_name)); // nacteme obsah do promenne
//$file = fopen($soubor, "r"); // $obr je filename prilohy
$contents = fread($file, $_FILES["soubor"]["size"]);
$encoded_attach = chunk_split(base64_encode($contents));
fclose($file);
$mailheaders .= "MIME-version: 1.0\n";
$mailheaders .= "Content-type: multipart/mixed; ";
$mailheaders .= "boundary=\"Message-Boundary\"\n";
$mailheaders .= "Content-transfer-encoding: 7BIT\n";
$mailheaders .= "X-attachments: ".$_FILES["soubor"]["name"]."";
$mailheaders1 = "From: ".$_POST["emailodesli"]."\nX-Mailer: PHP/";
$mailheaders1 .= "MIME-version: 1.0\n";
$mailheaders1 .= "Content-type: multipart/mixed; ";
$mailheaders1 .= "boundary=\"Message-Boundary\"\n";
$mailheaders1 .= "Content-transfer-encoding: 7BIT\n";
$mailheaders1 .= "X-attachments: ".$_FILES["soubor"]["name"]."";
$body_top = "--Message-Boundary\n";
$body_top .= "Content-type: text/plain; charset=utf-8\n";
$body_top .= "Content-transfer-encoding: quoted-printable\n";
$body_top .= "Content-description: Mail message body\n\n";
$msg_body = $body_top . $msg_body;
$msg_body .= "\n\n--Message-Boundary\n";
$msg_body .= "Content-type: ".$_FILES["soubor"]["type"]."; name=\"".$_FILES["soubor"]["name"]."\"\n";
$msg_body .= "Content-Transfer-Encoding: BASE64\n";
$msg_body .= "Content-disposition: attachment; filename=\"".$_FILES["soubor"]["name"]."\"\n\n";
$msg_body .= "$encoded_attach\n";
$msg_body .= "--Message-Boundary--\n";
$nazev_pozice1=odstran_diakritiku($nazev_pozice);
$zpravadopredmetu = "NATE - Poptavka na pozici: $nazev_pozice1 ";
$msg_body
//if(mail("petr@webrex.cz", $zpravadopredmetu, $msg_body, $mailheaders))
if(mail($_POST["emailodesli"], $zpravadopredmetu, $msg_body, $mailheaders))
{
$odeslano = 1;
mail($email, $zpravadopredmetu, $msg_body, $mailheaders1);
// mail("petr@webrex.cz", $zpravadopredmetu, $msg_body, $mailheaders);
}
else {$odeslano = 0;}
//smazani docasneho souboru
if (File_Exists("".$_FILES["soubor"]["name"].""))
{
UnLink("".$_FILES["soubor"]["name"]."");
}
}
//}
}
if($odeslano == 1){
?>
<html><head>
<meta http-equiv="Refresh" content="0; URL=../../<?php echo $_POST['idmenu'];?>-kariera-odeslano.html?odeslano=1&message=Děkujeme za Váš zájem.#clanek<?php echo $_POST['id']; ?>">
</head></html>
<?php
}
else {
?>
<html><head>
<meta http-equiv="Refresh" content="0; URL=../../<?php echo $_POST['idmenu'];?>-kariera.html?odeslano=0&chybovazprava=<?php echo $chybovazprava; ?>#clanek<?php echo $_POST['id']; ?>">
</head></html>
<?php
}
?>
ACC SHELL 2018