<?php 
session_start();
require('db.php'); 
include('inc/func.php');
include('inc/logo.php');
?> 
<?php include('inc/header.php');?>
        <!-- ============================================================== -->
        <!-- end navbar -->
        <!-- ============================================================== -->
    
        <!-- ============================================================== -->
        <!-- left sidebar -->
        <!-- ============================================================== -->
         <?php include('inc/nav.php');?>
        <!-- ============================================================== -->
        <!-- end left sidebar -->
        <!-- ============================================================== -->
        <!-- ============================================================== -->
        <!-- wrapper  -->
        <!-- ============================================================== -->
        <div class="dashboard-wrapper">
            <div class="dashboard-ecommerce">
                <div class="container-fluid dashboard-content ">
                    <!-- ============================================================== -->
                     <?php 
                                  
                         include('inc/func.php');
                         include('inc/coinpayments.inc.php');
                         
                       	
										 ?>
                    <!-- pageheader  -->
                    <!-- ============================================================== -->
                    <div class="row">
                        <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                            <div class="page-header">
                                <h2 class="pageheader-title"><li class="fa fa-plug"></li> Electricity Payment </h2>
                        
                            </div>
                        </div>
                    </div>
                    <!-- ============================================================== -->
                    <!-- end pageheader  -->
                    <!-- ============================================================== -->
                    <div class="ecommerce-widget">

                        <div class="row"></div>
                        <div class="row">
                            <!-- ============================================================== -->
                      
                            <!-- ============================================================== -->

                                          <!-- recent orders  -->
                            <!-- ============================================================== -->
                            <div class="col-xl-9 col-lg-12 col-md-6 col-sm-12 col-12">
                            
                                <div class="card">
                                          
                                    <h5 class="card-header"></h5>
                                    <div class="card-body">
                                      
                                    <?php
							
							if(isset($_GET['ref'])){
								       echo'<div class="alert alert-success">
										<button type="button" class="close" data-dismiss="alert">×</button>
										<strong>Transaction successful</strong>  
									</div>'; 
									
									echo '<script>
									setTimeout(function(){ window.location.href="dashboard.php" }, 3000);</script>';
									      
								        }
								        
								
									
									if(isset($_POST['disco'])){
										
										$username = $_SESSION['user'];
										$amount = $_POST['amount'];
										$serviceID = $_POST['service'];
										$plan = $_POST['plan'];
										$phone = $_POST['tel'];
										$iuc = $_POST['iuc'];

$amount = filter_var($amount, FILTER_SANITIZE_STRING);
$serviceID = filter_var($serviceID, FILTER_SANITIZE_STRING);
$phone = filter_var($phone, FILTER_SANITIZE_STRING);
$plan = filter_var($plan, FILTER_SANITIZE_STRING);
$iuc = filter_var($iuc, FILTER_SANITIZE_STRING);


$username = mysqli_real_escape_string ($conn, $username);
$amount = mysqli_real_escape_string ($conn, $amount);
$serviceID = mysqli_real_escape_string ($conn, $serviceID);
$plan = mysqli_real_escape_string ($conn, $plan);
$phone = mysqli_real_escape_string ($conn, $phone);
$iuc = mysqli_real_escape_string ($conn, $iuc);

$phone = str_replace(' ', '', $phone);
$iuc = str_replace(' ', '', $iuc);
$variation = $plan;
$xamount = str_replace( array('+', ',', '-', '/', '(', ')',   '_',   '{',   '}',   '<',  '>',  '=', ' ', '  ', '   '), '', $amount);
 
 
 						if(!empty($amount) && !empty($serviceID) && !empty($iuc) ){
						    
						   
if($amount >= '100'){

if($xamount <= $bal){
 

									    
										
					
										$_SESSION['amt'] = $xamount;
										$_SESSION['carier'] = $serviceID;
										$_SESSION['phone'] = $phone;
										$_SESSION['iuc'] = $iuc;
										$_SESSION['transid'] = $uid;
										$_SESSION['plan'] = $plan;
										$_SESSION['variation_code'] = $plan;
                                        $_SESSION['service']= $serviceID;										
										
										
										if($serviceID === 'ikeja-electric'){
							
							$pnt = "Ikeja Electricity Payment - IKEDC";
							
							}elseif($serviceID === 'portharcourt-electric'){
								
								$pnt = "Port Harcourt Electricity Payment - PHED";
								
								}elseif($serviceID === 'ibadan-electric'){
									
									$pnt = "Ibadan Electricity Payment - IBEDC";
									
									}elseif($serviceID === 'kano-electric'){
										
										$pnt = "Kano Electricity Payment - KEDCO";
										
										}elseif($serviceID === 'jos-electric'){
											
										$pnt = "Jos Electricity Payment - JED";	
										
									}elseif($serviceID === 'eko-electric'){
											
										$pnt = "Eko Electricity Payment - EKEDC";	
											}
											
										elseif($serviceID === 'abuja-electric'){
											
										$pnt = "Abuja Electricity Payment - AEDC";	
											}
											
									elseif($serviceID === 'enugu-electric'){
											
										$pnt = "Enugu Electricity Payment - EEDC";	
											}
											
											
									elseif($serviceID === 'kaduna-electric'){
											
										$pnt = "Kaduna Electricity Payment - KAEDCO";	
											}	
											
										
			
											
					



											
								
										
include('inc/verify-electric.php');							    
							    

		    
		   if($status !== "Completed"){
	
		    
			
			echo'<div class="alert alert-warning">
		<button type="button" class="close" data-dismiss="alert">×</button>
		<strong>Error Occured '.$APImessage.' <br> Contact Admin on '.$sitephone.'</strong>   
									</div>'; 
			
			}	else{	
			    
			    

					
									
$qsel = "INSERT INTO transactions(network,serviceid,vcode,meterno,phone,ref,refer,amount,email,status,token,customer,balanceB,balanceA,date) VALUES ('$pnt','$serviceID','$plan','$iuc','$phone','$uid','$token','$xamount','$username','$stat','$token','$customer','$bal','$bal','$date')";	
$sav = $conn->query($qsel);

$updateuser = mysqli_query($conn,"UPDATE users SET action='$uid' WHERE email='$user' ") or die(mysqli_error());
								
		
			?>
        <script>						
       window.location="transaction-view/electric/?<?php echo $uid; ?>#transPreview";
          </script>
         <?php								

								
                                }


	}else{
										echo'<div class="alert alert-danger">
										<button type="button" class="close" data-dismiss="alert">×</button>
										<strong>Insufficient Balance</strong>  
									</div>'; }
									
									
									
		}else{
										echo'<div class="alert alert-danger">
										<button type="button" class="close" data-dismiss="alert">×</button>
										<strong>Invalid Amount. Minimum Amount is &#x20A6;100</strong>  
									</div>'; }

	}else{
										echo'<div class="alert alert-danger">
										<button type="button" class="close" data-dismiss="alert">×</button>
										<strong>Enter required fields</strong>  
									</div>'; }
									}
									
									 ?>
                      
           
                   
                                      <label for="inputText3" class="col-form-label">Please Select DISCO</label><br>
                                            <label class="custom-control custom-radio custom-control-inline">
                                                <input type="radio" name="carier"  class="custom-control-input" value="Eko" onclick="javascript:showTv();" id="Eko" ><span class="custom-control-label"><img src="assets/images/Eko-Electric-Payment-PHCN.jpg" width="35" height="30"></span>
                                            </label>
                                            
                                            
                                            <label class="custom-control custom-radio custom-control-inline">
                                                <input type="radio" name="carier" class="custom-control-input"value="EEDC" onclick="javascript:showTv();" id="EEDC"><span class="custom-control-label" ><img src="assets/images/EEDC-Enugu-electricity-payment.jpg" width="35" height="30"></span>
                                            </label>
                                            
                                            <label class="custom-control custom-radio custom-control-inline">
                                                <input type="radio" name="carier" class="custom-control-input"value="ikeja" onclick="javascript:showTv();" id="Ikeja"><span class="custom-control-label" ><img src="assets/images/ikeja.png" width="70" height="30"></span>
                                            </label>
                                            
                       <label class="custom-control custom-radio custom-control-inline">
                                                <input type="radio" name="carier" class="custom-control-input"value="phc" onclick="javascript:showTv();" id="phc"><span class="custom-control-label" ><img src="assets/images/phc.png" width="70" height="30"></span>
                                            </label>
                                            
                                            
    <label class="custom-control custom-radio custom-control-inline">
                                                <input type="radio" name="carier" class="custom-control-input"value="ibedc" onclick="javascript:showTv();" id="ibedc"><span class="custom-control-label" ><img src="assets/images/IBEDC-Ibadan-Electricity-Distribution-Company.jpg" width="55" height="30"></span>
                                            </label>
                                            
                                            
                                  <label class="custom-control custom-radio custom-control-inline">
                                                <input type="radio" name="carier" class="custom-control-input"value="kedco" onclick="javascript:showTv();" id="kedco"><span class="custom-control-label" ><img src="assets/images/Kano-Electricity-Distribution-Company-KEDCO-logo.png" width="55" height="30"></span>
                                            </label>    
                                            
                                            
           <label class="custom-control custom-radio custom-control-inline">
                                                <input type="radio" name="carier" class="custom-control-input"value="jos" onclick="javascript:showTv();" id="jos"><span class="custom-control-label" ><img src="assets/images/Jos-Electric-JED.jpg" width="55" height="30"></span>
                                            </label>
                     
                                            
<label class="custom-control custom-radio custom-control-inline">
                                                <input type="radio" name="carier" class="custom-control-input"value="abuja" onclick="javascript:showTv();" id="abuja"><span class="custom-control-label" ><img src="assets/images/abuja.jpg" width="55" height="30"></span>
                                            </label>                            
                                            
                                            
        <label class="custom-control custom-radio custom-control-inline">
                                                <input type="radio" name="carier" class="custom-control-input"value="kaduna" onclick="javascript:showTv();" id="kaduna"><span class="custom-control-label" ><img src="assets/images/kaduna.jpg" width="65" height="30"></span>
                                            </label>                    
                                           
                                        <p></p>
                                        <div class="float-center">
                                        <img style="display:none;" id="bigpic" src="bigpic"  width="120" height="90"/>     
                                                   
                                    </div>
                                    
                                   
                                 
                                  <!-- Start Eko Electric hidden -->       
                              <div class="float-center" id="ifEko" style="display:none;">                 
                                       <div class="form-group" >
                                          
		 
        <label>Meter Type</label>
		
		<select class="form-control" id="IsEko" required="required" ><option value = "" selected="selected" required="required">Select Meter Type</option>
                
                <option data-plan="prepaid" data-service="eko-electric"> Prepaid</option>
          <option data-plan="postpaid" data-service="eko-electric">Postpaid</option> 
                
                
                </select>
		
      </div>


      
     <!-- <div class="form-group">
          <label for="inputText3" class="col-form-label">Meter Number</label>
    <input id="smartno" type="text" class="form-control" name="smartno" onKeyUp="javacript:document.getElementById('iuc').value = document.getElementById('smartno').value;" onSelect="javacript:document.getElementById('iuc').value = document.getElementById('smartno').value;" onpaste="javacript:document.getElementById('iuc').value = document.getElementById('smartno').value;">
                                            </div> -->
                                            
                                            
             <div class="form-group">
          <label for="inputText3" class="col-form-label">Enter Amount</label>
    <input id="amt" type="text" class="form-control" name="amt" onKeyUp="javascript:document.getElementById('amount').value = document.getElementById('amt').value;" onSelect="javascript:document.getElementById('amount').value = document.getElementById('amt').value;" onpaste="javascript:document.getElementById('amount').value = document.getElementById('amt').value;">
                                            </div>                              
                                            
              <!--<div class="form-group">
          <label for="inputText3" class="col-form-label">Phone Number</label>
    <input id="mobile" type="phone" class="form-control" name="phone" onKeyUp="javascript:document.getElementById('tele').value = document.getElementById('mobile').value;" onSelect="javascript:document.getElementById('tele').value = document.getElementById('mobile').value;">
                                            </div>    -->         
                             
                                            
                </div>
                <!-- End EKO Electric hidden -->   
                
               
                <!-- Start EEDC hidden -->       
                              <div class="float-center" id="ifEEDC" style="display:none;">                 
                                       <div class="form-group" >
                                                 
		 
        <label>Meter Type</label>
		
		<select class="form-control" id="IsEEDC" required="required" ><option value = "" selected="selected" required="required">Select Meter Type</option>
                <!-- <option data-plan="prepaid"  data-service="enugu-electric"> Prepaid</option>
          <option data-plan="postpaid"  data-service="enugu-electric">Postpaid</option> -->
		   <option data-plan="postpaid"  data-service="enugu-electric">Service Not Available</option>
                
                </select>
	
      </div>


      
      
      <!--<div class="form-group">
          <label for="inputText3" class="col-form-label">Meter Number</label>
    <input id="smartcard" type="text" class="form-control" name="smartno" onKeyUp="javascript:document.getElementById('iuc').value = document.getElementById('smartcard').value;" onSelect="javascript:document.getElementById('iuc').value = document.getElementById('smartcard').value;" onpaste="javascript:document.getElementById('iuc').value = document.getElementById('smartcard').value;">
                                            </div>-->
                                            
           <div class="form-group">
          <label for="inputText3" class="col-form-label">Enter Amount</label>
    <input id="amtPay" type="text" class="form-control" name="amt" onKeyUp="javascript:document.getElementById('amount').value = document.getElementById('amtPay').value;" onSelect="javascript:document.getElementById('amount').value = document.getElementById('amtPay').value;" onpaste="javascript:document.getElementById('amount').value = document.getElementById('amtPay').value;">
                                            </div>                                
                                            
             <!-- <div class="form-group">
          <label for="inputText3" class="col-form-label">Phone Number</label>
    <input id="phone" type="phone" class="form-control" name="phone" onKeyUp="javascript:document.getElementById('tele').value = document.getElementById('phone').value;" onSelect="javascript:document.getElementById('tele').value = document.getElementById('phone').value;">
                                            </div>  -->              
                                              
                                            
                </div>
                <!-- End EEDC hidden -->  
                
          <!-- Start Ikeja Electric hidden -->       
                              <div class="float-center" id="ifIkeja" style="display:none;">                 
                                       <div class="form-group" >
                                                 
		 
        <label>Meter Type</label>
		
		<select class="form-control" id="IsIkeja" required="required" ><option value = "" selected="selected" required="required">Select Meter Type</option>
              <option data-plan="prepaid"  data-service="ikeja-electric"> Prepaid</option>
          <option data-plan="postpaid"  data-service="ikeja-electric">Postpaid</option>
                
                </select>
	
      </div>


      
       
      <!--<div class="form-group">
          <label for="inputText3" class="col-form-label">Meter Number</label>
    <input id="smart" type="text" class="form-control" name="smartno" onKeyUp="javascript:document.getElementById('iuc').value = document.getElementById('smart').value;" onSelect="javascript:document.getElementById('iuc').value = document.getElementById('smart').value;" onpaste="javascript:document.getElementById('iuc').value = document.getElementById('smart').value;">
                                            </div>-->
                                            
           <div class="form-group">
          <label for="inputText3" class="col-form-label">Enter Amount</label>
    <input id="payamt" type="text" class="form-control" name="amt" onKeyUp="javascript:document.getElementById('amount').value = document.getElementById('payamt').value;" onSelect="javascript:document.getElementById('amount').value = document.getElementById('payamt').value;" onpaste="javascript:document.getElementById('amount').value = document.getElementById('payamt').value;">
                                            </div>                                  
                                            
            <!--  <div class="form-group">
          <label for="inputText3" class="col-form-label">Phone Number</label>
    <input id="mobil" type="phone" class="form-control" name="phone" onKeyUp="javascript:document.getElementById('tele').value = document.getElementById('mobil').value;" onSelect="javascript:document.getElementById('tele').value = document.getElementById('mobil').value;">
                                            </div>  -->                 
                                            
                </div>
                <!-- End Ikeja Electric hidden -->   
                
         <!-- Start PHC Electric hidden -->       
                              <div class="float-center" id="ifPhc" style="display:none;">                 
                                       <div class="form-group" >
                                                 
		 
        <label>Meter Type</label>
		
		<select class="form-control" id="IsPhc" required="required" ><option value = "" selected="selected" required="required">Select Meter Type</option>
              
         <option data-plan="prepaid"  data-service="portharcourt-electric">Prepaid</option>
                <option data-plan="postpaid"  data-service="portharcourt-electric">Postpaid</option>
                </select>
	
      </div>


      <!--<div class="form-group">
          <label for="inputText3" class="col-form-label">Meter Number</label>
    <input id="meterNo" type="text" class="form-control" name="smartno" onKeyUp="javascript:document.getElementById('iuc').value = document.getElementById('meterNo').value;" onSelect="javascript:document.getElementById('iuc').value = document.getElementById('meterNo').value;" onpaste="javascript:document.getElementById('iuc').value = document.getElementById('meterNo').value;">
                                            </div>-->
                                            
        
         <div class="form-group">
          <label for="inputText3" class="col-form-label">Enter Amount</label>
    <input id="topay" type="text" class="form-control" name="amt" onKeyUp="javascript:document.getElementById('amount').value = document.getElementById('topay').value;" onSelect="javascript:document.getElementById('amount').value = document.getElementById('topay').value;" onpaste="javascript:document.getElementById('amount').value = document.getElementById('topay').value;">
                                            </div>                                    
                                            
                                            
              <!--<div class="form-group">
          <label for="inputText3" class="col-form-label">Phone Number</label>
    <input id="mobi" type="phone" class="form-control" name="phone" onKeyUp="javascript:document.getElementById('tele').value = document.getElementById('mobi').value;" onSelect="javascript:document.getElementById('tele').value = document.getElementById('mobi').value;">
                                            </div>    -->               
                                            
                </div>
                <!-- End PHC Electric hidden -->   
                
                
                <!-- Start IBADAN Electric hidden -->       
                              <div class="float-center" id="ifIbedc" style="display:none;">                 
                                       <div class="form-group" >
                                                 
		 
        <label>Meter Type</label>
		
		<select class="form-control" id="IsIbedc" required="required" ><option value = "" selected="selected" required="required">Select Meter Type</option>
              
         <option data-plan="prepaid"  data-service="ibadan-electric">Prepaid</option>
                <option data-plan="postpaid"  data-service="ibadan-electric">Postpaid</option>
                </select>
	
      </div>


     <!-- <div class="form-group">
          <label for="inputText3" class="col-form-label">Meter Number</label>
    <input id="IbmeterNo" type="text" class="form-control" name="smartno" onKeyUp="javascript:document.getElementById('iuc').value = document.getElementById('IbmeterNo').value;" onSelect="javascript:document.getElementById('iuc').value = document.getElementById('IbmeterNo').value;" onpaste="javascript:document.getElementById('iuc').value = document.getElementById('IbmeterNo').value;">
                                            </div>-->
                                            
        
         <div class="form-group">
          <label for="inputText3" class="col-form-label">Enter Amount</label>
    <input id="itopay" type="text" class="form-control" name="amt" onKeyUp="javascript:document.getElementById('amount').value = document.getElementById('itopay').value;" onSelect="javascript:document.getElementById('amount').value = document.getElementById('itopay').value;" onpaste="javascript:document.getElementById('amount').value = document.getElementById('itopay').value;">
                                            </div>                                    
                                            
                                            
             <!-- <div class="form-group">
          <label for="inputText3" class="col-form-label">Phone Number</label>
    <input id="ibmobi" type="phone" class="form-control" name="phone" onKeyUp="javascript:document.getElementById('tele').value = document.getElementById('ibmobi').value;" onSelect="javascript:document.getElementById('tele').value = document.getElementById('ibmobi').value;">
                                            </div>  -->                 
                                            
                </div>
                <!-- End IBADAN Electric hidden -->       
                
                
                
                <!-- Start KANO Electric hidden -->       
                              <div class="float-center" id="ifKedco" style="display:none;">                 
                                       <div class="form-group" >
                                                 
		 
        <label>Meter Type</label>
		
		<select class="form-control" id="IsKedco" required="required" ><option value = "" selected="selected" required="required">Select Meter Type</option>
              
         <option data-plan="prepaid"  data-service="kano-electric">Prepaid</option>
                <option data-plan="postpaid"  data-service="kano-electric">Postpaid</option>
                </select>
	
      </div>


     <!-- <div class="form-group">
          <label for="inputText3" class="col-form-label">Meter Number</label>
    <input id="kedmeterNo" type="text" class="form-control" name="smartno" onKeyUp="javascript:document.getElementById('iuc').value = document.getElementById('kedmeterNo').value;" onSelect="javascript:document.getElementById('iuc').value = document.getElementById('kedmeterNo').value;" onpaste="javascript:document.getElementById('iuc').value = document.getElementById('kedmeterNo').value;">
                                            </div>-->
                                            
        
         <div class="form-group">
          <label for="inputText3" class="col-form-label">Enter Amount</label>
    <input id="kedpay" type="text" class="form-control" name="amt" onKeyUp="javascript:document.getElementById('amount').value = document.getElementById('kedpay').value;" onSelect="javascript:document.getElementById('amount').value = document.getElementById('kedpay').value;" onpaste="javascript:document.getElementById('amount').value = document.getElementById('kedpay').value;">
                                            </div>                                    
                                            
                                            
             <!-- <div class="form-group">
          <label for="inputText3" class="col-form-label">Phone Number</label>
    <input id="kdmobi" type="phone" class="form-control" name="phone" onKeyUp="javascript:document.getElementById('tele').value = document.getElementById('kdmobi').value;" onSelect="javascript:document.getElementById('tele').value = document.getElementById('kdmobi').value;">
                                            </div> -->                  
                                            
                </div>
                <!-- End KANO Electric hidden --> 
                
                
               <!-- Start JOS Electric hidden -->       
                              <div class="float-center" id="ifJos" style="display:none;">                 
                                       <div class="form-group" >
                                                 
		 
        <label>Meter Type</label>
		
		<select class="form-control" id="IsJos" required="required" ><option value = "" selected="selected" required="required">Select Meter Type</option>
              
         <option data-plan="prepaid"  data-service="jos-electric">Prepaid</option>
                <option data-plan="postpaid"  data-service="jos-electric">Postpaid</option>
                </select>
	
      </div>


      <!--<div class="form-group">
          <label for="inputText3" class="col-form-label">Meter Number</label>
    <input id="josmeterNo" type="text" class="form-control" name="smartno" onKeyUp="javascript:document.getElementById('iuc').value = document.getElementById('josmeterNo').value;" onSelect="javascript:document.getElementById('iuc').value = document.getElementById('josmeterNo').value;" onpaste="javascript:document.getElementById('iuc').value = document.getElementById('josmeterNo').value;">
                                            </div>-->
                                            
        
         <div class="form-group">
          <label for="inputText3" class="col-form-label">Enter Amount</label>
    <input id="jospay" type="text" class="form-control" name="amt" onKeyUp="javascript:document.getElementById('amount').value = document.getElementById('jospay').value;" onSelect="javascript:document.getElementById('amount').value = document.getElementById('jospay').value;" onpaste="javascript:document.getElementById('amount').value = document.getElementById('jospay').value;">
                                            </div>                                    
                                            
                                            
             <!-- <div class="form-group">
          <label for="inputText3" class="col-form-label">Phone Number</label>
    <input id="josmobi" type="phone" class="form-control" name="phone" onKeyUp="javascript:document.getElementById('tele').value = document.getElementById('josmobi').value;" onSelect="javascript:document.getElementById('tele').value = document.getElementById('josmobi').value;">
                                            </div>  -->                 
                                            
                </div>
                <!-- End JOS Electric hidden -->  
               
               <!-- Start Abuja Electric hidden -->       
                              <div class="float-center" id="ifAbuja" style="display:none;">                 
                                       <div class="form-group" >
                                                 
		 
        <label>Meter Type</label>
		
		<select class="form-control" id="IsAbuja" required="required" ><option value = "" selected="selected" required="required">Select Meter Type</option>
              
         <option data-plan="prepaid"  data-service="abuja-electric">Prepaid</option>
                <option data-plan="postpaid"  data-service="abuja-electric">Postpaid</option>
                </select>
	
      </div>


    <!--  <div class="form-group">
          <label for="inputText3" class="col-form-label">Meter Number</label>
    <input id="abjmeterNo" type="text" class="form-control" name="smartno" onKeyUp="javascript:document.getElementById('iuc').value = document.getElementById('abjmeterNo').value;" onSelect="javascript:document.getElementById('iuc').value = document.getElementById('abjmeterNo').value;" onpaste="javascript:document.getElementById('iuc').value = document.getElementById('abjmeterNo').value;">
                                            </div>-->
                                            
        
         <div class="form-group">
          <label for="inputText3" class="col-form-label">Enter Amount</label>
    <input id="abjpay" type="text" class="form-control" name="amt" onKeyUp="javascript:document.getElementById('amount').value = document.getElementById('abjpay').value;" onSelect="javascript:document.getElementById('amount').value = document.getElementById('abjpay').value;" onpaste="javascript:document.getElementById('amount').value = document.getElementById('abjpay').value;">
                                            </div>                                    
                                            
                                            
              <!--<div class="form-group">
          <label for="inputText3" class="col-form-label">Phone Number</label>
    <input id="abjmobi" type="phone" class="form-control" name="phone" onKeyUp="javascript:document.getElementById('tele').value = document.getElementById('abjmobi').value;" onSelect="javascript:document.getElementById('tele').value = document.getElementById('abjmobi').value;">
                                            </div>  -->                 
                                            
                </div>
                <!-- End Abuja Electric hidden -->  
                
                
                
                
                <!-- Start Kaduna Electric hidden -->       
                              <div class="float-center" id="ifKaduna" style="display:none;">                 
                                       <div class="form-group" >
                                                 
		 
        <label>Meter Type</label>
		
		<select class="form-control" id="IsKaduna" required="required" ><option value = "" selected="selected" required="required">Select Meter Type</option>
              
         <option data-plan="prepaid"  data-service="kaduna-electric">Prepaid</option>
                <option data-plan="postpaid"  data-service="kaduna-electric">Postpaid</option>
                </select>
	
      </div>


    <!--  <div class="form-group">
          <label for="inputText3" class="col-form-label">Meter Number</label>
    <input id="kadumeterNo" type="text" class="form-control" name="smartno" onKeyUp="javascript:document.getElementById('iuc').value = document.getElementById('kadumeterNo').value;" onSelect="javascript:document.getElementById('iuc').value = document.getElementById('kadumeterNo').value;" onpaste="javascript:document.getElementById('iuc').value = document.getElementById('kadumeterNo').value;">
                                            </div>-->
                                            
        
         <div class="form-group">
          <label for="inputText3" class="col-form-label">Enter Amount</label>
    <input id="kadupay" type="text" class="form-control" name="amt" onKeyUp="javascript:document.getElementById('amount').value = document.getElementById('kadupay').value;" onSelect="javascript:document.getElementById('amount').value = document.getElementById('kadupay').value;" onpaste="javascript:document.getElementById('amount').value = document.getElementById('kadupay').value;">
                                            </div>                                    
                                            
                                            
              <!-- <div class="form-group">
          <label for="inputText3" class="col-form-label">Phone Number</label>
    <input id="kadumobi" type="phone" class="form-control" name="phone" onKeyUp="javascript:document.getElementById('tele').value = document.getElementById('kadumobi').value;" onSelect="javascript:document.getElementById('tele').value = document.getElementById('kadumobi').value;">
                                            </div>  -->                 
                                            
                </div>
                <!-- End Kaduna Electric hidden -->  
                
                                                   
                 <form method="post" action="" >                            
          
                 <input type="hidden" value="" name="plan" id="plan">
		 <input type="hidden" value="" name="service" id="service">
         
         <input type="hidden" value="" name="amount" id="amount">
         
         <input type="hidden" value="" name="iuc2" id="iuc">
         
         <input type="hidden" value="" name="tel" id="tele">
		 
		    <div class="form-group">
          
<label for="inputText3" class="col-form-label">Metter Number</label>
    
<input id="inputText3" type="phone" class="form-control" name="iuc">
    </div> 
	
                                            
                     <div class="col-sm-6 pl-0">
                           <p class="text-center">
                                                    <button type="submit" name="disco" class="btn btn-rounded btn-primary">Proceed </button>
                           <button class="btn btn-rounded btn-secondary">Cancel</button>                    
                                                </p>                                            
                                            </div>       
                                        </form>
                                        
                                 
                                    </div>
                                </div>
                            </div>
                            <!-- ============================================================== -->
                            <!-- end recent orders  -->
                            
                    
                            
<script>

 function Comma(Num)
 {
       Num += '';
       Num = Num.replace(/,/g, '');

       x = Num.split('.');
       x1 = x[0];

       x2 = x.length > 1 ? '.' + x[1] : '';

       
         var rgx = /(\d)((\d{3}?)+)$/;

       while (rgx.test(x1))

       x1 = x1.replace(rgx, '$1' + ',' + '$2');
     
       return x1 + x2;       
        
 }
 
 
 
 function showTv(){
    if (document.getElementById('Eko').checked) {
        document.getElementById('ifEko').style.display = 'block';
		
		var sourceOfPicture = "assets/images/Eko-Electric-Payment-PHCN.jpg";
  var img = document.getElementById('bigpic')
  img.src = sourceOfPicture.replace('90x90', '225x225');
  img.style.display = "block";
	
  $('#IsEko').change(function(){
	  var selected = $(this).find('option:selected');
	 
	  var service = selected.data('service');
	  var plan = selected.data('plan');
	  
	  $('#service').val(service);
	  $('#plan').val(plan);
	  
	  }); 
  
    }else document.getElementById('ifEko').style.display = 'none';
	
	
	if (document.getElementById('EEDC').checked) {
        document.getElementById('ifEEDC').style.display = 'block';
		
		var sourceOfPicture = "assets/images/EEDC-Enugu-electricity-payment.jpg";
  var img = document.getElementById('bigpic')
  img.src = sourceOfPicture.replace('90x90', '225x225');
  img.style.display = "block";
  
  $('#IsEEDC').change(function(){
	  var selected = $(this).find('option:selected');
	  
	  var service = selected.data('service');
	  var plan = selected.data('plan');
	  
	  $('#service').val(service);
	  $('#plan').val(plan);
	  });
		
	
		
		}else document.getElementById('ifEEDC').style.display = 'none';
	
	if (document.getElementById('Ikeja').checked) {
        document.getElementById('ifIkeja').style.display = 'block';
		
		var sourceOfPicture = "assets/images/Ikeja-Electric-Payment-PHCN.jpg";
  var img = document.getElementById('bigpic')
  img.src = sourceOfPicture.replace('90x90', '225x225');
  img.style.display = "block";
		
		
		$('#IsIkeja').change(function(){
	  var selected = $(this).find('option:selected');
	  
	  var service = selected.data('service');
	  var plan = selected.data('plan');
	  
	  $('#service').val(service);
	  $('#plan').val(plan);
	  });
		
	}
    
	else document.getElementById('ifIkeja').style.display = 'none';
	
	
	
	if (document.getElementById('phc').checked) {
        document.getElementById('ifPhc').style.display = 'block';
		
		var sourceOfPicture = "assets/images/18112019141721Port-Harcourt-Electric.jpg";
  var img = document.getElementById('bigpic')
  img.src = sourceOfPicture.replace('90x90', '225x225');
  img.style.display = "block";
		
		
		$('#IsPhc').change(function(){
	  var selected = $(this).find('option:selected');
	 
	  var service = selected.data('service');
	  var plan = selected.data('plan');
	 
	  $('#service').val(service);
	  $('#plan').val(plan);
	  });
		
	}
    
	else document.getElementById('ifPhc').style.display = 'none';
	
	
	
	if (document.getElementById('ibedc').checked) {
        document.getElementById('ifIbedc').style.display = 'block';
		
		var sourceOfPicture = "assets/images/IBEDC-Ibadan-Electricity-Distribution-Company.jpg";
  var img = document.getElementById('bigpic')
  img.src = sourceOfPicture.replace('90x90', '225x225');
  img.style.display = "block";
		
		
		$('#IsIbedc').change(function(){
	  var selected = $(this).find('option:selected');
	 
	  var service = selected.data('service');
	  var plan = selected.data('plan');
	 
	  $('#service').val(service);
	  $('#plan').val(plan);
	  });
		
	}
    
	else document.getElementById('ifIbedc').style.display = 'none';
	
	
	
	if (document.getElementById('kedco').checked) {
        document.getElementById('ifKedco').style.display = 'block';
		
		var sourceOfPicture = "assets/images/Kano-Electricity-Distribution-Company-KEDCO-logo.png";
  var img = document.getElementById('bigpic')
  img.src = sourceOfPicture.replace('90x90', '225x225');
  img.style.display = "block";
		
		
		$('#IsKedco').change(function(){
	  var selected = $(this).find('option:selected');
	 
	  var service = selected.data('service');
	  var plan = selected.data('plan');
	 
	  $('#service').val(service);
	  $('#plan').val(plan);
	  });
		
	}
    
	else document.getElementById('ifKedco').style.display = 'none';
	
	
	
	if (document.getElementById('jos').checked) {
        document.getElementById('ifJos').style.display = 'block';
		
		var sourceOfPicture = "assets/images/Jos-Electric-JED.jpg";
  var img = document.getElementById('bigpic')
  img.src = sourceOfPicture.replace('90x90', '225x225');
  img.style.display = "block";
		
		
		$('#IsJos').change(function(){
	  var selected = $(this).find('option:selected');
	 
	  var service = selected.data('service');
	  var plan = selected.data('plan');
	 
	  $('#service').val(service);
	  $('#plan').val(plan);
	  });
		
	}
    
	else document.getElementById('ifJos').style.display = 'none';
	
	
	
	if (document.getElementById('abuja').checked) {
        document.getElementById('ifAbuja').style.display = 'block';
		
		var sourceOfPicture = "assets/images/Abuja-Electric.jpg";
  var img = document.getElementById('bigpic')
  img.src = sourceOfPicture.replace('90x90', '225x225');
  img.style.display = "block";
		
		
		$('#IsAbuja').change(function(){
	  var selected = $(this).find('option:selected');
	 
	  var service = selected.data('service');
	  var plan = selected.data('plan');
	 
	  $('#service').val(service);
	  $('#plan').val(plan);
	  });
		
	}
    
	else document.getElementById('ifAbuja').style.display = 'none';
	
	
	
	if (document.getElementById('kaduna').checked) {
        document.getElementById('ifKaduna').style.display = 'block';
		
		var sourceOfPicture = "assets/images/Kaduna-Electric-KAEDCO.jpg";
  var img = document.getElementById('bigpic')
  img.src = sourceOfPicture.replace('90x90', '225x225');
  img.style.display = "block";
		
		
		$('#IsKaduna').change(function(){
	  var selected = $(this).find('option:selected');
	 
	  var service = selected.data('service');
	  var plan = selected.data('plan');
	 
	  $('#service').val(service);
	  $('#plan').val(plan);
	  });
		
	}
    
	else document.getElementById('ifKaduna').style.display = 'none';
	
	}



                            </script> 
                            <!-- ============================================================== -->
                            <!-- ============================================================== -->
                            <!-- customer acquistion  -->
                            <!-- ============================================================== -->
                            <?php include('inc/nav-reflink.php'); ?> 
                          
                            <!-- ============================================================== -->
                        </div>
                        <div class="row">
                          
                        </div>

                        <div class="row">
                            <!-- ============================================================== -->
                            <!-- sales  -->
                         
                            <!-- end new customer  -->
                           
                        </div>
                        <div class="row">
              
                        </div>
                        <div class="row">
                      
                        </div>
                    </div>
                </div>
            </div>
            <!-- ============================================================== -->
            <!-- footer -->
            <!-- ============================================================== -->
            <?php include('inc/footer.php');?>