diff --git a/add_service.php b/add_service.php
new file mode 100644
index 0000000..5a8a3f7
--- /dev/null
+++ b/add_service.php
@@ -0,0 +1,37 @@
+ 'danger', 'message' => 'All fields are required.'];
+ header('Location: index.php');
+ exit();
+}
+
+if (!filter_var($repo_url, FILTER_VALIDATE_URL)) {
+ $_SESSION['feedback'] = ['type' => 'danger', 'message' => 'Please enter a valid repository URL.'];
+ header('Location: index.php');
+ exit();
+}
+
+try {
+ $pdo = db();
+ $stmt = $pdo->prepare("INSERT INTO services (name, repo_url, owner_team) VALUES (?, ?, ?)");
+ $stmt->execute([$name, $repo_url, $owner_team]);
+ $_SESSION['feedback'] = ['type' => 'success', 'message' => 'Service registered successfully!'];
+} catch (PDOException $e) {
+ error_log($e->getMessage());
+ $_SESSION['feedback'] = ['type' => 'danger', 'message' => 'An error occurred while saving the service.'];
+}
+
+header('Location: index.php');
+exit();
diff --git a/assets/css/custom.css b/assets/css/custom.css
new file mode 100644
index 0000000..c3ef122
--- /dev/null
+++ b/assets/css/custom.css
@@ -0,0 +1,32 @@
+
+body {
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
+ background-color: #F8F9FA;
+ color: #212529;
+}
+
+.header-gradient {
+ background: linear-gradient(90deg, #0A68F4 0%, #17A2B8 100%);
+}
+
+.card {
+ border-radius: 0.5rem;
+ border: none;
+ box-shadow: 0 4px 6px rgba(0,0,0,.05);
+}
+
+.form-control, .btn {
+ border-radius: 0.5rem;
+}
+
+.btn-primary {
+ background-color: #0A68F4;
+ border-color: #0A68F4;
+}
+
+.toast-container {
+ position: fixed;
+ top: 1.5rem;
+ right: 1.5rem;
+ z-index: 1055;
+}
diff --git a/index.php b/index.php
index 7205f3d..4fc5e56 100644
--- a/index.php
+++ b/index.php
@@ -1,150 +1,151 @@
exec("CREATE TABLE IF NOT EXISTS services (
+ id INT AUTO_INCREMENT PRIMARY KEY,
+ name VARCHAR(255) NOT NULL,
+ repo_url VARCHAR(255) NOT NULL,
+ owner_team VARCHAR(255) NOT NULL,
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
+ )");
+} catch (PDOException $e) {
+ // If this fails, the page will show a generic error.
+ error_log("DB connection or table creation failed: " . $e->getMessage());
+}
+
+// Fetch services
+$services = [];
+if (isset($pdo)) {
+ $stmt = $pdo->query("SELECT id, name, repo_url, owner_team, created_at FROM services ORDER BY created_at DESC");
+ $services = $stmt->fetchAll(PDO::FETCH_ASSOC);
+}
+
+// Handle feedback messages
+$feedback = $_SESSION['feedback'] ?? null;
+unset($_SESSION['feedback']);
+
+$project_name = htmlspecialchars($_SERVER['PROJECT_NAME'] ?? 'Aegis Platform');
+$project_description = htmlspecialchars($_SERVER['PROJECT_DESCRIPTION'] ?? 'The Proactive System Integrity Platform');
?>
-
+
-
-
- New Style
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ = $project_name ?>
+
+
+
+
+
+
+
-
-
-
Analyzing your requirements and generating your website…
-
- Loading…
-
-
= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.
-
This page will update automatically as the plan is implemented.
-
Runtime: PHP = htmlspecialchars($phpVersion) ?> — UTC = htmlspecialchars($now) ?>
+
+
+
+
+
+
+
+
+
Register a New Service
+
+
+
+
+
+
+
+
Registered Services
+
+
+
+
No services registered yet.
Use the form to add the first one.
+
+
+
Could not connect to the database. Please check the configuration.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ = htmlspecialchars($feedback['message']) ?>
+
+
+
+
-
-
+
+
+
+
+
+
-
+