Linux spg1.cloudpowerdns.com 5.14.0-611.34.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 18 05:51:10 EST 2026 x86_64
LiteSpeed
Server IP : 176.9.63.151 & Your IP : 216.73.217.60
Domains :
Cant Read [ /etc/named.conf ]
User : fastear1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
fastear1 /
chat.app /
Delete
Unzip
Name
Size
Permission
Date
Action
.well-known
[ DIR ]
drwxr-xr-x
2026-02-22 15:26
admin
[ DIR ]
drwxr-xr-x
2026-04-01 03:43
api
[ DIR ]
drwxr-xr-x
2026-04-01 03:43
assets
[ DIR ]
drwxr-xr-x
2026-04-01 03:43
cgi-bin
[ DIR ]
drwxr-xr-x
2026-04-01 03:43
chat
[ DIR ]
drwxr-xr-x
2026-04-01 03:43
image
[ DIR ]
drwxr-xr-x
2026-04-01 03:43
includes
[ DIR ]
drwxr-xr-x
2026-04-01 03:43
.htaccess
197
B
-r--r--r--
2026-04-01 03:43
5CIklYH0.php
445
B
-rw-r--r--
2026-02-23 13:08
G0cQmLsV.php
445
B
-rw-r--r--
2026-02-22 23:14
chat.zip
27.93
MB
-rw-r--r--
2026-02-22 17:31
dashboard.php
36.16
KB
-rw-r--r--
2026-02-23 09:09
database.sql
2.81
KB
-rw-r--r--
2026-02-22 22:29
error_log
2.61
KB
-rw-r--r--
2026-02-23 10:51
index.php
25.53
KB
-rw-r--r--
2026-02-23 10:52
install.php
5.88
KB
-rw-r--r--
2026-02-22 17:43
login.php
5.69
KB
-rw-r--r--
2026-02-22 18:40
logout.php
328
B
-rw-r--r--
2026-02-21 21:39
manifest.json
536
B
-rw-r--r--
2026-02-22 19:03
my_stories.php
11.66
KB
-rw-r--r--
2026-02-21 23:17
signup.php
6.39
KB
-rw-r--r--
2026-02-22 11:41
sw.js
2.21
KB
-rw-r--r--
2026-02-22 20:10
txets.php
4.37
KB
-rw-r--r--
2026-02-24 02:50
wp-blog-header.php
2.74
KB
-rw-r--r--
2026-04-01 03:43
wp-cron.php
2.74
KB
-rw-r--r--
2026-04-01 03:43
Save
Rename
<?php session_start(); header("Cache-Control: no-cache, no-store, must-revalidate"); header("Pragma: no-cache"); header("Expires: 0"); require_once 'includes/db.php'; require_once 'includes/functions.php'; if (!isLoggedIn()) { redirect('login.php'); } $user_id = $_SESSION['user_id']; $stmt = $pdo->prepare("SELECT * FROM users WHERE id = ?"); $stmt->execute([$user_id]); $current_user = $stmt->fetch(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Dashboard - ChatApp</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="assets/css/style.css?v=11" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"> <link rel="manifest" href="manifest.json"> <meta name="theme-color" content="#4f46e5"> <script> const CURRENT_USER_ID = <?php echo $user_id; ?>; (function() { const theme = localStorage.getItem('theme') || 'light'; document.documentElement.setAttribute('data-theme', theme); })(); </script> </head> <body> <div class="chat-container fade-in"> <!-- Connection Status Bar --> <div id="offlineStatusBar" class="bg-danger text-white text-center py-1 small d-none" style="z-index: 9999; position: absolute; width: 100%; top: 0;"> <i class="fas fa-wifi-slash me-2"></i> You are currently offline. Checking connection... </div> <!-- Left Sidebar: Friends List --> <div class="sidebar-left modern-sidebar"> <div class="p-4 border-bottom d-flex align-items-center justify-content-between bg-white sticky-top"> <div class="d-flex align-items-center"> <div class="avatar-wrapper me-3"> <img src="assets/images/<?php echo htmlspecialchars($current_user['profile_pic_url'] ?? 'default.png'); ?>" alt="Profile" class="avatar-sm border shadow-sm" onerror="this.src='https://ui-avatars.com/api/?name=<?php echo urlencode($current_user['username']); ?>&background=random'"> <div class="status-indicator status-online"></div> </div> <div> <span class="fw-bold clickable-username d-block" id="openProfileSettings" style="cursor: pointer; font-family: 'Outfit', sans-serif;"><?php echo htmlspecialchars($current_user['username']); ?></span> <small class="text-success small fw-medium" style="font-size: 0.7rem;"><i class="fas fa-circle me-1" style="font-size: 0.5rem;"></i> Active Now</small> </div> </div> <div class="d-flex gap-1 align-items-center"> <button class="btn btn-light btn-sm rounded-circle shadow-sm me-1" title="Add Status" id="addStoryBtn"><i class="fas fa-plus text-success"></i></button> <!-- Mobile Requests Button --> <button class="btn btn-light btn-sm rounded-circle shadow-sm position-relative" title="Friend Requests" id="mobileRequestsBtn"> <i class="fas fa-bell text-warning"></i> <span class="badge bg-danger rounded-pill d-none position-absolute" id="mobileReqBadge" style="font-size: 0.55rem; top: -4px; right: -4px; padding: 3px 5px; min-width: 17px;">0</span> </button> <button class="btn btn-light btn-sm rounded-circle shadow-sm" title="New Chat" data-bs-toggle="modal" data-bs-target="#searchUsersModal"><i class="fas fa-user-plus text-primary"></i></button> <a href="logout.php" class="btn btn-light btn-sm rounded-circle shadow-sm text-danger" title="Logout"><i class="fas fa-power-off"></i></a> </div> </div> <!-- Stories Section --> <div class="stories-container p-3 border-bottom d-flex align-items-center overflow-x-auto gap-3 bg-light/50"> <div class="story-item text-center my-story" id="myStoryTrigger"> <div class="story-avatar-wrapper add-story shadow-sm"> <img src="assets/images/<?php echo htmlspecialchars($current_user['profile_pic_url'] ?? 'default.png'); ?>" class="story-avatar" onerror="this.src='https://ui-avatars.com/api/?name=<?php echo urlencode($current_user['username']); ?>&background=random'"> <div class="add-story-icon shadow-sm"><i class="fas fa-plus"></i></div> </div> <small class="story-name fw-medium">My Status</small> </div> <div id="friendsStories" class="d-flex gap-3"> <!-- Dynamic Stories --> </div> </div> <div class="p-3"> <div class="input-group"> <span class="input-group-text bg-light border-0 rounded-start-4 ps-3"><i class="fas fa-search text-muted small"></i></span> <input type="text" class="form-control search-box border-0 bg-light rounded-end-4" placeholder="Search conversations..." id="searchFriendsInput" name="filter_query" autocomplete="new-password" value=""> </div> </div> <div class="flex-grow-1 overflow-y-auto px-2" id="friendsList"> <div class="p-5 text-center text-muted"> <div class="spinner-border spinner-border-sm text-primary mb-2" role="status"></div> <div class="small">Syncing contacts...</div> </div> </div> </div> <!-- Middle: Chat Area --> <div class="chat-main" id="chatArea"> <div class="h-100 d-flex flex-column align-items-center justify-content-center text-center p-5" id="initialChatView" style="background: radial-gradient(circle at center, rgba(79, 70, 229, 0.03) 0%, transparent 70%);"> <div class="mb-4"> <div class="icon-shape bg-primary text-white rounded-circle shadow-lg mb-3 mx-auto d-flex align-items-center justify-content-center" style="width: 80px; height: 80px; font-size: 2rem;"> <i class="fas fa-comments"></i> </div> </div> <h3 class="fw-bold" style="font-family: 'Outfit', sans-serif;">Welcome, <?php echo htmlspecialchars($current_user['username']); ?>!</h3> <p class="text-muted max-w-400 mx-auto">Stay connected with your friends and family. Select a contact from the list to start a secure conversation.</p> <button class="btn btn-primary rounded-pill px-5 py-2 mt-4 shadow hover-scale fw-bold" data-bs-toggle="modal" data-bs-target="#searchUsersModal"> <i class="fas fa-user-plus me-2"></i> Find New Friends </button> </div> <!-- Active Chat View (hidden by default) --> <div id="activeChatView" class="h-100 d-none flex-column"> <div class="chat-header"> <div class="d-flex align-items-center"> <button class="btn btn-light btn-sm me-2 d-md-none rounded-circle" id="backToFriendsBtn"><i class="fas fa-arrow-left"></i></button> <div class="avatar-wrapper me-3"> <img src="" alt="Friend" class="avatar-sm" id="activeFriendAvatar" onerror="this.src='https://ui-avatars.com/api/?name=Friend&background=random'"> <div class="status-indicator" id="activeFriendStatus"></div> </div> <div> <h6 class="mb-0 fw-bold" id="activeFriendName">Friend Name</h6> <small class="text-muted" id="activeFriendLastSeen">online</small> </div> </div> <div class="d-flex align-items-center gap-2"> <button class="btn btn-light rounded-circle btn-sm" id="voiceCallBtn" title="Voice Call"> <i class="fas fa-phone text-success"></i> </button> <div class="dropdown"> <button class="btn btn-light rounded-circle btn-sm" type="button" data-bs-toggle="dropdown" aria-expanded="false"> <i class="fas fa-ellipsis-v"></i> </button> <ul class="dropdown-menu dropdown-menu-end shadow-lg border-0 rounded-3 mt-2"> <li><a class="dropdown-item py-2" href="#" id="clearChatBtn"><i class="fas fa-trash-alt me-2 text-danger"></i> Clear All Chat</a></li> <li><a class="dropdown-item py-2" href="#" id="changeBgBtn"><i class="fas fa-image me-2 text-primary"></i> Change Background</a></li> <li><a class="dropdown-item py-2 text-muted" href="#" id="resetBgBtn"><i class="fas fa-undo me-2"></i> Reset Background</a></li> <li><a class="dropdown-item py-2" href="#" id="lockChatBtn"><i class="fas fa-lock me-2 text-warning"></i> Lock Chat</a></li> </ul> </div> </div> </div> <div class="chat-messages" id="chatMessages"> <!-- Messages go here --> </div> <div class="chat-input-area"> <div id="recordingUI" class="d-none align-items-center w-100 bg-light rounded-pill px-3 py-2"> <div class="recording-dot me-2"></div> <span id="recordingTimer" class="me-auto fw-bold text-danger">00:00</span> <button type="button" class="btn btn-link text-muted text-decoration-none me-3" id="cancelRecordBtn">Cancel</button> <button type="button" class="btn btn-primary rounded-circle" id="stopRecordBtn"><i class="fas fa-paper-plane"></i></button> </div> <form id="sendMessageForm" class="d-flex align-items-center w-100"> <button type="button" class="btn btn-light rounded-circle me-2" id="attachmentBtn"><i class="fas fa-paperclip text-muted"></i></button> <input type="text" id="messageInput" class="form-control chat-input me-2" placeholder="Type a message..." autocomplete="off"> <button type="button" class="btn btn-light rounded-circle me-2" id="voiceRecordBtn"><i class="fas fa-microphone text-muted"></i></button> <button type="submit" class="btn btn-primary rounded-circle"><i class="fas fa-paper-plane"></i></button> </form> </div> </div> </div> <!-- Right Panel: Info / Requests --> <div class="sidebar-right modern-sidebar"> <div class="p-4 border-bottom d-flex justify-content-between align-items-center bg-white sticky-top"> <button class="btn btn-light btn-sm d-md-none rounded-circle" id="closeRequestsBtn"><i class="fas fa-arrow-left"></i></button> <h6 class="mb-0 fw-bold text-dark mx-auto d-flex align-items-center" id="desktopRequestTitle"> <span class="bg-primary-light text-primary rounded-circle p-2 me-2 d-inline-flex align-items-center justify-content-center" style="width: 32px; height: 32px; background: rgba(79, 70, 229, 0.1);"> <i class="fas fa-bell" style="font-size: 0.8rem;"></i> </span> Activity Center <span class="badge bg-danger rounded-pill ms-2 d-none" id="desktopReqBadge" style="font-size: 0.65rem; padding: 0.35em 0.65em;">0</span> </h6> <div class="d-md-none" style="width: 31px;"></div> </div> <div class="flex-grow-1 overflow-y-auto w-100 p-3" id="requestsList"> <div class="p-5 text-center text-muted"> <div class="spinner-border spinner-border-sm text-primary mb-2" role="status"></div> <div class="small">Loading updates...</div> </div> </div> <div class="p-4 border-top bg-white"> <button type="button" class="btn btn-outline-primary btn-sm w-100 rounded-pill py-2 fw-bold shadow-sm" data-bs-toggle="modal" data-bs-target="#profileSettingsModal"> <i class="fas fa-user-gear me-2"></i>Account Settings </button> </div> </div> </div> <!-- Search Users Modal --> <div class="modal fade" id="searchUsersModal" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content rounded-4 border-0 shadow"> <div class="modal-header border-0 pb-0"> <h5 class="modal-title fw-bold">Find Users</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body p-4"> <input type="text" id="globalSearchInput" class="form-control chat-input mb-4" placeholder="Search by username..." autocomplete="off"> <div id="globalSearchResults" class="list-group list-group-flush"> <div class="text-center text-muted py-3 small">Type at least 2 characters to search users</div> </div> </div> </div> </div> </div> <!-- Message Options Modal (Modern) --> <div class="modal fade action-sheet" id="messageOptionsModal" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered modal-sm"> <div class="modal-content border-0 shadow-lg" style="border-radius: 1.25rem; overflow: hidden;"> <div class="modal-body p-0 list-group list-group-flush text-center"> <button class="list-group-item list-group-item-action border-bottom py-3 fw-medium" id="btnCopyMsg"><i class="fas fa-copy me-2 text-muted"></i> Copy Message</button> <button class="list-group-item list-group-item-action border-bottom py-3 fw-medium" id="btnDeleteMe"><i class="fas fa-trash me-2 text-muted"></i> Delete for me</button> <button class="list-group-item list-group-item-action py-3 fw-bold text-danger" id="btnDeleteEveryone"><i class="fas fa-trash-alt me-2"></i> Delete for everyone</button> </div> <div class="bg-light p-2 text-center border-top"> <button class="btn btn-light w-100 rounded-pill text-muted fw-bold shadow-sm" data-bs-dismiss="modal">Cancel</button> </div> </div> </div> </div> <!-- Toast Container --> <div class="toast-container position-fixed bottom-0 start-50 translate-middle-x p-3" style="z-index: 1055"> <div id="undoToast" class="toast align-items-center text-white bg-dark border-0 rounded-pill shadow" role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="4000"> <div class="d-flex px-3 py-2"> <div class="toast-body p-0 d-flex align-items-center"> Message deleted for you </div> <button type="button" class="btn btn-link text-info fw-bold text-decoration-none ms-auto p-0 ps-3 border-start border-secondary ms-3" id="btnUndoDeleteMe">UNDO</button> </div> </div> </div> <!-- Notification Sound --> <audio id="notificationSound" preload="auto"> <source src="assets/audio/notification.mp3" type="audio/mpeg"> </audio> <!-- Story Choice Modal --> <div class="modal fade action-sheet" id="storyChoiceModal" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered modal-sm"> <div class="modal-content border-0 shadow-lg" style="border-radius: 1.25rem; overflow: hidden;"> <div class="modal-body p-0 list-group list-group-flush text-center"> <button class="list-group-item list-group-item-action border-bottom py-3 fw-bold text-primary" id="choiceText"> <i class="fas fa-font me-2"></i> Text Story </button> <button class="list-group-item list-group-item-action border-bottom py-3 fw-bold" id="choicePhoto"> <i class="fas fa-image me-2 text-success"></i> Photo </button> <button class="list-group-item list-group-item-action py-3 fw-bold" id="choiceVideo"> <i class="fas fa-video me-2 text-danger"></i> Video </button> </div> <div class="bg-light p-2 text-center border-top"> <button class="btn btn-light w-100 rounded-pill text-muted fw-bold shadow-sm" data-bs-dismiss="modal">Cancel</button> </div> </div> </div> </div> <!-- Text Story Editor Modal --> <div class="modal fade" id="textStoryModal" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-fullscreen"> <div class="modal-content border-0 text-white" id="textStoryEditorBg" style="background-color: #4F46E5; transition: background 0.3s ease;"> <div class="modal-header border-0"> <button type="button" class="btn btn-link text-white text-decoration-none fw-bold" data-bs-dismiss="modal">Cancel</button> <div class="ms-auto d-flex gap-2"> <button class="btn btn-light btn-sm rounded-circle color-picker" style="background: #4F46E5; width: 30px; height: 30px;" data-color="#4F46E5"></button> <button class="btn btn-light btn-sm rounded-circle color-picker" style="background: #E11D48; width: 30px; height: 30px;" data-color="#E11D48"></button> <button class="btn btn-light btn-sm rounded-circle color-picker" style="background: #10B981; width: 30px; height: 30px;" data-color="#10B981"></button> <button class="btn btn-light btn-sm rounded-circle color-picker" style="background: #F59E0B; width: 30px; height: 30px;" data-color="#F59E0B"></button> <button class="btn btn-light btn-sm rounded-circle color-picker" style="background: #7C3AED; width: 30px; height: 30px;" data-color="#7C3AED"></button> </div> </div> <div class="modal-body d-flex flex-column align-items-center justify-content-center p-4"> <textarea id="textStoryContent" class="form-control bg-transparent border-0 text-white text-center fw-bold" style="font-size: 2.5rem; resize: none;" placeholder="Type a status..."></textarea> <button class="btn btn-white rounded-pill px-5 py-2 mt-5 fw-bold shadow-lg" id="submitTextStory">Post Story</button> <input type="hidden" id="selectedStoryColor" value="#4F46E5"> </div> </div> </div> </div> <!-- Story Viewer Modal --> <div class="modal fade story-viewer-modal" id="storyViewerModal" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-fullscreen"> <div class="modal-content bg-dark border-0"> <div class="modal-header border-0 position-absolute top-0 start-0 w-100 p-3" style="z-index: 10;"> <div class="d-flex align-items-center text-white"> <img src="" id="storyUserAvatar" class="avatar-sm rounded-circle me-2 border border-2"> <div> <h6 class="mb-0 fw-bold" id="storyUserName">Username</h6> <small class="opacity-75" id="storyTime">Just now</small> </div> </div> <button type="button" class="btn-close btn-close-white ms-auto" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body p-0 d-flex align-items-center justify-content-center bg-black position-relative"> <div class="story-progress-container position-absolute top-0 start-0 w-100 d-flex px-3 pt-2" id="storyProgressBar" style="z-index: 11;"> <!-- Progress bars go here --> </div> <!-- Media Display --> <img src="" id="storyDisplayImage" class="story-media d-none" style="max-width: 100%; max-height: 100vh; object-fit: contain;"> <video id="storyDisplayVideo" class="story-media d-none" style="max-width: 100%; max-height: 100vh;" playsinline></video> <!-- Text Display --> <div id="storyDisplayText" class="story-media d-none w-100 h-100 d-flex align-items-center justify-content-center p-5 text-white text-center fw-bold" style="font-size: 2rem;"> </div> </div> </div> </div> </div> <!-- Attachment Menu Modal --> <div class="modal fade action-sheet" id="attachmentMenuModal" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered modal-sm"> <div class="modal-content border-0 shadow-lg" style="border-radius: 1.25rem; overflow: hidden;"> <div class="modal-body p-0 list-group list-group-flush text-center"> <button class="list-group-item list-group-item-action border-bottom py-3 fw-bold text-primary" id="attachDocument"> <i class="fas fa-file-lines me-2"></i> Document </button> <button class="list-group-item list-group-item-action border-bottom py-3 fw-bold text-success" id="attachPicture"> <i class="fas fa-image me-2"></i> Picture </button> <button class="list-group-item list-group-item-action py-3 fw-bold text-danger" id="attachVideo"> <i class="fas fa-video me-2"></i> Video </button> </div> <div class="bg-light p-2 text-center border-top"> <button class="btn btn-light w-100 rounded-pill text-muted fw-bold shadow-sm" data-bs-dismiss="modal">Cancel</button> </div> </div> </div> </div> <!-- Hidden Inputs for Chat Media --> <input type="file" id="chatImageInput" class="d-none" accept="image/*"> <input type="file" id="chatVideoInput" class="d-none" accept="video/*"> <input type="file" id="chatDocumentInput" class="d-none" accept=".pdf,.doc,.docx,.txt,.zip"> <div class="modal fade" id="profileSettingsModal" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content rounded-4 border-0 shadow-lg"> <div class="modal-header border-0 pb-0"> <h5 class="modal-title fw-bold">Profile Settings</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body p-4"> <form id="profileSettingsForm" enctype="multipart/form-data"> <div class="text-center mb-4 position-relative"> <div class="profile-pic-setup d-inline-block position-relative"> <img src="assets/images/<?php echo htmlspecialchars($current_user['profile_pic_url'] ?? 'default.png'); ?>" id="profilePreview" class="rounded-circle border shadow-sm" style="width: 100px; height: 100px; object-fit: cover;" onerror="this.src='https://ui-avatars.com/api/?name=<?php echo urlencode($current_user['username']); ?>&background=random'"> <label for="profilePicInput" class="btn btn-primary btn-sm rounded-circle position-absolute bottom-0 end-0 shadow-sm" style="width: 32px; height: 32px; padding: 5px;"> <i class="fas fa-camera"></i> </label> <input type="file" id="profilePicInput" name="profile_pic" class="d-none" accept="image/*"> </div> <div class="mt-2"> <small class="text-muted">Joined: <?php echo date('M d, Y', strtotime($current_user['created_at'])); ?></small> </div> </div> <div class="mb-3"> <label class="form-label small fw-bold text-muted">Email Address</label> <input type="email" class="form-control bg-light border-0 rounded-3" value="<?php echo htmlspecialchars($current_user['email']); ?>" readonly disabled> <small class="text-muted" style="font-size: 0.75rem;">Email cannot be changed</small> </div> <div class="mb-3"> <label class="form-label small fw-bold text-muted">Username</label> <input type="text" name="username" class="form-control border-0 bg-light rounded-3" value="<?php echo htmlspecialchars($current_user['username']); ?>" required> </div> <div class="d-flex align-items-center justify-content-between mb-4 p-3 bg-light rounded-4 border"> <div class="d-flex align-items-center"> <div class="bg-primary-soft text-primary rounded-circle p-2 me-3 d-flex align-items-center justify-content-center" style="width: 40px; height: 40px;"> <i class="fas fa-moon"></i> </div> <div> <span class="d-block fw-bold small">Dark Mode</span> <small class="text-muted" style="font-size: 0.7rem;">Lower eye strain</small> </div> </div> <label class="theme-switch" for="themeCheckbox"> <input type="checkbox" id="themeCheckbox" /> <div class="slider"> <i class="fas fa-sun"></i> <i class="fas fa-moon"></i> </div> </label> </div> <hr class="my-4 opacity-10"> <h6 class="fw-bold mb-3">Change Password</h6> <div class="mb-3"> <label class="form-label small fw-bold text-muted">Current Password</label> <input type="password" name="current_password" class="form-control border-0 bg-light rounded-3" placeholder="Leave blank if not changing"> </div> <div class="row"> <div class="col-6 mb-3"> <label class="form-label small fw-bold text-muted">New Password</label> <input type="password" name="new_password" class="form-control border-0 bg-light rounded-3"> </div> <div class="col-6 mb-3"> <label class="form-label small fw-bold text-muted">Confirm Password</label> <input type="password" name="confirm_password" class="form-control border-0 bg-light rounded-3"> </div> </div> <hr> <div class="d-grid gap-2"> <button type="button" class="btn btn-outline-primary rounded-pill btn-sm" id="requestPushPermission"> <i class="fas fa-bell me-2"></i> Enable Push Notifications </button> <button type="button" class="btn btn-outline-secondary rounded-pill btn-sm" id="repairPWA"> <i class="fas fa-sync me-2"></i> Repair App (Sync Fix) </button> <button type="submit" class="btn btn-primary rounded-pill" id="saveProfileBtn">Save Changes</button> <a href="logout.php" class="btn btn-danger rounded-pill mt-2">Logout</a> </div> </form> </div> </div> </div> </div> <input type="file" id="storyInput" class="d-none" accept="image/*"> <input type="file" id="storyVideoInput" class="d-none" accept="video/*"> <input type="file" id="chatBgInput" class="d-none" accept="image/*"> <!-- Lock Chat Modal --> <div class="modal fade" id="lockChatModal" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-sm modal-dialog-centered"> <div class="modal-content border-0 shadow-lg rounded-4"> <div class="modal-header border-0 pb-0"> <h5 class="modal-title fw-bold"><i class="fas fa-lock me-2 text-warning"></i>Lock Chat</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body p-4"> <p class="small text-muted mb-4">Set a password to lock this chat. You will need this password every time you open this conversation.</p> <input type="password" id="lockChatPassword" class="form-control chat-input border-0 bg-light" placeholder="Set Password"> <div class="d-grid mt-4"> <button type="button" id="confirmLockBtn" class="btn btn-warning rounded-pill py-2 fw-bold text-white shadow-sm">Enable Lock</button> </div> </div> </div> </div> </div> <!-- Unlock Chat Modal --> <div class="modal fade" id="unlockChatModal" tabindex="-1" aria-hidden="true" data-bs-backdrop="static"> <div class="modal-dialog modal-sm modal-dialog-centered"> <div class="modal-content border-0 shadow-lg rounded-4"> <div class="modal-header border-0 pb-0"> <h5 class="modal-title fw-bold"><i class="fas fa-key me-2 text-primary"></i>Protected Chat</h5> </div> <div class="modal-body p-4"> <p class="small text-muted mb-4">This chat is locked. Please enter the password to view messages.</p> <input type="password" id="unlockChatPassword" class="form-control chat-input border-0 bg-light" placeholder="Enter Password"> <div class="d-grid mt-4"> <button type="button" id="confirmUnlockBtn" class="btn btn-primary rounded-pill py-2 fw-bold shadow-sm">Log In to Chat</button> </div> </div> <div class="modal-footer border-0 pt-0"> <button type="button" class="btn btn-link text-muted text-decoration-none w-100 small" id="cancelUnlockBtn">Back to Contacts</button> </div> </div> </div> </div> <script> (function() { const themeCheckbox = document.getElementById('themeCheckbox'); const html = document.documentElement; // Initial Sync const currentTheme = localStorage.getItem('theme') || 'light'; html.setAttribute('data-theme', currentTheme); if (themeCheckbox) { themeCheckbox.checked = (currentTheme === 'dark'); } // Change Listener if (themeCheckbox) { themeCheckbox.addEventListener('change', function(e) { const newTheme = e.target.checked ? 'dark' : 'light'; html.setAttribute('data-theme', newTheme); localStorage.setItem('theme', newTheme); console.log('Theme changed to:', newTheme); }); } })(); </script> <!-- Call Modal (Outgoing/Incoming) --> <div class="modal fade" id="callModal" tabindex="-1" aria-hidden="true" data-bs-backdrop="static" style="z-index: 2000;"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content rounded-5 border-0 shadow-lg text-center p-4 call-modal-bg"> <div class="modal-body"> <div class="avatar-group-call mb-4 position-relative d-inline-block"> <img src="" id="callUserAvatar" class="avatar-xl rounded-circle border border-4 border-white shadow" onerror="this.src='https://ui-avatars.com/api/?name=User&background=random'"> <div class="pulse-ring"></div> </div> <h4 class="fw-bold mb-1 mt-3" id="callUserName">Username</h4> <p class="text-muted call-status mb-4" id="callStatusText">Calling...</p> <div class="d-flex justify-content-center gap-4 mt-5"> <button class="btn btn-danger rounded-circle p-3 call-action-btn shadow-lg" id="rejectCallBtn" title="Decline"> <i class="fas fa-phone-slash fa-lg"></i> </button> <button class="btn btn-success rounded-circle p-3 call-action-btn shadow-lg d-none" id="acceptCallBtn" title="Accept"> <i class="fas fa-phone fa-lg"></i> </button> </div> </div> </div> </div> </div> <!-- Audio Settings --> <audio id="ringtone" loop preload="auto"> <source src="https://assets.mixkit.co/active_storage/sfx/2358/2358-preview.mp3" type="audio/mpeg"> </audio> <audio id="callingTone" loop preload="auto"> <source src="https://assets.mixkit.co/active_storage/sfx/1359/1359-preview.mp3" type="audio/mpeg"> </audio> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <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=10"></script> <script> if ('serviceWorker' in navigator) { window.addEventListener('load', () => { navigator.serviceWorker.register('sw.js?v=10') .then(reg => { console.log('SW v10 Registered'); reg.onupdatefound = () => { const installingWorker = reg.installing; installingWorker.onstatechange = () => { if (installingWorker.state === 'installed' && navigator.serviceWorker.controller) { window.location.reload(); } }; }; }) .catch(err => console.log('Service Worker Failed', err)); }); } </script> </body> </html>