diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..2e449b1 --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,70 @@ + +body { + background-color: #f2f2f7; + color: #1c1c1e; + font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; +} + +.container-fluid { + padding-top: 2rem; +} + +.card { + border: none; + border-radius: 12px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +.card-header { + background: linear-gradient(45deg, #5856d6, #7a78e0); + color: white; + font-weight: 500; + border-top-left-radius: 12px; + border-top-right-radius: 12px; +} + +.list-group-item { + border: none; + padding: 1rem; +} + +.form-control, .form-select { + border-radius: 12px; + padding: 0.75rem 1rem; +} + +.btn-primary { + background-color: #5856d6; + border-color: #5856d6; + border-radius: 12px; + padding: 0.75rem 1.5rem; + font-weight: 500; + transition: background-color 0.2s; +} + +.btn-primary:hover { + background-color: #4946c8; + border-color: #4946c8; +} + +.btn-secondary { + background-color: #ff9500; + border-color: #ff9500; + border-radius: 12px; + padding: 0.75rem 1.5rem; + font-weight: 500; + color: white; + transition: background-color 0.2s; +} + +.btn-secondary:hover { + background-color: #e08300; + border-color: #e08300; +} + +.toast-container { + position: fixed; + top: 1rem; + right: 1rem; + z-index: 1055; +} diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..1129d26 --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1,39 @@ + +document.addEventListener('DOMContentLoaded', function () { + const sendButton = document.getElementById('sendMessage'); + const toastContainer = document.querySelector('.toast-container'); + + if (sendButton) { + sendButton.addEventListener('click', function (e) { + e.preventDefault(); + + const toastHTML = ` + + `; + + toastContainer.innerHTML = toastHTML; + + const toast = new bootstrap.Toast(toastContainer.querySelector('.toast')); + toast.show(); + }); + } + + const selectAllCheckbox = document.getElementById('selectAll'); + if (selectAllCheckbox) { + selectAllCheckbox.addEventListener('change', function() { + const memberCheckboxes = document.querySelectorAll('.member-checkbox'); + memberCheckboxes.forEach(checkbox => { + checkbox.checked = this.checked; + }); + }); + } +}); diff --git a/db/setup.php b/db/setup.php new file mode 100644 index 0000000..2667ab7 --- /dev/null +++ b/db/setup.php @@ -0,0 +1,40 @@ +exec("CREATE TABLE IF NOT EXISTS members ( + id INT AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(255) NOT NULL, + email VARCHAR(255) NOT NULL UNIQUE, + joined_at DATETIME NOT NULL, + status VARCHAR(50) NOT NULL DEFAULT 'active' + );"); + + // Check if table is empty before inserting + $stmt = $pdo->query("SELECT COUNT(*) FROM members"); + if ($stmt->fetchColumn() == 0) { + $stmt = $pdo->prepare("INSERT INTO members (name, email, joined_at, status) VALUES (?, ?, ?, ?)"); + + $members = [ + ['Alice Johnson', 'alice@example.com', '2023-01-15 10:30:00', 'active'], + ['Bob Williams', 'bob@example.com', '2023-02-20 14:00:00', 'active'], + ['Charlie Brown', 'charlie@example.com', '2023-03-05 09:00:00', 'active'], + ['Diana Miller', 'diana@example.com', '2023-04-10 18:45:00', 'unsubscribed'], + ['Ethan Davis', 'ethan@example.com', '2023-05-22 11:20:00', 'active'], + ]; + + foreach ($members as $member) { + $stmt->execute($member); + } + + echo "Database setup complete. `members` table created and populated.\n"; + } else { + echo "`members` table already exists and contains data. Skipping population.\n"; + } + +} catch (PDOException $e) { + die("Database setup failed: " . $e->getMessage() . "\n"); +} + diff --git a/index.php b/index.php index 7205f3d..1ee1bfa 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,113 @@ query("SELECT id, name, email, status FROM members ORDER BY name"); + $members = $stmt->fetchAll(); +} catch (PDOException $e) { + // For a real app, you'd want to log this error and show a user-friendly message. + $members = []; + $error_message = "Database error: Could not fetch members."; +} + +$projectName = $_SERVER['PROJECT_NAME'] ?? 'Whop Creator Cashback Messenger'; -$phpVersion = PHP_VERSION; -$now = date('Y-m-d H:i:s'); ?> - + - - - New Style - - - - - - - - - - - - - - - - - - - + + + <?php echo htmlspecialchars($projectName); ?> + + + + -
-
-

Analyzing your requirements and generating your website…

-
- Loading… -
-

AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

+ +
+
-
- + +
+
+

+

Engage your members and boost your reviews.

+
+ + + + + +
+ +
+
+
+ Your Members () +
+
    +
  • +
    + + +
    +
  • +
    + +
  • +
    + + +
    + +
  • + +
    +
+
+
+ + +
+
+
+ Compose Message +
+
+
+
+ + +
+
+ + +
You can use {{name}} as a placeholder.
+
+
+ +
+
+
+
+
+
+
+ + + + + + - + \ No newline at end of file