Partially done
All checks were successful
Build and Deploy Zola Website / build_and_deploy (push) Successful in 16s
All checks were successful
Build and Deploy Zola Website / build_and_deploy (push) Successful in 16s
This commit is contained in:
@ -52,10 +52,21 @@ class VehicleController extends Controller {
|
||||
|
||||
|
||||
public function edit() {
|
||||
// Edit vehicle (to be implemented later)
|
||||
// TODO: Edit vehicle (to be implemented later)
|
||||
}
|
||||
|
||||
public function delete() {
|
||||
// Delete vehicle (to be implemented later)
|
||||
// TODO: Delete vehicle (to be implemented later)
|
||||
}
|
||||
|
||||
public function api_get() {
|
||||
if(!$_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
echo "Wrong method, use GET";
|
||||
return;
|
||||
}
|
||||
|
||||
$vehicle = new Vehicle();
|
||||
$result = $vehicle->getVehiclesByUser($_SESSION['user']['id']);
|
||||
echo json_encode($result);
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,14 @@
|
||||
<link rel="stylesheet" href="/css/dashboard.css">
|
||||
|
||||
<link rel="stylesheet" href="/css/form.css">
|
||||
<link rel="stylesheet" href="/css/vehicle_create.css">
|
||||
|
||||
<section class="dashboard">
|
||||
<h1>Welcome, <?= htmlspecialchars($_SESSION['user']['username']) ?>!</h1>
|
||||
<div>
|
||||
<div id="actions">
|
||||
<a href="/refuel/create" class="btn-green">Add new refuel record!</a>
|
||||
<a href="/vehicles" class="btn-primary">List all vehicles</a>
|
||||
<button class="btn-primary" id="btn-offline-add">Add new refuel record OFFLINE</button>
|
||||
<a class="btn-warning" id="btn-offline-add">Add new offline refuel record</a>
|
||||
</div>
|
||||
<div class="card-wrapper">
|
||||
<section class="card latest">
|
||||
|
Reference in New Issue
Block a user