<?php require_once("../resources/config.php"); 
$naziv = "Hvala na kupovini";
?>
<!DOCTYPE html>
<html lang="sr">

<?php include(TEMPLATE_FRONT . DS . "head.php"); ?>
    
<body>
    
<span class="loader"></span>
<header>
    <?php include(TEMPLATE_FRONT . DS . "header.php");?>   
</header>
<section class="banner pb-0" style="background-color: #f7f7f7 ;">
  <div class="container">
    <ol class="breadcrumb">
      <li class="breadcrumb-item">
        <a href="index.php">Početna</a>
      </li>
        <li class="breadcrumb-item">
        <a href="#"><?php echo $naziv ?></a>
      </li>
    </ol>
    <h2><?php echo $naziv ?></h2>
  </div>
</section>
<h4 class="text-center bg-danger"><?php display_message(); ?></h4>    
<section class="gap">
    <div class="container">          
        <div class="row">
            <div class="col-lg-4">
               <?php 

                    process_transaction();

                ?> 
                <h1 class="text-center">Hvala na kupovini</h1>
            </div>
        </div>
    </div>
</section>
        
    
<?php

 $to = 'milenko.milovanovic@gmail.com' . "\r\n";
  $subject = 'Contact Request from BalonBar';
  $name = $_POST['name'];
  $email = $_POST['email']; 
  $phone = $_POST['phone']; 
  $address = $_POST['adresa']; 
  $comment = $_POST['comment']; 
 

  $message = "************************************************** \r\n" .
  	         "Message from you website!  \r\n" .
             "************************************************** \r\n" .	
    
  	        "Name: " . $name . "\r\n" .
  	        "E-mail: " . $email . "\r\n" .
            "Phone: " . $phone . "\r\n" .
            "Phone: " . $address . "\r\n" .
  	        "Message: " . $comment . "\r\n"; 

 // Set content-type header for sending HTML email 
            $headers = "MIME-Version: 1.0" . "\r\n"; 
            $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; 
             
            // Additional headers 
            $headers .= 'From: '.$name.'<'.$email.'>'. "\r\n"; 

	$mail = mail($to, $subject, $message, $headers); 



 ?>
    
<footer class="gap">
  <?php include(TEMPLATE_FRONT . DS . "footer.php");?>  
</footer>
<!-- progress -->
<div id="progress">
      <span id="progress-value"><i class="fa-solid fa-arrow-up"></i></span>
</div>
<!-- jQuery -->
<script src="assets/js/jquery-3.6.0.min.js"></script>
<!-- Bootstrap Js -->
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>

<script src="assets/js/jquery.nice-select.min.js"></script>
<!-- fancybox -->
<script src="assets/js/jquery.fancybox.min.js"></script>
<script src="assets/js/custom.js"></script>
</body>    