<!DOCTYPE html>
<html>
<head>
	<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
	<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<style>
#customers {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    border-collapse: collapse;
    width: 100%;
}

#customers td, #customers th {
    border: 1px solid #ddd;
    padding: 8px;
}

#customers tr:nth-child(even){background-color: #f2f2f2;}

#customers tr:hover {background-color: #ddd;}

#customers th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: left;
    background-color: hsl(148, 7%, 62%);
    color: white;
}
</style>

</head>
<body>
        <header style=" text-align:center;">
        <br>        <br>
        <a href = "CLOSE" style="margin-top: -150px;"><img src="https://image.flaticon.com/icons/svg/93/93634.svg" class="img-responsive" style="height:50px"></a>
    </header>
    </header>
    
<br>	<br>	


		<div class="container">
  <center><h4>Edit Your Weekly Timesheet</h4></center><br>	<br>	
  <form action="postedit.php" method="POST" id="timesheet" enctype="multipart/form-data">
    <?php
      include('connect.php');
      $id = $_GET['id'];
      $sql = mysqli_query($con,"SELECT * FROM timesheet WHERE id = '$id'");
      $data = mysqli_fetch_array($sql,MYSQLI_BOTH);
      $exploding = explode('-', $data['additional_info']);
     ?>
   
<input type="hidden" name="id" value="<?= $id ?>">
<input type="hidden" name="driver_id" value="<?= $exploding['1'] ?>">
<input type="hidden" name="agency_id" value="<?= $exploding['2'] ?>">
<input type="hidden" name="date" value="<?= $exploding['3'] ?>">
<label><b>Rate 1</b></label>
<div class="barrol" style=" overflow:hidden;overflow-x:scroll;">
<table style="width: 100%;" class="table" id="customers">
  <tr>
    <th  style="background: white;"></th>
    <th><center>Sunday</center></th>
    <th><center>Monday</center></th>
    <th><center>Tuesday</center></th>
    <th><center>Wednesday</center></th>
    <th><center>Thursday</center></th>
    <th><center>Friday</center></th>
    <th><center>Saturday</center></th>
  </tr>
  <tr>
    <th><center>Duty</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate1_duty_sunday'] ?>" name="rate1_duty_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_duty_monday'] ?>" name="rate1_duty_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_duty_tuesday'] ?>" name="rate1_duty_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_duty_wednesday'] ?>" name="rate1_duty_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_duty_thursday'] ?>" name="rate1_duty_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_duty_friday'] ?>" name="rate1_duty_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_duty_saturday'] ?>" name="rate1_duty_saturday"></td>
  </tr>
  <tr>
    <th><center>Less Break</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate1_less_sunday'] ?>" name="rate1_less_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_less_monday'] ?>" name="rate1_less_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_less_tuesday'] ?>" name="rate1_less_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_less_wednesday'] ?>" name="rate1_less_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_less_thursday'] ?>" name="rate1_less_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_less_friday'] ?>" name="rate1_less_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_less_saturday'] ?>" name="rate1_less_saturday"></td>
  </tr>
  <tr>
    <th><center>Total Payable</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate1_payable_sunday'] ?>" name="rate1_payable_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_payable_monday'] ?>" name="rate1_payable_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_payable_tuesday'] ?>" name="rate1_payable_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_payable_wednesday'] ?>" name="rate1_payable_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_payable_thursday'] ?>" name="rate1_payable_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_payable_friday'] ?>" name="rate1_payable_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_payable_saturday'] ?>" name="rate1_payable_saturday"></td>
  </tr>
  <tr>
    <th><center>Rate 1</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate1_sunday'] ?>" name="rate1_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_monday'] ?>" name="rate1_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_tuesday'] ?>" name="rate1_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_wednesday'] ?>" name="rate1_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_thursday'] ?>" name="rate1_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_friday'] ?>" name="rate1_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_saturday'] ?>" name="rate1_saturday"></td>
    
  </tr>
  <tr>
    <th><center>Nights Out Y/N</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate1_night_sunday'] ?>" name="rate1_night_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_night_monday'] ?>" name="rate1_night_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_night_tuesday'] ?>" name="rate1_night_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_night_wednesday'] ?>" name="rate1_night_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_night_thursday'] ?>" name="rate1_night_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_night_friday'] ?>" name="rate1_night_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_night_saturday'] ?>" name="rate1_night_saturday"></td>
  </tr>
  <tr>
    <th><center>Parking/Tolls</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate1_parking_sunday'] ?>" name="rate1_parking_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_parking_monday'] ?>" name="rate1_parking_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_parking_tuesday'] ?>" name="rate1_parking_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_parking_wednesday'] ?>" name="rate1_parking_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_parking_thursday'] ?>" name="rate1_parking_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_parking_friday'] ?>" name="rate1_parking_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_parking_saturday'] ?>" name="rate1_parking_saturday"></td>
  </tr>
  <tr>
    <th><center>DNI</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate1_dni_sunday'] ?>" name="rate1_dni_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_dni_monday'] ?>" name="rate1_dni_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_dni_tuesday'] ?>" name="rate1_dni_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_dni_wednesday'] ?>" name="rate1_dni_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_dni_thursday'] ?>" name="rate1_dni_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_dni_friday'] ?>" name="rate1_dni_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate1_dni_saturday'] ?>" name="rate1_dni_saturday"></td>
  </tr>
</table>
</div>
<br><br><br><br><br>







<label><b>Rate 2</b></label>
<div class="barrol" style=" overflow:hidden;overflow-x:scroll;">
<table style="width: 100%;" class="table" id="customers">
  <tr>
    <th style="background: white;"></th>
    <th><center>Sunday</center></th>
    <th><center>Monday</center></th>
    <th><center>Tuesday</center></th>
    <th><center>Wednesday</center></th>
    <th><center>Thursday</center></th>
    <th><center>Friday</center></th>
    <th><center>Saturday</center></th>
  </tr>
  <tr>
    <th><center>Duty</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate2_duty_sunday'] ?>" name="rate2_duty_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_duty_monday'] ?>" name="rate2_duty_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_duty_tuesday'] ?>" name="rate2_duty_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_duty_wednesday'] ?>" name="rate2_duty_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_duty_thursday'] ?>" name="rate2_duty_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_duty_friday'] ?>" name="rate2_duty_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_duty_saturday'] ?>" name="rate2_duty_saturday"></td>
  </tr>
  <tr>
    <th><center>Less Break</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate2_less_sunday'] ?>" name="rate2_less_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_less_monday'] ?>" name="rate2_less_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_less_tuesday'] ?>" name="rate2_less_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_less_wednesday'] ?>" name="rate2_less_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_less_thursday'] ?>" name="rate2_less_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_less_friday'] ?>" name="rate2_less_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_less_saturday'] ?>" name="rate2_less_saturday"></td>
  </tr>
  <tr>
    <th><center>Total Payable</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate2_payable_sunday'] ?>" name="rate2_payable_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_payable_monday'] ?>" name="rate2_payable_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_payable_tuesday'] ?>" name="rate2_payable_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_payable_wednesday'] ?>" name="rate2_payable_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_payable_thursday'] ?>" name="rate2_payable_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_payable_friday'] ?>" name="rate2_payable_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_payable_saturday'] ?>" name="rate2_payable_saturday"></td>
  </tr>
  <tr>
    <th><center>Rate 2</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate2_sunday'] ?>" name="rate2_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_monday'] ?>" name="rate2_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_tuesday'] ?>" name="rate2_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_wednesday'] ?>" name="rate2_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_thursday'] ?>" name="rate2_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_friday'] ?>" name="rate2_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_saturday'] ?>" name="rate2_saturday"></td>
  </tr>
  <tr>
    <th><center>Nights Out Y/N</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate2_night_sunday'] ?>" name="rate2_night_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_night_monday'] ?>" name="rate2_night_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_night_tuesday'] ?>" name="rate2_night_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_night_wednesday'] ?>" name="rate2_night_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_night_thursday'] ?>" name="rate2_night_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_night_friday'] ?>" name="rate2_night_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_night_saturday'] ?>" name="rate2_night_saturday"></td>
  </tr>
  <tr>
    <th><center>Parking/Tolls</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate2_parking_sunday'] ?>" name="rate2_parking_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_parking_monday'] ?>" name="rate2_parking_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_parking_tuesday'] ?>" name="rate2_parking_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_parking_wednesday'] ?>" name="rate2_parking_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_parking_thursday'] ?>" name="rate2_parking_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_parking_friday'] ?>" name="rate2_parking_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_parking_saturday'] ?>" name="rate2_parking_saturday"></td>
  </tr>
  <tr>
    <th><center>DNI</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate2_dni_sunday'] ?>" name="rate2_dni_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_dni_monday'] ?>" name="rate2_dni_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_dni_tuesday'] ?>" name="rate2_dni_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_dni_wednesday'] ?>" name="rate2_dni_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_dni_thursday'] ?>" name="rate2_dni_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_dni_friday'] ?>" name="rate2_dni_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate2_dni_saturday'] ?>" name="rate2_dni_saturday"></td>
  </tr>
</table>
</div>
<br><br><br><br><br>


<label><b>Rate 3</b></label>
<div class="barrol" style=" overflow:hidden;overflow-x:scroll;">
<table style="width: 100%;" class="table" id="customers">
  <tr>
    <th style="background: white;"></th>
    <th><center>Sunday</center></th>
    <th><center>Monday</center></th>
    <th><center>Tuesday</center></th>
    <th><center>Wednesday</center></th>
    <th><center>Thursday</center></th>
    <th><center>Friday</center></th>
    <th><center>Saturday</center></th>
  </tr>
  <tr>
    <th><center>Duty</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate3_duty_sunday'] ?>" name="rate3_duty_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_duty_monday'] ?>" name="rate3_duty_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_duty_tuesday'] ?>" name="rate3_duty_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_duty_wednesday'] ?>" name="rate3_duty_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_duty_thursday'] ?>" name="rate3_duty_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_duty_friday'] ?>" name="rate3_duty_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_duty_saturday'] ?>" name="rate3_duty_saturday"></td>
  </tr>
  <tr>
    <th><center>Less Break</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate3_less_sunday'] ?>" name="rate3_less_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_less_monday'] ?>" name="rate3_less_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_less_tuesday'] ?>" name="rate3_less_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_less_wednesday'] ?>" name="rate3_less_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_less_thursday'] ?>" name="rate3_less_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_less_friday'] ?>" name="rate3_less_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_less_saturday'] ?>" name="rate3_less_saturday"></td>
  </tr>
  <tr>
    <th><center>Total Payable</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate3_payable_sunday'] ?>" name="rate3_payable_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_payable_monday'] ?>" name="rate3_payable_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_payable_tuesday'] ?>" name="rate3_payable_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_payable_wednesday'] ?>" name="rate3_payable_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_payable_thursday'] ?>" name="rate3_payable_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_payable_friday'] ?>" name="rate3_payable_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_payable_saturday'] ?>" name="rate3_payable_saturday"></td>
  </tr>
  <tr>
    <th><center>Rate 3</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate3_sunday'] ?>" name="rate3_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_monday'] ?>" name="rate3_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_tuesday'] ?>" name="rate3_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_wednesday'] ?>" name="rate3_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_thursday'] ?>" name="rate3_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_friday'] ?>" name="rate3_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_saturday'] ?>" name="rate3_saturday"></td>
  </tr>
  <tr>
    <th><center>Nights Out Y/N</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate3_night_sunday'] ?>" name="rate3_night_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_night_monday'] ?>" name="rate3_night_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_night_tuesday'] ?>" name="rate3_night_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_night_wednesday'] ?>" name="rate3_night_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_night_thursday'] ?>" name="rate3_night_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_night_friday'] ?>" name="rate3_night_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_night_saturday'] ?>" name="rate3_night_saturday"></td>
  </tr>
  <tr>
    <th><center>Parking/Tolls</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate3_parking_sunday'] ?>" name="rate3_parking_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_parking_monday'] ?>" name="rate3_parking_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_parking_tuesday'] ?>" name="rate3_parking_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_parking_wednesday'] ?>" name="rate3_parking_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_parking_thursday'] ?>" name="rate3_parking_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_parking_friday'] ?>" name="rate3_parking_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_parking_saturday'] ?>" name="rate3_parking_saturday"></td>
  </tr>
  <tr>
    <th><center>DNI</center></th>
    <td><input type="text" class="form-control" value="<?= $data['rate3_dni_sunday'] ?>" name="rate3_dni_sunday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_dni_monday'] ?>" name="rate3_dni_monday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_dni_tuesday'] ?>" name="rate3_dni_tuesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_dni_wednesday'] ?>" name="rate3_dni_wednesday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_dni_thursday'] ?>" name="rate3_dni_thursday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_dni_friday'] ?>" name="rate3_dni_friday"></td>
    <td><input type="text" class="form-control" value="<?= $data['rate3_dni_saturday'] ?>" name="rate3_dni_saturday"></td>
  </tr>
</table>
</div><
<br><br><br>


    <div class="form-group">
      <label>Additional Information:</label>
      <textarea class="form-control" name="additional_info"><?= $exploding['0'] ?></textarea>
    </div><br> 

    <div class="form-group">
      <label>Invoice Or Remittance To Upload:</label>
      <input type="file" class="form-control" name="invoice">
      <span><a href = "<?= $data['invoice'] ?>">Download previous attached file</a></span>
      <input type="hidden" value="<?= $data['invoice'] ?>" target = "_blank" name = "previousmode">
    </div><br>
  <br><br>
    
    <button type="submit" id="savetimesheet" name="savetimesheet" class="btn btn-primary">Update</button>
  </form>

</div>

<br>  <br>  <br>  
</body>
</html>

<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<?php

if(isset($_GET['msg']))
{?>

 <script type="text/javascript">
   swal({
  title: "Data Saved!",
  text: "Your timesheet has been sent to selected agency.",
  icon: "success",
  button: "Close",
});
 </script>

<?php } 


if(isset($_GET['error']))
{?>

 <script type="text/javascript">
   swal({
  title: "Error!",
  text: "Timesheet Already submitted for this agency and week",
  icon: "error",
  button: "Close",
});
 </script>

<?php } ?>
<script type="text/javascript">
  $(document).ready(function(){
    var form = $('#timesheet');
    $('#savetimesheet').click(function(){

      $.ajax({
        url: form.attr("action"),
        type: 'POST',
        data: $("#timesheet input").serialize(),

         success: function(data){
          console.log(data);
         }
      });

    });
  });
</script>




                
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>