<?php 

$query_rec = mysqli_query($conn,"SELECT * FROM data");
$sme = mysqli_fetch_array($query_rec);	


$query_rec2 = mysqli_query($conn,"SELECT * FROM data_regular");
$smeR = mysqli_fetch_array($query_rec2);



$Reseller  = 'paid';
$Agent  = 'agent';
$free  = 'free';






		
if($level == $Reseller ){
		
$mtnA = $sme['mtnA'];
$mtnB = $sme['mtnB'];
$mtnC = $sme['mtnC'];
$mtnD = $sme['mtnD'];
$mtnE = $sme['mtnE'];
$mtnF = $sme['mtnF'];


		
$airtelA = $sme['airtelA'];
$airtelB = $sme['airtelB']; 
$airtelC = $sme['airtelC'];
$airtelD = $sme['airtelD'];
$airtelE = $sme['airtelE'];
$airtelF = $sme['airtelF'];
$airtelG = $sme['airtelG'];
$airtelH = $sme['airtelH'];
$airtelI = $sme['airtelI'];
$airtelJ = $sme['airtelJ'];
$airtelK = $sme['airtelK'];


$gloA = $sme['gloA'];
$gloB = $sme['gloB'];
$gloC = $sme['gloC'];
$gloD = $sme['gloD'];
$gloE = $sme['gloE'];
$gloF = $sme['gloF'];
$gloG = $sme['gloG'];
$gloH = $sme['gloH'];
$gloI = $sme['gloI'];

$etisalatA = $sme['etisalatA'];
$etisalatB = $sme['etisalatB'];
$etisalatC = $sme['etisalatC'];
$etisalatD = $sme['etisalatD'];
$etisalatE = $sme['etisalatE'];
$etisalatF = $sme['etisalatF'];
$etisalatG = $sme['etisalatG'];
$etisalatH = $sme['etisalatH'];
$etisalatI = $sme['etisalatI'];
$etisalatJ = $sme['etisalatJ'];
$etisalatK = $sme['etisalatK'];


}elseif($level == $free){	
					
				
		
$smeA = $smeR['mtnA'];
$smeB = $smeR['mtnB'];
$smeC = $smeR['mtnC'];
$smeD = $smeR['mtnD'];
$smeE = $smeR['mtnE'];
$smeF = $smeR['mtnF'];

$mtnA = $smeR['mtnA'];
$mtnB = $smeR['mtnB'];
$mtnC = $smeR['mtnC'];
$mtnD = $smeR['mtnD'];
$mtnE = $smeR['mtnE'];
$mtnF = $smeR['mtnF'];
$mtnG = $smeR['mtnG'];

$smecA = $smeR['mtncA'];
$smecB = $smeR['mtncB'];
$smecC = $smeR['mtncC'];
$smecD = $smeR['mtncD'];
$smecE = $smeR['mtncE'];
$smecF = $smeR['mtncF'];

$airtelA = $smeR['airtelA'];
$airtelB = $smeR['airtelB']; 
$airtelC = $smeR['airtelC'];
$airtelD = $smeR['airtelD'];
$airtelE = $smeR['airtelE'];
$airtelF = $smeR['airtelF'];
$airtelG = $smeR['airtelG'];
$airtelH = $smeR['airtelH'];
$airtelI = $smeR['airtelI'];
$airtelJ = $smeR['airtelJ'];
$airtelK = $smeR['airtelK'];

$gloA = $smeR['gloA'];
$gloB = $smeR['gloB'];
$gloC = $smeR['gloC'];
$gloD = $smeR['gloD'];
$gloE = $smeR['gloE'];
$gloF = $smeR['gloF'];
$gloG = $smeR['gloG'];
$gloH = $smeR['gloH'];
$gloI = $smeR['gloI'];

$etisalatA = $smeR['etisalatA'];
$etisalatB = $smeR['etisalatB'];
$etisalatC = $smeR['etisalatC'];
$etisalatD = $smeR['etisalatD'];
$etisalatE = $smeR['etisalatE'];
$etisalatF = $smeR['etisalatF'];
$etisalatG = $smeR['etisalatG'];
$etisalatH = $smeR['etisalatH'];
$etisalatI = $smeR['etisalatI'];
$etisalatJ = $smeR['etisalatJ'];
$etisalatK = $smeR['etisalatK'];

                                         
                                                
}else{
                                                
$smeA = $smeR['mtnA'];
$smeB = $smeR['mtnB'];
$smeC = $smeR['mtnC'];
$smeD = $smeR['mtnD'];
$smeE = $smeR['mtnE'];
$smeF = $smeR['mtnF'];

$mtnA = $smeR['mtnA'];
$mtnB = $smeR['mtnB'];
$mtnC = $smeR['mtnC'];
$mtnD = $smeR['mtnD'];
$mtnE = $smeR['mtnE'];
$mtnF = $smeR['mtnF'];
$mtnG = $smeR['mtnG'];

$smecA = $smeR['mtncA'];
$smecB = $smeR['mtncB'];
$smecC = $smeR['mtncC'];
$smecD = $smeR['mtncD'];
$smecE = $smeR['mtncE'];
$smecF = $smeR['mtncF'];

$airtelA = $smeR['airtelA'];
$airtelB = $smeR['airtelB']; 
$airtelC = $smeR['airtelC'];
$airtelD = $smeR['airtelD'];
$airtelE = $smeR['airtelE'];
$airtelF = $smeR['airtelF'];
$airtelG = $smeR['airtelG'];
$airtelH = $smeR['airtelH'];
$airtelI = $smeR['airtelI'];
$airtelJ = $smeR['airtelJ'];
$airtelK = $smeR['airtelK'];

$gloA = $smeR['gloA'];
$gloB = $smeR['gloB'];
$gloC = $smeR['gloC'];
$gloD = $smeR['gloD'];
$gloE = $smeR['gloE'];
$gloF = $smeR['gloF'];
$gloG = $smeR['gloG'];
$gloH = $smeR['gloH'];
$gloI = $smeR['gloI'];

$etisalatA = $smeR['etisalatA'];
$etisalatB = $smeR['etisalatB'];
$etisalatC = $smeR['etisalatC'];
$etisalatD = $smeR['etisalatD'];
$etisalatE = $smeR['etisalatE'];
$etisalatF = $smeR['etisalatF'];
$etisalatG = $smeR['etisalatG'];
$etisalatH = $smeR['etisalatH'];
$etisalatI = $smeR['etisalatI'];
$etisalatJ = $smeR['etisalatJ'];
$etisalatK = $smeR['etisalatK'];

} 




if($serviceID == 'MTNGIFT' && $Dataplan == '500'  ){
		
		$amount = $mtnA;
		
		$valu = "MTN 500MB ";




}elseif($serviceID == 'MTNGIFT' && $Dataplan == '1000D'  ){
		
		$amount = $mtnB;
		
		$valu = "MTN 1GB ";

		
		
			
}elseif($serviceID == 'MTNGIFT' && $Dataplan == '2000' ){
				
    		$amount = $mtnC;
    		
    		$valu = "MTN 2GB ";


			
				}elseif($serviceID == 'MTNGIFT' && $Dataplan == '3500' ){
					
				$amount = $mtnD;
				
				$valu = "MTN 3GB ";


				
					}elseif($serviceID == 'MTNGIFT' && $Dataplan == '5000' ){
						
						$amount = $mtnE;
						
						$valu = "MTN 5GB ";


						
}elseif($serviceID == 'MTNGIFT' && $Dataplan == '10000'){	
										
			        
$amount = $mtnF;
$valu = "MTN 10GB ";


}elseif($serviceID == 'MTNGIFT' && $Dataplan == '20000' ){
						
$amount = $mtnG;
$valu = "MTN 20GB ";
						
						
						
					// airtel Data	
						
						}elseif($serviceID == 'AIRTELGIFT' && $Dataplan == '100' ){
							
						$amount = $airtelA;	
						
						$valu = "Airtel 100MB ";




}elseif($serviceID == 'AIRTELGIFT' && $Dataplan == '300' ){
							
						$amount = $airtelB;	
						
						$valu = "Airtel 300MB ";



							
							}elseif($serviceID == 'AIRTELGIFT' && $Dataplan == '500' ){
								
							$amount = $airtelA;	
							
							$valu = "Airtel 500MB ";


			}elseif($serviceID == 'AIRTELGIFT' && $Dataplan == '1000'){
								
							$amount = $airtelB;	
							
							$valu = "Airtel 1GB ";


								
							}elseif($serviceID == 'AIRTELGIFT' && $Dataplan == '2000'){
								
							$amount = $airtelC;	
							
							$valu = "Airtel 2GB ";


								
							}elseif($serviceID == 'AIRTELGIFT' && $Dataplan == '3000'){
								
							$amount = $airtelD;	
							
							$valu = "Airtel 3GB ";


								

								
							}elseif($serviceID == 'AIRTELGIFT' && $Dataplan == '4000'){
								
							$amount = $airtelE;	
							
							$valu = "Airtel 4GB ";
				
							
							}elseif($serviceID == 'AIRTELGIFT' && $Dataplan == '10000'){
								
							$amount = $airtelF;	
							
							$valu = "Airtel 10GB ";



}elseif($serviceID == 'AIRTELGIFT' && $Dataplan == '13000'){
								
							$amount = $airtelG;	
							
							$valu = "Airtel 13GB ";



}elseif($serviceID == 'AIRTELGIFT' && $Dataplan == '20000'){
								
							$amount = $airtelH;	
							
							$valu = "Airtel 20GB ";

            

						
							
							
						//glo data	
						
						
						}elseif($serviceID == 'GLOGIFT' && $Dataplan == '150'){
								
							

$amount = $gloA;						
							
$valu = "Glo 150MB";





}elseif($serviceID == 'GLOGIFT' && $Dataplan == '350'){
								
							

$amount = $gloB;				
$valu = "Glo 350MB";




}elseif($serviceID == 'GLOGIFT' && $Dataplan == '1000W'){
								
							

$amount = $gloC;
							
							
$valu = "Glo 1GB";





}elseif($serviceID == 'GLOGIFT' && $Dataplan == '3900'){
								
							

$amount = $gloD;
							
							
$valu = "Glo 3.9GB";





}elseif($serviceID == 'GLOGIFT' && $Dataplan == '7500'){
								
							

$amount = $gloE;
							
							
$valu = "Glo 7.5GB";






}elseif($serviceID == 'GLOGIFT' && $Dataplan == '9000'){
								
							

$amount = $gloF;
							
							
$valu = "Glo 9GB";





}elseif($serviceID == 'GLOGIFT' && $Dataplan == '10000'){
								
							

$amount = $gloG;
							
							
$valu = "Glo 10GB";





}elseif($serviceID == 'GLOGIFT' && $Dataplan == '14000'){
								
							

$amount = $gloH;
							
							
$valu = "Glo 14GB";

		
							
								
							
							
							
							//etisalat data
							
							}elseif($serviceID == '9MOBILEGIFT' && $Dataplan == '250'){ 
								
							$amount = $etisalatA;
							
							$valu = "9Mobile 250MB ";


								
							}elseif($serviceID == '9MOBILEGIFT' && $Dataplan == '500'){
								
							$amount = $etisalatB;
							
							$valu = "9Mobile 500MB ";

								
							}elseif($serviceID == '9MOBILEGIFT' && $Dataplan == '1000D'){
								
							$amount = $etisalatC;
							
							$valu = "9Mobile 1GB ";
							


								
							}elseif($serviceID == '9MOBILEGIFT' && $Dataplan == '1500W'){
								
							$amount = $etisalatD;
							
							$valu = "9Mobile 1.5GB ";
							
				
							}elseif($serviceID == '9MOBILEGIFT' && $Dataplan == '1500'){
								
							$amount = $etisalatE;
							
							$valu = "9Mobile 1.5GB ";
							

								
							}elseif($serviceID == '9MOBILEGIFT' && $Dataplan == '2000'){
								
							$amount = $etisalatF;
							
							$valu = "9Mobile 2GB ";
							


                            }elseif($serviceID == '9MOBILEGIFT' && $Dataplan == '3000'){
								
							$amount = $etisalatG;	
							
							$valu = "9Mobile 3GB ";
		
							
							}elseif($serviceID == '9MOBILEGIFT' && $Dataplan == '4500'){
								
							$amount = $etisalatH;	
							
							$valu = "9Mobile 4.5GB ";

								
							}elseif($serviceID == '9MOBILEGIFT' && $Dataplan == '5500'){
								
							$amount = $etisalatI;
							
							$valu = "9Mobile 5.5GB ";
							

								
							}elseif($serviceID == '9MOBILEGIFT' && $Dataplan == '11000'){
								
							$amount = $etisalatJ;	
							
							$valu = "9Mobile 11GB ";
							


}elseif($serviceID == '9MOBILEGIFT' && $Dataplan == '20000'){
								
							$amount = $etisalatK;	
							
							$valu = "9Mobile 20GB ";
							

                                                
							
}else{
	
$amount = $Dataplan; }	

							
									 ?>