<?php
session_start();
include "../config.php";
include "../secureheader.php";
include "../style.php";
include "../Stripe/syek.php";
$currency="usd";
$userid=$_SESSION['uname'];

function createOrderNumber() {
    $chars = "abcdefghijkmnopqrstuvwxyz023456789";
    srand((double)microtime()*1000000);
    $i = 0;
    $pass = '' ;
    while ($i <= 7) {
        $num = rand() % 33;
        $tmp = substr($chars, $num, 1);
        $pass = $pass . $tmp;
        $i++;
    }
    return $pass;
}

$ordernumber = createOrderNumber();

if($_POST['item'] == 1){
    $dataName="Per 1000 Points";
    $dataDesc="$sitename Per 1000 Points - $userid";
    $amount=$setting['pointprice'];
    
}
elseif($_POST['item'] == 2){
    $dataName="Banner Ad";
    $dataDesc="$sitename Banner Ad - $userid";
    $amount=$setting['bannerprice'];
}
elseif($_POST['item'] == 3){
    $dataName="Button Ad";
    $dataDesc="$sitename Button Ad - $userid";
    $amount=$setting['buttonprice'];
}
elseif($_POST['item'] == 4){
    $dataName="Solo Ad";
    $dataDesc="$sitename Solo Ad - $userid";
    $amount=$setting['soloprice'];
}
elseif($_POST['item'] == 5){
    $dataName="Hot Headline Ad";
    $dataDesc="$sitename Hot Headline Ad - $userid";
    $amount=$setting['prohheadlineadprice'];
}
elseif($_POST['item'] == 6){
    $dataName="Hot Link 5000";
    $dataDesc="$sitename Hot Link 5000 - $userid";
    $amount=$setting['hotlinkprice1'];
}
elseif($_POST['item'] == 7){
    $dataName="Hot Link 10000";
    $dataDesc="$sitename Hot Link 10000 - $userid";
    $amount=$setting['hotlinkprice2'];
}
elseif($_POST['item'] == 8){
    $dataName="Hot Link 20000";
    $dataDesc="$sitename Hot Link 20000 - $userid";
    $amount=$setting['hotlinkprice3'];
}
elseif($_POST['item'] == 9){
    $dataName="Traffic Link 50";
    $dataDesc="$sitename Traffic Link 50 - $userid";
    $amount=$setting['tlinkprice1'];	
}
elseif($_POST['item'] == 10){
    $dataName="Traffic Link 100";
    $dataDesc="$sitename Traffic Link 100 - $userid";
    $amount=$setting['tlinkprice2'];
}
elseif($_POST['item'] == 11){
    $dataName="Traffic Link 200";
    $dataDesc="$sitename Traffic Link 200 - $userid";
    $amount=$setting['tlinkprice3'];
}
elseif($_POST['item'] == 12){
    $dataName="PTC 1";
    $dataDesc="$sitename PTC 1 - $userid";
    $amount=$setting['ptc1'];
}
elseif($_POST['item'] == 13){
    $dataName="PTC 2";
    $dataDesc="$sitename PTC 2 - $userid";
    $amount=$setting['ptc2'];
}
elseif($_POST['item'] == 14){
    $dataName="PTC 3";
    $dataDesc="$sitename PTC 3 - $userid";
    $amount=$setting['ptc3'];
}
elseif($_POST['item'] == 15){
    $dataName="Top Navigation Link";
    $dataDesc="$sitename Top Navigation Link - $userid";
    $amount=$setting['navtopprice'];
}
elseif($_POST['item'] == 16){
    $dataName="Bottom Navigation Link";
    $dataDesc="$sitename Bottom Navigation Link - $userid";
    $amount=$setting['navprice'];
}
elseif($_POST['item'] == 17){
    $dataName="Login Ad";
    $dataDesc="$sitename Login Ad - $userid";
    $amount=$setting['loginprice'];
}
elseif($_POST['item'] == 18){
    $dataName="Solo Footer Ad";
    $dataDesc="$sitename Solo Footer Ad - $userid";
    $amount=$setting['safprice'];
}
elseif($_POST['item'] == 19){
    $dataName="Solo Header Ad";
    $dataDesc="$sitename Solo Header Ad - $userid";
    $amount=$setting['sahprice'];
}
elseif($_POST['item'] == 20){
    $rented = $_POST['rented'];
    $dataName="Daily Bonus";
    $dataDesc="$userid - $sitename Daily Bonus";
    $amount=$setting['dailybonusprice'];
    
}
elseif($_POST['item'] == 21){
	$rented = $_POST['rented'];
    $dataName="Full Page Login Ad";
    $dataDesc="$userid - $sitename Full Page Login Ad";
    $amount=$setting['fullloginprice'];

}    
elseif($_POST['item'] == 22){
    $dataName="Hot Header Ad";
    $dataDesc="$sitename Hot Header Ad - $userid";
    $amount=$setting['prohheadlineadprice'];
    
}    
elseif($_POST['item'] == 23){
    $dataName="High Priority Solo Ad";
    $dataDesc="$sitename High Priority Solo Ad - $userid";
    $amount=$setting['hpsoloprice']; 
    
}    
elseif($_POST['item'] == 24){
    $dataName="Set N Forget Solo(s)";
    $type = $_POST['type'];
    $number = $_POST['number'];
    $dataDesc="$sitename Set N Forget Solo(s)";
    $amount=$_POST['amount'];
    $userid = $_POST['userid'];
    
}    
elseif($_POST['item'] == 25){
    $dataName="Cash Solo";
    $dataDesc="$sitename Cash Solo - $userid";
    $amount=$setting['cashsoloprice']; 
    
}    
elseif($_POST['item'] == 26){
    $dataName="High Priority Cash Solo Ad";
    $dataDesc="$sitename High Priority Cash Solo Ad - $userid";
    $amount=$setting['hpcsoloprice'];
    
}    
elseif($_POST['item'] == 27){
    $dataName="Set N Forget Cash Solo(s)";
    $type = $_POST['type'];
    $number = $_POST['number'];
    $dataDesc="$sitename Set N Forget Cash Solo(s)";
    $amount=$_POST['amount'];
    $userid = $_POST['userid'];  
    
}    
elseif($_POST['item'] == 28){
    $dataName="Headline 5000";
    $dataDesc="$sitename Headline 5000 - $userid";
    $amount=$setting['headlineprice1'];
    
}    
elseif($_POST['item'] == 29){
    $dataName="Headline 10000";
    $dataDesc="$sitename Headline 10000 - $userid";
    $amount=$setting['headlineprice2'];
    
}    
elseif($_POST['item'] == 30){
    $dataName="Headline 20000";
    $dataDesc="$sitename Headline 20000 - $userid";
    $amount=$setting['headlineprice3'];  
    
}    
elseif($_POST['item'] == 31){
    $dataName="JV Membership Upgrade";
    $dataDesc="$sitename Monthly JV Membership - $userid";
    $amount=$setting['jvprice'];
    
}    
elseif($_POST['item'] == 32){
    $dataName="JV Membership Upgrade";
    $dataDesc="$sitename Lifetime JV Membership - $userid";
    $amount=$setting['jvprice'];
    
}    
elseif($_POST['item'] == 33){
    $dataName="JV Membership Upgrade";
    $dataDesc="$sitename Yearly JV Membership - $userid";
    $amount=$setting['jvprice']; 
    
}    
elseif($_POST['item'] == 34){
    $dataName="SuperJV Membership";
    $dataDesc="$sitename Monthly SuperJV Membership - $userid";
    $amount=$setting['superjvprice'];
    
}    
elseif($_POST['item'] == 35){
    $dataName="SuperJV Membership";
    $dataDesc="$sitename Lifetime SuperJV Membership - $userid";
    $amount=$setting['superjvprice'];
    
}    
elseif($_POST['item'] == 36){
    $dataName="SuperJV Membership";
    $dataDesc="$sitename Yearly SuperJV Membership - $userid";
    $amount=$setting['superjvprice'];
    
}    
elseif($_POST['item'] == 37){
    $dataName="SuperJV Membership";
    $dataDesc="$sitename Monthly SuperJV Membership - $userid";
    $amount=$setting['superjvprice'];
    
}    
elseif($_POST['item'] == 38){
    $dataName="SuperJV Membership";
    $dataDesc="$sitename Lifetime SuperJV Membership - $userid";
    $amount=$setting['superjvprice'];
    
}    
elseif($_POST['item'] == 39){
    $dataName="SuperJV Membership";
    $dataDesc="$sitename Yearly SuperJV Membership - $userid";
    $amount=$setting['superjvprice']; 
    
    
   

    
        
}
$amountCent = $amount * 100;

?>

<div align="center"><table border="0" bgcolor="#FFFFFF"><tr><td align="center">

<?php

$currency="usd";

$amountCent = $amount * 100;
?>

<p align="center"><font size=5>Please Make Your Payment of $<? echo $amount; ?> for <? echo $dataName; ?></font></p>

<? if($_POST['item'] == 1){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 2){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 3){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 4){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 5){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 6){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 7){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 8){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 9){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 10){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 11){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 12){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 13){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 14){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 15){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 16){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 17){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 18){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 19){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 20){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 21){ ?>
<center><form action="/members/charge.php" method="post"> 

<? } ?>
<? if($_POST['item'] == 22){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 23){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 24){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 25){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 26){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 27){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 28){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 29){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 30){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 31){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 32){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 33){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 34){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 35){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 36){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 37){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 38){ ?>
<center><form action="/members/charge.php" method="post">
<? } ?>
<? if($_POST['item'] == 39){ ?>
<center><form action="/members/charge.php" method="post"> 


<? } ?>
<input type="hidden" name="ip"     value="<?php echo $_SERVER['REMOTE_ADDR'];?>">
<input type="hidden" name="orderid"          value="<?php echo $ordernumber?>">
<input type="hidden" name="amount"      value="<?php echo $amountCent?>">
<input type="hidden" name="name"        value="<?php echo $dataName;?>">
<input type="hidden" name="currency"    value="<?php echo $currency;?>">
<input type="hidden" name="description" value="<?php echo $dataDesc;?>">
<input type="hidden" name="rented"        value="<?php echo $rented;?>">
<input type="hidden" name="type"        value="<?php echo $type;?>">
<input type="hidden" name="number"        value="<?php echo $number;?>">
<input type="hidden" name="userid"        value="<?php echo $userid;?>">
<input type="hidden" name="item"        value="<?php echo $dataDesc;?>">

<script src="https://checkout.stripe.com/checkout.js" class="stripe-button"

        data-key =           "<?php echo $public;?>"
        data-amount =        "<?php echo $amountCent;?>"
        data-name =          "<?php echo $dataname;?>"
        data-currency =      "<?php echo $currency;?>"
        data-description =   "<?php echo $description;?>"
		data-name =          "<?php echo $rented;?>"
		data-name =          "<?php echo $type;?>"
		data-name =          "<?php echo $number;?>"
		data-zip-code="true"
        data-image="https://stripe.com/img/documentation/checkout/marketplace.png"
        data-locale="auto"
        >
</script>
</form></center>


	<?

    echo "</font></td></tr></table><br><br>";

include("../securefooter.php");
mysql_close($dblink);
?>