<?php require ("header.php")?>


      
      
    
      
      
      
      
      
      
      
      
      
       <?php
session_start();
if(isset($_SESSION['SESS_ADMINLOGGEDIN']) == FALSE) {
    header("Location: " . $config_basedir."access");
}
require_once("../config.php");

?>
      

  
      
                <?php


    $id = $_GET['id'];
   
 
 
 ?>
 
 
 
 


 
  <div class='page-wrapper'>
           
            <div class='page-breadcrumb'>
                <div class='row'>
                    <div class='col-12 d-flex no-block align-items-center'>
                       
                       
                    </div>
                </div>
            </div>
           
            <div class='container-fluid'>
               
                <div class='row'>
                    <div class='col-12'>
                        <div class='card'>
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
 
     <!-- Content Wrapper. Contains page content -->
      <div class='content-wrapper'>
      
        <!-- Main content -->
        <section class='content'>

          <div class='row'>
            <!-- /.col -->
            <div class='col-md-12'>
              <div class='nav-tabs-custom'>
                <ul class='nav nav-tabs'>
                    <li class='active'>
                          <a href='index.php' class='rowtab'><strong>HOME</strong></a>
                          
                          </li>
<a href='list_customers.php'  class='btn btn-primary' value='log in'>CUSTOMERS List</a>
                   
                   </li>
                </ul>
                <div class='tab-content'>
                  <div class='active tab-pane' id='activity'>
                    <!-- Post -->
                    <div class='post'>
      
      
          
    <section class='content-header'>
      <h1>
        BILLING
        <small>Customer's panel</small>
      </h1>
      <ol class='breadcrumb'>
        <li><a href='index.php'><i class='fa fa-dashboard'></i> Home</a></li>
        <li class='active'> <a href='list_customers.php'>CUSTOMERS List</a></li>
        <li class='active'>Add</li>
      </ol>
    </section>
	
	
    <section class='content'>
	<div class='row'>	
		
	 <section class='content'>
     

				
				<div class='box box-success'>
            <div class='box-body'>
              <div class='table-responsive'>
             <div class='box-body'>

			 <!--<div class='col-md-14'>-->
           <div class='container'>
             <ul class='nav nav-tabs'>
              
    <li class='active'><a href='#tab_1' data-toggle='tab'>BILLING</a></li>
              
   
               
<li><a href='#tab_7' class='btn btn-warning' data-toggle='tab'>LOGIN</a></li>
               
               
             
           
              
              </ul>
              
         
            
            
            
          <div class='tab-content'>
            
<?php


if (isset($_POST['action_bill'])) {
    // Sanitize and validate inputs
    $b1 = $_POST['b1'] ?? '';
    $b2 = $_POST['b2'] ?? '';
    $b3 = $_POST['b3'] ?? '';
    $b4 = $_POST['b4'] ?? '';
    $b5 = $_POST['b5'] ?? '';
    $b6 = $_POST['b6'] ?? '';
    $b7 = $_POST['b7'] ?? '';
    $b8 = $_POST['b8'] ?? '';
    $b9 = $_POST['b9'] ?? '';
    $b10 = $_POST['b10'] ?? '';

    $b1n = $_POST['b1n'] ?? '';
    $b2n = $_POST['b2n'] ?? '';
    $b3n = $_POST['b3n'] ?? '';
    $b4n = $_POST['b4n'] ?? '';
    $b5n = $_POST['b5n'] ?? '';
    $b6n = $_POST['b6n'] ?? '';
    $b7n = $_POST['b7n'] ?? '';
    $b8n = $_POST['b8n'] ?? '';
    $b9n = $_POST['b9n'] ?? '';
    $b10n = $_POST['b10n'] ?? '';

    $bs1 = $_POST['bs1'] ?? '';
    $bs2 = $_POST['bs2'] ?? '';
    $bs3 = $_POST['bs3'] ?? '';
    $bs4 = $_POST['bs4'] ?? '';
    $bs5 = $_POST['bs5'] ?? '';
    $bs6 = $_POST['bs6'] ?? '';
    $bs7 = $_POST['bs7'] ?? '';
    $bs8 = $_POST['bs8'] ?? '';
    $bs9 = $_POST['bs9'] ?? '';
    $bs10 = $_POST['bs10'] ?? '';

    $fe1 = $_POST['fe1'] ?? '';
    $fe2 = $_POST['fe2'] ?? '';
    $fe3 = $_POST['fe3'] ?? '';
    $fe4 = $_POST['fe4'] ?? '';
    $fe5 = $_POST['fe5'] ?? '';
    $fe6 = $_POST['fe6'] ?? '';
    $fe7 = $_POST['fe7'] ?? '';
    $fe8 = $_POST['fe8'] ?? '';
    $fe9 = $_POST['fe9'] ?? '';
    $fe10 = $_POST['fe10'] ?? '';

    $fee1 = $_POST['fee1'] ?? '';
    $fee2 = $_POST['fee2'] ?? '';
    $fee3 = $_POST['fee3'] ?? '';
    $fee4 = $_POST['fee4'] ?? '';
    $fee5 = $_POST['fee5'] ?? '';
    $fee6 = $_POST['fee6'] ?? '';
    $fee7 = $_POST['fee7'] ?? '';
    $fee8 = $_POST['fee8'] ?? '';
    $fee9 = $_POST['fee9'] ?? '';
    $fee10 = $_POST['fee10'] ?? '';

    $id = $_POST['id'] ?? 0;

    // Ensure the ID is numeric
    if (is_numeric($id)) {
        try {
            // Prepare the PDO query to update the database
            $stmt = $pdo->prepare("UPDATE logins SET 
                b1 = :b1, b2 = :b2, b3 = :b3, b4 = :b4, b5 = :b5, b6 = :b6, b7 = :b7, b8 = :b8, b9 = :b9, b10 = :b10,
                b1n = :b1n, b2n = :b2n, b3n = :b3n, b4n = :b4n, b5n = :b5n, b6n = :b6n, b7n = :b7n, b8n = :b8n, b9n = :b9n, b10n = :b10n,
                bs1 = :bs1, bs2 = :bs2, bs3 = :bs3, bs4 = :bs4, bs5 = :bs5, bs6 = :bs6, bs7 = :bs7, bs8 = :bs8, bs9 = :bs9, bs10 = :bs10,
                fe1 = :fe1, fe2 = :fe2, fe3 = :fe3, fe4 = :fe4, fe5 = :fe5, fe6 = :fe6, fe7 = :fe7, fe8 = :fe8, fe9 = :fe9, fe10 = :fe10,
                fee1 = :fee1, fee2 = :fee2, fee3 = :fee3, fee4 = :fee4, fee5 = :fee5, fee6 = :fee6, fee7 = :fee7, fee8 = :fee8, fee9 = :fee9, fee10 = :fee10
                WHERE id = :id");

            // Execute the query with bound parameters
            $stmt->execute([
                ':b1' => $b1, ':b2' => $b2, ':b3' => $b3, ':b4' => $b4, ':b5' => $b5, ':b6' => $b6, ':b7' => $b7, ':b8' => $b8, ':b9' => $b9, ':b10' => $b10,
                ':b1n' => $b1n, ':b2n' => $b2n, ':b3n' => $b3n, ':b4n' => $b4n, ':b5n' => $b5n, ':b6n' => $b6n, ':b7n' => $b7n, ':b8n' => $b8n, ':b9n' => $b9n, ':b10n' => $b10n,
                ':bs1' => $bs1, ':bs2' => $bs2, ':bs3' => $bs3, ':bs4' => $bs4, ':bs5' => $bs5, ':bs6' => $bs6, ':bs7' => $bs7, ':bs8' => $bs8, ':bs9' => $bs9, ':bs10' => $bs10,
                ':fe1' => $fe1, ':fe2' => $fe2, ':fe3' => $fe3, ':fe4' => $fe4, ':fe5' => $fe5, ':fe6' => $fe6, ':fe7' => $fe7, ':fe8' => $fe8, ':fe9' => $fe9, ':fe10' => $fe10,
                ':fee1' => $fee1, ':fee2' => $fee2, ':fee3' => $fee3, ':fee4' => $fee4, ':fee5' => $fee5, ':fee6' => $fee6, ':fee7' => $fee7, ':fee8' => $fee8, ':fee9' => $fee9, ':fee10' => $fee10,
                ':id' => $id
            ]);

            // Success message with JavaScript popup and redirect
            echo "<script>
                alert('Billing settings updated successfully.');
                window.location.href = 'index.php'; 
            </script>";

        } catch (PDOException $e) {
            // Handle database errors
            error_log("Error: " . $e->getMessage()); // Log errors for debugging
            echo "<script>
                alert('Error: " . $e->getMessage() . "');
                window.location.href = 'index.php'; 
            </script>";
        }
    } else {
        echo "<script>
            alert('Invalid ID.');
            window.location.href = 'index.php'; 
        </script>";
    }
} 
?>






<?php
if (isset($_GET['id']) && is_numeric($_GET['id'])) {
    $id = (int) $_GET['id'];

    $stmt = $pdo->prepare("SELECT * FROM logins WHERE id = :id");
    $stmt->bindParam(':id', $id, PDO::PARAM_INT);
    $stmt->execute();
    $ordrow = $stmt->fetch(PDO::FETCH_ASSOC);

    if ($ordrow) {

            echo" <form class='form-horizontal' method='post' enctype='multipart/form-data' action=''>
			
			
			
	<div class='alert-danger'>&nbsp; CUSTOMER BILLINGs (" . $ordrow['firstname'] . " " . $ordrow['lastname'] . ")</div>
<hr>
	   
          	
               
               
             <input type='hidden' class='form-control' name='id' value='" . $ordrow['id'] . "'readonly>
               
               
               
               
               
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>Billing Name</label>
                  	<div class='col-sm-10'>
					<input name='b1' type='text' class='form-control' value='" . $ordrow['b1'] . "'>
           			 </div>
          	</div>  
          	
          	
          	
          	
          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b1'] . " Description</label>
                  	<div class='col-sm-10'>
					<textarea name='b1n' type='text' class='form-control' placeholder=''>" . $ordrow['b1n'] . "</textarea>
           			 </div>
          	</div> 
          	
               
               
                  		
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b1'] . " Code</label>
                  	<div class='col-sm-10'>
					<input name='fe1' type='text' class='form-control' value='" . $ordrow['fe1'] . "'>
           			 </div>
          	</div> 
          	
          	
          	 
				  <div class='form-group'>
                  <label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b1'] . " Cost(&#x00025;)</label>
                  <div class='col-sm-10'>
                  <div class='input-group date'>
                  <div class='input-group-addon'>&#x00025;</div>
                  <input name='fee1' type='number' class='form-control' value='" . $ordrow['fee1']. "' >
                  </div>
                  </div>
                  </div>
          	



          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b1'] . " Status</label>
                  	<div class='col-sm-10'>
				<select name='bs1'>
				
				
				<option value='".$ordrow['bs1']."'>";
                   
                   
                   if($ordrow['bs1'] == 1)
                   { 
                  echo "ACTIVE";
                   }
                   
                 
                 
                   elseif($ordrow['bs1'] == 0)
                   { 
                  echo "NOT-ACTIVE";
                   } 
                   
                   
			
                   echo"</option>
				
				
				<option value='1'>ON</option>
				<option value='0'>OFF</option>
				</select>
           			 </div>
          	</div> 
               
               
               
               
               
               
               
               
               
               
               
               
               
               
               
               
              <hr> 
               
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>Billing Name</label>
                  	<div class='col-sm-10'>
					<input name='b2' type='text' class='form-control' value='" . $ordrow['b2'] . "'>
           			 </div>
          	</div>  
          	
          	
          	
          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b2'] . " Description</label>
                  	<div class='col-sm-10'>
					<textarea name='b2n' type='text' class='form-control' >" . $ordrow['b2n'] . "</textarea>
           			 </div>
          	</div> 
          	
               
               
                  		
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b2'] . " Code</label>
                  	<div class='col-sm-10'>
					<input name='fe2' type='text' class='form-control' value='" . $ordrow['fe2'] . "'>
           			 </div>
          	</div> 
          	
          	
          	 
				  <div class='form-group'>
                  <label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b2'] . " Cost(&#x00025;)</label>
                  <div class='col-sm-10'>
                  <div class='input-group date'>
                  <div class='input-group-addon'>&#x00025;</div>
                  <input name='fee2' type='number' class='form-control' value='" . $ordrow['fee2']. "' >
                  </div>
                  </div>
                  </div>
          	



          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b2'] . " Status</label>
                  	<div class='col-sm-10'>
				<select name='bs2'>
				
				
			<option value='".$ordrow['bs2']."'>";
                   
                   
                   
                   if($ordrow['bs2'] == 1)
                   { 
                  echo "ACTIVE";
                   }
                   
                 
                 
                   elseif($ordrow['bs2'] == 0)
                   { 
                  echo "NOT-ACTIVE";
                   } 
                   
                   
			
                   echo"</option>
				
				
				<option value='1'>ON</option>
				<option value='0'>OFF</option>
				</select>
           			 </div>
          	</div> 
               
          	
          	
          	
          	
          	
          	
          	
          
          
          
          
          
          
          
          
          
          
          
          
          
          
            <hr> 
               
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>Billing Name</label>
                  	<div class='col-sm-10'>
					<input name='b3' type='text' class='form-control' value='" . $ordrow['b3'] . "'>
           			 </div>
          	</div>  
          	
          	
          	
          	
          	
          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b3'] . " Description</label>
                  	<div class='col-sm-10'>
					<textarea name='b3n' type='text' class='form-control' >" . $ordrow['b3n'] . "</textarea>
           			 </div>
          	</div> 
               
               
                  		
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b3'] . " Code</label>
                  	<div class='col-sm-10'>
					<input name='fe3' type='text' class='form-control' value='" . $ordrow['fe3'] . "'>
           			 </div>
          	</div> 
          	
          	
          	 
				 <div class='form-group'>
                  <label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b3'] . " Cost(&#x00025;)</label>
                  <div class='col-sm-10'>
                  <div class='input-group date'>
                  <div class='input-group-addon'>&#x00025;</div>
                  <input name='fee3' type='number' class='form-control' value='" . $ordrow['fee3']. "' >
                  </div>
                  </div>
                  </div>



          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b3'] . " Status</label>
                  	<div class='col-sm-10'>
				<select name='bs3'>
				
				
			<option value='".$ordrow['bs3']."'>";
                   
                   
                   if($ordrow['bs3'] == 1)
                   { 
                  echo "ACTIVE";
                   }
                   
                 
                 
                   elseif($ordrow['bs3'] == 0)
                   { 
                  echo "NOT-ACTIVE";
                   } 
                   
                   
			
                   echo"</option>
				
				
				<option value='1'>ON</option>
				<option value='0'>OFF</option>
				</select>
           			 </div>
          	</div> 
               
          	
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
            <hr> 
               
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>Billing Name</label>
                  	<div class='col-sm-10'>
					<input name='b4' type='text' class='form-control' value='" . $ordrow['b4'] . "'>
           			 </div>
          	</div>  
               
               
               
               
               
          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b4'] . " Description</label>
                  	<div class='col-sm-10'>
					<textarea name='b4n' type='text' class='form-control' >" . $ordrow['b4n'] . "</textarea>
           			 </div>
          	</div> 
               
               
                  		
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b4'] . " Code</label>
                  	<div class='col-sm-10'>
					<input name='fe4' type='text' class='form-control' value='" . $ordrow['fe4'] . "'>
           			 </div>
          	</div> 
          	
          	
          	 
				  <div class='form-group'>
                  <label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b4'] . " Cost(&#x00025;)</label>
                  <div class='col-sm-10'>
                  <div class='input-group date'>
                  <div class='input-group-addon'>&#x00025;</div>
                  <input name='fee4' type='number' class='form-control' value='" . $ordrow['fee4']. "' >
                  </div>
                  </div>
                  </div>
          	



          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b4'] . " Status</label>
                  	<div class='col-sm-10'>
				<select name='bs4'>
				
				
				<option value='".$ordrow['bs4']."'>";
                   
                   
                   
                   if($ordrow['bs4'] == 1)
                   { 
                  echo "ACTIVE";
                   }
                   
                 
                 
                   elseif($ordrow['bs4'] == 0)
                   { 
                  echo "NOT-ACTIVE";
                   } 
                   
                   
			
                   echo"</option>
				
				
				<option value='1'>ON</option>
				<option value='0'>OFF</option>
				</select>
           			 </div>
          	</div> 
               
          	
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
            <hr> 
               
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>Billing Name</label>
                  	<div class='col-sm-10'>
					<input name='b5' type='text' class='form-control' value='" . $ordrow['b5'] . "'>
           			 </div>
          	</div>  
          	
          	
          	
          	
          	
          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b5'] . " Description</label>
                  	<div class='col-sm-10'>
					<textarea name='b5n' type='text' class='form-control' >" . $ordrow['b5n'] . "</textarea>
           			 </div>
          	</div> 
               
               
               
               
               
                  		
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b5'] . " Code</label>
                  	<div class='col-sm-10'>
					<input name='fe5' type='text' class='form-control' value='" . $ordrow['fe5'] . "'>
           			 </div>
          	</div> 
          	
          	
          	 
				 <div class='form-group'>
                  <label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b5'] . " Cost(&#x00025;)</label>
                  <div class='col-sm-10'>
                  <div class='input-group date'>
                  <div class='input-group-addon'>&#x00025;</div>
                  <input name='fee5' type='number' class='form-control' value='" . $ordrow['fee5']. "' >
                  </div>
                  </div>
                  </div>
          	



          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b5'] . " Status</label>
                  	<div class='col-sm-10'>
				<select name='bs5'>
				
				
			<option value='".$ordrow['bs5']."'>";
                   
                   
                   
                   if($ordrow['bs5'] == 1)
                   { 
                  echo "ACTIVE";
                   }
                   
                 
                 
                   elseif($ordrow['bs5'] == 0)
                   { 
                  echo "NOT-ACTIVE";
                   } 
                   
                   
			
                   echo"</option>
				
				
				<option value='1'>ON</option>
				<option value='0'>OFF</option>
				</select>
           			 </div>
          	</div> 
               
          	
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
            <hr> 
               
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>Billing Name</label>
                  	<div class='col-sm-10'>
					<input name='b6' type='text' class='form-control' value='" . $ordrow['b6'] . "'>
           			 </div>
          	</div> 
          	
          	
          	
          	
          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b6'] . " Description</label>
                  	<div class='col-sm-10'>
					<textarea name='b6n' type='text' class='form-control' >" . $ordrow['b6n'] . "</textarea>
           			 </div>
          	</div> 
               
               
               
                  		
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b6'] . " Code</label>
                  	<div class='col-sm-10'>
					<input name='fe6' type='text' class='form-control' value='" . $ordrow['fe6'] . "'>
           			 </div>
          	</div> 
          	
          	
          	 
				 <div class='form-group'>
                  <label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b7'] . " Cost(&#x00025;)</label>
                  <div class='col-sm-10'>
                  <div class='input-group date'>
                  <div class='input-group-addon'>&#x00025;</div>
                  <input name='fee7' type='number' class='form-control' value='" . $ordrow['fee7']. "' >
                  </div>
                  </div>
                  </div>
          	



          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b6'] . " Status</label>
                  	<div class='col-sm-10'>
				<select name='bs6'>
				
				
				<option value='".$ordrow['bs6']."'>";
                   
                   
                   
                   if($ordrow['bs6'] == 1)
                   { 
                  echo "ACTIVE";
                   }
                   
                 
                 
                   elseif($ordrow['bs6'] == 0)
                   { 
                  echo "NOT-ACTIVE";
                   } 
                   
                   
			
                   echo"</option>
				
				
				<option value='1'>ON</option>
				<option value='0'>OFF</option>
				</select>
           			 </div>
          	</div> 
               
          	
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
            <hr> 
               
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>Billing Name</label>
                  	<div class='col-sm-10'>
					<input name='b7' type='text' class='form-control' value='" . $ordrow['b7'] . "'>
           			 </div>
          	</div>  
          	
          	
          	
          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b7'] . " Description</label>
                  	<div class='col-sm-10'>
					<textarea name='b7n' type='text' class='form-control' >" . $ordrow['b7n'] . "</textarea>
           			 </div>
          	</div> 
               
               
               
                  		
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b7'] . " Code</label>
                  	<div class='col-sm-10'>
					<input name='fe7' type='text' class='form-control' value='" . $ordrow['fe7'] . "'>
           			 </div>
          	</div> 
          	
          	
          	 
				  <div class='form-group'>
                  <label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b7'] . " Cost(&#x00025;)</label>
                  <div class='col-sm-10'>
                  <div class='input-group date'>
                  <div class='input-group-addon'>&#x00025;</div>
                  <input name='fee7' type='number' class='form-control' value='" . $ordrow['fee7']. "' >
                  </div>
                  </div>
                  </div>



          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b7'] . " Status</label>
                  	<div class='col-sm-10'>
				<select name='bs7'>
				
				
				<option value='".$ordrow['bs7']."'>";
                   
                   
                   
                   if($ordrow['bs7'] == 1)
                   { 
                  echo "ACTIVE";
                   }
                   
                 
                 
                   elseif($ordrow['bs7'] == 0)
                   { 
                  echo "NOT-ACTIVE";
                   } 
                   
                   
			
                   echo"</option>
				
				
				<option value='1'>ON</option>
				<option value='0'>OFF</option>
				</select>
           			 </div>
          	</div>   
          	
          	
          	
          	
          	
          	
          	
          	
          	
          	
          	
          	    <hr> 
               
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>Billing Name</label>
                  	<div class='col-sm-10'>
					<input name='b8' type='text' class='form-control' value='" . $ordrow['b8'] . "'>
           			 </div>
          	</div> 
          	
          	
          	
          	
          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b8'] . " Description</label>
                  	<div class='col-sm-10'>
					<textarea name='b8n' type='text' class='form-control' >" . $ordrow['b8n'] . "</textarea>
           			 </div>
          	</div> 
               
               
               
                  		
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b8'] . " Code</label>
                  	<div class='col-sm-10'>
					<input name='fe8' type='text' class='form-control' value='" . $ordrow['fe8'] . "'>
           			 </div>
          	</div> 
          	
          	
          	 
				  <div class='form-group'>
                  <label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b8'] . " Cost(&#x00025;)</label>
                  <div class='col-sm-10'>
                  <div class='input-group date'>
                  <div class='input-group-addon'>&#x00025;</div>
                  <input name='fee8' type='number' class='form-control' value='" . $ordrow['fee8']. "' >
                  </div>
                  </div>
                  </div>
          	



          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b8'] . " Status</label>
                  	<div class='col-sm-10'>
				<select name='bs8'>
				
				
				<option value='".$ordrow['bs8']."'>";
                   
                   
                   
                   if($ordrow['bs8'] == 1)
                   { 
                  echo "ACTIVE";
                   }
                   
                 
                 
                   elseif($ordrow['bs8'] == 0)
                   { 
                  echo "NOT-ACTIVE";
                   } 
                   
                   
			
                   echo"</option>
				
				
				<option value='1'>ON</option>
				<option value='0'>OFF</option>
				</select>
           			 </div>
          	</div> 
          	
          	
          	
          	
          	
          	
          	
          	
          	
          	
          	
          	    <hr> 
               
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>Billing Name</label>
                  	<div class='col-sm-10'>
					<input name='b9' type='text' class='form-control' value='" . $ordrow['b9'] . "'>
           			 </div>
          	</div>  
          	
          	
          	
          	
          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b9'] . " Description</label>
                  	<div class='col-sm-10'>
					<textarea name='b9n' type='text' class='form-control' >" . $ordrow['b9n'] . "</textarea>
           			 </div>
          	</div> 
               
               
               
                  		
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b9'] . " Code</label>
                  	<div class='col-sm-10'>
					<input name='fe9' type='text' class='form-control' value='" . $ordrow['fe9'] . "'>
           			 </div>
          	</div> 
          	
          	
          	 
				  <div class='form-group'>
                  <label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b9'] . " Cost(&#x00025;)</label>
                  <div class='col-sm-10'>
                  <div class='input-group date'>
                  <div class='input-group-addon'>&#x00025;</div>
                  <input name='fee9' type='number' class='form-control' value='" . $ordrow['fee9']. "' >
                  </div>
                  </div>
                  </div>



          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b6'] . " Status</label>
                  	<div class='col-sm-10'>
				<select name='bs9'>
				
				
				<option value='".$ordrow['bs9']."'>";
                   
                   
                   
                   if($ordrow['bs9'] == 1)
                   { 
                  echo "ACTIVE";
                   }
                   
                 
                 
                   elseif($ordrow['bs9'] == 0)
                   { 
                  echo "NOT-ACTIVE";
                   } 
                   
                   
			
                   echo"</option>
				
				
				<option value='1'>ON</option>
				<option value='0'>OFF</option>
				</select>
           			 </div>
          	</div> 
          	
          	
          	
          	
          
          
          
          
          
              <hr> 
               
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>Billing Name</label>
                  	<div class='col-sm-10'>
					<input name='b10' type='text' class='form-control' value='" . $ordrow['b10'] . "'>
           			 </div>
          	</div>  
          	
          	
          	
          	
          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b10'] . " Description</label>
                  	<div class='col-sm-10'>
					<textarea name='b10n' type='text' class='form-control' >" . $ordrow['b10n'] . "</textarea>
           			 </div>
          	</div> 
               
               
               
               
                  		
                <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b10'] . " Code</label>
                  	<div class='col-sm-10'>
					<input name='fe10' type='text' class='form-control' value='" . $ordrow['fe10'] . "'>
           			 </div>
          	</div> 
          	
          	
          	 
				  <div class='form-group'>
                  <label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b10'] . " Cost(&#x00025;)</label>
                  <div class='col-sm-10'>
                  <div class='input-group date'>
                  <div class='input-group-addon'>&#x00025;</div>
                  <input name='fee10' type='number' class='form-control' value='" . $ordrow['fee10']. "' >
                  </div>
                  </div>
                  </div>
          	



          	  <div class='form-group'>
                  	<label for='' class='col-sm-2 control-label' style='color:#009900'>" . $ordrow['b10'] . " Status</label>
                  	<div class='col-sm-10'>
				<select name='bs10'>
				
				
				<option value='".$ordrow['bs10']."'>";
                   
                   
                   
                   if($ordrow['bs10'] == 1)
                   { 
                  echo "ACTIVE";
                   }
                   
                 
                 
                   elseif($ordrow['bs10'] == 0)
                   { 
                  echo "NOT-ACTIVE";
                   } 
                   
                   
			
                   echo"</option>
				
				
				<option value='1'>ON</option>
				<option value='0'>OFF</option>
				</select>
           			 </div>
          	</div> 
          
          
          
          
          
          
          
                  
             <center>
                  
        <button type='submit' class='btn btn-info btn-flat' name='action_bill'><i class='fa fa-save'>&nbsp;Update Billings</i></button>
              </center>

              </div>
			 
			  </form>";
    }
}
?>

            </div>
        </div>
       
 
              
       <hr>
       
       
       
         
       

              
              
                  </div> 
     
     
     
     
     
              
              
              
              
                  </div>
                  
           
              
              
              
              
              
              <?php
// Assuming you are using PDO for database connection
// Modify this code as necessary based on your PDO setup
try {
    // Prepare and execute the query using PDO
    $stmt = $pdo->prepare("SELECT * FROM logins WHERE id = :id");
    $stmt->bindParam(':id', $id, PDO::PARAM_INT);
    $stmt->execute();
    $ordrow = $stmt->fetch(PDO::FETCH_ASSOC);

    if ($ordrow) {
        echo "
        <div class='tab-pane fade' id='tab_7'>       
            <form method='POST' action='../connx/login.php' role='form'>
                <div class='form-group'>
                    <label for='' class='col-sm-2 control-label' style='color:#009900'>Account No. </label>
                    <div class='col-sm-10'>
                        <input name='acc_no' class='form-control' value='" . htmlspecialchars($ordrow['acc_no']) . "' readonly/>
                    </div>
                </div> 
                <br><br>
                
                <div class='form-group'>
                    <label for='' class='col-sm-2 control-label' style='color:#009900'>Password</label>
                    <div class='col-sm-10'>
                        <input name='password' type='password' class='form-control' placeholder='Enter your password' />
                    </div>
                </div>
                
                <center>
                    <button type='submit' name='action' value='Login' class='btn btn-success my-4'>Sign in</button> 
                </center>
            </form>
        </div>";
    } else {
        echo "Account not found.";
    }
} catch (PDOException $e) {
    echo "Error: " . $e->getMessage();
}
?>

              <!-- /.tab-pane -->
                  
					
					
				
				
				</div>
				

              </div>
			 

	
</div>	
</div>
</div></div>	
</div>
</div></div>	
</div>
</div></div>	
</div>
</div></div>	
</div>
</div>	
</div>		</section>
        
        
        
        
        
        
        
        
        
        
                    </div><!-- /.post -->

                
                  </div>
                  <!-- /.tab-pane -->
                  
                  
                  
                  

                  <!-- /.tab-pane -->
                </div><!-- /.tab-content -->
              </div><!-- /.nav-tabs-custom -->
            </div><!-- /.col -->
          </div><!-- /.row -->

        </section><!-- /.content -->
      </div>
                </div>
               
            </div>
            
           <?php require ("footer.php")?>
           
           <script>
function myFunction() {
  window.print(); }
</script>