Files
cs2440/catalog/index.php
T
jashton 3f844e4e06
Deploy CSIS 2440 / deploy (push) Canceled after 0s
finished final project
2025-05-05 21:53:39 -06:00

30 lines
766 B
PHP
Executable File

<?php
require_once 'functions/init.php';
require_once 'functions/user.php';
if (isset($_POST['username']) && isset($_POST['password'])) {
if (login($_POST['username'], $_POST['password'])) {
header('Location: catalog.php');
} else {
echo '<p>Username and/or password are incorrect!</p>';
}
}
require_once 'components/head.php';
require_once 'components/user/login.php';
if (isset($_SESSION['id'])) {
echo '
<div id="welcome" class="glass" style="width: auto; height: auto;">
<h1>Welcome to ACME!</h1>
<p><strong>Where \'Oops!\' is Part of the Plan.</strong></p>
</div>
';
include_once 'components/bubbles.php';
} else {
echo login_form();
}
require_once 'components/foot.php';