<?php include "../header.php";?>   
<?php include "config.php"; ?> 
<?php echo "Success Upto Here";exit;?>
<style>
.pay_button {
	margin-left: 50px;
	margin-top:50px;
}
</style>

<script type="text/javascript">

$(document).ready(function() {

$('.submit_paypal').click(function() {
	$('#event_fee').submit();
});

});


</script>

<div  class="content_container">
<div id="main">
	

<?php
if(isset($_GET['id'])) {
	$id = $_GET['id'];
	$email = $_GET['email'];

	$sqlGetDetails = mysql_query("SELECT sum(donation_amount)as donation FROM user_information WHERE parent_id = '".$id."' ");
		
	$result = mysql_fetch_row($sqlGetDetails);
	//echo "<pre>";
	//print_r($result);
	$donationAmount = $result['0'];
	//exit;
}
?>

<form name="_xclick" id="event_fee" action="https://www.paypal.com/cgi-bin/webscr" method="post"><!--sandbox post -->
 <input type="hidden" name="cmd" value="_xclick">
 <input type="hidden" name="business" value="finance@unitedsikhs.org"><!--enter your paypal account emailid -->
 <input type="hidden" name="custom" value="<?php echo $id;?>">
 
 <input type="hidden" name="currency_code" value="USD"><!--enter your currency code -->
 <input type="hidden" name="item_name" value="United Sikhs"><!--enter the item name-->
 <input type="hidden" name="return" value="http://unitedsikhs.org/tktgn/ticket.php"><!--url to return once payment is done.-->
 <input type="hidden" name="amount" value="<?php echo $donationAmount; ?>"><!--amount of transaction needs to be credited to your paypal account-->
 <input type='hidden' name='rm' value='2'><!-- auto redirect -->
 <div style="padding:30px;text-align:center">
<div> Wait you are redirecting to paypal.</div>
<!--
<input type="image" src="http://unitedsikhs.org/receipt/btn_buynow_LG.gif" border="0" name="submit">
    <img alt="" border="0" src="http://unitedsikhs.org/receipt/btn_buynow_LG.gif" width="1" height="1">
  </div>
  -->
<img border="0" src="http://unitedsikhs.org/images/btn_donate_LG.gif" class="submit_paypal">

 <!--<input type="image" src="http://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">-->

</form>
<div style="text-align:center">
    <img src="Rabbi_Event.jpg" style="width:450px">
</div>


</div>
</div>




<?include "../footer.php";?>  
