mirror of
https://github.com/itflow-org/itflow
synced 2026-03-16 10:44:50 +00:00
First commit
This commit is contained in:
68
mileage.php
Normal file
68
mileage.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php include("header.php"); ?>
|
||||
|
||||
<?php $sql = mysqli_query($mysqli,"SELECT * FROM mileage ORDER BY mileage_id DESC"); ?>
|
||||
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-car"></i> Mileage</h6>
|
||||
<button type="button" class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addMileageModal"><i class="fas fa-plus"></i> Add New</button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Purpose</th>
|
||||
<th>Start</th>
|
||||
<th>Destination</th>
|
||||
<th>Miles</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$mileage_id = $row['mileage_id'];
|
||||
$mileage_date = $row['mileage_date'];
|
||||
$mileage_purpose = $row['mileage_purpose'];
|
||||
$mileage_starting_location = $row['mileage_starting_location'];
|
||||
$mileage_destination = $row['mileage_destination'];
|
||||
$mileage_miles = $row['mileage_miles'];
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo "$mileage_date"; ?></td>
|
||||
<td><?php echo "$mileage_purpose"; ?></td>
|
||||
<td><?php echo "$mileage_starting_location"; ?></td>
|
||||
<td><?php echo "$mileage_destination"; ?></td>
|
||||
<td><?php echo "$mileage_miles"; ?></td>
|
||||
<td>
|
||||
<div class="dropdown dropleft text-center">
|
||||
<button class="btn btn-secondary btn-sm" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editMileageModal<?php echo $mileage_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="#">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
include("edit_mileage_modal.php");
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("add_mileage_modal.php"); ?>
|
||||
|
||||
<?php include("footer.php");
|
||||
Reference in New Issue
Block a user