function PopulateTableBody() { $requests = RetrieveMainVacationRequests(); if ($requests != NULL) { foreach ($requests as $request) { $employee = RetrieveEmployeeByID($request[MAIN_VACATION_EMP_ID]); echo "<tr>"; echo "<td>" . $employee[EMP_NAME] . "</td>"; echo "<td>" . $request[MAIN_VACATION_1ST_START] . "</td>"; echo "<td>" . $request[MAIN_VACATION_1ST_END] . "</td>"; echo "<td>" . $request[MAIN_VACATION_2ND_START] . "</td>"; echo "<td>" . $request[MAIN_VACATION_2ND_END] . "</td>"; echo '<td> <button class="btn btn-success" type="submit" ' . 'name="amend" value="' . $request[MAIN_VACATION_REQ_ID] . '">Amend</button></td>'; echo '<td> <button class="btn btn-danger" type="submit" name="delete"' . ' value="' . $request[MAIN_VACATION_REQ_ID] . '">Delete</button></td>'; echo "</tr>"; } } }
function DisplayMainVacationTableBody() { $requests = RetrieveMainVacationRequests(); if ($requests != NULL) { foreach ($requests as $request) { $employee = RetrieveEmployeeByID($request[MAIN_VACATION_EMP_ID]); echo "<tr>"; echo "<td>" . $employee[EMP_NAME] . "</td>"; echo "<td>" . $request[MAIN_VACATION_1ST_START] . "</td>"; echo "<td>" . $request[MAIN_VACATION_1ST_END] . "</td>"; echo "<td>" . $request[MAIN_VACATION_2ND_START] . "</td>"; echo "<td>" . $request[MAIN_VACATION_2ND_END] . "</td>"; echo '<td> <button class="btn btn-success" type="submit" ' . 'name="approve1st" value="' . $request[MAIN_VACATION_REQ_ID] . '">Approve 1st Choice</button></td>'; echo '<td> <button class="btn btn-success" type="submit" ' . 'name="approve2nd" value="' . $request[MAIN_VACATION_REQ_ID] . '">Approve 2nd Choice</button></td>'; echo '<td> <button class="btn btn-danger" type="submit" name="reject"' . ' value="' . $request[MAIN_VACATION_REQ_ID] . '">Reject</button></td>'; echo '</tr>'; } } }