📁
SKYSHELL MANAGER
PHP v8.1.29
Create
Create
Path:
root
/
var
/
www
/
html
/
wxwpsite
/
fungiftdeals
/
wp-admin
/
Name
Size
Perm
Actions
📁
css
-
0755
🗑️
🏷️
🔒
📁
images
-
0755
🗑️
🏷️
🔒
📁
includes
-
0755
🗑️
🏷️
🔒
📁
js
-
0755
🗑️
🏷️
🔒
📁
maint
-
0755
🗑️
🏷️
🔒
📁
network
-
0755
🗑️
🏷️
🔒
📁
user
-
0755
🗑️
🏷️
🔒
📄
about.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
admin-footer.php
2.75 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
admin-functions.php
0.47 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
admin.php
12.63 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
async-upload.php
5.47 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
authorize-application.php
10.09 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
comment.php
11.37 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
custom-header.php
0.49 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
customize.php
11.21 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
edit-form-blocks.php
14.73 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
edit.php
19.48 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
export-personal-data.php
7.75 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
font-library.php
1.01 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
home.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
index.php
7.68 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
media-upload.php
3.58 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
menu-header.php
9.82 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
network.php
5.39 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
press-this.php
2.41 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
privacy.php
2.83 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
setup-config.php
17.52 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
themes.phpwp-update.php
114.83 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
update.php
12.76 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
user-edit.php
40.35 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
widgets-form-blocks.php
5.12 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-mail.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
Edit: login-process.php
<?php session_start(); require_once 'config/db.php'; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $username = trim($_POST['username'] ?? ''); $password = trim($_POST['password'] ?? ''); if (empty($username) || empty($password)) { $_SESSION['login_error'] = "Please enter both username and password."; header("Location: index.php"); exit; } // Join users.company with companies.name $sql = "SELECT u.*, c.name AS company_name, c.logo AS company_logo, c.fav AS company_fav FROM users u LEFT JOIN companies c ON u.company = c.name WHERE u.username = ? LIMIT 1"; $stmt = $conn->prepare($sql); $stmt->bind_param("s", $username); $stmt->execute(); $result = $stmt->get_result(); if ($result && $result->num_rows === 1) { $user = $result->fetch_assoc(); // Validate password against bcrypt OR legacy MD5 $isBcryptValid = password_verify($password, $user['password']); $isMd5Valid = (md5($password) === $user['password']); if ($isBcryptValid || $isMd5Valid) { // Account status check if (strtolower(trim($user['status'])) !== 'active') { $_SESSION['login_error'] = "Your account is inactive. Please contact an administrator."; header("Location: index.php"); exit; } // Upgrade MD5 to Bcrypt on login if ($isMd5Valid && !$isBcryptValid) { $newHash = password_hash($password, PASSWORD_BCRYPT); $updatePassStmt = $conn->prepare("UPDATE users SET password = ? WHERE id = ?"); $updatePassStmt->bind_param("si", $newHash, $user['id']); $updatePassStmt->execute(); } session_regenerate_id(true); $roleClean = strtolower(trim($user['role'] ?? 'user')); // Store user AND company information in Session $_SESSION['user'] = [ 'id' => $user['id'], 'full_name' => $user['full_name'] ?? '', 'username' => $user['username'], 'role' => $roleClean, 'status' => $user['status'], 'company_name' => $user['company_name'] ?? ($user['company'] ?? 'Dashboard'), 'logo' => $user['company_logo'] ?? 'images/webberax.png', 'fav' => $user['company_fav'] ?? 'images/webberax.ico' ]; // Route based on clean role if (in_array($roleClean, ['sales', 'sales team', 'server_team', 'server team'])) { header("Location: new-server-status.php"); } elseif ($roleClean === 'admin') { header("Location: manage-users.php"); } else { header("Location: new-server-requirement.php"); } exit; } else { $_SESSION['login_error'] = "Invalid Username or Password"; header("Location: index.php"); exit; } } else { $_SESSION['login_error'] = "Invalid Username or Password"; header("Location: index.php"); exit; } } else { header("Location: index.php"); exit; }
Save