118 lines
5.2 KiB
PHP
118 lines
5.2 KiB
PHP
<?php
|
|
session_start();
|
|
|
|
// If the user is not logged in, redirect to the login page
|
|
if (!isset($_SESSION['user_id'])) {
|
|
header('Location: login.php');
|
|
exit;
|
|
}
|
|
?>
|
|
<!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>Message NOW</title>
|
|
<meta name="description" content="A modern messaging app built with Flatlogic Generator.">
|
|
<meta name="keywords" content="messaging app, chat, real-time communication, direct message, group chat, secure messaging, instant messenger, flatlogic">
|
|
|
|
<!-- Open Graph / Facebook -->
|
|
<meta property="og:type" content="website">
|
|
<meta property="og:title" content="Message NOW">
|
|
<meta property="og:description" content="A modern messaging app built with Flatlogic Generator.">
|
|
<meta property="og:image" content="<?php echo htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? ''); ?>">
|
|
|
|
<!-- Twitter -->
|
|
<meta property="twitter:card" content="summary_large_image">
|
|
<meta property="twitter:title" content="Message NOW">
|
|
<meta property="twitter:description" content="A modern messaging app built with Flatlogic Generator.">
|
|
<meta property="twitter:image" content="<?php echo htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? ''); ?>">
|
|
|
|
<!-- Favicon -->
|
|
<link rel="icon" href="https://flatlogic.com/favicon.ico" type="image/x-icon">
|
|
|
|
<script>
|
|
window.userId = <?php echo $_SESSION['user_id']; ?>;
|
|
</script>
|
|
|
|
<!-- Styles -->
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
|
</head>
|
|
<body>
|
|
|
|
<div class="chat-app">
|
|
<!-- Sidebar -->
|
|
<aside class="sidebar">
|
|
<div class="sidebar-header d-flex align-items-center">
|
|
<div class="avatar-placeholder me-3">
|
|
<i class="bi bi-person-fill"></i>
|
|
</div>
|
|
<div>
|
|
<h5 class="mb-0 fw-bold">You</h5>
|
|
<p class="text-muted mb-0 small">My status message...</p>
|
|
</div>
|
|
</div>
|
|
<div class="sidebar-search">
|
|
<form id="user-search-form">
|
|
<input type="text" id="user-search-input" class="form-control rounded-pill" placeholder="Search for users...">
|
|
</form>
|
|
</div>
|
|
<div id="search-results" class="conversation-list">
|
|
<!-- Search results will be injected here -->
|
|
</div>
|
|
<div class="conversation-list" id="conversation-list-container">
|
|
<div class="text-center text-muted p-4">
|
|
<i class="bi bi-chat-dots fs-2"></i>
|
|
<p class="mt-2">No conversations yet.</p>
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- Main Chat View -->
|
|
<main class="chat-view">
|
|
<!-- Chat Header -->
|
|
<header class="chat-header">
|
|
<div class="d-flex align-items-center">
|
|
<div class="avatar-placeholder avatar-sm me-3">
|
|
<i class="bi bi-person-fill"></i>
|
|
</div>
|
|
<div>
|
|
<h5 class="mb-0 name">Select a Conversation</h5>
|
|
<p class="mb-0 status text-muted">Offline</p>
|
|
</div>
|
|
</div>
|
|
<div class="ms-auto">
|
|
<button class="btn btn-light rounded-circle" disabled><i class="bi bi-telephone"></i></button>
|
|
<button class="btn btn-light rounded-circle mx-2" disabled><i class="bi bi-camera-video"></i></button>
|
|
<button class="btn btn-light rounded-circle" disabled><i class="bi bi-three-dots-vertical"></i></button>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- Chat Body -->
|
|
<div class="chat-body">
|
|
<div class="text-center text-muted" style="margin-top: auto; margin-bottom: auto;">
|
|
<i class="bi bi-wechat fs-1"></i>
|
|
<h4 class="mt-3">Welcome to Message NOW</h4>
|
|
<p>Select a conversation to start messaging.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Chat Footer -->
|
|
<footer class="chat-footer">
|
|
<form id="chat-form" class="d-flex align-items-center">
|
|
<button class="btn btn-light rounded-circle me-3" type="button"><i class="bi bi-paperclip"></i></button>
|
|
<input type="text" id="message-input" class="form-control form-control-lg border-0" placeholder="Type a message..." autocomplete="off">
|
|
<button class="btn btn-primary rounded-circle ms-3" type="submit" style="width: 48px; height: 48px;"><i class="bi bi-send-fill"></i></button>
|
|
</form>
|
|
</footer>
|
|
</main>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
|
</body>
|
|
</html>
|