<?php
   include('session.php');
   include('header1.php');
   include('ietpartial.php');

// start role specific 
$user_role = $_SESSION['role'];

if ($_SERVER["REQUEST_METHOD"] == "GET") {

  $employeeid = $_GET['employeeID'];

  if(isset($_GET['updated'])) {

    $updated = $_GET['updated'];

  }

  $sqlGetEmployee = "SELECT * FROM employees WHERE employeeid = $employeeid";

  $resultEmployee = mysqli_query($db,$sqlGetEmployee);

  $countEmployee = mysqli_num_rows($resultEmployee);

  echo "<main role=\"main\" class=\"col-md-9 ml-sm-auto col-lg-10 px-4\">";

  echo "<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\">";

  if ($countEmployee !== 0) { 

  	while ($rowemployee = mysqli_fetch_array($resultEmployee)) {

    	echo "<h1 class=\"h2\">" . $rowemployee['employeesurname'] . ", " . $rowemployee['employeename'] . "</h1>";
      echo "<a href=\"viewEmployee.php?employeeID=" . $rowemployee['employeeid'] . "\" class=\"btn btn-sm btn-outline-secondary\" role=\"button\">Back to Employee File</a>";
    
    	echo "</div>";

    	echo "<form method = \"POST\" action=\"addBankDetail1.php\">";

    	echo "<input type = \"hidden\" value = \"" . $rowemployee['employeeid'] . "\" name = \"employee_id\">";

          echo "<p>Bank Name*
                <select name=\"bank_Name\" id=\"cars\" required class=\"form-control\">
                  <option disabled selected value> -- Select Bank -- </option>
                  <option value=\"ABC Banking Corporation Ltd\">ABC Banking Corporation Ltd</option>
                  <option value=\"Absa Bank\">Absa Bank</option>
                  <option value=\"AfrAsia Bank Limited\">AfrAsia Bank Limited</option>
                  <option value=\"Bank of Baroda\">Bank of Baroda</option>
                  <option value=\"Bank One Limited\">Bank One Limited</option>
                  <option value=\"BanyanTree Bank Limited\">BanyanTree Bank Limited</option>
                  <option value=\"BCP Bank\">BCP Bank</option>
                  <option value=\"Century Banking Corporation Ltd\">Century Banking Corporation Ltd</option>
                  <option value=\"Habib Bank Limited\">Habib Bank Limited</option>
                  <option value=\"Investec Bank\">Investec Bank</option>
                  <option value=\"MauBank Ltd\">MauBank Ltd</option>
                  <option value=\"SBI\">SBI</option>
                  <option value=\"Standard Bank\">Standard Bank</option>
                  <option value=\"Standard Chartered Bank\">Standard Chartered Bank</option>
                  <option value=\"SBM Bank\">SBM Bank</option>
                  <option value=\"The Hongkong and Shanghai Banking Corporation Limited\">The Hongkong and Shanghai Banking Corporation Limited</option>
                  <option value=\"The Mauritius Commercial Bank Ltd\">The Mauritius Commercial Bank Ltd</option>


                </select>
              </p>";

          echo "<p>Bank Account*
                <input type=\"text\" name=\"bank_Account\" required class=\"form-control\"> 
              </p>";

    }

    echo "<input type=\"submit\"> </form>";

   }

} 


include('footer1.php');
?>