Revert to version d5d7ce7
This commit is contained in:
parent
f9a46874cd
commit
24b0a60fe2
@ -1,319 +0,0 @@
|
|||||||
/* assets/css/custom.css */
|
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--color-background-light: #FDFBF5; /* Lighter Beige */
|
|
||||||
--color-surface-light: #FFFFFF;
|
|
||||||
--color-text-light: #1C1C1C; /* Near Black */
|
|
||||||
--color-primary: #B8860B; /* DarkGoldenRod - more subtle than pure gold */
|
|
||||||
--color-secondary: #A9A9A9; /* DarkGray */
|
|
||||||
--color-accent: #D4AF37; /* Golden */
|
|
||||||
--border-color: #EAEAEA;
|
|
||||||
--border-radius: 0.5rem;
|
|
||||||
--font-family-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: var(--font-family-sans-serif);
|
|
||||||
background-color: var(--color-background-light);
|
|
||||||
color: var(--color-text-light);
|
|
||||||
display: flex;
|
|
||||||
min-height: 100vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar {
|
|
||||||
width: 260px;
|
|
||||||
background-color: var(--color-surface-light);
|
|
||||||
border-right: 1px solid var(--border-color);
|
|
||||||
padding: 1.5rem;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar .logo {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
font-weight: 700;
|
|
||||||
color: var(--color-primary);
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar .nav-link {
|
|
||||||
color: #555;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0.75rem 1rem;
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
transition: background-color 0.2s, color 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar .nav-link .feather {
|
|
||||||
margin-right: 1rem;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar .nav-link:hover,
|
|
||||||
.sidebar .nav-link.active {
|
|
||||||
background-color: var(--color-accent);
|
|
||||||
color: var(--color-surface-light);
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-content {
|
|
||||||
flex-grow: 1;
|
|
||||||
padding: 2rem;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header h1 {
|
|
||||||
font-size: 2rem;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.theme-toggle {
|
|
||||||
background: none;
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
border-radius: 50%;
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
cursor: pointer;
|
|
||||||
color: var(--color-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-cards {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
|
||||||
gap: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
background-color: var(--color-surface-light);
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
padding: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-title {
|
|
||||||
font-size: 0.9rem;
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--color-secondary);
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-value {
|
|
||||||
font-size: 2rem;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--color-text-light);
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-delta {
|
|
||||||
font-size: 0.85rem;
|
|
||||||
margin-top: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-success {
|
|
||||||
color: #28a745;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-danger {
|
|
||||||
color: #dc3545;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dark Mode */
|
|
||||||
body.dark-mode {
|
|
||||||
--color-background-light: #121212;
|
|
||||||
--color-surface-light: #1E1E1E;
|
|
||||||
--color-text-light: #E0E0E0;
|
|
||||||
--border-color: #333;
|
|
||||||
--color-secondary: #888;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.dark-mode .sidebar {
|
|
||||||
background-color: var(--color-surface-light);
|
|
||||||
border-right-color: var(--border-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
body.dark-mode .sidebar .nav-link {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.dark-mode .sidebar .nav-link:hover,
|
|
||||||
body.dark-mode .sidebar .nav-link.active {
|
|
||||||
background-color: var(--color-accent);
|
|
||||||
color: #121212;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.dark-mode .theme-toggle {
|
|
||||||
border-color: var(--border-color);
|
|
||||||
color: var(--color-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
body.dark-mode .card {
|
|
||||||
background-color: var(--color-surface-light);
|
|
||||||
border-color: var(--border-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Page Content Sections */
|
|
||||||
.content-section {
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-section h2 {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
font-weight: 600;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Form Styles */
|
|
||||||
.form-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
||||||
gap: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group-full {
|
|
||||||
grid-column: 1 / -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group label {
|
|
||||||
font-size: 0.875rem;
|
|
||||||
font-weight: 500;
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
color: var(--color-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group input,
|
|
||||||
.form-group select {
|
|
||||||
padding: 0.75rem;
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
background-color: var(--color-background-light);
|
|
||||||
color: var(--color-text-light);
|
|
||||||
font-family: inherit;
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.dark-mode .form-group input,
|
|
||||||
body.dark-mode .form-group select {
|
|
||||||
background-color: #2c2c2c;
|
|
||||||
border-color: #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
padding: 0.75rem 1.5rem;
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
border: none;
|
|
||||||
cursor: pointer;
|
|
||||||
font-weight: 600;
|
|
||||||
transition: background-color 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary {
|
|
||||||
background-color: var(--color-primary);
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary:hover {
|
|
||||||
background-color: var(--color-accent);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Table Styles */
|
|
||||||
.table-responsive {
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
table th, table td {
|
|
||||||
padding: 1rem;
|
|
||||||
border-bottom: 1px solid var(--border-color);
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
table th {
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 0.875rem;
|
|
||||||
color: var(--color-secondary);
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Status Badges */
|
|
||||||
.status-badge {
|
|
||||||
display: inline-block;
|
|
||||||
padding: 0.25em 0.6em;
|
|
||||||
font-size: 0.8rem;
|
|
||||||
font-weight: 600;
|
|
||||||
border-radius: 20px;
|
|
||||||
text-transform: capitalize;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-pending {
|
|
||||||
background-color: #f0ad4e;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-in-transit {
|
|
||||||
background-color: #5bc0de;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-delivered {
|
|
||||||
background-color: #5cb85c;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-cancelled {
|
|
||||||
background-color: #d9534f;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --- Charts --- */
|
|
||||||
.dashboard-charts {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
|
|
||||||
gap: 1.5rem;
|
|
||||||
margin-top: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chart-container {
|
|
||||||
background-color: var(--color-surface-light);
|
|
||||||
padding: 1.5rem;
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.chart-title {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 1.5rem;
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.dark-mode .chart-container {
|
|
||||||
background-color: var(--color-surface-light);
|
|
||||||
border-color: var(--border-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,127 +0,0 @@
|
|||||||
// assets/js/main.js
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
|
||||||
const themeToggle = document.getElementById('theme-toggle');
|
|
||||||
const featherSun = document.getElementById('feather-sun');
|
|
||||||
const featherMoon = document.getElementById('feather-moon');
|
|
||||||
|
|
||||||
// Function to apply theme based on saved preference or system setting
|
|
||||||
const applyTheme = (theme) => {
|
|
||||||
if (theme === 'dark') {
|
|
||||||
document.body.classList.add('dark-mode');
|
|
||||||
if (featherSun) featherSun.style.display = 'block';
|
|
||||||
if (featherMoon) featherMoon.style.display = 'none';
|
|
||||||
} else {
|
|
||||||
document.body.classList.remove('dark-mode');
|
|
||||||
if (featherSun) featherSun.style.display = 'none';
|
|
||||||
if (featherMoon) featherMoon.style.display = 'block';
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Check for saved theme in localStorage
|
|
||||||
const savedTheme = localStorage.getItem('theme');
|
|
||||||
// Check for user's system preference
|
|
||||||
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
||||||
|
|
||||||
// Apply theme on initial load
|
|
||||||
if (savedTheme) {
|
|
||||||
applyTheme(savedTheme);
|
|
||||||
} else if (prefersDark) {
|
|
||||||
applyTheme('dark');
|
|
||||||
} else {
|
|
||||||
applyTheme('light');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (themeToggle) {
|
|
||||||
themeToggle.addEventListener('click', () => {
|
|
||||||
const isDarkMode = document.body.classList.toggle('dark-mode');
|
|
||||||
const newTheme = isDarkMode ? 'dark' : 'light';
|
|
||||||
localStorage.setItem('theme', newTheme);
|
|
||||||
applyTheme(newTheme);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Feather icons replacement
|
|
||||||
if (typeof feather !== 'undefined') {
|
|
||||||
feather.replace();
|
|
||||||
}
|
|
||||||
|
|
||||||
// -- CHARTS INITIALIZATION --
|
|
||||||
// Check if chartData is defined (it's passed from index.php)
|
|
||||||
if (typeof chartData !== 'undefined') {
|
|
||||||
const pieCtx = document.getElementById('loadsByStatusChart');
|
|
||||||
const barCtx = document.getElementById('monthlyLoadsChart');
|
|
||||||
|
|
||||||
// Define colors that work with the theme
|
|
||||||
const chartColors = {
|
|
||||||
primary: 'rgba(184, 134, 11, 0.8)', // Golden
|
|
||||||
secondary: 'rgba(169, 169, 169, 0.8)', // Gray
|
|
||||||
accent: 'rgba(212, 175, 55, 0.8)', // Lighter Gold
|
|
||||||
success: 'rgba(40, 167, 69, 0.8)',
|
|
||||||
danger: 'rgba(220, 53, 69, 0.8)',
|
|
||||||
info: 'rgba(23, 162, 184, 0.8)',
|
|
||||||
};
|
|
||||||
|
|
||||||
if (pieCtx) {
|
|
||||||
new Chart(pieCtx, {
|
|
||||||
type: 'pie',
|
|
||||||
data: {
|
|
||||||
labels: chartData.loadsByStatus.labels,
|
|
||||||
datasets: [{
|
|
||||||
label: 'Loads',
|
|
||||||
data: chartData.loadsByStatus.counts,
|
|
||||||
backgroundColor: [
|
|
||||||
chartColors.info,
|
|
||||||
chartColors.primary,
|
|
||||||
chartColors.success,
|
|
||||||
chartColors.danger,
|
|
||||||
chartColors.secondary
|
|
||||||
],
|
|
||||||
borderWidth: 1
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
options: {
|
|
||||||
responsive: true,
|
|
||||||
plugins: {
|
|
||||||
legend: {
|
|
||||||
position: 'top',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (barCtx) {
|
|
||||||
new Chart(barCtx, {
|
|
||||||
type: 'bar',
|
|
||||||
data: {
|
|
||||||
labels: chartData.monthlyLoads.labels,
|
|
||||||
datasets: [{
|
|
||||||
label: 'Loads Created',
|
|
||||||
data: chartData.monthlyLoads.counts,
|
|
||||||
backgroundColor: chartColors.primary,
|
|
||||||
borderColor: chartColors.accent,
|
|
||||||
borderWidth: 1
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
options: {
|
|
||||||
responsive: true,
|
|
||||||
scales: {
|
|
||||||
y: {
|
|
||||||
beginAtZero: true,
|
|
||||||
ticks: { // Make sure Y-axis ticks are integers
|
|
||||||
stepSize: 1,
|
|
||||||
callback: function(value) { if (Number.isInteger(value)) { return value; } }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
plugins: {
|
|
||||||
legend: {
|
|
||||||
display: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
16
billing.php
16
billing.php
@ -1,16 +0,0 @@
|
|||||||
<?php include 'includes/header.php'; ?>
|
|
||||||
|
|
||||||
<?php include 'includes/sidebar.php'; ?>
|
|
||||||
|
|
||||||
<main class="main-content">
|
|
||||||
<header class="header">
|
|
||||||
<h1>Billing</h1>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section class="dashboard-cards">
|
|
||||||
<p>Invoicing and payroll content will go here.</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<?php include 'includes/footer.php'; ?>
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
<?php include 'includes/header.php'; ?>
|
|
||||||
|
|
||||||
<?php include 'includes/sidebar.php'; ?>
|
|
||||||
|
|
||||||
<main class="main-content">
|
|
||||||
<header class="header">
|
|
||||||
<h1>Customers</h1>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section class="dashboard-cards">
|
|
||||||
<p>Customer and shipper management will go here.</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<?php include 'includes/footer.php'; ?>
|
|
||||||
132
drivers.php
132
drivers.php
@ -1,132 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once 'db/config.php';
|
|
||||||
|
|
||||||
$page_title = "Drivers";
|
|
||||||
|
|
||||||
// Handle form submission for adding a new driver
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_driver'])) {
|
|
||||||
$name = trim($_POST['name']);
|
|
||||||
$email = trim($_POST['email']);
|
|
||||||
$phone = trim($_POST['phone']);
|
|
||||||
$status = trim($_POST['status']);
|
|
||||||
|
|
||||||
if (!empty($name) && !empty($email) && !empty($phone) && !empty($status)) {
|
|
||||||
try {
|
|
||||||
$pdo = db();
|
|
||||||
$sql = "INSERT INTO drivers (name, email, phone, status) VALUES (:name, :email, :phone, :status)";
|
|
||||||
$stmt = $pdo->prepare($sql);
|
|
||||||
$stmt->execute(['name' => $name, 'email' => $email, 'phone' => $phone, 'status' => $status]);
|
|
||||||
// Redirect to avoid form resubmission
|
|
||||||
header("Location: drivers.php");
|
|
||||||
exit;
|
|
||||||
} catch (PDOException $e) {
|
|
||||||
$error_message = "Database error: " . $e->getMessage();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create drivers table if it doesn't exist
|
|
||||||
try {
|
|
||||||
$pdo = db();
|
|
||||||
$pdo->exec("CREATE TABLE IF NOT EXISTS drivers (
|
|
||||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
|
||||||
name VARCHAR(255) NOT NULL,
|
|
||||||
email VARCHAR(255) NOT NULL,
|
|
||||||
phone VARCHAR(50) NOT NULL,
|
|
||||||
status VARCHAR(50) NOT NULL,
|
|
||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
|
||||||
)");
|
|
||||||
} catch (PDOException $e) {
|
|
||||||
die("Could not create table: " . $e->getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fetch all drivers
|
|
||||||
try {
|
|
||||||
$pdo = db();
|
|
||||||
$stmt = $pdo->query("SELECT id, name, email, phone, status, created_at FROM drivers ORDER BY created_at DESC");
|
|
||||||
$drivers = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
||||||
} catch (PDOException $e) {
|
|
||||||
$error_message = "Database error: " . $e->getMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
include 'includes/header.php';
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php include 'includes/sidebar.php'; ?>
|
|
||||||
|
|
||||||
<main class="main-content">
|
|
||||||
<header class="header">
|
|
||||||
<h1>Manage Drivers</h1>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section class="card">
|
|
||||||
<h2>Add New Driver</h2>
|
|
||||||
<form action="drivers.php" method="POST" class="form-grid">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="name">Full Name</label>
|
|
||||||
<input type="text" id="name" name="name" required>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="email">Email</label>
|
|
||||||
<input type="email" id="email" name="email" required>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="phone">Phone Number</label>
|
|
||||||
<input type="tel" id="phone" name="phone" required>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="status">Status</label>
|
|
||||||
<select id="status" name="status" required>
|
|
||||||
<option value="Available" selected>Available</option>
|
|
||||||
<option value="On-duty">On-duty</option>
|
|
||||||
<option value="Off-duty">Off-duty</option>
|
|
||||||
<option value="Maintenance">Maintenance</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="form-group form-group-full">
|
|
||||||
<button type="submit" name="add_driver" class="button button-primary">Add Driver</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="card">
|
|
||||||
<h2>All Drivers</h2>
|
|
||||||
<?php if (isset($error_message)): ?>
|
|
||||||
<div class="alert alert-danger"><?php echo htmlspecialchars($error_message); ?></div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="data-table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Contact</th>
|
|
||||||
<th>Status</th>
|
|
||||||
<th>Joined</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php if (empty($drivers)): ?>
|
|
||||||
<tr>
|
|
||||||
<td colspan="4">No drivers found.</td>
|
|
||||||
</tr>
|
|
||||||
<?php else: ?>
|
|
||||||
<?php foreach ($drivers as $driver): ?>
|
|
||||||
<tr>
|
|
||||||
<td><?php echo htmlspecialchars($driver['name']); ?></td>
|
|
||||||
<td>
|
|
||||||
<a href="mailto:<?php echo htmlspecialchars($driver['email']); ?>"><?php echo htmlspecialchars($driver['email']); ?></a><br>
|
|
||||||
<a href="tel:<?php echo htmlspecialchars($driver['phone']); ?>"><?php echo htmlspecialchars($driver['phone']); ?></a>
|
|
||||||
</td>
|
|
||||||
<td><span class="status-badge status-<?php echo strtolower(htmlspecialchars($driver['status'])); ?>"><?php echo htmlspecialchars($driver['status']); ?></span></td>
|
|
||||||
<td><?php echo date("M d, Y", strtotime($driver['created_at'])); ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<?php include 'includes/footer.php'; ?>
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<!-- Scripts -->
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
||||||
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
|
|
||||||
<!-- SEO & Meta Tags -->
|
|
||||||
<title>Datatruck TMS</title>
|
|
||||||
<meta name="description" content="Datatruck TMS - Manage your trucking company with AI-powered tools and integrations. Built with Flatlogic Generator.">
|
|
||||||
<meta name="keywords" content="tms, trucking management, fleet management, load planning, dispatch software, logistics, ai logistics, datatruck, Built with Flatlogic Generator">
|
|
||||||
|
|
||||||
<!-- Open Graph / Facebook -->
|
|
||||||
<meta property="og:type" content="website">
|
|
||||||
<meta property="og:title" content="Datatruck TMS">
|
|
||||||
<meta property="og:description" content="Datatruck TMS - Manage your trucking company with AI-powered tools and integrations. Built with Flatlogic Generator.">
|
|
||||||
<meta property="og:image" content="<?php echo htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? ''); ?>">
|
|
||||||
|
|
||||||
<!-- Twitter -->
|
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
|
||||||
<meta name="twitter:title" content="Datatruck TMS">
|
|
||||||
<meta name="twitter:description" content="Datatruck TMS - Manage your trucking company with AI-powered tools and integrations. Built with Flatlogic Generator.">
|
|
||||||
<meta name="twitter:image" content="<?php echo htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? ''); ?>">
|
|
||||||
|
|
||||||
<!-- Stylesheets -->
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
<?php
|
|
||||||
$current_page = basename($_SERVER['PHP_SELF']);
|
|
||||||
?>
|
|
||||||
<aside class="sidebar">
|
|
||||||
<div class="logo">
|
|
||||||
Datatruck TMS
|
|
||||||
</div>
|
|
||||||
<nav class="nav flex-column">
|
|
||||||
<a class="nav-link <?php echo ($current_page == 'index.php') ? 'active' : ''; ?>" href="index.php">
|
|
||||||
<i data-feather="home"></i>
|
|
||||||
<span>Overview</span>
|
|
||||||
</a>
|
|
||||||
<a class="nav-link <?php echo ($current_page == 'loads.php') ? 'active' : ''; ?>" href="loads.php">
|
|
||||||
<i data-feather="truck"></i>
|
|
||||||
<span>Loads</span>
|
|
||||||
</a>
|
|
||||||
<a class="nav-link <?php echo ($current_page == 'drivers.php') ? 'active' : ''; ?>" href="drivers.php">
|
|
||||||
<i data-feather="users"></i>
|
|
||||||
<span>Drivers</span>
|
|
||||||
</a>
|
|
||||||
<a class="nav-link <?php echo ($current_page == 'maintenance.php') ? 'active' : ''; ?>" href="maintenance.php">
|
|
||||||
<i data-feather="tool"></i>
|
|
||||||
<span>Maintenance</span>
|
|
||||||
</a>
|
|
||||||
<a class="nav-link <?php echo ($current_page == 'billing.php') ? 'active' : ''; ?>" href="billing.php">
|
|
||||||
<i data-feather="dollar-sign"></i>
|
|
||||||
<span>Billing</span>
|
|
||||||
</a>
|
|
||||||
<a class="nav-link <?php echo ($current_page == 'customers.php') ? 'active' : ''; ?>" href="customers.php">
|
|
||||||
<i data-feather="package"></i>
|
|
||||||
<span>Customers</span>
|
|
||||||
</a>
|
|
||||||
<a class="nav-link <?php echo ($current_page == 'settings.php') ? 'active' : ''; ?>" href="settings.php">
|
|
||||||
<i data-feather="settings"></i>
|
|
||||||
<span>Settings</span>
|
|
||||||
</a>
|
|
||||||
</nav>
|
|
||||||
<div class="mt-auto">
|
|
||||||
<button id="theme-toggle" class="theme-toggle">
|
|
||||||
<i id="feather-moon" data-feather="moon"></i>
|
|
||||||
<i id="feather-sun" data-feather="sun" style="display: none;"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</aside>
|
|
||||||
244
index.php
244
index.php
@ -1,102 +1,150 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once 'db/config.php';
|
declare(strict_types=1);
|
||||||
|
@ini_set('display_errors', '1');
|
||||||
|
@error_reporting(E_ALL);
|
||||||
|
@date_default_timezone_set('UTC');
|
||||||
|
|
||||||
// --- DATA FETCHING ---
|
$phpVersion = PHP_VERSION;
|
||||||
$pdo = db();
|
$now = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
// Card metrics
|
|
||||||
$total_loads = $pdo->query('SELECT count(*) FROM loads')->fetchColumn();
|
|
||||||
$total_drivers = $pdo->query('SELECT count(*) FROM drivers')->fetchColumn();
|
|
||||||
$in_transit_loads = $pdo->query('SELECT count(*) FROM loads WHERE status = "In-Transit"')->fetchColumn();
|
|
||||||
$delivered_loads = $pdo->query('SELECT count(*) FROM loads WHERE status = "Delivered"')->fetchColumn();
|
|
||||||
|
|
||||||
// Pie Chart: Loads by Status
|
|
||||||
$loads_by_status_stmt = $pdo->query('SELECT status, count(*) as count FROM loads GROUP BY status');
|
|
||||||
$loads_by_status = $loads_by_status_stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
||||||
$status_labels = [];
|
|
||||||
$status_counts = [];
|
|
||||||
foreach ($loads_by_status as $row) {
|
|
||||||
$status_labels[] = $row['status'];
|
|
||||||
$status_counts[] = $row['count'];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bar Chart: Loads per month
|
|
||||||
// Using a default of 0 for all months of the current year
|
|
||||||
$monthly_counts = array_fill(1, 12, 0);
|
|
||||||
$loads_by_month_stmt = $pdo->query("
|
|
||||||
SELECT
|
|
||||||
CAST(strftime('%m', pickup_date) AS INTEGER) as month,
|
|
||||||
count(*) as count
|
|
||||||
FROM loads
|
|
||||||
WHERE strftime('%Y', pickup_date) = strftime('%Y', 'now')
|
|
||||||
GROUP BY month
|
|
||||||
");
|
|
||||||
$loads_by_month = $loads_by_month_stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
||||||
|
|
||||||
foreach ($loads_by_month as $row) {
|
|
||||||
$monthly_counts[$row['month']] = $row['count'];
|
|
||||||
}
|
|
||||||
$monthly_labels = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
||||||
$monthly_values = array_values($monthly_counts);
|
|
||||||
|
|
||||||
|
|
||||||
include 'includes/header.php';
|
|
||||||
include 'includes/sidebar.php';
|
|
||||||
?>
|
?>
|
||||||
|
<!doctype html>
|
||||||
<main class="main-content">
|
<html lang="en">
|
||||||
<header class="header">
|
<head>
|
||||||
<h1>Reports & Analytics</h1>
|
<meta charset="utf-8" />
|
||||||
</header>
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<title>New Style</title>
|
||||||
<section class="dashboard-cards">
|
<?php
|
||||||
<div class="card">
|
// Read project preview data from environment
|
||||||
<div class="card-title">TOTAL LOADS</div>
|
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? '';
|
||||||
<div class="card-value"><?php echo $total_loads; ?></div>
|
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
||||||
<div class="card-delta text-muted">All time</div>
|
?>
|
||||||
</div>
|
<?php if ($projectDescription): ?>
|
||||||
<div class="card">
|
<!-- Meta description -->
|
||||||
<div class="card-title">TOTAL DRIVERS</div>
|
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' />
|
||||||
<div class="card-value"><?php echo $total_drivers; ?></div>
|
<!-- Open Graph meta tags -->
|
||||||
<div class="card-delta text-muted">All time</div>
|
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||||||
</div>
|
<!-- Twitter meta tags -->
|
||||||
<div class="card">
|
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||||||
<div class="card-title">IN-TRANSIT NOW</div>
|
<?php endif; ?>
|
||||||
<div class="card-value"><?php echo $in_transit_loads; ?></div>
|
<?php if ($projectImageUrl): ?>
|
||||||
<div class="card-delta text-primary"> </div>
|
<!-- Open Graph image -->
|
||||||
</div>
|
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||||||
<div class="card">
|
<!-- Twitter image -->
|
||||||
<div class="card-title">COMPLETED LOADS</div>
|
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||||||
<div class="card-value"><?php echo $delivered_loads; ?></div>
|
<?php endif; ?>
|
||||||
<div class="card-delta text-success"> </div>
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
</div>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
</section>
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
|
||||||
|
<style>
|
||||||
<section class="dashboard-charts">
|
:root {
|
||||||
<div class="chart-container">
|
--bg-color-start: #6a11cb;
|
||||||
<h3 class="chart-title">Loads by Status</h3>
|
--bg-color-end: #2575fc;
|
||||||
<canvas id="loadsByStatusChart"></canvas>
|
--text-color: #ffffff;
|
||||||
</div>
|
--card-bg-color: rgba(255, 255, 255, 0.01);
|
||||||
<div class="chart-container">
|
--card-border-color: rgba(255, 255, 255, 0.1);
|
||||||
<h3 class="chart-title">Monthly Load Volume (This Year)</h3>
|
|
||||||
<canvas id="monthlyLoadsChart"></canvas>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// Pass data to main.js
|
|
||||||
const chartData = {
|
|
||||||
loadsByStatus: {
|
|
||||||
labels: <?php echo json_encode($status_labels); ?>,
|
|
||||||
counts: <?php echo json_encode($status_counts); ?>
|
|
||||||
},
|
|
||||||
monthlyLoads: {
|
|
||||||
labels: <?php echo json_encode($monthly_labels); ?>,
|
|
||||||
counts: <?php echo json_encode($monthly_values); ?>
|
|
||||||
}
|
}
|
||||||
};
|
body {
|
||||||
</script>
|
margin: 0;
|
||||||
|
font-family: 'Inter', sans-serif;
|
||||||
<?php include 'includes/footer.php'; ?>
|
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||||
|
color: var(--text-color);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 100vh;
|
||||||
|
text-align: center;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
body::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M-10 10L110 10M10 -10L10 110" stroke-width="1" stroke="rgba(255,255,255,0.05)"/></svg>');
|
||||||
|
animation: bg-pan 20s linear infinite;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
@keyframes bg-pan {
|
||||||
|
0% { background-position: 0% 0%; }
|
||||||
|
100% { background-position: 100% 100%; }
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
padding: 2rem;
|
||||||
|
}
|
||||||
|
.card {
|
||||||
|
background: var(--card-bg-color);
|
||||||
|
border: 1px solid var(--card-border-color);
|
||||||
|
border-radius: 16px;
|
||||||
|
padding: 2rem;
|
||||||
|
backdrop-filter: blur(20px);
|
||||||
|
-webkit-backdrop-filter: blur(20px);
|
||||||
|
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
.loader {
|
||||||
|
margin: 1.25rem auto 1.25rem;
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
border: 3px solid rgba(255, 255, 255, 0.25);
|
||||||
|
border-top-color: #fff;
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
}
|
||||||
|
@keyframes spin {
|
||||||
|
from { transform: rotate(0deg); }
|
||||||
|
to { transform: rotate(360deg); }
|
||||||
|
}
|
||||||
|
.hint {
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
.sr-only {
|
||||||
|
position: absolute;
|
||||||
|
width: 1px; height: 1px;
|
||||||
|
padding: 0; margin: -1px;
|
||||||
|
overflow: hidden;
|
||||||
|
clip: rect(0, 0, 0, 0);
|
||||||
|
white-space: nowrap; border: 0;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-size: 3rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
letter-spacing: -1px;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
margin: 0.5rem 0;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
background: rgba(0,0,0,0.2);
|
||||||
|
padding: 2px 6px;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 1rem;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main>
|
||||||
|
<div class="card">
|
||||||
|
<h1>Analyzing your requirements and generating your website…</h1>
|
||||||
|
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
||||||
|
<span class="sr-only">Loading…</span>
|
||||||
|
</div>
|
||||||
|
<p class="hint"><?= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.</p>
|
||||||
|
<p class="hint">This page will update automatically as the plan is implemented.</p>
|
||||||
|
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
127
loads.php
127
loads.php
@ -1,127 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once 'db/config.php';
|
|
||||||
|
|
||||||
try {
|
|
||||||
$pdo = db();
|
|
||||||
|
|
||||||
// Create table if it doesn't exist
|
|
||||||
$pdo->exec("CREATE TABLE IF NOT EXISTS loads (
|
|
||||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
|
||||||
origin VARCHAR(255) NOT NULL,
|
|
||||||
destination VARCHAR(255) NOT NULL,
|
|
||||||
pickup_date DATE NOT NULL,
|
|
||||||
delivery_date DATE NOT NULL,
|
|
||||||
rate DECIMAL(10, 2) NOT NULL,
|
|
||||||
status VARCHAR(50) NOT NULL DEFAULT 'Pending',
|
|
||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
|
||||||
)");
|
|
||||||
|
|
||||||
// Handle form submission
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
||||||
$origin = $_POST['origin'] ?? '';
|
|
||||||
$destination = $_POST['destination'] ?? '';
|
|
||||||
$pickup_date = $_POST['pickup_date'] ?? '';
|
|
||||||
$delivery_date = $_POST['delivery_date'] ?? '';
|
|
||||||
$rate = $_POST['rate'] ?? 0;
|
|
||||||
|
|
||||||
if ($origin && $destination && $pickup_date && $delivery_date && $rate) {
|
|
||||||
$stmt = $pdo->prepare("INSERT INTO loads (origin, destination, pickup_date, delivery_date, rate) VALUES (?, ?, ?, ?, ?)");
|
|
||||||
$stmt->execute([$origin, $destination, $pickup_date, $delivery_date, $rate]);
|
|
||||||
header("Location: loads.php"); // Redirect to avoid form resubmission
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fetch all loads
|
|
||||||
$stmt = $pdo->query("SELECT id, origin, destination, pickup_date, delivery_date, rate, status, created_at FROM loads ORDER BY created_at DESC");
|
|
||||||
$loads = $stmt->fetchAll();
|
|
||||||
|
|
||||||
} catch (PDOException $e) {
|
|
||||||
// For development, you might want to see the error.
|
|
||||||
// In production, you'd log this and show a generic error message.
|
|
||||||
die("Database error: " . $e->getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
include 'includes/header.php';
|
|
||||||
include 'includes/sidebar.php';
|
|
||||||
?>
|
|
||||||
|
|
||||||
<main class="main-content">
|
|
||||||
<header class="header">
|
|
||||||
<h1>Load Management</h1>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section class="content-section">
|
|
||||||
<h2>Add New Load</h2>
|
|
||||||
<div class="card">
|
|
||||||
<form action="loads.php" method="POST" class="form-grid">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="origin">Origin</label>
|
|
||||||
<input type="text" id="origin" name="origin" required>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="destination">Destination</label>
|
|
||||||
<input type="text" id="destination" name="destination" required>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="pickup_date">Pickup Date</label>
|
|
||||||
<input type="date" id="pickup_date" name="pickup_date" required>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="delivery_date">Delivery Date</label>
|
|
||||||
<input type="date" id="delivery_date" name="delivery_date" required>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="rate">Rate ($)</label>
|
|
||||||
<input type="number" id="rate" name="rate" step="0.01" required>
|
|
||||||
</div>
|
|
||||||
<div class="form-group form-group-full">
|
|
||||||
<button type="submit" class="btn btn-primary">Create Load</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="content-section">
|
|
||||||
<h2>Current Loads</h2>
|
|
||||||
<div class="card">
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>ID</th>
|
|
||||||
<th>Origin</th>
|
|
||||||
<th>Destination</th>
|
|
||||||
<th>Pickup Date</th>
|
|
||||||
<th>Delivery Date</th>
|
|
||||||
<th>Rate</th>
|
|
||||||
<th>Status</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php if (empty($loads)): ?>
|
|
||||||
<tr>
|
|
||||||
<td colspan="7" style="text-align:center;">No loads found.</td>
|
|
||||||
</tr>
|
|
||||||
<?php else: ?>
|
|
||||||
<?php foreach ($loads as $load): ?>
|
|
||||||
<tr>
|
|
||||||
<td><?php echo htmlspecialchars($load['id']); ?></td>
|
|
||||||
<td><?php echo htmlspecialchars($load['origin']); ?></td>
|
|
||||||
<td><?php echo htmlspecialchars($load['destination']); ?></td>
|
|
||||||
<td><?php echo htmlspecialchars($load['pickup_date']); ?></td>
|
|
||||||
<td><?php echo htmlspecialchars($load['delivery_date']); ?></td>
|
|
||||||
<td>$<?php echo htmlspecialchars(number_format($load['rate'], 2)); ?></td>
|
|
||||||
<td><span class="status-badge status-<?php echo strtolower(htmlspecialchars($load['status'])); ?>"><?php echo htmlspecialchars($load['status']); ?></span></td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<?php include 'includes/footer.php'; ?>
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
<?php include 'includes/header.php'; ?>
|
|
||||||
|
|
||||||
<?php include 'includes/sidebar.php'; ?>
|
|
||||||
|
|
||||||
<main class="main-content">
|
|
||||||
<header class="header">
|
|
||||||
<h1>Maintenance</h1>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section class="dashboard-cards">
|
|
||||||
<p>Maintenance records and scheduling will go here.</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<?php include 'includes/footer.php'; ?>
|
|
||||||
16
settings.php
16
settings.php
@ -1,16 +0,0 @@
|
|||||||
<?php include 'includes/header.php'; ?>
|
|
||||||
|
|
||||||
<?php include 'includes/sidebar.php'; ?>
|
|
||||||
|
|
||||||
<main class="main-content">
|
|
||||||
<header class="header">
|
|
||||||
<h1>Settings</h1>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section class="dashboard-cards">
|
|
||||||
<p>Application settings will go here.</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<?php include 'includes/footer.php'; ?>
|
|
||||||
Loading…
x
Reference in New Issue
Block a user