Compare commits

...

19 Commits

Author SHA1 Message Date
LeviM0323 59e0329d1e CMS SQL file 2026-04-15 16:12:49 -04:00
LeviM0323 a747e2a1d9 CMS Project Sync 2026-04-15 15:59:53 -04:00
LeviM0323 015ea75186 CMS Project 2026-04-15 15:39:30 -04:00
LeviM0323 ee2a792c56 Merge branch 'main' of https://git.levimclean.me/Levi/IWD2-02 2026-04-13 16:20:07 -04:00
LeviM0323 e2aa277aaf Large commit, multiple projects/labs 2026-04-13 16:19:41 -04:00
LeviM0323 9daa37287f Merge branch 'main' of https://git.levimclean.me/Levi/IWD2-02 2026-04-13 16:16:39 -04:00
LeviM0323 a253f3ffb2 db lab 6 2026-04-13 16:16:06 -04:00
LeviM0323 942da76704 JS Lab 2 2026-03-25 16:10:17 -04:00
LeviM0323 f3667266a9 Merge branch 'main' of https://git.levimclean.me/Levi/IWD2-02 2026-03-15 21:03:34 -04:00
LeviM0323 fd7b36e76a CMS Lab 7 2026-03-15 21:03:20 -04:00
LeviM0323 8c78e75b97 PHP lab 8 2026-03-12 23:46:12 -04:00
LeviM0323 8b132e776f Merge branch 'main' of https://git.levimclean.me/Levi/IWD2-02 2026-03-10 10:54:38 -04:00
LeviM0323 b732795717 JS Lab 4 2026-03-10 10:54:20 -04:00
LeviM0323 41ebd4ac62 JS Lab 3 2026-03-06 21:27:16 -05:00
LeviM0323 1fdfbb1b4f PHP Lab 6 2026-02-26 19:52:28 -05:00
LeviM0323 a7b70a2a55 JS Lab 3 progress 2026-02-24 18:02:01 -05:00
LeviM0323 f186c94048 JS lab 3 2026-02-24 17:13:31 -05:00
LeviM0323 ae48ceff91 Merge branch 'main' of https://git.levimclean.me/Levi/IWD2-02 2026-02-14 22:49:19 -05:00
LeviM0323 05116ea9b9 PHP lab 5 2026-02-14 22:49:11 -05:00
13484 changed files with 2927010 additions and 4 deletions
+3 -1
View File
@@ -1 +1,3 @@
INFO-3174 (Web Security)/kali-linux-2025.4-vmware-amd64.vmwarevm
INFO-3174 (Web Security)/kali-linux-2025.4-vmware-amd64.vmwarevm
*.mp4
*.mkv
Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

+32
View File
@@ -0,0 +1,32 @@
<?php
// Create first variables, sanitized
$firstName = filter_var($_POST['fname'], FILTER_SANITIZE_STRING);
$lastName = filter_var($_POST['lname'], FILTER_SANITIZE_STRING);
$favMovie = filter_var($_POST['favMovie'], FILTER_SANITIZE_STRING);
$favMovieSnack = filter_var($_POST['favMovieSnack'], FILTER_SANITIZE_STRING);
$seatPref = filter_var($_POST['seatPref'], FILTER_SANITIZE_STRING);
$genFeedback = filter_var($_POST['genFeedback'], FILTER_SANITIZE_STRING);
// Create full name variable and urlencode it
$fullName = $firstName . " " . $lastName;
$nameEncoded = urlencode($fullName);
// Filter for newlines
$genFeedback = nl2br($genFeedback);
// Replace the mean words
$genFeedback = str_ireplace("bad","good",$genFeedback);
$genFeedback = str_ireplace("horrible","amazing",$genFeedback);
// Create a message variable (I just like this way more)
$message = "<p>Thank you for your feedback! Below are your survey results:</p>
<p>Full Name: $fullName</p>
<p>Favourite Movie: $favMovie</p>
<p>Favourite Movie Snack: $favMovieSnack</p>
<p>Theatre Seat Row Preference: $seatPref</p>
<p>General Feedback: $genFeedback</p>
<p>Click <a href=\"lab5.php?fullName=$nameEncoded\">Here</a> to return to the survey.</p>";
// Print the message
print($message);
?>
+31
View File
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Lab 5 Page 1</title>
<meta charset="utf-8">
</head>
<body>
<h1>Movie Theatre Survey</h1>
<form action="lab5-1.php" method="post">
<label for="fname">First Name:</label>
<input type="text" name="fname"><br>
<label for="lname">Last Name:</label>
<input type="text" name="lname"><br>
<label for="favMovie">Favourite Movie:</label>
<input type="text" name="favMovie"><br>
<label for="favMovieSnack">Favourite Movie Snack:</label>
<input type="text" name="favMovieSnack"><br>
<label for="seatPref">Theatre Seat Row Preference:</label>
<select name="seatPref">
<option value="Back">Back</option>
<option value="Middle">Middle</option>
<option value="Front">Front</option>
</select><br>
<label for="genFeedback">General Feedback:</label>
<textarea name="genFeedback"></textarea><br>
<button type="submit">Submit</button>
</form>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

+90
View File
@@ -0,0 +1,90 @@
<?php
// Get and print age, print error if empty
if (!isset($_POST["ageInput"]) || $_POST["ageInput"] === "") {
print("Please enter a valid age above or equal to 0<br>");
} else {
$userAge = $_POST["ageInput"];
$birthYear = date("Y") - $userAge;
if ($userAge < 0) {
print("Please enter a valid age above or equal to 0");
} else {
print("Your age is " . $userAge . "<br>");
// Two ways to determine even-ness
$isEven = ($userAge % 2 === 0) ? "Your age is even<br>" : "Your age is odd<br>";
print($isEven);
// OR
// if ($userAge % 2 === 0) {
// print("Your name is even<br>");
// } else {
// print("Your name is odd<br>");
// }
// Print age "category"
if ($userAge <= 12) {
print("You are a child<br>");
} else if ($userAge > 12 && $userAge <= 17) {
print("You are a teenager<br>");
} else if ($userAge > 17 && $userAge <= 54) {
print("You are an adult<br>");
} else {
print("You are a senior<br>");
}
// Print significant events with switch statement
switch ($birthYear) {
case 1969:
print("You were born the same year as the moon landing<br>");
break;
case 1983:
print("You were born the same year as the creation of the internet<br>");
break;
case 1986:
print("You were born the same year as the Challenger explosion<br>");
break;
case 2000:
print("You were born the same year as Y2K<br>");
break;
case 2020:
print("You were born the same year as the COVID-19 pandemic<br>");
break;
default:
print("You were not born in any significant year<br>");
break;
}
// Print age number of hearts
for ($i = 0; $i < $userAge; $i++) {
print("&hearts;");
}
print("<br>");
// Print 100 - age number of stars
for ($i = 0; $i < (100 - $userAge); $i++) {
print("&star;");
}
print("<br>");
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHP Lab 6</title>
<meta charset="utf-8">
</head>
<body>
<h1>Age Result Generator</h1>
<form method="post">
<label for="ageInput">Please enter your age:</label>
<input name="ageInput" type="number"><br>
<button type="submit">Submit</button>
</form>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

+103
View File
@@ -0,0 +1,103 @@
<!DOCTYPE html>
<html>
<head>
<title>PHP Lab 7</title>
<meta charset="utf-8">
</head>
<body>
<h1>Months of the Year</h1>
<?php
$months = [
1 => "January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
];
print_r($months);
echo "<br><br>";
$months[13] = "Winter";
$months[14] = "Construction";
foreach ($months as $type => $value) {
echo "The month of $value is month number $type<br>";
}
?>
<h1>Pizza Toppings</h1>
<?php
$vegetables = [
"Green Peppers",
"Mushrooms",
"Olives",
"Chives"
];
$meats = [
"Pepperoni",
"Ham",
"Bacon"
];
$cheeses = [
"Mozzarella",
"Cheddar",
"Provologne"
];
$toppings = [
"Vegetables" => $vegetables,
"Meats" => $meats,
"Cheeses" => $cheeses
];
foreach ($toppings as $type => $value) {
echo "$type: ";
if (is_array($value)) {
foreach ($value as $number => $topping) {
echo "$topping, ";
}
} else {
echo "$type is $value<br>";
}
echo "<br>";
};
echo "<br>";
$prices = [
"Small" => 6.99,
"Medium" => 8.99,
"Large" => 13.99,
"X-Large" => 18.99,
"Supersize" => 22.99
];
asort($prices);
foreach ($prices as $type => $value) {
echo "$type: $value<br>";
};
echo "<br>";
ksort($prices);
foreach ($prices as $type => $value) {
echo "$type: $value<br>";
};
?>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

@@ -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"); ?>
+43
View File
@@ -0,0 +1,43 @@
<?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')) {
ob_end_clean();
header('Location: specials.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");
@@ -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</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>
Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

@@ -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>
+43
View File
@@ -0,0 +1,43 @@
<?php
if (isset($_POST['font_size']) && isset($_POST['font_color'])) {
setcookie('fontsize', $_POST['font_size']);
setcookie('fontcolor', $_POST['font_color']);
$message = "Your settings have beens set!";
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Customize Your Settings</title>
</head>
<body>
<?php
if (isset($message)) {
echo $message;
}
?>
<p>Use this form to customize your settings:</p>
<form action="customize.php" method="post">
<select name="font_size">
<option selected value="">Font Size</option>
<option value="xl">Extra Large</option>
<option value="l">Large</option>
<option value="m">Medium</option>
<option value="s">Small</option>
<option value="xs">Extra Small</option>
</select>
<select name="font_color">
<option selected value="">Font Color</option>
<option value="black">Black</option>
<option value="red">Red</option>
<option value="blue">Blue</option>
</select>
<input type="submit" name="submit" value="Set my preferences">
</form>
</body>
</html>
+59
View File
@@ -0,0 +1,59 @@
<!-- Below is a header -->
<h1>This is a header!</h1>
<!-- Below is a header.
It is a very important header. -->
<h1> This is still a header! </h1>
<form action="submit.php" method="post">
<!-- Text input -->
<label>Text</label>
<input type="text" name="desc">
<br><br>
<!-- Textarea -->
<label>Textarea</label>
<textarea name="desc-2"></textarea>
<br><br>
<!-- Select -->
<label>Select</label>
<select name="food">
<option value="burger">Burger</option>
<option value="pizza">Pizza</option>
<option value="pie">Pie</option>
</select>
<br><br>
<!-- Checkbox -->
<label>Checkbox</label>
<input type="checkbox" value="purple">
<br><br>
<!-- Radio button -->
<label>Radio</label>
<input type="radio" value="yes">
<br><br>
<!-- Button -->
<button type="button" onclick="alert('Hello')">Alert</button>
<br><br>
<!-- Example -->
<label>Grade</label>
<input type="text" name="grade">
<br><br>
<button type="submit">Submit</button>
</form>
<?php
# PHP comment with hashtag.
// PHP comment with two slashes.
/*
Multi-line
PHP comment
*/
+21
View File
@@ -0,0 +1,21 @@
<?php
// empty().
// isset().
// is_numeric().
if (
!empty($_POST['grade']) &&
isset($_POST['grade']) &&
is_numeric($_POST['grade'])
) {
$grade = $_POST['grade'];
print_r($grade);
}
else {
echo 'Grade not provided and/or was not numeric!';
}
// Strip Tags.
$text = 'Hello <b><em>world!</em></b>';
echo $text;
echo strip_tags($text);
+64
View File
@@ -0,0 +1,64 @@
<?php
// All of the following will give the same result.
echo 123 + 1;
echo '<br>';
echo "123" + 1;
echo '<br>';
echo "123" + "1";
echo '<br><br>';
// Arithmetic operators.
echo '<strong>Arithmetic operators</strong><br>';
echo 'Addition (+) ' . 1 + 2 . '<br>';
echo 'Subtraction (-) ' . 2 - 1 . '<br>';
echo 'Multiplication (*) ' . 2 * 2 . '<br>';
echo 'Division (/) ' . 4 / 2 . '<br>';
echo 'Modulus (%) ' . 4 % 2 . '<br>';
$a = 1;
$a++;
echo 'Increment (++) ' . $a . '<br>';
$a--;
echo 'Decrement (--) ' . $a . '<br>';
echo '<br>';
// Assignment operators.
echo '<strong>Assignment operators</strong><br>';
$a = 2;
echo $a . '<br>';
$a += 2;
echo $a . '<br>';
$a -= 2;
echo $a . '<br>';
$a *= 2;
echo $a . '<br>';
$a /= 2;
echo $a . '<br>';
echo '<br>';
// Comparison operators.
echo '<strong>Comparison operators</strong><br>';
$a = 1;
$b = 2;
$c = '2';
echo ($a < $b) . '<br>';
echo ($a > $b) . '<br>';
echo ($a == $b) . '<br>';
echo ($a != $b) . '<br>';
echo ($b == $c) . '<br>';
echo ($b === $c) . '<br>';
echo '<br>';
// Formatting numbers.
echo '<strong>Formatting numbers</strong><br>';
echo 'Round (2.49): ' . round(2.49) . '<br>';
echo 'Number Format (21233122):' . number_format(21233122) . '<br>';
echo 'Printf: ';
$sub = 5;
$tax = 0.65;
printf('The subtotal is %u, making the tax
%.2f.', $sub, $tax);
echo '<br>';
echo 'Mt Rand: ' . mt_rand(0, 100);
+133
View File
@@ -0,0 +1,133 @@
<?php
/* String Concatenation. */
// Using the dot (.) operator
$string1 = 'Hello';
$string2 = 'World';
$concatenation = $string1 . $string2;
echo $concatenation;
echo '<br><br>';
// Using the concatenation assignment operator (.=)
$string1 = 'Hello';
$string2 = 'World';
$string1 .= ' ' . $string2;
echo $string1;
echo '<br><br>';
// Using double quotes (") to directly concatenate variables within a string
$string1 = 'Hello';
$string2 = 'World';
$concatenation = "$string1 $string2";
echo $concatenation;
echo '<br><br>';
/* Newlines */
// Using the "\n" escape sequence
echo "Line 1\nLine 2\nLine 3";
echo '<br><br>';
// Using double quotes (")
echo "Line 1
Line 2
Line 3";
echo '<br><br>';
// Using PHP_EOL constant, which represents the correct end-of-line character
echo "Line 1" . PHP_EOL . "Line 2" . PHP_EOL . "Line 3";
echo '<br><br>';
// Using the nl2br() function to insert HTML line breaks (\n) before all newlines in a string
$text = "Line 1\nLine 2\nLine 3";
echo nl2br($text);
echo '<br><br>';
/* Handling HTML String Input */
// htmlspecialchars()
$string = "<a href='test'>Test & 'Example'</a>";
$safe_string = htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
echo $safe_string;
echo '<br><br>';
// htmlentities()
$string = "<a href='test'>Test & 'Example'</a>";
$safe_string = htmlentities($string, ENT_QUOTES, 'UTF-8');
echo $safe_string;
echo '<br><br>';
/* Encoding and Decoding */
// Encode
$url = urlencode("https://fanshawec.ca?programs=iwd&cpa");
echo $url;
echo '<br><br>';
// Decode
$url = urldecode("https%3A%2F%2Ffanshawec.ca%3Fprograms%3Diwd%26cpa");
echo $url;
echo '<br><br>';
/* Adjusting strings */
// substr()
$string = "You are a wizard, Harry.";
$substr = substr($string, 9, 6);
echo $substr;
echo '<br><br>';
// strtok()
$string = "Luke, I am your father.";
$substr = strtok($string, ",");
echo $substr;
echo '<br><br>';
// strlen()
$string = "May the odds be ever in your favour.";
$length = strlen($string);
echo $length;
echo '<br><br>';
// Uppercase / Lowercase
$string = "hello world";
echo ucfirst($string);
echo '<br><br>';
echo ucwords($string);
echo '<br><br>';
echo strtoupper($string);
echo '<br><br>';
echo strtolower('HELLO WORLD');
echo '<br><br>';
/* Replacing Strings */
// str_replace()
$search = 'world';
$replace = 'everyone';
$subject = 'Hello world!';
echo str_replace($search, $replace, $subject);
echo '<br><br>';
// str_ireplace()
$search = 'WORLD';
$replace = 'everyone';
$subject = 'Hello world!';
echo str_ireplace($search, $replace, $subject);
echo '<br><br>';
// trim()
$string = " hello world ";
echo trim($string);
echo '<br><br>';
// rtrim()
$string = "hello world!!!";
echo rtrim($string, '!');
echo '<br><br>';
$string = " hello world";
echo ltrim($string);
echo '<br><br>';
+201
View File
@@ -0,0 +1,201 @@
<?php
// -----------------------------
// IF statement
// -----------------------------
if ($condition) {
// code.
}
// E.g.
if ($year === 2024) {
$isOlympicYear = TRUE;
}
// Bonus: IF statements with a lot of conditions
if (
$condition_1 &&
(
$condition_2 ||
$condition_3
) &&
$condition_4
) {
// code.
}
// -----------------------------
// IF/ELSE statement
// -----------------------------
if ($condition) {
// code.
}
else {
// other code.
}
// E.g.
if ($year === 2024) {
$isOlympicYear = TRUE;
}
else {
$isOlympicYear = FALSE;
}
// Alternatively, you could write the above like this.
$isOlympicYear = FALSE;
if ($year === 2024) {
$isOlympicYear = TRUE;
}
// -----------------------------
// ELSEIF statements.
// -----------------------------
if ($condition_1) {
// code.
}
elseif ($condition_2) {
// other code.
}
else {
// other other code.
}
// E.g.
if ($year === 2024) {
$isOlympicYear = TRUE;
}
elseif ($year === 2025) {
$isOlympicYear = FALSE;
}
// -----------------------------
// Nesting statements
// -----------------------------
// E.g.
if ($year === 2024) {
$isOlympicYear = TRUE;
if ($city === 'Paris') {
echo "Bonjour!";
}
else {
echo "Hello!";
}
}
// -----------------------------
// Early Return statements
// -----------------------------
function checkAge($age) {
// Early return if age is less than 18
if ($age < 18) {
return "Too young";
}
// Continue with the function if age is 18+
return "Welcome!";
}
echo checkAge(16); // Outputs: Too young
echo checkAge(20); // Outputs: Welcome!
// -----------------------------
// Ternary Expressions
// - Only good for replacing non-complex IF/ELSE statements
// -----------------------------
$age = 20;
$can_vote = ($age >= 18) ? 'Yes' : 'No'
// Alternatively, you could write the above like this, but the above saves lines of code.
if ($age >= 18) {
$can_vote = 'Yes';
}
else {
$can_vote = 'No';
}
// -----------------------------
// Switch statements
// -----------------------------
// E.g.
switch ($isOlympicYear) {
case 2023:
break; // Without a break, the code will continue executing to the next case.
case 2024:
break;
case 2025:
break;
default: // Default is the equivalent to an ELSE
break;
}
// Using a switch like above instead of the following
if ($year === 2023) {
//
}
elseif ($year === 2024) {
//
}
elseif ($year === 2025) {
//
}
// -----------------------------
// For loops
// -----------------------------
// E.g.
for ($i = 1; $i < 5; $i++) {
echo "This is the $i -th iteration.";
}
// -----------------------------
// While loops
// -----------------------------
// E.g.
$i = 1;
while ($i < 5) {
echo "This is the $i -th iteration.";
$i++;
}
// -----------------------------
// Passing Arguments by Reference
// -----------------------------
function add_five(&$value) {
$value += 5;
}
$num = 2;
add_five($num);
echo $num; // Outputs: 7
// -----------------------------
// Using the ... operator
// - Allows for any number of arguments
// -----------------------------
function sum(...$numbers) {
$sum = 0;
for ($i = 0; $i < count($numbers); $i++) {
$sum += $numbers[$i];
}
return $sum;
}
echo sum(1, 2, 3, 4); // Output: 10
+194
View File
@@ -0,0 +1,194 @@
<?php
/* Arrays */
$months = array(
'January', // Index = 0
'February', // Index = 1
'March', // Index = 2
);
echo '<pre>';
print_r($months);
echo '</pre>';
// Getting value from index
echo '<pre>';
print_r($months[1]);
echo '</pre>';
// Short hand
$months = [
'January', // Index = 0
'February', // Index = 1
'March', // Index = 2
];
/* Associative Arrays */
$months = [
'month1' => 'January',
'month2' => 'February',
'month3' => 'March'
];
echo '<pre>';
print_r($months);
echo '</pre>';
echo '<pre>';
print_r($months['month1']);
echo '</pre>';
/* Working with Arrays */
// range()
$numbers = range(1, 10); // Same as $numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
echo '<pre>';
print_r($numbers);
echo '</pre>';
$numbers = range(1, 10, 2); // Same as $numbers = [1, 3, 5, 7, 9];
echo '<pre>';
print_r($numbers);
echo '</pre>';
// Adding to arrays
$months = [
'January', // Index = 0
'February', // Index = 1
'March', // Index = 2
];
// Add to index 3
$months[3] = 'April';
// Change index 2
$months[2] = 'May';
// Add to end of array
$months[] = 'June';
echo '<pre>';
print_r($months);
echo '</pre>';
/* Merging Arrays */
$sem1grades = [
'math' => 90,
'chemistry' => 67,
'biology' => 88,
'history' => 45,
'gym' => 60,
];
$sem2grades = [
'philosophy' => 87,
'art' => 99,
'physics' => 71,
'gym' => 60,
];
// array_merge()
$allGrades = array_merge($sem1grades, $sem2grades);
echo '<pre>';
print_r($allGrades);
echo '</pre>';
// Array Union
$allGrades = $sem1grades + $sem2grades;
echo '<pre>';
print_r($allGrades);
echo '</pre>';
/* Multidimensional arrays */
$meats = [
'Pepperoni',
'Bacon',
'Ham',
];
$cheeses = [
'Mozzarella',
'Cheddar',
'Swiss',
];
$veggies = [
'Onions',
'Peppers',
'Mushrooms',
];
$toppings = [
'Meats' => $meats,
'Cheeses' => $cheeses,
'Veggies' => $veggies,
'Size' => 'Medium',
];
echo $toppings['Veggies'][1];
echo '<br><br>';
/* Printing Arrays */
// foreach()
foreach ($toppings as $type => $value) {
echo "{$type}:</br>";
if (is_array($value)) {
foreach ($value as $number => $topping) {
echo "Topping #{$number} is $topping</br>";
}
}
else {
echo "{$type} is $value</br>";
}
echo "</br>";
}
$words = [
'The',
'cow',
'jumped',
'over',
'the',
'moon',
];
// implode()
$sentence = implode(' ', $words);
echo $sentence;
echo '<br><br>';
// explode()
$words2 = explode(' ', $sentence);
echo $words2;
echo '<br><br>';
/* Sorting Arrays */
$array1 = [
3,
1,
4,
1,
5,
9,
];
// sort()
sort($array1);
echo '<pre>';
print_r($array1);
echo '</pre>';
// rsort()
rsort($array1);
echo '<pre>';
print_r($array1);
echo '</pre>';
$assocArray = [
'a' => 3,
'b' => 1,
'c' => 4,
];
// asort()
asort($assocArray);
echo '<pre>';
print_r($assocArray);
echo '</pre>';
$assocArray = [
'a' => 3,
'b' => 1,
'c' => 4,
];
// ksort()
ksort($assocArray);
echo '<pre>';
print_r($assocArray);
echo '</pre>';
@@ -0,0 +1,25 @@
USE mynorthwind;
CREATE TABLE IF NOT EXISTS invoices (
invoiceId INT AUTO_INCREMENT PRIMARY KEY,
customer VARCHAR(5) NOT NULL,
amount INT NOT NULL,
date DATE NOT NULL,
FOREIGN KEY (customer) REFERENCES customers(CustomerID)
);
INSERT INTO invoices (customer, amount, date) VALUES ('ANATR', 250, '2026-01-06');
INSERT INTO invoices (customer, amount, date) VALUES ('ANTON', 375, '2026-01-02');
INSERT INTO invoices (customer, amount, date) VALUES ('ALFKI', 125, '2026-01-25');
CREATE TABLE IF NOT EXISTS returns (
returnId INT AUTO_INCREMENT PRIMARY KEY,
customer VARCHAR(5) NOT NULL,
amount INT NOT NULL,
date DATE NOT NULL,
FOREIGN KEY (customer) REFERENCES customers(CustomerID)
);
INSERT INTO returns (customer, amount, date) VALUES ('ANATR', 111, '2026-02-12');
INSERT INTO returns (customer, amount, date) VALUES ('ANTON', 950, '2026-02-26');
INSERT INTO returns (customer, amount, date) VALUES ('ALFKI', 10205, '2026-03-01');
@@ -0,0 +1,76 @@
Customers
ID
First name
Last name
Street Address
City
Province/State
Postal Code
Phone Number
Email Address
Purpose:
Tracks who the client is and how to contact them.
Relationship:
One customer can have multiple contracts.
Contracts
Contract ID (unique identifier)
Customer ID (links to the customer)
Building Street Address
City
Province/State
Postal Code
Scheduled Date
Scheduled Time
Employee ID (employee assigned to the job)
Purpose:
Tracks each job being performed.
Relationships:
Each contract belongs to one customer.
Each contract is handled by one employee.
Each contract can contain multiple rooms.
Rooms
Room ID
Contract ID
Room Name
Paint ID
Purpose:
Tracks individual areas being painted for each contract.
Relationships:
Each room belongs to one contract.
Each room uses one paint color.
Inventory
Paint ID
Paint Name
Cost Per Can
Quantity
Purpose:
Tracks paint options and pricing so customers know how much each paint can costs.
Relationships:
One paint type can be used in many rooms.
Employees
Employee ID
First Name
Last Name
Address
Postal Code
Hire Date
Salary
Purpose:
Tracks the staff doing the work.
Relationship:
One employee can be assigned to multiple contracts.
Each contract has exactly one employee.
@@ -0,0 +1,172 @@
CREATE DATABASE IF NOT EXISTS `paintingbusiness` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */;
USE `paintingbusiness`;
-- MySQL dump 10.13 Distrib 8.0.45, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: paintingbusiness
-- ------------------------------------------------------
-- Server version 5.5.5-10.4.32-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `contracts`
--
DROP TABLE IF EXISTS `contracts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contracts` (
`contract_id` int(11) NOT NULL,
`customer_id` int(11) NOT NULL,
`employee_id` int(11) NOT NULL,
`address` varchar(255) NOT NULL,
`scheduled_for` datetime NOT NULL,
PRIMARY KEY (`contract_id`),
KEY `customer_id` (`customer_id`),
KEY `employee_id` (`employee_id`),
CONSTRAINT `contracts_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`customer_id`),
CONSTRAINT `contracts_ibfk_2` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`employee_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `contracts`
--
LOCK TABLES `contracts` WRITE;
/*!40000 ALTER TABLE `contracts` DISABLE KEYS */;
INSERT INTO `contracts` VALUES (1,1,2,'123 Maple St','2026-04-10 10:00:00'),(2,2,1,'45 Oak Ave','2026-04-12 09:00:00'),(3,3,3,'78 Pine Rd','2026-04-15 13:30:00');
/*!40000 ALTER TABLE `contracts` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `customers`
--
DROP TABLE IF EXISTS `customers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customers` (
`customer_id` int(11) NOT NULL,
`first_name` varchar(25) NOT NULL,
`last_name` varchar(30) NOT NULL,
`address` varchar(255) NOT NULL,
`phone` varchar(15) NOT NULL,
`email` varchar(30) NOT NULL,
PRIMARY KEY (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `customers`
--
LOCK TABLES `customers` WRITE;
/*!40000 ALTER TABLE `customers` DISABLE KEYS */;
INSERT INTO `customers` VALUES (1,'John','Smith','123 Maple St','416-555-1111','john.smith@email.com'),(2,'Sarah','Johnson','45 Oak Ave','416-555-2222','sarah.j@email.com'),(3,'Michael','Brown','78 Pine Rd','416-555-3333','m.brown@email.com');
/*!40000 ALTER TABLE `customers` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `employees`
--
DROP TABLE IF EXISTS `employees`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `employees` (
`employee_id` int(11) NOT NULL,
`first_name` varchar(25) NOT NULL,
`last_name` varchar(30) NOT NULL,
`address` varchar(255) NOT NULL,
`hire_date` datetime NOT NULL,
`salary` int(11) NOT NULL,
PRIMARY KEY (`employee_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `employees`
--
LOCK TABLES `employees` WRITE;
/*!40000 ALTER TABLE `employees` DISABLE KEYS */;
INSERT INTO `employees` VALUES (1,'David','Wilson','22 Birch Ln','2022-04-12 09:00:00',45000),(2,'Emily','Davis','91 Cedar Dr','2023-01-20 09:00:00',42000),(3,'Robert','Taylor','15 Spruce Ct','2021-07-15 09:00:00',48000);
/*!40000 ALTER TABLE `employees` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `inventory`
--
DROP TABLE IF EXISTS `inventory`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `inventory` (
`paint_id` int(11) NOT NULL,
`paint_name` varchar(30) NOT NULL,
`cost_per_can` decimal(2,0) NOT NULL,
`quantity` int(11) NOT NULL,
PRIMARY KEY (`paint_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `inventory`
--
LOCK TABLES `inventory` WRITE;
/*!40000 ALTER TABLE `inventory` DISABLE KEYS */;
INSERT INTO `inventory` VALUES (1,'Arctic White',30,50),(2,'Ocean Blue',35,40),(3,'Sunset Yellow',28,60);
/*!40000 ALTER TABLE `inventory` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `rooms`
--
DROP TABLE IF EXISTS `rooms`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `rooms` (
`room_id` int(11) NOT NULL,
`contract_id` int(11) NOT NULL,
`paint_id` int(11) NOT NULL,
`room_name` varchar(30) NOT NULL,
PRIMARY KEY (`room_id`),
KEY `contract_id` (`contract_id`),
KEY `paint_id` (`paint_id`),
CONSTRAINT `rooms_ibfk_1` FOREIGN KEY (`contract_id`) REFERENCES `contracts` (`contract_id`),
CONSTRAINT `rooms_ibfk_2` FOREIGN KEY (`paint_id`) REFERENCES `inventory` (`paint_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `rooms`
--
LOCK TABLES `rooms` WRITE;
/*!40000 ALTER TABLE `rooms` DISABLE KEYS */;
INSERT INTO `rooms` VALUES (1,1,1,'Living Room'),(2,2,2,'Bedroom'),(3,3,3,'Kitchen');
/*!40000 ALTER TABLE `rooms` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2026-03-14 20:50:41
@@ -0,0 +1,46 @@
CREATE DATABASE IF NOT EXISTS paintingBusiness;
USE paintingBusiness;
CREATE TABLE IF NOT EXISTS customers(
customer_id INT NOT NULL PRIMARY KEY,
first_name VARCHAR(25) NOT NULL,
last_name VARCHAR(30) NOT NULL,
`address` VARCHAR(255) NOT NULL,
phone VARCHAR(15) NOT NULL,
email VARCHAR(30) NOT NULL
);
CREATE TABLE IF NOT EXISTS employees(
employee_id INT NOT NULL PRIMARY KEY,
first_name VARCHAR(25) NOT NULL,
last_name VARCHAR(30) NOT NULL,
`address` VARCHAR(255) NOT NULL,
hire_date DATETIME NOT NULL,
salary INT NOT NULL
);
CREATE TABLE IF NOT EXISTS inventory(
paint_id INT NOT NULL PRIMARY KEY,
paint_name VARCHAR(30) NOT NULL,
cost_per_can DECIMAL(5,2) NOT NULL,
quantity INT NOT NULL
);
CREATE TABLE IF NOT EXISTS contracts(
contract_id INT NOT NULL PRIMARY KEY,
customer_id INT NOT NULL,
employee_id INT NOT NULL,
`address` VARCHAR(255) NOT NULL,
scheduled_for DATETIME NOT NULL,
FOREIGN KEY (customer_id) REFERENCES customers(customer_id),
FOREIGN KEY (employee_id) REFERENCES employees(employee_id)
);
CREATE TABLE IF NOT EXISTS rooms(
room_id INT NOT NULL PRIMARY KEY,
contract_id INT NOT NULL,
paint_id INT NOT NULL,
room_name VARCHAR(30) NOT NULL,
FOREIGN KEY (contract_id) REFERENCES contracts(contract_id),
FOREIGN KEY (paint_id) REFERENCES inventory(paint_id)
);
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<title>Lab 7 Levi McLean</title>
</head>
<body>
<div>
<form>
<label for="fname">First Name</label>
<input type="text" name="fname"><br>
<label for="lname">Last Name</label>
<input type="text" name="lname"><br>
<label for="email">Email</label>
<input type="email" name="email"><br>
<label for="password">Password</label>
<input type="password" name="password"><br>
<label for="address">Address</label>
<input type="text" name="address"><br>
<label for="city">City</label>
<input type="text" name="city"><br>
<label for="country">Country</label>
<input type="text" name="country"><br>
<button type="submit">Submit</button>
</form>
</div>
</body>
</html>
@@ -0,0 +1,58 @@
CREATE DATABASE IF NOT EXISTS `lab7` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */;
USE `lab7`;
-- MySQL dump 10.13 Distrib 8.0.44, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: lab7
-- ------------------------------------------------------
-- Server version 5.5.5-10.4.32-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `registration`
--
DROP TABLE IF EXISTS `registration`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `registration` (
`reg_id` int(11) NOT NULL,
`fname` varchar(30) NOT NULL,
`lname` varchar(30) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(255) NOT NULL,
`address` varchar(255) NOT NULL,
`city` varchar(30) NOT NULL,
`country` varchar(30) NOT NULL,
PRIMARY KEY (`reg_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `registration`
--
LOCK TABLES `registration` WRITE;
/*!40000 ALTER TABLE `registration` DISABLE KEYS */;
/*!40000 ALTER TABLE `registration` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2026-04-01 19:11:27
@@ -0,0 +1,25 @@
<?php
$databaseHost = 'localhost'; // localhost
$databaseName = 'lab7'; // your db_name
$databaseUsername = 'root'; // root by default for localhost
$mysqli = mysqli_connect($databaseHost, $databaseUsername, $databaseName);
?>
<?php
if(isset($_POST['submit']))
{
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$password = $_POST['password'];
$address = $_POST['address'];
$city = $_POST['city'];
$country = $_POST['country'];
$result = mysqli_query($mysqli,"insert into user values('','$fname','$lname','$email','$password','$address','$city','$country')");
if($result) {
echo "Registration Successfully";
}
else {
echo "failed:";
}
}
?>
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<title>Lab 7 Levi McLean</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div>
<form method="post" action="action.php">
<label for="fname">First Name</label>
<input type="text" name="fname"><br>
<label for="lname">Last Name</label>
<input type="text" name="lname"><br>
<label for="email">Email</label>
<input type="email" name="email"><br>
<label for="password">Password</label>
<input type="password" name="password"><br>
<label for="address">Address</label>
<input type="text" name="address"><br>
<label for="city">City</label>
<input type="text" name="city"><br>
<label for="country">Country</label>
<input type="text" name="country"><br>
<button type="submit">Submit</button>
</form>
</div>
</body>
</html>
@@ -0,0 +1,6 @@
body {
font-family: Arial, Helvetica, sans-serif;
color: black;
font-weight: bold;
background-color: darkred;
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,125 @@
/*
Create and use database Rebu
*/
CREATE DATABASE IF NOT EXISTS Rebu;
USE Rebu;
/*
Create table for drivers
*/
DROP TABLE IF EXISTS drivers;
CREATE TABLE IF NOT EXISTS drivers(
driver_id INT NOT NULL PRIMARY KEY,
salutation VARCHAR(3) NOT NULL,
fname VARCHAR(30) NOT NULL,
lname VARCHAR(30) NOT NULL,
`address` VARCHAR(100) NOT NULL,
phone VARCHAR(20) NOT NULL UNIQUE,
email VARCHAR(100) NOT NULL UNIQUE,
insurance_provider VARCHAR(30) NOT NULL,
policy_number VARCHAR(15) NOT NULL UNIQUE,
speeding_tickers INT,
accidents INT
);
/*
Create table for vehicles, in case a driver has two or more
*/
DROP TABLE IF EXISTS vehicles;
CREATE TABLE IF NOT EXISTS vehicles(
vehicle_id INT NOT NULL PRIMARY KEY,
driver_id INT NOT NULL,
vehicle_make VARCHAR(30) NOT NULL,
vehicle_model VARCHAR(30) NOT NULL,
vehicle_year VARCHAR(4) NOT NULL,
license_plate VARCHAR(7) NOT NULL,
FOREIGN KEY (driver_id) REFERENCES drivers(driver_id)
);
/*
Create table for payment cards, in case rider has multiple
*/
DROP TABLE IF EXISTS cards;
CREATE TABLE IF NOT EXISTS cards(
card_id INT NOT NULL PRIMARY KEY,
rider_id INT NOT NULL,
card_number VARCHAR(12) NOT NULL,
card_name VARCHAR(100) NOT NULL,
card_expiry VARCHAR(12) NOT NULL,
FOREIGN KEY (rider_id) REFERENCES riders(rider_id)
);
/*
Create table for riders
*/
DROP TABLE IF EXISTS riders;
CREATE TABLE IF NOT EXISTS riders(
rider_id INT NOT NULL PRIMARY KEY,
`address` VARCHAR(100) NOT NULL,
phone VARCHAR(20) NOT NULL UNIQUE
);
/*
Create table for the actual ride information
*/
DROP TABLE IF EXISTS rides;
CREATE TABLE IF NOT EXISTS rides(
ride_id INT NOT NULL PRIMARY KEY,
pickup_location VARCHAR(100) NOT NULL,
pickup_date DATE NOT NULL,
pickup_time TIME NOT NULL,
dropoff_location VARCHAR(100) NOT NULL,
base_cost DECIMAL(5,2) NOT NULL,
hst DECIMAL(5,2) GENERATED ALWAYS AS (ROUND(base_cost * 0.13,2)) STORED,
total_cost DECIMAL(5,2) GENERATED ALWAYS AS (ROUND(base_cost * 1.13,2)) STORED,
driver_id INT NOT NULL,
driver_satisfaction INT NOT NULL CHECK (driver_satisfaction BETWEEN 1 AND 5),
rider_id INT NOT NULL,
card_id INT NOT NULL,
FOREIGN KEY (driver_id) REFERENCES drivers(driver_id),
FOREIGN KEY (card_id) REFERENCES cards(card_id)
);
/*
Some simple select and join statements for testing and demonstration purposes
*/
INSERT INTO drivers VALUES
(1, 'Mr', 'John', 'Doe', '123 Main St', '111-111-1111', 'john@example.com', 'StateFarm', 'POL123', 1, 0),
(2, 'Ms', 'Jane', 'Smith', '456 Oak Ave', '222-222-2222', 'jane@example.com', 'Allianz', 'POL456', 0, 1),
(3, 'Mr', 'Mike', 'Brown', '789 Pine Rd', '333-333-3333', 'mike@example.com', 'Geico', 'POL789', 2, 2);
INSERT INTO vehicles VALUES
(1, 1, 'Toyota', 'Camry', '2020', 'ABC1234'),
(2, 2, 'Honda', 'Civic', '2019', 'XYZ5678'),
(3, 3, 'Ford', 'Focus', '2018', 'LMN9101');
INSERT INTO riders VALUES
(1, '12 King St', '444-444-4444'),
(2, '34 Queen St', '555-555-5555'),
(3, '56 Prince St', '666-666-6666');
INSERT INTO cards VALUES
(1, 1, '123456789012', 'John Doe', '12/27'),
(2, 2, '234567890123', 'Jane Smith', '11/26'),
(3, 3, '345678901234', 'Mike Brown', '10/25');
INSERT INTO rides (ride_id, pickup_location, pickup_date, pickup_time, dropoff_location, base_cost, driver_id, driver_satisfaction, card_id, rider_id) VALUES
(1, 'Downtown', '2026-03-01', '08:00:00', 'Airport', 20.00, 1, 5, 1, 1),
(2, 'Mall', '2026-03-02', '09:30:00', 'University', 15.50, 2, 4, 2, 2),
(3, 'Station', '2026-03-03', '11:00:00', 'Hotel', 30.00, 3, 3, 3, 3);
SELECT * FROM drivers;
SELECT * FROM vehicles;
SELECT * FROM riders;
SELECT * FROM cards;
SELECT * FROM rides;
SELECT * FROM drivers
INNER JOIN vehicles ON drivers.driver_id = vehicles.driver_id;
SELECT * FROM riders
INNER JOIN cards ON riders.rider_id = cards.rider_id;
SELECT * FROM rides
INNER JOIN drivers ON rides.driver_id = drivers.driver_id
INNER JOIN riders ON rides.rider_id = riders.rider_id;
Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.
@@ -0,0 +1,16 @@
# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /project/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /project/index.php [L]
</IfModule>
# END WordPress
@@ -0,0 +1,17 @@
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
@@ -0,0 +1,384 @@
WordPress - Web publishing software
Copyright 2011-2025 by the contributors
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
This program incorporates work covered by the following copyright and
permission notices:
b2 is (c) 2001, 2002 Michel Valdrighi - Cafelog
Wherever third party code has been used, credit has been given in the code's
comments.
b2 is released under the GPL
and
WordPress - Web publishing software
Copyright 2003-2010 by the contributors
WordPress is released under the GPL
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
WRITTEN OFFER
The source code for any program binaries or compressed scripts that are
included with WordPress can be freely obtained at the following URL:
https://wordpress.org/download/source/
@@ -0,0 +1,98 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow" />
<title>WordPress &#8250; ReadMe</title>
<link rel="stylesheet" href="wp-admin/css/install.css?ver=20100228" type="text/css" />
</head>
<body>
<h1 id="logo">
<a href="https://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>
<h2>First Things First</h2>
<p>Welcome. WordPress is a very special project to me. Every developer and contributor adds something unique to the mix, and together we create something beautiful that I am proud to be a part of. Thousands of hours have gone into WordPress, and we are dedicated to making it better every day. Thank you for making it part of your world.</p>
<p style="text-align: right">&#8212; Matt Mullenweg</p>
<h2>Installation: Famous 5-minute install</h2>
<ol>
<li>Unzip the package in an empty directory and upload everything.</li>
<li>Open <span class="file"><a href="wp-admin/install.php">wp-admin/install.php</a></span> in your browser. It will take you through the process to set up a <code>wp-config.php</code> file with your database connection details.
<ol>
<li>If for some reason this does not work, do not worry. It may not work on all web hosts. Open up <code>wp-config-sample.php</code> with a text editor like WordPad or similar and fill in your database connection details.</li>
<li>Save the file as <code>wp-config.php</code> and upload it.</li>
<li>Open <span class="file"><a href="wp-admin/install.php">wp-admin/install.php</a></span> in your browser.</li>
</ol>
</li>
<li>Once the configuration file is set up, the installer will set up the tables needed for your site. If there is an error, double check your <code>wp-config.php</code> file, and try again. If it fails again, please go to the <a href="https://wordpress.org/support/forums/">WordPress support forums</a> with as much data as you can gather.</li>
<li><strong>If you did not enter a password, note the password given to you.</strong> If you did not provide a username, it will be <code>admin</code>.</li>
<li>The installer should then send you to the <a href="wp-login.php">login page</a>. Sign in with the username and password you chose during the installation. If a password was generated for you, you can then click on &#8220;Profile&#8221; to change the password.</li>
</ol>
<h2>Updating</h2>
<h3>Using the Automatic Updater</h3>
<ol>
<li>Open <span class="file"><a href="wp-admin/update-core.php">wp-admin/update-core.php</a></span> in your browser and follow the instructions.</li>
<li>You wanted more, perhaps? That&#8217;s it!</li>
</ol>
<h3>Updating Manually</h3>
<ol>
<li>Before you update anything, make sure you have backup copies of any files you may have modified such as <code>index.php</code>.</li>
<li>Delete your old WordPress files, saving ones you&#8217;ve modified.</li>
<li>Upload the new files.</li>
<li>Point your browser to <span class="file"><a href="wp-admin/upgrade.php">/wp-admin/upgrade.php</a>.</span></li>
</ol>
<h2>Migrating from other systems</h2>
<p>WordPress can <a href="https://developer.wordpress.org/advanced-administration/wordpress/import/">import from a number of systems</a>. First you need to get WordPress installed and working as described above, before using <a href="wp-admin/import.php">our import tools</a>.</p>
<h2>System Requirements</h2>
<ul>
<li><a href="https://www.php.net/">PHP</a> version <strong>7.2.24</strong> or greater.</li>
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.5.5</strong> or greater.</li>
</ul>
<h3>Recommendations</h3>
<ul>
<li><a href="https://www.php.net/">PHP</a> version <strong>8.3</strong> or greater.</li>
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>8.0</strong> or greater OR <a href="https://mariadb.org/">MariaDB</a> version <strong>10.6</strong> or greater.</li>
<li>The <a href="https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a> Apache module.</li>
<li><a href="https://wordpress.org/news/2016/12/moving-toward-ssl/">HTTPS</a> support.</li>
<li>A link to <a href="https://wordpress.org/">wordpress.org</a> on your site.</li>
</ul>
<h2>Online Resources</h2>
<p>If you have any questions that are not addressed in this document, please take advantage of WordPress&#8217; numerous online resources:</p>
<dl>
<dt><a href="https://wordpress.org/documentation/">HelpHub</a></dt>
<dd>HelpHub is the encyclopedia of all things WordPress. It is the most comprehensive source of information for WordPress available.</dd>
<dt><a href="https://wordpress.org/news/">The WordPress Blog</a></dt>
<dd>This is where you&#8217;ll find the latest updates and news related to WordPress. Recent WordPress news appears in your administrative dashboard by default.</dd>
<dt><a href="https://planet.wordpress.org/">WordPress Planet</a></dt>
<dd>The WordPress Planet is a news aggregator that brings together posts from WordPress blogs around the web.</dd>
<dt><a href="https://wordpress.org/support/forums/">WordPress Support Forums</a></dt>
<dd>If you&#8217;ve looked everywhere and still cannot find an answer, the support forums are very active and have a large community ready to help. To help them help you be sure to use a descriptive thread title and describe your question in as much detail as possible.</dd>
<dt><a href="https://make.wordpress.org/support/handbook/appendix/other-support-locations/introduction-to-irc/">WordPress <abbr>IRC</abbr> (Internet Relay Chat) Channel</a></dt>
<dd>There is an online chat channel that is used for discussion among people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (<a href="https://web.libera.chat/#wordpress">irc.libera.chat #wordpress</a>)</dd>
</dl>
<h2>Final Notes</h2>
<ul>
<li>If you have any suggestions, ideas, or comments, or if you (gasp!) found a bug, join us in the <a href="https://wordpress.org/support/forums/">Support Forums</a>.</li>
<li>WordPress has a robust plugin <abbr>API</abbr> (Application Programming Interface) that makes extending the code easy. If you are a developer interested in utilizing this, see the <a href="https://developer.wordpress.org/plugins/">Plugin Developer Handbook</a>. You shouldn&#8217;t modify any of the core code.</li>
</ul>
<h2>Share the Love</h2>
<p>WordPress has no multi-million dollar marketing campaign or celebrity sponsors, but we do have something even better&#8212;you. If you enjoy WordPress please consider telling a friend, setting it up for someone less knowledgeable than yourself, or writing the author of a media article that overlooks us.</p>
<p>WordPress is the official continuation of b2/caf&#233;log, which came from Michel V. The work has been continued by the <a href="https://wordpress.org/about/">WordPress developers</a>. If you would like to support WordPress, please consider <a href="https://wordpress.org/donate/">donating</a>.</p>
<h2>License</h2>
<p>WordPress is free software, and is released under the terms of the <abbr>GPL</abbr> (GNU General Public License) version 2 or (at your option) any later version. See <a href="license.txt">license.txt</a>.</p>
</body>
</html>
@@ -0,0 +1,214 @@
<?php
/**
* Confirms that the activation key that is sent in an email after a user signs
* up for a new site matches the key for that user and then displays confirmation.
*
* @package WordPress
*/
define( 'WP_INSTALLING', true );
/** Sets up the WordPress Environment. */
require __DIR__ . '/wp-load.php';
require __DIR__ . '/wp-blog-header.php';
if ( ! is_multisite() ) {
wp_redirect( wp_registration_url() );
die();
}
$valid_error_codes = array( 'already_active', 'blog_taken' );
list( $activate_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
$activate_cookie = 'wp-activate-' . COOKIEHASH;
$key = '';
$result = null;
if ( isset( $_GET['key'] ) && isset( $_POST['key'] ) && $_GET['key'] !== $_POST['key'] ) {
wp_die( __( 'A key value mismatch has been detected. Please follow the link provided in your activation email.' ), __( 'An error occurred during the activation' ), 400 );
} elseif ( ! empty( $_GET['key'] ) ) {
$key = sanitize_text_field( $_GET['key'] );
} elseif ( ! empty( $_POST['key'] ) ) {
$key = sanitize_text_field( $_POST['key'] );
}
if ( $key ) {
$redirect_url = remove_query_arg( 'key' );
if ( remove_query_arg( false ) !== $redirect_url ) {
setcookie( $activate_cookie, $key, 0, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
wp_safe_redirect( $redirect_url );
exit;
} else {
$result = wpmu_activate_signup( $key );
}
}
if ( null === $result && isset( $_COOKIE[ $activate_cookie ] ) ) {
$key = $_COOKIE[ $activate_cookie ];
$result = wpmu_activate_signup( $key );
setcookie( $activate_cookie, ' ', time() - YEAR_IN_SECONDS, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
}
if ( null === $result || ( is_wp_error( $result ) && 'invalid_key' === $result->get_error_code() ) ) {
status_header( 404 );
} elseif ( is_wp_error( $result ) ) {
$error_code = $result->get_error_code();
if ( ! in_array( $error_code, $valid_error_codes, true ) ) {
status_header( 400 );
}
}
nocache_headers();
// Fix for page title.
$wp_query->is_404 = false;
/**
* Fires before the Site Activation page is loaded.
*
* @since 3.0.0
*/
do_action( 'activate_header' );
/**
* Adds an action hook specific to this page.
*
* Fires on {@see 'wp_head'}.
*
* @since MU (3.0.0)
*/
function do_activate_header() {
/**
* Fires within the `<head>` section of the Site Activation page.
*
* Fires on the {@see 'wp_head'} action.
*
* @since 3.0.0
*/
do_action( 'activate_wp_head' );
}
add_action( 'wp_head', 'do_activate_header' );
/**
* Loads styles specific to this page.
*
* @since MU (3.0.0)
*/
function wpmu_activate_stylesheet() {
?>
<style type="text/css">
.wp-activate-container { width: 90%; margin: 0 auto; }
.wp-activate-container form { margin-top: 2em; }
#submit, #key { width: 100%; font-size: 24px; box-sizing: border-box; }
#language { margin-top: 0.5em; }
.wp-activate-container .error { background: #f66; color: #333; }
span.h3 { padding: 0 8px; font-size: 1.3em; font-weight: 600; }
</style>
<?php
}
add_action( 'wp_head', 'wpmu_activate_stylesheet' );
add_action( 'wp_head', 'wp_strict_cross_origin_referrer' );
add_filter( 'wp_robots', 'wp_robots_sensitive_page' );
get_header( 'wp-activate' );
$blog_details = get_site();
?>
<div id="signup-content" class="widecolumn">
<div class="wp-activate-container">
<?php if ( ! $key ) { ?>
<h2><?php _e( 'Activation Key Required' ); ?></h2>
<form name="activateform" id="activateform" method="post" action="<?php echo esc_url( network_site_url( $blog_details->path . 'wp-activate.php' ) ); ?>">
<p>
<label for="key"><?php _e( 'Activation Key:' ); ?></label>
<br /><input type="text" name="key" id="key" value="" size="50" autofocus="autofocus" />
</p>
<p class="submit">
<input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e( 'Activate' ); ?>" />
</p>
</form>
<?php
} else {
if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes, true ) ) {
$signup = $result->get_error_data();
?>
<h2><?php _e( 'Your account is now active!' ); ?></h2>
<?php
echo '<p class="lead-in">';
if ( '' === $signup->domain . $signup->path ) {
printf(
/* translators: 1: Login URL, 2: Username, 3: User email address, 4: Lost password URL. */
__( 'Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
esc_url( network_site_url( $blog_details->path . 'wp-login.php', 'login' ) ),
esc_html( $signup->user_login ),
esc_html( $signup->user_email ),
esc_url( wp_lostpassword_url() )
);
} else {
printf(
/* translators: 1: Site URL, 2: Username, 3: User email address, 4: Lost password URL. */
__( 'Your site at %1$s is active. You may now log in to your site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
sprintf( '<a href="http://%1$s">%1$s</a>', esc_url( $signup->domain . $blog_details->path ) ),
esc_html( $signup->user_login ),
esc_html( $signup->user_email ),
esc_url( wp_lostpassword_url() )
);
}
echo '</p>';
} elseif ( null === $result || is_wp_error( $result ) ) {
?>
<h2><?php _e( 'An error occurred during the activation' ); ?></h2>
<?php if ( is_wp_error( $result ) ) : ?>
<p><?php echo esc_html( $result->get_error_message() ); ?></p>
<?php endif; ?>
<?php
} else {
$url = isset( $result['blog_id'] ) ? esc_url( get_home_url( (int) $result['blog_id'] ) ) : '';
$user = get_userdata( (int) $result['user_id'] );
?>
<h2><?php _e( 'Your account is now active!' ); ?></h2>
<div id="signup-welcome">
<p><span class="h3"><?php _e( 'Username:' ); ?></span> <?php echo esc_html( $user->user_login ); ?></p>
<p><span class="h3"><?php _e( 'Password:' ); ?></span> <?php echo esc_html( $result['password'] ); ?></p>
</div>
<?php
if ( $url && network_home_url( '', 'http' ) !== $url ) :
switch_to_blog( (int) $result['blog_id'] );
$login_url = wp_login_url();
restore_current_blog();
?>
<p class="view">
<?php
/* translators: 1: Site URL, 2: Login URL. */
printf( __( 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>' ), esc_url( $url ), esc_url( $login_url ) );
?>
</p>
<?php else : ?>
<p class="view">
<?php
printf(
/* translators: 1: Login URL, 2: Network home URL. */
__( 'Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ),
esc_url( network_site_url( $blog_details->path . 'wp-login.php', 'login' ) ),
esc_url( network_home_url( $blog_details->path ) )
);
?>
</p>
<?php
endif;
}
}
?>
</div>
</div>
<?php
get_footer( 'wp-activate' );
@@ -0,0 +1,432 @@
<?php
/**
* About This Version administration panel.
*
* @package WordPress
* @subpackage Administration
*/
/** WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
// Used in the HTML title tag.
/* translators: Page title of the About WordPress page in the admin. */
$title = _x( 'About', 'page title' );
list( $display_version ) = explode( '-', wp_get_wp_version() );
$display_major_version = '6.9';
$release_notes_url = sprintf(
/* translators: %s: WordPress version number. */
__( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ),
sanitize_title( $display_major_version )
);
$field_guide_url = sprintf(
/* translators: %s: WordPress version number. */
__( 'https://make.wordpress.org/core/wordpress-%s-field-guide/' ),
sanitize_title( $display_major_version )
);
$release_page_url = sprintf(
/* translators: %s: WordPress version number. */
__( 'https://wordpress.org/download/releases/%s/' ),
sanitize_title( $display_major_version )
);
require_once ABSPATH . 'wp-admin/admin-header.php';
?>
<div class="wrap about__container">
<div class="about__header">
<div class="about__header-title">
<h1>
<?php
printf(
/* translators: %s: Version number. */
__( 'WordPress %s' ),
$display_version
);
?>
</h1>
</div>
</div>
<nav class="about__header-navigation nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">
<a href="about.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'What&#8217;s New' ); ?></a>
<a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
<a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
<a href="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
<a href="contribute.php" class="nav-tab"><?php _e( 'Get Involved' ); ?></a>
</nav>
<div class="about__section changelog has-subtle-background-color">
<div class="column">
<h2><?php _e( 'Maintenance and Security Releases' ); ?></h2>
<p>
<?php
printf(
/* translators: %s: WordPress version. */
__( '<strong>Version %s</strong> addressed some security issues.' ),
'6.9.4'
);
?>
<?php
printf(
/* translators: %s: HelpHub URL. */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version. */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '6.9.4' )
)
);
?>
</p>
<p>
<?php
printf(
/* translators: %s: WordPress version. */
_n(
'<strong>Version %1$s</strong> addressed %2$s bug.',
'<strong>Version %1$s</strong> addressed %2$s bugs.',
1
),
'6.9.3',
1
);
?>
<?php
printf(
/* translators: %s: HelpHub URL. */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version. */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '6.9.3' )
)
);
?>
</p>
<p>
<?php
printf(
/* translators: %s: WordPress version. */
__( '<strong>Version %s</strong> addressed some security issues.' ),
'6.9.2'
);
?>
<?php
printf(
/* translators: %s: HelpHub URL. */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version. */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '6.9.2' )
)
);
?>
</p>
<p>
<?php
printf(
/* translators: 1: WordPress version number, 2: Plural number of bugs. */
_n(
'<strong>Version %1$s</strong> addressed %2$s bug.',
'<strong>Version %1$s</strong> addressed %2$s bugs.',
49
),
'6.9.1',
49
);
?>
<?php
printf(
/* translators: %s: HelpHub URL. */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version. */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '6.9.1' )
)
);
?>
</p>
</div>
</div>
<div class="about__section">
<div class="column">
<h2><?php _e( 'Welcome to WordPress 6.9' ); ?></h2>
<p class="is-subheading"><?php _e( 'WordPress 6.9 introduces a more intuitive way to create content, together. Every detail is designed to fit your creative flow, from Notes that let you collaborate directly in the editor to a powerful Command Palette that helps you reach every part of your site.' ); ?></p>
</div>
</div>
<div class="about__section has-2-columns">
<div class="column is-vertically-aligned-center">
<h3><?php _ex( 'Notes', 'about page section title' ); ?></h3>
<p>
<strong><?php _e( 'Leave feedback right where youre working.' ); ?></strong><br />
<?php _e( 'With notes attached directly to blocks, your team can stay aligned, track changes, and turn feedback into action all in one place. Whether you&#8217;re working on copy or refining design, collaboration happens seamlessly on the canvas itself.' ); ?>
</p>
</div>
<div class="column is-vertically-aligned-center">
<div class="about__image">
<img src="https://s.w.org/images/core/6.9/01-notes.webp" alt="" height="436" width="436" />
</div>
</div>
</div>
<div class="about__section has-2-columns">
<div class="column is-vertically-aligned-center">
<div class="about__image">
<img src="https://s.w.org/images/core/6.9/02-visual-drag-drop.webp" alt="" height="436" width="436" />
</div>
</div>
<div class="column is-vertically-aligned-center">
<h3><?php _e( 'Visual drag and drop' ); ?></h3>
<p>
<strong><?php _e( 'Design flows naturally.' ); ?></strong><br />
<?php _e( 'Building layouts is now more intuitive and flexible with clear drag handles and a live preview that shows exactly what you&#8217;re moving—a faster way to build pages.' ); ?>
</p>
</div>
</div>
<div class="about__section has-2-columns">
<div class="column is-vertically-aligned-center">
<h3><?php _e( 'Command Palette, everywhere' ); ?></h3>
<p>
<strong><?php _e( 'Your tools are always at hand.' ); ?></strong><br />
<?php _e( 'Access the Command Palette from any part of your site, whether you&#8217;re writing your latest post, deep in design in the Site Editor, or browsing your plugins. Everything you need, just a few keystrokes away.' ); ?>
</p>
</div>
<div class="column is-vertically-aligned-center">
<div class="about__image">
<img src="https://s.w.org/images/core/6.9/03-command-palette-everywhere.webp" alt="" height="436" width="436" />
</div>
</div>
</div>
<div class="about__section has-2-columns">
<div class="column is-vertically-aligned-center">
<div class="about__image">
<img src="https://s.w.org/images/core/6.9/04-fit-text.webp" alt="" height="436" width="436" />
</div>
</div>
<div class="column is-vertically-aligned-center">
<h3><?php _e( 'Fit text to container' ); ?></h3>
<p>
<strong><?php _e( 'Content that adapts.' ); ?></strong><br />
<?php _e( 'A new typography option for text-based blocks, starting with the Paragraph and Heading blocks, that automatically adjusts font size to fill its container perfectly. Ideal for banners, callouts, and standout moments in your design. No manual tweaks, just an instant clean design.' ); ?>
</p>
</div>
</div>
<hr class="is-invisible is-large" />
<div class="about__section has-2-columns">
<div class="column">
<div class="about__image">
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
<path fill="#1e1e1e" d="M32.455 17.72a1.592 1.592 0 0 1 .599 2.195l-7.637 12.99a1.653 1.653 0 0 1-2.235.589 1.592 1.592 0 0 1-.599-2.195l7.637-12.99a1.653 1.653 0 0 1 2.235-.589ZM13.774 23.21a1.653 1.653 0 0 0-2.236.589 1.592 1.592 0 0 0 .6 2.195l.944.536c.783.444 1.783.18 2.235-.588a1.592 1.592 0 0 0-.599-2.196l-.944-.535ZM16.432 17.72a1.653 1.653 0 0 1 2.236.588l.545.928a1.592 1.592 0 0 1-.599 2.196 1.653 1.653 0 0 1-2.235-.588l-.546-.928a1.592 1.592 0 0 1 .6-2.196ZM25.637 16.5c0-.888-.733-1.607-1.637-1.607s-1.636.72-1.636 1.607v1.071c0 .888.732 1.608 1.636 1.608.904 0 1.637-.72 1.637-1.608V16.5Z"/>
<path fill="#1e1e1e" fill-rule="evenodd" d="M4.91 27.75C4.91 17.395 13.455 9 24 9s19.091 8.395 19.091 18.75c0 3.909-1.22 7.542-3.305 10.548l-.488.702H8.702l-.488-.702A18.438 18.438 0 0 1 4.91 27.75ZM24 12.214c-8.736 0-15.818 6.956-15.818 15.536 0 2.943.832 5.692 2.277 8.036h27.082a15.25 15.25 0 0 0 2.277-8.036c0-8.58-7.082-15.536-15.818-15.536Z" clip-rule="evenodd"/>
</svg>
</div>
<h3><?php _e( 'Performance updates' ); ?></h3>
<p><?php _e( 'WordPress 6.9 includes a broad set of performance enhancements. A better <abbr>LCP</abbr> (Largest Contentful Paint) metric is achieved through improved loading of conditional and inlined stylesheets, script loading with fetchpriority support, and additional core optimizations. Editor advances include fixes for layout shifts caused by the Video block and faster loading of the terms selector.' ); ?></p>
</div>
<div class="column">
<div class="about__image">
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
<path fill="#1e1e1e" d="M24 13.84c-.752 0-1.397-.287-1.936-.86a2.902 2.902 0 0 1-.809-2.06c0-.8.27-1.487.809-2.06S23.248 8 24 8c.753 0 1.398.287 1.937.86.54.573.809 1.26.809 2.06s-.27 1.487-.809 2.06-1.184.86-1.937.86ZM19.976 40V18.68a69.562 69.562 0 0 1-4.945-.56 45.877 45.877 0 0 1-4.57-.92l.565-2.4a46.79 46.79 0 0 0 6.356 1.14c2.106.227 4.312.34 6.618.34 2.307 0 4.513-.113 6.62-.34a46.786 46.786 0 0 0 6.355-1.14l.564 2.4c-1.454.373-2.977.68-4.57.92a69.55 69.55 0 0 1-4.945.56V40h-2.256V29.6h-3.535V40h-2.257Z"/>
</svg>
</div>
<h3><?php _e( 'Accessibility improvements' ); ?></h3>
<p><?php _e( '70+ accessibility fixes and enhancements focus on central areas of the WordPress experience. From globally hiding CSS-generated content from assistive technology and improvements to screen reader announcements and user experience, to fixing cursor position and keeping typing focus when clicking on an autocomplete suggestion item.' ); ?></p>
</div>
</div>
<hr class="is-invisible is-large" style="margin-bottom:calc(2 * var(--gap));" />
<div class="about__section has-2-columns is-wider-left is-feature" style="background-color:var(--background);border-radius:var(--border-radius);">
<h3 class="is-section-header"><?php _e( 'And much more' ); ?></h3>
<div class="column">
<p>
<?php
printf(
/* translators: %s: Version number. */
__( 'For a comprehensive overview of all the new features and enhancements in WordPress %s, please visit the feature-showcase website.' ),
$display_major_version
);
?>
</p>
</div>
<div class="column aligncenter">
<div class="about__image">
<a href="<?php echo esc_url( $release_page_url ); ?>" class="button button-primary button-hero"><?php _e( 'See everything new' ); ?></a>
</div>
</div>
</div>
<hr class="is-large" style="margin-top:calc(2 * var(--gap));" />
<div class="about__section has-3-columns">
<div class="column about__image is-vertically-aligned-top">
<img src="<?php echo esc_url( admin_url( 'images/about-release-badge.svg?ver=6.9' ) ); ?>" alt="" height="280" width="280" />
</div>
<div class="column is-vertically-aligned-center" style="grid-column-end:span 2">
<h3>
<?php
printf(
/* translators: %s: Version number. */
__( 'Learn more about WordPress %s' ),
$display_major_version
);
?>
</h3>
<p>
<?php
printf(
/* translators: 1: Learn WordPress link, 2: Workshops link. */
__( '<a href="%1$s">Learn WordPress</a> is a free resource for new and experienced WordPress users. Learn is stocked with how-to videos on using various features in WordPress, <a href="%2$s">interactive workshops</a> for exploring topics in-depth, and lesson plans for diving deep into specific areas of WordPress.' ),
'https://learn.wordpress.org/',
'https://learn.wordpress.org/online-workshops/'
);
?>
</p>
</div>
</div>
<div class="about__section has-2-columns">
<div class="column">
<div class="about__image">
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
<path fill="#1e1e1e" d="M32 15.5H16v3h16v-3ZM16 22h16v3H16v-3ZM28 28.5H16v3h12v-3Z"/>
<path fill="#1e1e1e" fill-rule="evenodd" d="M34 8H14a4 4 0 0 0-4 4v24a4 4 0 0 0 4 4h20a4 4 0 0 0 4-4V12a4 4 0 0 0-4-4Zm-20 3h20a1 1 0 0 1 1 1v24a1 1 0 0 1-1 1H14a1 1 0 0 1-1-1V12a1 1 0 0 1 1-1Z" clip-rule="evenodd"/>
</svg>
</div>
<h4 style="margin-top: calc(var(--gap) / 2); margin-bottom: calc(var(--gap) / 2);">
<a href="<?php echo esc_url( $release_notes_url ); ?>">
<?php
printf(
/* translators: %s: WordPress version number. */
__( 'WordPress %s Release Notes' ),
$display_major_version
);
?>
</a>
</h4>
<p>
<?php
printf(
/* translators: %s: WordPress version number. */
__( 'Read the WordPress %s Release Notes for information on installation, enhancements, fixed issues, release contributors, learning resources, and the list of file changes.' ),
$display_major_version
);
?>
</p>
</div>
<div class="column">
<div class="about__image">
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
<path fill="#1e1e1e" stroke="#fff" stroke-width=".5" d="M26.5 24.25h13.75v11.5h-14v8h-3.5v-8H12.604L8.09 31.237a1.75 1.75 0 0 1 0-2.474l4.513-4.513H22.75v-4.5h-14V8.25h14v-4h3.5v4h10.146l4.513 4.513a1.75 1.75 0 0 1 0 2.474l-4.513 4.513H26.25v4.5h.25ZM12.25 16v.25h22.704l.073-.073 1.293-1.293a1.25 1.25 0 0 0 0-1.768l-1.293-1.293-.073-.073H12.25V16Zm1.723 16.177.073.073H36.75v-4.5H14.046l-.073.073-1.293 1.293a1.25 1.25 0 0 0 0 1.768l1.293 1.293Z"/>
</svg>
</div>
<h4 style="margin-top: calc(var(--gap) / 2); margin-bottom: calc(var(--gap) / 2);">
<a href="<?php echo esc_url( $field_guide_url ); ?>">
<?php
printf(
/* translators: %s: WordPress version number. */
__( 'WordPress %s Field Guide' ),
$display_major_version
);
?>
</a>
</h4>
<p>
<?php
printf(
/* translators: %s: WordPress version number. */
__( 'Explore the WordPress %s Field Guide. Learn about the changes in this release with detailed developer notes to help you build with WordPress.' ),
$display_major_version
);
?>
</p>
</div>
</div>
<hr class="is-large" />
<div class="return-to-dashboard">
<?php
if ( isset( $_GET['updated'] ) && current_user_can( 'update_core' ) ) {
printf(
'<a href="%1$s">%2$s</a> | ',
esc_url( self_admin_url( 'update-core.php' ) ),
is_multisite() ? __( 'Go to Updates' ) : __( 'Go to Dashboard &rarr; Updates' )
);
}
printf(
'<a href="%1$s">%2$s</a>',
esc_url( self_admin_url() ),
is_blog_admin() ? __( 'Go to Dashboard &rarr; Home' ) : __( 'Go to Dashboard' )
);
?>
</div>
</div>
<?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?>
<?php
// These are strings we may use to describe maintenance/security releases, where we aim for no new strings.
return;
__( 'Maintenance Release' );
__( 'Maintenance Releases' );
__( 'Security Release' );
__( 'Security Releases' );
__( 'Maintenance and Security Release' );
__( 'Maintenance and Security Releases' );
/* translators: %s: WordPress version number. */
__( '<strong>Version %s</strong> addressed one security issue.' );
/* translators: %s: WordPress version number. */
__( '<strong>Version %s</strong> addressed some security issues.' );
/* translators: 1: WordPress version number, 2: Plural number of bugs. */
_n_noop(
'<strong>Version %1$s</strong> addressed %2$s bug.',
'<strong>Version %1$s</strong> addressed %2$s bugs.'
);
/* translators: 1: WordPress version number, 2: Plural number of bugs. Singular security issue. */
_n_noop(
'<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bugs.'
);
/* translators: 1: WordPress version number, 2: Plural number of bugs. More than one security issue. */
_n_noop(
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.'
);
/* translators: %s: Documentation URL. */
__( 'For more information, see <a href="%s">the release notes</a>.' );
/* translators: 1: WordPress version number, 2: Link to update WordPress */
__( 'Important! Your version of WordPress (%1$s) is no longer supported, you will not receive any security updates for your website. To keep your site secure, please <a href="%2$s">update to the latest version of WordPress</a>.' );
/* translators: 1: WordPress version number, 2: Link to update WordPress */
__( 'Important! Your version of WordPress (%1$s) will stop receiving security updates in the near future. To keep your site secure, please <a href="%2$s">update to the latest version of WordPress</a>.' );
/* translators: %s: The major version of WordPress for this branch. */
__( 'This is the final release of WordPress %s' );
/* translators: The localized WordPress download URL. */
__( 'https://wordpress.org/download/' );
@@ -0,0 +1,211 @@
<?php
/**
* WordPress Ajax Process Execution
*
* @package WordPress
* @subpackage Administration
*
* @link https://developer.wordpress.org/plugins/javascript/ajax
*/
/**
* Executing Ajax process.
*
* @since 2.1.0
*/
define( 'DOING_AJAX', true );
if ( ! defined( 'WP_ADMIN' ) ) {
define( 'WP_ADMIN', true );
}
/** Load WordPress Bootstrap */
require_once dirname( __DIR__ ) . '/wp-load.php';
/** Allow for cross-domain requests (from the front end). */
send_origin_headers();
header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
header( 'X-Robots-Tag: noindex' );
// Require a valid action parameter.
if ( empty( $_REQUEST['action'] ) || ! is_scalar( $_REQUEST['action'] ) ) {
wp_die( '0', 400 );
}
/** Load WordPress Administration APIs */
require_once ABSPATH . 'wp-admin/includes/admin.php';
/** Load Ajax Handlers for WordPress Core */
require_once ABSPATH . 'wp-admin/includes/ajax-actions.php';
send_nosniff_header();
nocache_headers();
/** This action is documented in wp-admin/admin.php */
do_action( 'admin_init' );
$core_actions_get = array(
'fetch-list',
'ajax-tag-search',
'wp-compression-test',
'imgedit-preview',
'oembed-cache',
'autocomplete-user',
'dashboard-widgets',
'logged-in',
'rest-nonce',
);
$core_actions_post = array(
'oembed-cache',
'image-editor',
'delete-comment',
'delete-tag',
'delete-link',
'delete-meta',
'delete-post',
'trash-post',
'untrash-post',
'delete-page',
'dim-comment',
'add-link-category',
'add-tag',
'get-tagcloud',
'get-comments',
'replyto-comment',
'edit-comment',
'add-menu-item',
'add-meta',
'add-user',
'closed-postboxes',
'hidden-columns',
'update-welcome-panel',
'menu-get-metabox',
'wp-link-ajax',
'menu-locations-save',
'menu-quick-search',
'meta-box-order',
'get-permalink',
'sample-permalink',
'inline-save',
'inline-save-tax',
'find_posts',
'widgets-order',
'save-widget',
'delete-inactive-widgets',
'set-post-thumbnail',
'date_format',
'time_format',
'wp-remove-post-lock',
'dismiss-wp-pointer',
'upload-attachment',
'get-attachment',
'query-attachments',
'save-attachment',
'save-attachment-compat',
'send-link-to-editor',
'send-attachment-to-editor',
'save-attachment-order',
'media-create-image-subsizes',
'heartbeat',
'get-revision-diffs',
'save-user-color-scheme',
'update-widget',
'query-themes',
'parse-embed',
'set-attachment-thumbnail',
'parse-media-shortcode',
'destroy-sessions',
'install-plugin',
'activate-plugin',
'update-plugin',
'crop-image',
'generate-password',
'save-wporg-username',
'delete-plugin',
'search-plugins',
'search-install-plugins',
'activate-plugin',
'update-theme',
'delete-theme',
'install-theme',
'get-post-thumbnail-html',
'get-community-events',
'edit-theme-plugin-file',
'wp-privacy-export-personal-data',
'wp-privacy-erase-personal-data',
'health-check-site-status-result',
'health-check-dotorg-communication',
'health-check-is-in-debug-mode',
'health-check-background-updates',
'health-check-loopback-requests',
'health-check-get-sizes',
'toggle-auto-updates',
'send-password-reset',
);
// Deprecated.
$core_actions_post_deprecated = array(
'wp-fullscreen-save-post',
'press-this-save-post',
'press-this-add-category',
'health-check-dotorg-communication',
'health-check-is-in-debug-mode',
'health-check-background-updates',
'health-check-loopback-requests',
);
$core_actions_post = array_merge( $core_actions_post, $core_actions_post_deprecated );
// Register core Ajax calls.
if ( ! empty( $_GET['action'] ) && in_array( $_GET['action'], $core_actions_get, true ) ) {
add_action( 'wp_ajax_' . $_GET['action'], 'wp_ajax_' . str_replace( '-', '_', $_GET['action'] ), 1 );
}
if ( ! empty( $_POST['action'] ) && in_array( $_POST['action'], $core_actions_post, true ) ) {
add_action( 'wp_ajax_' . $_POST['action'], 'wp_ajax_' . str_replace( '-', '_', $_POST['action'] ), 1 );
}
add_action( 'wp_ajax_nopriv_generate-password', 'wp_ajax_nopriv_generate_password' );
add_action( 'wp_ajax_nopriv_heartbeat', 'wp_ajax_nopriv_heartbeat', 1 );
// Register Plugin Dependencies Ajax calls.
add_action( 'wp_ajax_check_plugin_dependencies', array( 'WP_Plugin_Dependencies', 'check_plugin_dependencies_during_ajax' ) );
$action = $_REQUEST['action'];
if ( is_user_logged_in() ) {
// If no action is registered, return a Bad Request response.
if ( ! has_action( "wp_ajax_{$action}" ) ) {
wp_die( '0', 400 );
}
/**
* Fires authenticated Ajax actions for logged-in users.
*
* The dynamic portion of the hook name, `$action`, refers
* to the name of the Ajax action callback being fired.
*
* @since 2.1.0
*/
do_action( "wp_ajax_{$action}" );
} else {
// If no action is registered, return a Bad Request response.
if ( ! has_action( "wp_ajax_nopriv_{$action}" ) ) {
wp_die( '0', 400 );
}
/**
* Fires non-authenticated Ajax actions for logged-out users.
*
* The dynamic portion of the hook name, `$action`, refers
* to the name of the Ajax action callback being fired.
*
* @since 2.8.0
*/
do_action( "wp_ajax_nopriv_{$action}" );
}
// Default status.
wp_die( '0' );
@@ -0,0 +1,119 @@
<?php
/**
* WordPress Administration Template Footer
*
* @package WordPress
* @subpackage Administration
*/
// Don't load directly.
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* @global string $hook_suffix
*/
global $hook_suffix;
?>
<div class="clear"></div></div><!-- wpbody-content -->
<div class="clear"></div></div><!-- wpbody -->
<div class="clear"></div></div><!-- wpcontent -->
<div id="wpfooter" role="contentinfo">
<?php
/**
* Fires after the opening tag for the admin footer.
*
* @since 2.5.0
*/
do_action( 'in_admin_footer' );
?>
<p id="footer-left" class="alignleft">
<?php
$text = sprintf(
/* translators: %s: https://wordpress.org/ */
__( 'Thank you for creating with <a href="%s">WordPress</a>.' ),
esc_url( __( 'https://wordpress.org/' ) )
);
/**
* Filters the "Thank you" text displayed in the admin footer.
*
* @since 2.8.0
*
* @param string $text The content that will be printed.
*/
echo apply_filters( 'admin_footer_text', '<span id="footer-thankyou">' . $text . '</span>' );
?>
</p>
<p id="footer-upgrade" class="alignright">
<?php
/**
* Filters the version/update text displayed in the admin footer.
*
* WordPress prints the current version and update information,
* using core_update_footer() at priority 10.
*
* @since 2.3.0
*
* @see core_update_footer()
*
* @param string $content The content that will be printed.
*/
echo apply_filters( 'update_footer', '' );
?>
</p>
<div class="clear"></div>
</div>
<?php
/**
* Prints scripts or data before the default footer scripts.
*
* @since 1.2.0
*
* @param string $data The data to print.
*/
do_action( 'admin_footer', '' );
/**
* Prints scripts and data queued for the footer.
*
* The dynamic portion of the hook name, `$hook_suffix`,
* refers to the global hook suffix of the current page.
*
* @since 4.6.0
*/
do_action( "admin_print_footer_scripts-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
/**
* Prints any scripts and data queued for the footer.
*
* @since 2.8.0
*/
do_action( 'admin_print_footer_scripts' );
/**
* Prints scripts or data after the default footer scripts.
*
* The dynamic portion of the hook name, `$hook_suffix`,
* refers to the global hook suffix of the current page.
*
* @since 2.8.0
*/
do_action( "admin_footer-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
// get_site_option() won't exist when auto upgrading from <= 2.7.
if ( function_exists( 'get_site_option' )
&& false === get_site_option( 'can_compress_scripts' )
) {
compression_test();
}
?>
<div class="clear"></div></div><!-- wpwrap -->
<script type="text/javascript">if(typeof wpOnload==='function')wpOnload();</script>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More