Compare commits

..

No commits in common. "ai-dev" and "master" have entirely different histories.

129
index.php
View File

@ -14,99 +14,56 @@ $now = date('Y-m-d H:i:s');
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Welcome to the LAMP Stack!</title> <title>LAMP Workspace</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<style> <style>
body { :root { color-scheme: light dark; }
background-color: #f8f9fa; body { margin: 0; font: 16px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; }
} header { background:#111; color:#fff; padding:16px 24px; }
.hero { main { max-width: 880px; margin: 32px auto; padding: 0 16px; }
background: linear-gradient(to right, #6a11cb, #2575fc); h1 { margin: 0 0 8px; font-size: 22px; }
color: white; h2 { margin-top: 28px; font-size: 18px; }
padding: 4rem 2rem; p { margin: 8px 0; }
text-align: center; code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
} pre { background: #0b1020; color: #cfe7ff; padding: 12px; border-radius: 8px; overflow:auto; }
.info-card { .grid { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
background-color: white; .card { border:1px solid #ddd; border-radius:8px; padding:12px; }
border-radius: 0.5rem; .muted { color:#666; }
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); .kv { display:flex; justify-content:space-between; padding:6px 0; border-bottom:1px dashed #e3e3e3; }
padding: 2rem; .kv:last-child { border-bottom:0; }
margin-top: -2rem; footer { color:#777; margin: 28px 0 40px; text-align:center; font-size: 13px; }
z-index: 10;
}
</style> </style>
</head> </head>
<body> <body>
<div class="hero"> <header>
<div class="container"> <h1>LAMP stack is ready</h1>
<h1 class="display-4">Behold the Power of LAMP!</h1> </header>
<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"> <main>
<div class="info-card"> <section class="grid">
<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">
<div class="card-body"> <h2>Stack</h2>
<h5 class="card-title">Color Palette</h5> <div class="kv"><span>Web server</span><code><?= htmlspecialchars($server) ?></code></div>
<p class="card-text">Here is a dynamically generated table of colors, created with a simple PHP loop and styled with Bootstrap.</p> <div class="kv"><span>PHP</span><code><?= htmlspecialchars($phpVersion) ?></code></div>
<table class="table table-bordered table-striped table-hover"> </div>
<thead class="table-dark"> <div class="card">
<tr> <h2>Tips</h2>
<th>Color Name</th> <p> Put your app files into this folder.</p>
<th>Hex Code</th> <p> <code>.htaccess</code> is enabled; <code>index.php</code> has priority.</p>
<th>Preview</th> <p> Errors are shown for development (disable in production).</p>
</tr> </div>
</thead> </section>
<tbody>
<?php
$colors = [
"Crimson" => "#DC143C",
"Gold" => "#FFD700",
"LimeGreen" => "#32CD32",
"DeepSkyBlue" => "#00BFFF",
"MediumOrchid" => "#BA55D3",
"Tomato" => "#FF6347",
];
foreach ($colors as $name => $hex) { <section>
echo "<tr>"; <h2>Try ideas</h2>
echo "<td>" . htmlspecialchars($name) . "</td>"; <p class="muted">You can ask the assistant to generate or modify code. Example requests:</p>
echo "<td>" . htmlspecialchars($hex) . "</td>"; <pre><code>"Create a simple landing page with a hero section and a contact form."
echo "<td style=\"background-color:" . htmlspecialchars($hex) . "\"></td>"; "Build an engineering calculator (e.g., beam deflection or resistor color code)."
echo "</tr>"; "Refactor the current PHP file for better readability and error handling."
} "Scan the project and list potential security issues in configuration."
?> "Add basic routing and a simple controller to serve multiple pages."</code></pre>
</tbody> </section>
</table>
</div>
</div>
</div>
</div>
<footer class="text-center text-muted py-4"> <footer>Updated at <?= htmlspecialchars($now) ?> (UTC)</footer>
<p>Generated by Flatlogic & Gemini</p> </main>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body> </body>
</html> </html>