38436-vm/index.php
Flatlogic Bot 8d5d2597c6 V1.0001
2026-02-14 23:14:09 +00:00

111 lines
4.5 KiB
PHP

<?php
declare(strict_types=1);
@ini_set('display_errors', '1');
@error_reporting(E_ALL);
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Support Ticketing System';
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Support Tickets</title>
<?php if ($projectDescription): ?>
<meta name="description" content="<?= htmlspecialchars($projectDescription) ?>" />
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
<?php endif; ?>
<?php if ($projectImageUrl): ?>
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
<?php endif; ?>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<link href="assets/css/custom.css?v=<?php echo time(); ?>" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-expand-lg py-3 sticky-top">
<div class="container">
<a class="navbar-brand fw-bold text-dark" href="/">Tickets.</a>
<div class="d-flex align-items-center">
<button class="btn btn-primary d-flex align-items-center" data-bs-toggle="modal" data-bs-target="#createTicketModal">
New Ticket
</button>
</div>
</div>
</nav>
<main class="container py-5">
<div class="row mb-4">
<div class="col-md-8">
<h1 class="h4 fw-bold mb-1">Issue Overview</h1>
<p class="text-muted small">Manage and track your support requests</p>
</div>
</div>
<div class="card bg-white">
<div class="table-responsive">
<table class="table table-hover mb-0">
<thead>
<tr>
<th class="ps-4">ID</th>
<th>Subject</th>
<th>Priority</th>
<th>Status</th>
<th>Date Created</th>
<th class="text-end pe-4">Actions</th>
</tr>
</thead>
<tbody id="ticketList">
<!-- Loaded via JS -->
</tbody>
</table>
</div>
</div>
</main>
<!-- Modal -->
<div class="modal fade" id="createTicketModal" tabindex="-1">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-0 shadow-lg">
<div class="modal-header border-0 pb-0">
<h5 class="modal-title fw-bold">Create New Ticket</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<form id="ticketForm">
<div class="mb-3">
<label class="form-label small fw-semibold">Title</label>
<input type="text" name="title" class="form-control" placeholder="Brief summary of the issue" required>
</div>
<div class="mb-3">
<label class="form-label small fw-semibold">Priority</label>
<select name="priority" class="form-select">
<option value="Low">Low</option>
<option value="Medium" selected>Medium</option>
<option value="High">High</option>
</select>
</div>
<div class="mb-3">
<label class="form-label small fw-semibold">Description</label>
<textarea name="description" class="form-control" rows="4" placeholder="Describe the problem in detail"></textarea>
</div>
<div class="d-grid pt-2">
<button type="submit" class="btn btn-primary">Submit Ticket</button>
</div>
</form>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body>
</html>