
  <?php
    $q="select name from plans where id = '1'";
    $r = mysqli_query($con,$q);
    $name1 = mysqli_R($r,0);
    
    $q="select period from plans where id = '1'";
    $r = mysqli_query($con,$q);
    $period1 = mysqli_R($r,0);    
    
    $q="select min from plans where id = '1'";
    $r = mysqli_query($con,$q);
    $min1 = mysqli_R($r,0);
      
    $q="select rate from plans where id = '1'";
    $r = mysqli_query($con,$q);
    $rate1 = mysqli_R($r,0);
  
?>

 <?php
    $q="select name from plans where id = '2'";
    $r = mysqli_query($con,$q);
    $name2 = mysqli_R($r,0);
    
    $q="select period from plans where id = '2'";
    $r = mysqli_query($con,$q);
    $period2 = mysqli_R($r,0);    
    
    $q="select min from plans where id = '2'";
    $r = mysqli_query($con,$q);
    $min2 = mysqli_R($r,0);
      
    $q="select rate from plans where id = '2'";
    $r = mysqli_query($con,$q);
    $rate2 = mysqli_R($r,0);
  
?>


 <?php
    $q="select name from plans where id = '3'";
    $r = mysqli_query($con,$q);
    $name3 = mysqli_R($r,0);
    
    $q="select period from plans where id = '3'";
    $r = mysqli_query($con,$q);
    $period3 = mysqli_R($r,0);    
    
    $q="select min from plans where id = '3'";
    $r = mysqli_query($con,$q);
    $min3 = mysqli_R($r,0);
      
    $q="select rate from plans where id = '3'";
    $r = mysqli_query($con,$q);
    $rate3 = mysqli_R($r,0);
  
?>

 <?php
    $q="select name from plans where id = '4'";
    $r = mysqli_query($con,$q);
    $name4 = mysqli_R($r,0);
    
    $q="select period from plans where id = '4'";
    $r = mysqli_query($con,$q);
    $period4 = mysqli_R($r,0);    
    
    $q="select min from plans where id = '4'";
    $r = mysqli_query($con,$q);
    $min4 = mysqli_R($r,0);
      
    $q="select rate from plans where id = '4'";
    $r = mysqli_query($con,$q);
    $rate4 = mysqli_R($r,0);
  
?>

	<h2> Weekly Plans </h2>

<?php 
	$first_plan_name = "$name1";
	$first_plan_img = '<img class=investment-plan-icon src="assets/global/images/xD7JO6pA0Wj2vbyp9FJsK.png.pagespeed.ic.ZbpcAEHyVU.png" alt=""/>';
	$first_plan_rate = "$rate1";
	$first_plan_Investment = "$min1";
	$first_plan_capital_back = 'Yes';
	$first_plan_return_type = 'Period';
	$first_plan_return_no = "$period1";
	$first_plan_withdrawal = 'Anytime';
	$badge1 = '';	
	
	$second_plan_name = "$name2";
	$second_plan_img = '<img class=investment-plan-icon src="assets/global/images/xgn6bCbbpkTCtTWIuPzzP.png.pagespeed.ic._fGlGfgngK.png" alt=""/>';
	$second_plan_rate = "$rate1";
	$second_plan_Investment = "$min2";
	$second_plan_capital_back = 'No';
	$second_plan_return_type = 'Period';
	$second_plan_return_no = "$period2";
	$second_plan_withdrawal = 'Anytime';	
	$badge2 = '<div class=feature-plan>BEST SCHEMA</div>';
	
	$third_plan_name = "$name3";
	$third_plan_img = '<img class=investment-plan-icon src="assets/global/images/xI79d1j4CUeMfRtGHs1nQ.png.pagespeed.ic.-dw2RHIcuP.png" alt=""/>';
	$third_plan_rate ="$rate3";
	$third_plan_Investment ="$min3";
	$third_plan_capital_back = 'No';
	$third_plan_return_type = 'Period';
	$third_plan_return_no = "$period3";
	$third_plan_withdrawal = 'Anytime';
	$badge3 = '';	

	
	$fourth_plan_name = "$name4";
	$fourth_plan_img = '<img class=investment-plan-icon src="assets/global/images/x7oF6RLsG8iAPmNCCKnC7.png.pagespeed.ic.XfIxot2pgB.png" alt=""/>';
	$fourth_plan_rate = "$rate4";
	$fourth_plan_Investment = "$min4";
	$fourth_plan_capital_back = 'Yes';
	$fourth_plan_return_type = 'Period';
	$fourth_plan_return_no = "$period4";
	$fourth_plan_withdrawal = 'Anytime';	
	$badge4 = '';	

	$invest_now='<a href="login.html" class="site-btn grad-btn w-100 centered"><i class="anticon anticon-check"></i>Invest Now</a>';

$plan_no=1;
$plan_length=4;	
?>


	<!-- start of plans <div class=row> -->

		<?php while($plan_no<=$plan_length){
			
			switch($plan_no){
				case 1:
					$plan_name =$first_plan_name;
					$plan_img =$first_plan_img;
					$plan_rate =$first_plan_rate;
					$plan_Investment =$first_plan_Investment;
					$plan_capital_back =$first_plan_capital_back;
					$plan_return_type =$first_plan_return_type;
					$plan_return_no =$first_plan_return_no;
					$plan_withdrawal =$first_plan_withdrawal;
					$plan_badge =$badge1;
				break;
				
				case 2:
					$plan_name =$second_plan_name;
					$plan_img =$second_plan_img;
					$plan_rate =$second_plan_rate;
					$plan_Investment =$second_plan_Investment;
					$plan_capital_back =$second_plan_capital_back;
					$plan_return_type =$second_plan_return_type;
					$plan_return_no =$second_plan_return_no;
					$plan_withdrawal =$second_plan_withdrawal;
					$plan_badge =$badge2;
				break;
				
				
				case 3:
					$plan_name =$third_plan_name;
					$plan_img =$third_plan_img;
					$plan_rate =$third_plan_rate;
					$plan_Investment =$third_plan_Investment;
					$plan_capital_back =$third_plan_capital_back;
					$plan_return_type =$third_plan_return_type;
					$plan_return_no =$third_plan_return_no;
					$plan_withdrawal =$third_plan_withdrawal;
					$plan_badge =$badge3;
				break;
				
				case 4:
					$plan_name =$fourth_plan_name;
					$plan_img =$fourth_plan_img;
					$plan_rate =$fourth_plan_rate;
					$plan_Investment =$fourth_plan_Investment;
					$plan_capital_back =$fourth_plan_capital_back;
					$plan_return_type =$fourth_plan_return_type;
					$plan_return_no =$fourth_plan_return_no;
					$plan_withdrawal =$fourth_plan_withdrawal;
					$plan_badge =$badge4;
				break;
				
			}
			$plan_return_type = "Days";
			?>
			
	<!--  plan <?php echo $plan_no ?> -->
<div class="col-xl-3 col-lg-6 col-md-6 col-12">
<div class=single-investment-plan>
	<?php echo $plan_img; ?>
<h3><?php echo $plan_name; ?></h3>
<p><?php echo $plan_rate ?></p>
<ul>
<li>Investment <span class=special>
<?php echo $plan_Investment ?>
</span></li>
<li>Capital Back <span><?php echo ucfirst($plan_capital_back) ?></span></li>
<li>Return Type <span><?php echo $plan_return_type; ?></span></li>
<li>Number of Period
<!--<span><?php //echo $plan_return_no; ?> Days</span>-->
<span><?php echo $plan_return_no; ?> </span>
</li>
<li>Profit Withdraw <span><?php echo $plan_withdrawal; ?></span></li>
</ul>
<?php echo $invest_now ?>
</div>
</div>
<!-- end of plan <?php echo $plan_no ?> -->
		<?php $plan_no++; }?>
<!-- end of plan </div> -->


<!--/// secod plan-->

    
	<!-- start of plans <div class=row> -->

	<h2> Monthly Plans </h2>
		<?php 
		$plan_no=1;
$plan_length=4;	
		while($plan_no<=$plan_length){
			
			switch($plan_no){
				case 1:
					$plan_name =$first_plan_name;
					$plan_img =$first_plan_img;
					$plan_rate =$first_plan_rate;
					$plan_Investment =$first_plan_Investment;
					$plan_capital_back =$first_plan_capital_back;
					$plan_return_type =$first_plan_return_type;
					$plan_return_no =$first_plan_return_no;
					$plan_withdrawal =$first_plan_withdrawal;
					$plan_badge =$badge1;
				break;
				
				case 2:
					$plan_name =$second_plan_name;
					$plan_img =$second_plan_img;
					$plan_rate =$second_plan_rate;
					$plan_Investment =$second_plan_Investment;
					$plan_capital_back =$second_plan_capital_back;
					$plan_return_type =$second_plan_return_type;
					$plan_return_no =$second_plan_return_no;
					$plan_withdrawal =$second_plan_withdrawal;
					$plan_badge =$badge2;
				break;
				
				
				case 3:
					$plan_name =$third_plan_name;
					$plan_img =$third_plan_img;
					$plan_rate =$third_plan_rate;
					$plan_Investment =$third_plan_Investment;
					$plan_capital_back =$third_plan_capital_back;
					$plan_return_type =$third_plan_return_type;
					$plan_return_no =$third_plan_return_no;
					$plan_withdrawal =$third_plan_withdrawal;
					$plan_badge =$badge3;
				break;
				
				case 4:
					$plan_name =$fourth_plan_name;
					$plan_img =$fourth_plan_img;
					$plan_rate =$fourth_plan_rate;
					$plan_Investment =$fourth_plan_Investment;
					$plan_capital_back =$fourth_plan_capital_back;
					$plan_return_type =$fourth_plan_return_type;
					$plan_return_no =$fourth_plan_return_no;
					$plan_withdrawal =$fourth_plan_withdrawal;
					$plan_badge =$badge4;
				break;
				
			}
			$plan_return_type = "Days";
			?>
			
	<!--  plan <?php echo $plan_no ?> -->
<div class="col-xl-3 col-lg-6 col-md-6 col-12">
<div class=single-investment-plan>
	<?php echo $plan_img; ?>
<h3><?php echo $plan_name; ?></h3>
<p><?php echo $plan_rate ?></p>
<ul>
<li>Investment <span class=special>
<?php echo $plan_Investment ?>
</span></li>
<li>Capital Back <span><?php echo ucfirst($plan_capital_back) ?></span></li>
<li>Return Type <span><?php echo $plan_return_type; ?></span></li>
<li>Number of Period
<!--<span><?php //echo $plan_return_no; ?> Days</span>-->
<span><?php echo $plan_return_no; ?> </span>
</li>
<li>Profit Withdraw <span><?php echo $plan_withdrawal; ?></span></li>
</ul>
<?php echo $invest_now ?>
</div>
</div>
<!-- end of plan <?php echo $plan_no ?> -->
		<?php $plan_no++; }?>
<!-- end of plan </div> -->




<!--end of seconf plan-->



<?php
     $q="select * from plans where ";
    $r = mysqli_query($con,$q);
    // $plans = mysqli_fetch_assoc($r);
    
    while($plans = mysqli_fetch_assoc($r)){
        $plan_img  = '<img class=investment-plan-icon src="assets/global/images/'.$plans['plan_img'].'" alt=""/>';
        $plan_name  = $plans['name'];
        $plan_rate  = $plans['rate'];
        $plan_Investment  = $plans['min'];
        $plan_capital_back = $plans['cb'];
        $plan_return_type = 'Days';
        $plan_return_no = $plans['period'];
        $plan_withdrawal = "Anytime";
        $invest_now='<a href="login.html" class="site-btn grad-btn w-100 centered"><i class="anticon anticon-check"></i>Invest Now</a>';
        

        ?>
        
        <div class="col-xl-3 col-lg-6 col-md-6 col-12">
<div class=single-investment-plan>
	<?php echo $plan_img; ?>
<h3><?php echo $plan_name; ?></h3>
<p><?php echo $plan_rate ?></p>
<ul>
<li>Investment <span class=special>
<?php echo $plan_Investment ?>
</span></li>
<li>Capital Back <span><?php echo ucfirst($plan_capital_back) ?></span></li>
<li>Return Type <span><?php echo $plan_return_type; ?></span></li>
<li>Number of Period
<!--<span><?php //echo $plan_return_no; ?> Days</span>-->
<span><?php echo $plan_return_no; ?> </span>
</li>
<li>Profit Withdraw <span><?php echo $plan_withdrawal; ?></span></li>
</ul>
<?php echo $invest_now ?>
</div>
</div>
        
    <?php } 
?>







