« Back to History
list.php
|
20260723_000646.php
Initial Domain Snapshot
Copy Code
<?php require_once __DIR__ . '/../includes/bootstrap.php'; require_once __DIR__ . '/../includes/header.php'; require_once __DIR__ . '/../includes/sidebar.php'; $message = ''; $errMessage = ''; // Simulated Current System Version Configuration $current_version = "v2.4.1"; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $version = trim($_POST['version'] ?? ''); $changelog = trim($_POST['changelog'] ?? ''); if (isset($_FILES['update_zip']) && $_FILES['update_zip']['error'] === UPLOAD_ERR_OK) { $fileTmpPath = $_FILES['update_zip']['tmp_name']; $fileName = $_FILES['update_zip']['name']; $fileSize = $_FILES['update_zip']['size']; $fileExtension = strtolower(pathinfo($fileName, PATHINFO_EXTENSION)); if ($fileExtension === 'zip') { $fileSizeMb = round($fileSize / (1024 * 1024), 2); $uploadedBy = $_SESSION['super_admin_name'] ?? 'Super Admin'; try { $pdo->beginTransaction(); // Prepare parameters to store into database index registry $stmt = $pdo->prepare("INSERT INTO updates_log (version, file_name, file_size_mb, changelog, uploaded_by, status) VALUES (?, ?, ?, ?, ?, 'PENDING')"); $stmt->execute([$version, $fileName, $fileSizeMb, $changelog, $uploadedBy]); $pdo->commit(); $message = "Update package archive binary loaded and indexed into runtime parameters successfully."; } catch (Exception $e) { $pdo->rollBack(); $errMessage = "Database pipeline logging runtime exception: " . $e->getMessage(); } } else { $errMessage = "Package deployment restricted. Core framework only accepts valid compressed (.zip) distribution packages."; } } else { $errMessage = "File allocation upload failure context. Ensure target binary does not exceed system file size constraints."; } } // Fetch complete release distribution tracking logs try { $history_stmt = $pdo->query("SELECT * FROM updates_log ORDER BY id DESC"); $logs = $history_stmt->fetchAll(); } catch (PDOException $e) { $logs = []; } ?> <div class="container-fluid p-0"> <div class="d-flex justify-content-between align-items-center mb-4"> <h4 class="m-0 fw-bold text-dark">Core Release & Deployment Manager</h4> </div> <?php if (!empty($message)): ?> <div class="alert alert-success small"><?= htmlspecialchars($message) ?></div> <?php endif; ?> <?php if (!empty($errMessage)): ?> <div class="alert alert-danger small"><?= htmlspecialchars($errMessage) ?></div> <?php endif; ?> <div class="row g-4"> <div class="col-12 col-xl-4"> <div class="card border-0 shadow-sm bg-white p-4 text-center mb-4"> <div class="text-muted small fw-semibold text-uppercase tracking-wider">Production Instance Release</div> <div class="display-3 fw-bold text-primary my-2"><?= htmlspecialchars($current_version) ?></div> <div class="text-secondary small">Framework Architecture Stable State</div> </div> <div class="card border-0 shadow-sm bg-white p-4"> <h6 class="fw-bold text-dark mb-3">Stage Distribution Package</h6> <form action="list.php" method="POST" enctype="multipart/form-data"> <div class="mb-3"> <label class="form-label small fw-semibold">Target Build Version Tag</label> <input type="text" name="version" class="form-control form-control-sm" placeholder="E.G., v2.4.2" required> </div> <div class="mb-3"> <label class="form-label small fw-semibold">Distribution Archive Binary (.zip)</label> <input type="file" name="update_zip" class="form-control form-control-sm" accept=".zip" required> </div> <div class="mb-3"> <label class="form-label small fw-semibold">Release Notes / Changelog Documentation</label> <textarea name="changelog" class="form-control form-control-sm" rows="4" placeholder="Log mutation context profiles..."></textarea> </div> <button type="submit" class="btn btn-sm btn-primary w-100">Upload Build Archive</button> </form> </div> </div> <div class="col-12 col-xl-8"> <div class="card border-0 shadow-sm bg-white h-100"> <div class="card-header bg-white py-3 border-0"> <h6 class="m-0 fw-bold text-dark">Historical Deployment Packages Registry</h6> </div> <div class="table-responsive"> <table class="table table-hover align-middle mb-0 text-nowrap small"> <thead class="table-light"> <tr> <th>Build Ref</th> <th>Package Archive Name</th> <th>Allocation Footprint</th> <th>Staged Operator</th> <th>Pipeline State</th> <th>Staging Date</th> <th class="text-center">Parameters</th> </tr> </thead> <tbody> <?php if (empty($logs)): ?> <tr><td colspan="7" class="text-center py-4 text-muted">No historical infrastructure release indices cataloged inside database registry.</td></tr> <?php else: ?> <?php foreach ($logs as $row): $statusBadge = '<span class="badge bg-warning text-dark">PENDING RUN</span>'; if ($row['status'] === 'APPLIED') { $statusBadge = '<span class="badge bg-success">APPLIED</span>'; } elseif ($row['status'] === 'FAILED') { $statusBadge = '<span class="badge bg-danger">FAILED</span>'; } ?> <tr> <td class="fw-bold text-dark"><?= htmlspecialchars($row['version']) ?></td> <td><code><?= htmlspecialchars($row['file_name']) ?></code></td> <td><?= htmlspecialchars($row['file_size_mb']) ?> MB</td> <td><?= htmlspecialchars($row['uploaded_by']) ?></td> <td><?= $statusBadge ?></td> <td><?= $row['created_at'] ?></td> <td class="text-center"> <button type="button" class="btn btn-sm btn-outline-secondary px-3" data-bs-toggle="modal" data-bs-target="#notesModal<?= $row['id'] ?>"> View Notes </button> <div class="modal fade text-start" id="notesModal<?= $row['id'] ?>" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content border-0 shadow"> <div class="modal-header bg-light"> <h6 class="modal-title fw-bold">Build Version Mapping Profile Parameters: <?= htmlspecialchars($row['version']) ?></h6> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body p-4"> <div class="mb-2"><strong>Target Archive Identifier:</strong> <code><?= htmlspecialchars($row['file_name']) ?></code></div> <div class="mb-3"><strong>Staging Date Metrics:</strong> <span class="text-muted small"><?= $row['created_at'] ?></span></div> <hr class="text-muted my-2"> <div class="mb-1 fw-bold text-dark">Changelog Structure Artifact Context Leaf:</div> <p class="text-secondary small bg-light p-3 rounded font-monospace"><?= nl2br(htmlspecialchars($row['changelog'])) ?: 'No structural patch documentation associated with this entity code block entry.' ?></p> </div> </div> </div> </div> </td> </tr> <?php endforeach; ?> <?php endif; ?> </tbody> </table> </div> </div> </div> </div> </div> <?php require_once __DIR__ . '/../includes/footer.php'; ?>