This commit is contained in:
2025-05-01 14:37:08 -06:00
parent b6008d462e
commit 5cd4571a92
91 changed files with 1009 additions and 36 deletions
+18 -7
View File
@@ -1,9 +1,20 @@
<?php
echo '<!doctype html>';
echo '<html lang="en">';
include('head.php');
include_once 'functions/init.php';
require_once 'functions/user.php';
echo '<body>';
include('nav.php');
echo '</body>';
echo '</html>';
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>';
}
include_once 'components/head.php';
include_once 'components/user/login.php';
if (isset($_SESSION['id'])) {
echo '<h1>Welcome to the store</h1>';
} else
echo login_form();
include_once 'components/foot.php';