initial code commit

This commit is contained in:
2024-02-09 20:52:11 -06:00
parent f5d267ea98
commit 532df6b9be
18 changed files with 583 additions and 1 deletions

30
views/home.php Normal file
View File

@@ -0,0 +1,30 @@
<?php
use Hpz937\BillReminder\View\PageRenderer;
session_start();
PageRenderer::renderHeader('Bill Reminder Home');
// views/home.php
session_start(); // Ensure session is started to access session variables
// Check if user is logged in
$loggedIn = isset($_SESSION['user_id']);
?>
<h1>Welcome to Bill Reminder</h1>
<p>Manage your bills efficiently and never miss a payment.</p>
<?php if ($loggedIn): ?>
<p>Hello, <?php echo htmlspecialchars($_SESSION['username']); ?>!</p>
<a href="/dashboard" class="btn btn-primary">Go to Dashboard</a>
<a href="/logout" class="btn btn-secondary">Logout</a>
<?php else: ?>
<a href="/login" class="btn btn-primary">Login</a>
<a href="/register" class="btn btn-secondary">Register</a>
<?php endif; ?>
<?php PageRenderer::renderFooter(); ?>