 <?php            
//******************************REGISTRAČKA*************************************
      if (isset($_GET["fullname"]))  {

                     
           $jmeno = htmlspecialchars($_GET['fullname']);
		   $email = htmlspecialchars($_GET['email']);
           $emailspravce = htmlspecialchars($_GET['emailspravce']);
            $odkaz = htmlspecialchars($_GET['odkaz']);
		   $zprava = htmlspecialchars($_GET['message']);
		   
		     
		
        
  


date_default_timezone_set('Etc/UTC');
require 'PHPMailer/PHPMailerAutoload.php';
$mail = new PHPMailer;
$mail->CharSet = 'UTF-8';
$mail->isSMTP();
$mail->SMTPDebug = 0;
$mail->Host = 'smtp.gmail.com';
$mail->Port = 465;
$mail->SMTPSecure = 'ssl';
$mail->SMTPAuth = true;
$mail->Username = "wasah.registrace@gmail.com";
$mail->Password = "75Skoda75";
$mail->setFrom(''.$email.'', ''.$jmeno.'');
$mail->addAddress("".$emailspravce."", "Rezervace auta");
$mail->Subject = 'Dotaz od '.$jmeno.'';
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
//  $mail->AltBody = 'This is a plain-text message body';
$mail->Body    = "$zprava";
if (!$mail->send()) {
    echo "Mailer Error: " . $mail->ErrorInfo;
  //  echo '<meta http-equiv="refresh" content="0;url=login.php?registrace_ne">';
} else {
    echo "Email odeslán v pořádku!";
    echo '<meta http-equiv="refresh" content="0;url=event_vypis.php?ID='.$odkaz.'&vzkaz_odeslan">';
}


 
 
 
 
 
 
 
 
 
 
 
 
 }
         
         
else header('Location: login.php');         
      
         
        ?>
        
        