113 lines
4.9 KiB
PHP
113 lines
4.9 KiB
PHP
<?php
|
|
// Read project preview data from environment
|
|
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'TRINETRA is a personal AI assistant for law enforcement.';
|
|
$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>TRINETRA - AI Assistant</title>
|
|
|
|
<!-- Dynamic Meta Tags -->
|
|
<meta name="description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
|
<?php if ($projectImageUrl): ?>
|
|
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
|
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
|
<?php endif; ?>
|
|
<meta property="og:title" content="TRINETRA - AI Assistant" />
|
|
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
|
<meta property="twitter:card" content="summary_large_image" />
|
|
<meta property="twitter:title" content="TRINETRA - AI Assistant" />
|
|
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
|
|
|
<!-- Fonts and Icons -->
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
|
|
<script src="https://unpkg.com/lucide@latest"></script>
|
|
|
|
<!-- Styles -->
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
|
</head>
|
|
<body>
|
|
|
|
<header class="header">
|
|
<i data-lucide="shield" class="icon"></i>
|
|
<h1>TRINETRA</h1>
|
|
</header>
|
|
|
|
<div class="container-fluid">
|
|
<ul class="nav nav-tabs" id="main-tabs" role="tablist">
|
|
<li class="nav-item" role="presentation">
|
|
<button class="nav-link active" id="chat-tab" data-bs-toggle="tab" data-bs-target="#chat-panel" type="button" role="tab" aria-controls="chat-panel" aria-selected="true">AI Assistant</button>
|
|
</li>
|
|
<li class="nav-item" role="presentation">
|
|
<button class="nav-link" id="reports-tab" data-bs-toggle="tab" data-bs-target="#reports-panel" type="button" role="tab" aria-controls="reports-panel" aria-selected="false">Reports</button>
|
|
</li>
|
|
</ul>
|
|
<div class="tab-content" id="myTabContent">
|
|
<div class="tab-pane fade show active" id="chat-panel" role="tabpanel" aria-labelledby="chat-tab">
|
|
<main id="chat-container" class="chat-container">
|
|
<div class="chat-bubble ai">
|
|
<pre>TRINETRA System Online.
|
|
|
|
I have access to your local case files. I can generate Arrest Memos, Bail Replies, and Case Diaries.
|
|
|
|
Command me, Officer. For example: `find case 684/25` or `generate arrest memo for case 684/25`</pre>
|
|
</div>
|
|
</main>
|
|
<footer class="chat-input-form">
|
|
<form id="chat-form" style="display: flex; width: 100%; gap: 0.5rem;">
|
|
<input type="text" id="message-input" class="form-control" placeholder="Enter command..." autocomplete="off" required>
|
|
<button type="button" id="upload-btn" class="btn btn-secondary">
|
|
<i data-lucide="paperclip"></i>
|
|
</button>
|
|
<button type="submit" class="btn btn-primary">
|
|
<i data-lucide="send"></i>
|
|
</button>
|
|
</form>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- File Upload Modal -->
|
|
<div class="modal fade" id="uploadModal" tabindex="-1" aria-labelledby="uploadModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="uploadModalLabel">Upload File</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p>Select a file to upload. You must first specify the case, for example: `upload file for case 123/25`</p>
|
|
<form id="upload-form" enctype="multipart/form-data">
|
|
<input type="hidden" id="upload-case-id" name="case_id">
|
|
<input type="hidden" name="action" value="upload_file">
|
|
<div class="mb-3">
|
|
<label for="file-input" class="form-label">File</label>
|
|
<input class="form-control" type="file" id="file-input" name="file" required>
|
|
</div>
|
|
<div class="d-flex justify-content-end">
|
|
<button type="button" class="btn btn-secondary me-2" data-bs-dismiss="modal">Close</button>
|
|
<button type="submit" class="btn btn-primary">Upload</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Scripts -->
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
|
<script>
|
|
lucide.createIcons();
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|