%PDF- %PDF-
Mini Shell

Mini Shell

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

<?php
session_start();
$pageTitle="Payment";
$pagename="payment";
?>
<?php
require("database.php");
require("inc/header2.php"); 




?>
    
    <!-- <div class="js-fullheight"> -->
  <!--  <div class="hero-wrap">
      <div class="overlay"></div>
      <div class="circle-bg"></div>
      <div class="circle-bg-2"></div>
      <div class="container-fluid">
        <div class="row no-gutters d-flex slider-text align-items-center justify-content-center" data-scrollax-parent="true">
          <div class="col-md-6 ftco-animate text-center" data-scrollax=" properties: { translateY: '70%' }">
            <p class="breadcrumbs" data-scrollax="properties: { translateY: '30%', opacity: 1.6 }"><span class="mr-2"><a href="index.html">Home</a></span> <span>Thankyou</span></p>
            <h1 class="mb-3 bread" data-scrollax="properties: { translateY: '30%', opacity: 1.6 }">Thankyou</h1>
          </div>
        </div>
      </div>
    </div> -->
<?php
if(isset($_POST['order'])){
    $name = htmlspecialchars($_POST['name']);
    $email = htmlspecialchars($_POST['email']);
    $contact = htmlspecialchars($_POST['code']);
    $phone = $contact .' '. htmlspecialchars($_POST['phone']);
    $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'] = "EIR-".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>Logo Name:</th>
<td>". $logo."</td>
</tr>

<tr>
<th>Tagline/Slogan:</th>
<td>". $tagline."</td>
</tr>

<tr>
<th>Nature:</th>
<td>". $nature."</td>
</tr>

<tr>
<th>Color Combination:</th>
<td>". $color."</td>
</tr>

<tr>
<th>Idea:</th>
<td>". $idea."</td>
</tr>

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

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

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

</table>
";

        $to = "fahadansari91@gmail.com";
        $subject = "Order From EirfoTech";
        
// 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' => "6Ld0x9kZAAAAADJdVNgnESdsFavt_uOvwg4Dbrjf",
			'response' => $_POST['token9'],
			// '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 order_now values('','$name','$email','$phone','$logo','$tagline','$nature','$color','$idea','$package','$amount','$order_no')");
$retval = mail ($to,$subject,$body,$headers);
}
         
else{
      echo "<script> window.onload = function() {
                    myfunction2();
                    }; </script>";
    
}
?>
</br></br></br></br>
<section style="margin-top:-50px" class="ftco-section contact-section ftco-degree-bg">
      <div class="container">
          <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><?php echo $name; ?></td>
                             <td class="font"><b>Tagline/Slogan:</b></td>
                             <td><?php echo $tagline; ?></td>
                             
                         </tr>
                         <tr>
                             <td class="font"><b>Email:</b></td>
                             <td><?php echo $email; ?></td>
                             <td class="font"><b>Color Combination:</b></td>
                             <td><?php echo $color; ?></td>
                            
                             
                         </tr>
                         <tr>
                              <td class="font"><b>Phone:</b></td>
                             <td><?php echo $phone; ?></td>
                             <td class="font"><b>Nature of Business:</b></td>
                             <td><?php echo $nature; ?></td>
                         </tr>
                         <tr>
                             <td class="font"><b>Logo Name:</b></td>
                             <td><?php echo $logo; ?></td>
                             <td class="font"><b>Idea:</b></td>
                             <td><?php echo $idea; ?></td>
                         </tr>
                         <tr>
                             <td class="font"><b>Package</b></td>
                             <td><?php echo $package; ?></td>
                             <td class="font"><b>Amount</b></td>
                             <td><?php echo '€'.$amount; ?></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="EUR"
                        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: #1A2774; 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>



<?php



}

?>


<?php
if(isset($_POST['order2'])){
    $name = htmlspecialchars($_POST['name']);
    $email = htmlspecialchars($_POST['email']);
    $contact = htmlspecialchars($_POST['code']);
    $phone = $contact .' '. htmlspecialchars($_POST['phone']);
    $req = htmlspecialchars($_POST['requirement']);
    
    $_SESSION['amount'] = htmlspecialchars($_POST['amount']);
    $_SESSION['package'] = htmlspecialchars($_POST['package']);
    $package = $_SESSION['package'];
    $amount = $_SESSION['amount'];
    $_SESSION['order_number'] = "EIR-".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>Requirement:</th>
<td>". $req."</td>
</tr>

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

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

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

</table>
";

        $to = "fahadansari91@gmail.com";
        $subject = "Order From EirfoTech";
        
// 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' => "6Ld0x9kZAAAAADJdVNgnESdsFavt_uOvwg4Dbrjf",
			'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 orders values('','$name','$email','$phone','$req','$package','$amount','$order_no')");
$retval = mail ($to,$subject,$body,$headers);
}
         
else{
      echo "<script> window.onload = function() {
                    myfunction2();
                    }; </script>";
    
}
?>
</br></br></br></br>
<section style="margin-top:-50px" class="ftco-section contact-section ftco-degree-bg">
      <div class="container">
          <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><?php echo $name; ?></td>
                            
                         </tr>
                         <tr>
                             
                              <td class="font"><b>Email:</b></td>
                             <td><?php echo $email; ?></td>
                         </tr>
                         <tr>
                             <td class="font"><b>Phone:</b></td>
                             <td><?php echo $phone; ?></td>
                         </tr>
                         <tr>
                             <td class="font"><b>Requirement:</b></td>
                             <td><?php echo $req; ?></td>

                         </tr>
                          <tr>
                             <td class="font"><b>Package</b></td>
                             <td><?php echo $package; ?></td>
                            
                         </tr>
                         
                         <tr>
                             <td class="font"><b>Amount</b></td>
                             <td><?php echo '€'.$amount; ?></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="EUR"
                        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: #1A2774; 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>



<?php



}

?>


 <!-- Central Modal Medium Info -->
 <div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
   aria-hidden="true">
   <div class="modal-dialog modal-notify modal-info" role="document">
     <!--Content-->
     <div class="modal-content secondary-r-gradient">
       <!--Header-->

       <!--Body-->
       <div class="modal-body">
         <div class="text-center">
           <i style="color:red;" class="fa fa-times fa-4x mb-3 animated rotateIn"></i>
           <p style="color:white">Invalid Captcha, Please Try Again.</p>
         </div>
       </div>

       <!--Footer-->
     </div>
     <!--/.Content-->
   </div>
 </div>
 <!-- Central Modal Medium Info-->
    


<?php
$pagescript="<script src=\"https://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.min.js\"></script><script src=\"https://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/additional-methods.min.js\"></script><script src=\"mail/vendor.js\" ></script><script src=\"mail/jqueryform.com.min.js?ver=v2.1.4&id=eirLogo-cform\" ></script>";
?>
<?php require("inc/footer.php"); ?>
<script>
function myfunction2(){

        $("#myModal2").modal('show');

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

Zerion Mini Shell 1.0