ACC SHELL
<?php
function cz_mail ($to, $predmet, $zprava, $jmeno, $email)
{ $predmet = "=?utf-8?B?".base64_encode($predmet)."?=";
$head .= "MIME-Version: 1.0\n";
$head .= "Content-Type: text/plain; charset=\"utf-8\"\n";
$head .= "Content-Transfer-Encoding: base64\n";
$head .="From: $jmeno <$email>\r\n"."Reply-To:$jmeno <$email>\r\n";
$zprava = base64_encode ($zprava);
//$mail_par = "-f $email";
$stav = mail ($to, $predmet, $zprava, $head/*, $mail_par*/);
if ($stav) return TRUE; else return FALSE; }
if(isset($_POST['send_form'])){
$jmeno = $_POST['first_name'].' '.$_POST['last_name'];
$email = $_POST['email'];
$dotaz = $_POST['message'];
$foo = cz_mail('info@blastresistantbin.com', 'Dotaz z webu Blast', $dotaz, $jmeno, $email);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Contact Us | Blast resistant bin</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/fonts.css">
</head>
<body class="contact">
<div class="header">
<div class="logo-nav">
<div class="logo">
<a href="http://blastresistantbin.com"><img src="img/logo.png" alt="Logo Blast resistant bin" title="Blast resistent bin" /></a>
</div>
<?php include ('menu.php')?>
</div>
<h1>Leave a message</h1>
</div>
<!-- ### HEADER END ### -->
<div class="wrapper blue">
<div class="content">
<form action="" method="post">
<fieldset>
<input onClick="this.value=='First Name'?this.value='':this.value; this.style.color ='#000';" type="text" name="first_name" value="First Name" />
<input onClick="this.value=='Last Name'?this.value='':this.value; this.style.color ='#000';" type="text" name="last_name" class="left" value="Last Name" />
<input onClick="this.value=='Email Address'?this.value='':this.value; this.style.color ='#000';" type="text" name="email" class="wide" value="Email Address" />
<textarea onClick="this.value=='Message'?this.value='':this.value; this.style.color ='#000';" name="message">Message</textarea>
<input type="submit" name="send_form" value="Send a message" >
</fieldset>
</form>
</div>
<div class="footer">
<h2>Contacts</h2>
<p>BOGGES, spol. s r.o.<br />
IČO: 24719064<br />
Ing. Josef Krátký, Ph.D.<br />
E-mail: info@bogges.cz</p>
<a href="" class="button">Leave a message here!</a>
<p>© 2015 BOGGES, spol. s r.o.</p>
</div>
</div>
<!-- ### WRAPPER END ### -->
</body>
</html>
<?php if ($foo) echo "<script>alert('Your message has been send')</script>"; ?>
ACC SHELL 2018