ÿØÿà JFIFÿØÿà JFIF ÿØÿà JFIFÿØÿà JFIF ÿþ$
<?php
include 'config.php';
?>
<?php
if (isset($_POST['submit'])) {
session_start();
$con_id = $_POST['con'];
$money= $_POST['pf-amount'];
$name= $_POST['pf-fname'];
$numb= $_POST['Phone_Number'];
$email= $_POST['pf-pemail'];
$_SESSION['id'] = $con_id;
// if ($money == 60000) {
// $voting = 2000;
// }
// elseif ($money == 50000) {
// $voting = 1000;
// }
// elseif ($money == 15000) {
// $voting = 500;
// }
// elseif ($money == 7500) {
// $voting = 250;
// }
// elseif ($money == 6000) {
// $voting = 200;
// }
// elseif ($money == 4500) {
// $voting = 150;
// }
// elseif ($money == 2700) {
// $voting = 90;
// }
// elseif ($money == 2400) {
// $voting = 80;
// }
// elseif ($money == 2100) {
// $voting = 70;
// }
// elseif ($money == 1800) {
// $voting = 60;
// }
// elseif ($money == 1500) {
// $voting = 50;
// }elseif ($money == 1200) {
// $voting = 40;
// }
// elseif ($money == 900) {
// $voting = 30;
// }
// elseif ($money == 750) {
// $voting = 25;
// }
// elseif ($money == 600) {
// $voting = 20;
// }
// elseif ($money == 450) {
// $voting =15;
// }
// elseif ($money == 300) {
// $voting = 10;
// }
// elseif ($money == 270) {
// $voting = 9;
// }
// elseif ($money == 240) {
// $voting = 8;
// }
// elseif ($money == 210) {
// $voting = 7;
// }
// elseif ($money == 180) {
// $voting = 6;
// }
// elseif ($money == 150) {
// $voting = 5;
// }
// elseif ($money == 120) {
// $voting = 4;
// }
// elseif ($money == 90) {
// $voting = 3;
// }
// elseif ($money == 60) {
// $voting = 2;
// }
// else{
// $voting = 1;
// }
// }else{
// header('Location:voter.php?id= echo $con_id');
// }
if ($money == 200000) {
$voting = 4000;
}
elseif ($money == 100000) {
$voting = 2000;
}
elseif ($money == 50000) {
$voting = 1000;
}
elseif ($money == 25000) {
$voting = 500;
}
elseif ($money == 12500) {
$voting = 250;
}
elseif ($money == 10000) {
$voting = 200;
}
elseif ($money == 7500) {
$voting = 150;
}
elseif ($money == 5000) {
$voting = 100;
}
elseif ($money == 4500) {
$voting = 90;
}
elseif ($money == 4000) {
$voting = 80;
}
elseif ($money == 3500) {
$voting = 70;
}
elseif ($money == 3000) {
$voting = 60;
}
elseif ($money == 2500) {
$voting = 50;
}
elseif ($money == 2000) {
$voting = 40;
}
elseif ($money == 1500) {
$voting = 30;
}
elseif ($money == 1250) {
$voting = 25;
}
elseif ($money == 1000) {
$voting = 20;
}
elseif ($money == 750) {
$voting =15;
}
elseif ($money == 500) {
$voting = 10;
}
elseif ($money == 450) {
$voting = 9;
}
elseif ($money == 400) {
$voting = 8;
}
elseif ($money == 350) {
$voting = 7;
}
elseif ($money == 300) {
$voting = 6;
}
elseif ($money == 250) {
$voting = 5;
}
elseif ($money == 200) {
$voting = 4;
}
elseif ($money == 150) {
$voting = 3;
}
elseif ($money == 100) {
$voting = 2;
}
else{
$voting = 1;
}
}else{
header('Location:voter.php?id= echo $con_id');
}
$_SESSION['vott'] = $voting;
$sql="SELECT Childsname FROM registration WHERE Id = '$con_id'";
$cont=mysqli_query($conn,$sql);
$conr=mysqli_fetch_all($cont,MYSQLI_ASSOC);
$fname = $conr[0]['Childsname'] ;
$c_name=$fname;
$money = $money.'';
?>
<!DOCTYPE html>
<html>
<head>
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<link rel="icon" href="img/LOGO TRANSPARENT.png">
<title>Payment Confirmation</title>
<style type="text/css">
.gh{
background-color: green;
}
button.gh:hover{
background-color: orange;
}
.confirm{
border:2px solid orange;
border-radius: 10px;
}
h5{
color: green;
}
</style>
</head>
<body>
<!--<h2>Voting has not started yet</h2>-->
<h5 class="center" >Please Confirm Your Details Before Payment</h5>
<div class="container">
<div class="row">
<div class="col l4"></div>
<div class="confirm col l4" >
<!-- <label>Name of Voter</label>-->
<!--<input type="text" value="<?php echo $name?>" >-->
<!--<label>-->
<!-- Phone Number-->
<!-- <input type="text" value="<?php echo $numb ?>">-->
<!--</label>-->
<label>
Contestant Name
<input type="text" value="<?php echo $c_name ?>" readonly>
</label>
<br>
<label>
Votes
<input type="text" name="" value="<?php echo $voting; ?>" readonly>
</label>
<label>Price
<input type="text"value="₦<?php echo $money ?>" readonly>
</label>
<br>
<div class="center">
<button onclick="payWithPaystack()" class="gh btn center"> Pay </button>
<a class="right red-text" href="voter.php?id=<?php echo $con_id ?>">
Cancel
</a>
</div>
<br>
</div>
<div class="col l4"></div>
</div>
</div>
<?php
$numb = $numb .''. 'update for ' .$con_id;
?>
<script>
function payWithPaystack() {
var handler = PaystackPop.setup({
key: 'pk_live_6164e435c062419d62aee81c6fa40978c600ff49', //put your public key here
email: '<?php echo($email) ?>', //put your customer's email here
amount: '<?php echo($money) ?>'+0+0, //amount the customer is supposed to pay
metadata: {
custom_fields: [
{
display_name: "Mobile Number",
variable_name: "mobile_number",
value: "<?php echo $numb ?>" //customer's mobile number
}
]
},
callback: function (response) {
//successful transaction
window.location.href = "confirm.php";
},
onClose: function () {
//when the user close the payment modal
alert('Transaction cancelled');
}
});
handler.openIframe(); //open the paystack's payment modal
}
</script>
<script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous">
</script>
<script src="https://js.paystack.co/v1/inline.js"></script>
<script src="app2.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<h3 class="center">OR</h3>
<h6 class="center"style="font-weight:bold; color:#F8D868;">Vote through Bank Transfer)</h6>
<!--<p style="color:grey;">Bank Name: WEMA Bank <br> Account Number: xxxxxxxxxxxxxxx <br> Account Name: THE GLITZ CONTEST</p>-->
<p class="center" style="color:grey;">Bank Name: WEMA Bank <br> Account Number: 0124097599 <br> Account Name: THE GLITZ CONTEST</p>
<br>
<p class="center" style="font-weight:bold; color:grey;">Kindly send the Screenshot of your transaction to the parent of the contestant to enable them claim the votes.</p>
</body>
</html>
ÿØÿà JFIF ÿþ$
ÿØÿà JFIF ÿþ$
ÿÂ