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 /
api /
Delete
Unzip
Name
Size
Permission
Date
Action
.htaccess
197
B
-r--r--r--
2026-04-01 03:43
call_actions.php
3.5
KB
-rw-r--r--
2026-02-22 20:21
chat_actions.php
4.36
KB
-rw-r--r--
2026-02-22 19:13
delete_story.php
1.79
KB
-rw-r--r--
2026-02-21 23:17
error_log
14.72
KB
-rw-r--r--
2026-03-05 18:14
get_friends.php
1.83
KB
-rw-r--r--
2026-02-22 18:39
get_messages.php
1.17
KB
-rw-r--r--
2026-02-22 17:43
get_my_stories.php
1.02
KB
-rw-r--r--
2026-02-21 23:06
get_stories.php
1.92
KB
-rw-r--r--
2026-02-21 23:03
handle_request.php
2.05
KB
-rw-r--r--
2026-02-21 21:55
mark_story_seen.php
853
B
-rw-r--r--
2026-02-21 23:03
message_action.php
1.8
KB
-rw-r--r--
2026-02-21 23:19
search_users.php
1.07
KB
-rw-r--r--
2026-02-21 21:55
send_message.php
1.68
KB
-rw-r--r--
2026-02-21 23:17
send_request.php
1.65
KB
-rw-r--r--
2026-02-21 22:18
update_profile.php
4.85
KB
-rw-r--r--
2026-02-21 22:49
upload_chat_media.php
1.86
KB
-rw-r--r--
2026-02-22 18:37
upload_story.php
2.6
KB
-rw-r--r--
2026-02-21 22:59
wp-blog-header.php
2.74
KB
-r--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(); require_once '../includes/db.php'; require_once '../includes/functions.php'; header('Content-Type: application/json'); if (!isLoggedIn() || $_SERVER['REQUEST_METHOD'] !== 'POST') { echo json_encode(['success' => false, 'error' => 'Unauthorized']); exit; } $user_id = $_SESSION['user_id']; $username = isset($_POST['username']) ? trim($_POST['username']) : ''; $status = isset($_POST['status']) ? trim($_POST['status']) : 'Available'; $current_password = isset($_POST['current_password']) ? $_POST['current_password'] : ''; $new_password = isset($_POST['new_password']) ? $_POST['new_password'] : ''; $confirm_password = isset($_POST['confirm_password']) ? $_POST['confirm_password'] : ''; if (empty($username)) { echo json_encode(['success' => false, 'error' => 'Username is required']); exit; } // 1. Check Username Uniqueness $stmt = $pdo->prepare("SELECT id FROM users WHERE username = ? AND id != ?"); $stmt->execute([$username, $user_id]); if ($stmt->rowCount() > 0) { echo json_encode(['success' => false, 'error' => 'Username already taken']); exit; } // 2. Handle Password Change $password_update_sql = ""; $params = [$username]; if (!empty($new_password)) { if (empty($current_password)) { echo json_encode(['success' => false, 'error' => 'Current password is required to set a new one']); exit; } if ($new_password !== $confirm_password) { echo json_encode(['success' => false, 'error' => 'New passwords do not match']); exit; } // Verify current password $stmt = $pdo->prepare("SELECT password FROM users WHERE id = ?"); $stmt->execute([$user_id]); $user = $stmt->fetch(); if (!password_verify($current_password, $user['password'])) { echo json_encode(['success' => false, 'error' => 'Incorrect current password']); exit; } $password_hash = password_hash($new_password, PASSWORD_DEFAULT); $password_update_sql = ", password = ?"; $params[] = $password_hash; } // 3. Handle Profile Picture Upload $pic_update_sql = ""; if (isset($_FILES['profile_pic']) && $_FILES['profile_pic']['error'] === UPLOAD_ERR_OK) { $fileTmpPath = $_FILES['profile_pic']['tmp_name']; $fileName = $_FILES['profile_pic']['name']; $fileSize = $_FILES['profile_pic']['size']; $fileType = $_FILES['profile_pic']['type']; $fileNameCmps = explode(".", $fileName); $fileExtension = strtolower(end($fileNameCmps)); $allowedfileExtensions = ['jpg', 'gif', 'png', 'jpeg', 'webp']; if (in_array($fileExtension, $allowedfileExtensions)) { $newFileName = md5(time() . $fileName) . '.' . $fileExtension; $uploadFileDir = '../assets/images/'; $dest_path = $uploadFileDir . $newFileName; if (move_uploaded_file($fileTmpPath, $dest_path)) { // Delete old pic if not default.png $stmt = $pdo->prepare("SELECT profile_pic_url FROM users WHERE id = ?"); $stmt->execute([$user_id]); $old_pic = $stmt->fetchColumn(); if ($old_pic && $old_pic != 'default.png' && file_exists($uploadFileDir . $old_pic)) { unlink($uploadFileDir . $old_pic); } $pic_update_sql = ", profile_pic_url = ?"; $params[] = $newFileName; } else { echo json_encode(['success' => false, 'error' => 'Error moving the uploaded file']); exit; } } else { echo json_encode(['success' => false, 'error' => 'Upload failed. Allowed types: ' . implode(',', $allowedfileExtensions)]); exit; } } $params[] = $user_id; $sql = "UPDATE users SET username = ?, status = ? $password_update_sql $pic_update_sql WHERE id = ?"; $stmt = $pdo->prepare($sql); $final_params = [$username, $status]; // Skip $username which is already at index 0 in my new logic or just rebuild params properly // Let's rebuild properly to be sure $final_params = [$username, $status]; // Password part if (!empty($new_password)) { $final_params[] = $password_hash; } // Image part if (isset($newFileName)) { $final_params[] = $newFileName; } $final_params[] = $user_id; if ($stmt->execute($final_params)) { // Update session if username changed $_SESSION['username'] = $username; // Get updated user data $stmt = $pdo->prepare("SELECT * FROM users WHERE id = ?"); $stmt->execute([$user_id]); $updated_user = $stmt->fetch(); echo json_encode([ 'success' => true, 'message' => 'Profile updated successfully', 'user' => [ 'username' => $updated_user['username'], 'profile_pic_url' => $updated_user['profile_pic_url'] ] ]); } else { echo json_encode(['success' => false, 'error' => 'Failed to update database']); }