%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/eirtvhdf/logobrainiacs.com/
Upload File :
Create Path :
Current File : /home/eirtvhdf/logobrainiacs.com/payment.php

<?php 
session_start();
include('header.php'); 
require("database.php");
require('inc/vars.php');
?>


<section class="main-banner-st">
  <div class="container-fluid">
    <div class="row">
      
     
     
     
  </div>
</section>




<section class="clientslogo">
    <div class="container">
      <div class="row">
        <div class="col-md-12">
          <ul class="slide">
            <li><figure><img data-original="assets1/images/c-logo-1.png" alt=""></figure></li>
            <li><figure><img data-original="assets1/images/c-logo-2.png" alt=""></figure></li>
            <li><figure><img data-original="assets1/images/c-logo-3.png" alt=""></figure></li>
            <li><figure><img data-original="assets1/images/c-logo-4.png" alt=""></figure></li>
            <li><figure><img data-original="assets1/images/c-logo-5.png" alt=""></figure></li>
            <li><figure><img data-original="assets1/images/c-logo-6.png" alt=""></figure></li>
            <li><figure><img data-original="assets1/images/c-logo-7.png" alt=""></figure></li>
            <li><figure><img data-original="assets1/images/c-logo-1.png" alt=""></figure></li>
            <li><figure><img data-original="assets1/images/c-logo-2.png" alt=""></figure></li>
            <li><figure><img data-original="assets1/images/c-logo-3.png" alt=""></figure></li>
            <li><figure><img data-original="assets1/images/c-logo-4.png" alt=""></figure></li>
            <li><figure><img data-original="assets1/images/c-logo-5.png" alt=""></figure></li>
            <li><figure><img data-original="assets1/images/c-logo-6.png" alt=""></figure></li>
            <li><figure><img data-original="assets1/images/c-logo-7.png" alt=""></figure></li>
          </ul>
         </div>
      </div>
    </div>
</section>

<?php
if(isset($_POST['order'])){
    $name = htmlspecialchars($_POST['name']);
    $email = htmlspecialchars($_POST['email']);
    $phone = $contact .' '. htmlspecialchars($_POST['phone']);
    $message = $contact .' '. htmlspecialchars($_POST['msg']);
  /*  $logo = htmlspecialchars($_POST['logo']);
    $tagline = htmlspecialchars($_POST['tagline']);
    $nature = htmlspecialchars($_POST['nature']);
    $color = htmlspecialchars($_POST['color']);
    $idea = htmlspecialchars($_POST['idea']); */

    $_SESSION['amount'] = htmlspecialchars($_POST['amount']);
    $_SESSION['package'] = htmlspecialchars($_POST['package']);
    $package = $_SESSION['package'];
    $amount = $_SESSION['amount'];
    $_SESSION['order_number'] = "ALD-".rand(1000,10000);
    $order_no = $_SESSION['order_number'];
   $body = "

<table class='table table-bordered'>
<tr>
<th>Name:</th>
<td>".$name."</td>
</tr>

<tr>
<th>Email:</th>
<td>".$email."</td>
</tr>

<tr>
<th>Phone:</th>
<td>". $phone."</td>
</tr>

<tr>
<th>Package:</th>
<td>".$package."</td>
</tr>

<tr>
<th>Amount:</th>
<td>&#36;".$amount."</td>
</tr>

<tr>
<th>Description:</th>
<td>".$message."</td>
</tr>

<tr>
<th>Order Number:</th>
<td>".$order_no."</td>
</tr>

</table>
";

        $to = "abdulfahad31@yahoo.com";
        $subject = "Order From A LogoDaddy";
        
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
//$headers .= "From: ". strip_tags($_POST['email']) . "\r\n";
$headers .= "Reply-To: ". strip_tags($_POST['email']) . "\r\n";
         
       
$url = "https://www.google.com/recaptcha/api/siteverify";
		$data = [
			'secret' => "6LcOU0caAAAAAFbKV8b9ChMUWH3ipZ1zqNlNK95g",
			'response' => $_POST['token2'],
			// 'remoteip' => $_SERVER['REMOTE_ADDR']
		];

		$options = array(
		    'http' => array(
		      'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
		      'method'  => 'POST',
		      'content' => http_build_query($data)
		    )
		  );

		$context  = stream_context_create($options);
  		$response = file_get_contents($url, false, $context);

		$res = json_decode($response, true);

if($res['success'] == true) {
$mysqli = mysqli_query($dbh,"insert into package_order values('','$name','$email','$phone','$message','$package','$amount','$order_no')");
$retval = mail ($to,$subject,$body,$headers);
}
         
else{
      echo "<script> window.onload = function() {
                    myfunction2();
                    }; </script>";
    
}
}
?>

<section class="services">
  <div class="container">

    <div class="row">
      <div class="col-md-12 content-header">
	          <div class="row justify-content-center">
               <div class="col-md-8 text-center heading-section ftco-animate">
                  <h2 class="mb-4">Your Order Details</h2>
                 <div class="table-responsive">
                     <table class="table table-striped">
                         <tr>
                             <td class="font"><b>Name:</b></td>
                             <td style="text-align:left;"><?php echo $name; ?></td>
                            <td class="font"><b>Email:</b></td>
                             <td style="text-align:left;"><?php echo $email; ?></td>
                             
                         </tr>
                         
                        
                         <tr>
                             <td class="font"><b>Package</b></td>
                             <td style="text-align:left;"><?php echo $package; ?></td>
                             <td class="font"><b>Amount</b></td>
                             <td style="text-align:left;"><?php echo '$'.$amount; ?></td>
                         </tr>
                         
                         <tr>
                             <td class="font"><b>Description:</b></td>
                             <td style="text-align:left;" colspan="3"><?php echo $message; ?></td>
                         </tr>
                         
                         </table>
                     </div>
              </div>
              <div class="col-md-4 text-center heading-section ftco-animate">
                  <h2 class="mb-4">Great! You are now just one step away...</h2>
                  <form action="<?php echo $serverName; ?>stripe/checkout.php" method="POST" class="payForm">
                <script
                        defer src="https://checkout.stripe.com/checkout.js" class="stripe-button"
                        data-key="<?php echo $datakey; ?>"
                        data-amount="<?php echo $_SESSION['amount'].'00'; ?>"
                        data-currency="usd"
                        data-name="<?php echo $dataname; ?>"
                        data-description="<?php echo $_SESSION['package']; ?>"
                        data-image="<?php echo $dataimage; ?>"
                        data-locale="auto"
                        data-zip-code="true">
                </script>
                <center>   <button style="background-color: rgb(72,26,89); color:white" id="btnClosePopup" type="submit" class="btn btn-primary d-block px-3 py-3">Pay with Debit/Credit Card</button> </center>
            </form>
              </div>
          </div>
  </div>
</section>



<script src="https://www.google.com/recaptcha/api.js?render=6LcOU0caAAAAAOJ8Z4NC78434DVnzo4r-R-01rM7"></script>
<script>
  grecaptcha.ready(function() {
      grecaptcha.execute('6LcOU0caAAAAAOJ8Z4NC78434DVnzo4r-R-01rM7', {action: 'homepage'}).then(function(token2) {
         // console.log(token);
         document.getElementById("token2").value = token2;
      });
  });
  </script>
	
<?php include('footer2.php'); ?>



Zerion Mini Shell 1.0