112 lines
3.6 KiB
PHP
112 lines
3.6 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
@ini_set('display_errors', '1');
|
|
@error_reporting(E_ALL);
|
|
@date_default_timezone_set('UTC');
|
|
|
|
$phpVersion = PHP_VERSION;
|
|
$server = $_SERVER['SERVER_SOFTWARE'] ?? 'Apache';
|
|
$root = realpath(__DIR__) ?: __DIR__;
|
|
$now = date('Y-m-d H:i:s');
|
|
?>
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Welcome to the LAMP Stack!</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<style>
|
|
body {
|
|
background-color: #f8f9fa;
|
|
}
|
|
.hero {
|
|
background: linear-gradient(to right, #6a11cb, #2575fc);
|
|
color: white;
|
|
padding: 4rem 2rem;
|
|
text-align: center;
|
|
}
|
|
.info-card {
|
|
background-color: white;
|
|
border-radius: 0.5rem;
|
|
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
|
|
padding: 2rem;
|
|
margin-top: -2rem;
|
|
z-index: 10;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="hero">
|
|
<div class="container">
|
|
<h1 class="display-4">Behold the Power of LAMP!</h1>
|
|
<p class="lead">This page is a testament to the flexibility and power of the classic LAMP stack, styled with a modern touch.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<div class="info-card">
|
|
<h2 class="text-center mb-4">Dynamic Server Information</h2>
|
|
<div class="row">
|
|
<div class="col-md-4 text-center">
|
|
<h5><span class="badge bg-primary">Web Server</span></h5>
|
|
<p class="fs-4"><?= htmlspecialchars($server) ?></p>
|
|
</div>
|
|
<div class="col-md-4 text-center">
|
|
<h5><span class="badge bg-success">PHP Version</span></h5>
|
|
<p class="fs-4"><?= htmlspecialchars($phpVersion) ?></p>
|
|
</div>
|
|
<div class="col-md-4 text-center">
|
|
<h5><span class="badge bg-info">Server Time</span></h5>
|
|
<p class="fs-4"><?= htmlspecialchars($now) ?> (UTC)</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="my-5">
|
|
<h2 class="text-center mb-4">Fun with PHP Loops!</h2>
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h5 class="card-title">Color Palette</h5>
|
|
<p class="card-text">Here is a dynamically generated table of colors, created with a simple PHP loop and styled with Bootstrap.</p>
|
|
<table class="table table-bordered table-striped table-hover">
|
|
<thead class="table-dark">
|
|
<tr>
|
|
<th>Color Name</th>
|
|
<th>Hex Code</th>
|
|
<th>Preview</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$colors = [
|
|
"Crimson" => "#DC143C",
|
|
"Gold" => "#FFD700",
|
|
"LimeGreen" => "#32CD32",
|
|
"DeepSkyBlue" => "#00BFFF",
|
|
"MediumOrchid" => "#BA55D3",
|
|
"Tomato" => "#FF6347",
|
|
];
|
|
|
|
foreach ($colors as $name => $hex) {
|
|
echo "<tr>";
|
|
echo "<td>" . htmlspecialchars($name) . "</td>";
|
|
echo "<td>" . htmlspecialchars($hex) . "</td>";
|
|
echo "<td style=\"background-color:" . htmlspecialchars($hex) . "\"></td>";
|
|
echo "</tr>";
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer class="text-center text-muted py-4">
|
|
<p>Generated by Flatlogic & Gemini</p>
|
|
</footer>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html>
|