Large commit, multiple projects/labs

This commit is contained in:
2026-04-13 16:19:41 -04:00
parent 942da76704
commit e2aa277aaf
1261 changed files with 180663 additions and 0 deletions
@@ -0,0 +1,95 @@
body {
font-family: "Roboto", sans-serif;
font-style: normal;
font-size: 20px;
margin: 0;
padding: 0;
color: #555555;
}
/* Header Styles */
header .logo {
display: flex;
align-items: center;
padding: 0.5rem;
}
header .logo i {
display: block;
color: teal;
font-size: 3rem;
}
header .logo span {
color: #666677;
font-size: 2rem;
font-weight: 300;
}
header .logo span strong {
font-weight: 600;
}
header nav {
background-color: teal;
padding-top: 5px;
}
header nav ul {
margin: 0;
padding: 0;
list-style: none;
display: flex;
justify-content: center;
align-items: center;
}
header nav ul li {
margin: 0;
padding: 0;
display: block;
}
header nav ul li a {
display: block;
padding: 0.75rem;
color: #ffffff;
text-decoration: none;
font-size: 1.1rem;
}
header nav ul li a:hover {
text-decoration: underline;
}
header nav ul li a.active {
color: teal;
background-color: #ffffff;
}
/* Main Styles */
main {
display: block;
padding: 2rem;
}
main h1 {
color: #666677;
padding: 0;
margin: 0;
}
/* Footer Styles */
footer {
display: block;
padding: 1.5rem 1rem;
background-color: teal;
color: rgba(255, 255, 255, 0.75);
text-align: center;
font-size: 1rem;
}
footer strong {
font-weight: 600;
color: rgba(255, 255, 255, 0.85);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

+4
View File
@@ -0,0 +1,4 @@
<?php define("TITLE", "Best Pizza In The World!"); ?>
<?php include("template/header.php"); ?>
<p>This is the content of the home page.</p>
<?php include("template/footer.php"); ?>
+46
View File
@@ -0,0 +1,46 @@
<?php
define("TITLE", "User Login");
include("template/header.php");
print("<h2>Login Form<h2>");
$formStart = "<form class='login' action='login.php' method='post'>";
$emailLabel = "<label for='email'>Email:</label>";
$emailInput = "<input type='email' name='email'>";
$passLabel = "<label for='pass'>Password:</label>";
$passInput = "<input type='password' name='pass'>";
$submit = "<input type='submit' name='submit' value='Log In'>";
$formEnd = "</form";
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$email = htmlspecialchars($_POST['email']);
$password = htmlspecialchars($_POST['pass']);
$stickyForm = $formStart .
$emailLabel . $emailInput .
$passLabel . $passInput .
$submit .
$formEnd;
if (!empty($email) && !empty($password)) {
if ((strtolower($email) == 'test@test.com') && ($password == 'test')) {
session_start();
$_SESSION['email'] = $_POST['email'];
$_SESSION['loggedin'] = time();
ob_end_clean();
header('Location: menu.php');
exit();
} else {
print("<p>Email or password is incorrect. Please try again.</p>" . $stickyForm);
}
} else {
print("<p>Email and password are required. Please try again.</p>" . $stickyForm);
}
} else {
print($stickyForm = $formStart .
$emailLabel . $emailInput .
$passLabel . $passInput .
$submit .
$formEnd);
}
include("template/footer.php");
+10
View File
@@ -0,0 +1,10 @@
<?php
session_start();
session_unset();
session_destroy();
define("TITLE", "Pizza Site Logout");
include("template/header.php");
?>
<p>You have logged out. <a href="index.php">Click here to log in again</a>.</p>
<?php include("template/footer.php"); ?>
+12
View File
@@ -0,0 +1,12 @@
<?php define("TITLE", "The Best Pizza Menu in The World"); ?>
<?php session_start(); ?>
<?php include("template/header.php"); ?>
<?php date_default_timezone_set("America/Toronto"); ?>
<?php
echo "Hello, " . $_SESSION['email'];
echo "<br>";
echo "You logged in at: " . date("l F j, Y, g:i A", $_SESSION['loggedin']);
echo "<br>";
?>
<a href="logout.php">Logout</a>
<?php include("template/footer.php"); ?>
@@ -0,0 +1,16 @@
<?php
define("TITLE", "Today's Specials");
date_default_timezone_set("America/Toronto");
$date = date("l F j Y");
$message = "<h2>These are our specails for $date:</h2>
<p>Extra Large Meat Lovers Pizza - $17.99</p>
<p>Toppings:</p>
<ul>
<li>Pepperoni</li>
<li>Bacon</li>
<li>Ham</li>
<li>Mozzarella Cheese</li>
</ul>";
include("template/header.php");
print($message);
include("template/footer.php");
@@ -0,0 +1,14 @@
<!-- Footer -->
<footer class="siteFooter">
<p>
<strong>&copy; 2025</strong>l_mclean215318's Pizza. All rights reserved.
</p>
<?php
date_default_timezone_set("America/Toronto");
print(date("l F j, Y"));
?>
</footer>
<?php
ob_end_flush();
?>
@@ -0,0 +1,44 @@
<?php
ob_start();
?>
<!-- Header -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<title><?php if (defined("TITLE")) {
print(TITLE);
} else {
print("l_mclean215318's Pizza");
} ?></title>
</head>
<body>
<header class="siteHeader">
<section>
<h1 class="logo">
<a href="index.php">
<img src="images/logo.png" alt="Pizza logo">
l_mclean215318's Pizza
</a>
</h1>
<nav>
<ul>
<li>
<a href="#">Place Order</a>
</li>
<li>
<a href="menu.php">Menu</a>
</li>
<li>
<a href="specials.php">Specials</a>
</li>
<li>
<a href="login.php">Register</a>
</li>
</ul>
</nav>
</section>
</header>
</body>
@@ -0,0 +1,54 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<title>l_mclean215318's Webpage</title>
</head>
<body>
<!-- Header -->
<header class="siteHeader">
<section>
<h1 class="logo">
<a href="index.php">
<img src="images/logo.png" alt="Pizza logo">
l_mclean215318's Pizza
</a>
</h1>
<nav>
<ul>
<li>
<a href="order.php">Place Order</a>
</li>
<li>
<a href="#">Menu</a>
</li>
<li>
<a href="#">Specials</a>
</li>
<li>
<a href="#">Register</a>
</li>
</ul>
</nav>
</section>
</header>
<!-- Main Content -->
<main class="siteContent">
<h1>Welcome</h1>
<p>This is the content of the home page.</p>
</main>
<!-- Footer -->
<footer class="siteFooter">
<p>
<strong>&copy; 2025</strong>l_mclean215318's Pizza. All rights reserved.
</p>
</footer>
</body>
</html>