<?php 

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


$query_rec2 = mysqli_query($conn,"SELECT * FROM data_sme_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'];
//$mtnG = $sme['mtnG'];

		
$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){	
					


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



$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{
                                                

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


$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 == 'MTNSME' && $Dataplan == '500W'  ){
		
		$amount = $mtnA;
		
		$valu = "MTN 500MB ";




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

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


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


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


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


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




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



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


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


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


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


								

								
							}elseif($serviceID == 'AIRTELSME' && $Dataplan == '5000'){
								
							$amount = $airtelE;	
							
							$valu = "Airtel 5GB ";
				
							
							}elseif($serviceID == 'AIRTELSME' && $Dataplan == '10000'){
								
							$amount = $airtelF;	
							
							$valu = "Airtel 10GB ";



}elseif($serviceID == 'AIRTELSME' && $Dataplan == '15000'){
								
							$amount = $airtelG;	
							
							$valu = "Airtel 15GB ";


		
						//glo data	
						
						
						}elseif($serviceID == 'GLOSME' && $Dataplan == '260'){
								
							

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





}elseif($serviceID == 'GLOSME' && $Dataplan == '500'){
								
							

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




}elseif($serviceID == 'GLOSME' && $Dataplan == '1500D'){
								
							

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





}elseif($serviceID == 'GLOSME' && $Dataplan == '2500D'){
								
							

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





}elseif($serviceID == 'GLOSME' && $Dataplan == '3750D'){
								
							

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






}elseif($serviceID == 'GLOSME' && $Dataplan == '4000'){
								
							

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





}elseif($serviceID == 'GLOSME' && $Dataplan == '5000'){
								
							

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





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

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

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


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

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


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

								
							}elseif($serviceID == '9MOBILESME' && $Dataplan == '3500'){
								
							$amount = $etisalatF;
							
							$valu = "9Mobile 3.5GB ";
							


                            }elseif($serviceID == '9MOBILESME' && $Dataplan == '4000'){
								
							$amount = $etisalatG;	
							
							$valu = "9Mobile 4GB ";
		
							
							}elseif($serviceID == '9MOBILESME' && $Dataplan == '4500'){
								
							$amount = $etisalatH;	
							
							$valu = "9Mobile 4.5GB ";

								
							}elseif($serviceID == '9MOBILESME' && $Dataplan == '5000'){
								
							$amount = $etisalatI;
							
							$valu = "9Mobile 5GB ";
							

								
							}elseif($serviceID == '9MOBILESME' && $Dataplan == '10000'){
								
							$amount = $etisalatJ;	
							
							$valu = "9Mobile 10GB ";
							


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

						
									 ?>