initial code commit
This commit is contained in:
30
views/home.php
Normal file
30
views/home.php
Normal 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(); ?>
|
||||
Reference in New Issue
Block a user