Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
feebceffaa | ||
|
|
6ed612a2b3 | ||
|
|
88a0c96790 | ||
|
|
c601b7e9a1 | ||
|
|
0dcce8f75c |
@@ -1 +1,23 @@
|
|||||||
# web_lepainbleu.ca
|
# web_lepainbleu.ca
|
||||||
|
|
||||||
|
blue bread is best bread.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Pages
|
||||||
|
|
||||||
|
- `index.html` — accueil
|
||||||
|
- `products.html` — produits
|
||||||
|
- `about.html` — à propos
|
||||||
|
- `login.html` — espace client
|
||||||
|
- `https://boutique.lepainbleu.ca` — boutique en ligne
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
Le dossier `api/` contient les scripts backend (`client.php`, `db.php`, `yeet.php`, `mmn.js`).
|
||||||
|
|
||||||
|
## Stack
|
||||||
|
|
||||||
|
- HTML / CSS / PHP
|
||||||
|
- Bootstrap 5
|
||||||
|
- Fonts : Raleway, Lora
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
<h2 class="section-heading mb-4"><span class="section-heading-upper">le pain dans seulement une couleur</span><span class="section-heading-lower">bleu</span></h2>
|
<h2 class="section-heading mb-4"><span class="section-heading-upper">le pain dans seulement une couleur</span><span class="section-heading-lower">bleu</span></h2>
|
||||||
<p>Fondé en 1987 par les frères Hernandez, notre établissement sert du pain bleu riche provenant d'agriculteurs artisanaux de diverses régions d'Amérique du Sud et d'Amérique centrale. Nous nous engageons à parcourir le monde, à trouver le meilleur pain bleu et à vous ramener ici dans notre boutique de pain bleue.<br></p>
|
<p>Fondé en 1987 par les frères Hernandez, notre établissement sert du pain bleu riche provenant d'agriculteurs artisanaux de diverses régions d'Amérique du Sud et d'Amérique centrale. Nous nous engageons à parcourir le monde, à trouver le meilleur pain bleu et à vous ramener ici dans notre boutique de pain bleue.<br></p>
|
||||||
<p class="mb-0">Nous vous garantissons que vous tomberez dans la convoitise avec nos mélanges décadents au moment où vous entrerez jusqu'à ce que vous ayez terminé votre dernière bouchée de pain bleu. Rejoignez-nous pour votre routine quotidienne, une sortie entre amis, ou tout simplement pour profiter d'un moment seul entre pains bleus.<br></p>
|
<p class="mb-0">Nous vous garantissons que vous tomberez dans la convoitise avec nos mélanges décadents au moment où vous entrerez jusqu'à ce que vous ayez terminé votre dernière bouchée de pain bleu. Rejoignez-nous pour votre routine quotidienne, une sortie entre amis, ou tout simplement pour profiter d'un moment seul entre pains bleus.<br></p>
|
||||||
|
<p class="mb-0"><br>Pour toute autre questions, vous pouvez rejoindre notre vendeur étoile Allain Dex au numéro suivant:<br></p><p><b>514-765-9295</b> Ext:1001
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,32 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<?php
|
||||||
|
include 'db.php';
|
||||||
|
if (isset($_COOKIE['pass'])) {
|
||||||
|
$dog = $_COOKIE["user"];
|
||||||
|
$cat = $_COOKIE["pass"];
|
||||||
|
}
|
||||||
|
$thelist = '';
|
||||||
|
if ($handle = opendir("./client_files/")) {
|
||||||
|
while (false !== ($file = readdir($handle))) {
|
||||||
|
if ($file != "." && $file != "..") {
|
||||||
|
$thelist .= '<li><a href="client_files/'.$file.'">'.$file.'</a></li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
}
|
||||||
|
$dog;
|
||||||
|
$cat;
|
||||||
|
$user_sql = "SELECT user FROM users where user LIKE '". $dog ."'";
|
||||||
|
$pass_sql = "SELECT pass FROM users where user LIKE '". $dog ."'";
|
||||||
|
$rus = mysqli_query($conn, $user_sql);
|
||||||
|
$rps = mysqli_query($conn, $pass_sql);
|
||||||
|
|
||||||
|
if ($rus->num_rows > 0) {
|
||||||
|
while($row = $rps->fetch_assoc()) {
|
||||||
|
if ($cat == $row["pass"])
|
||||||
|
{
|
||||||
|
echo <<<GFG
|
||||||
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||||
@@ -22,65 +48,31 @@
|
|||||||
<ul class="navbar-nav mx-auto">
|
<ul class="navbar-nav mx-auto">
|
||||||
<li class="nav-item"><a class="nav-link" href="../index.html">Accueil</a></li>
|
<li class="nav-item"><a class="nav-link" href="../index.html">Accueil</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="../products.html">produits</a></li>
|
<li class="nav-item"><a class="nav-link" href="../products.html">produits</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="../https://nop.lepainbleu.ca">boutique</a></li>
|
<li class="nav-item"><a class="nav-link" href="https://boutique.lepainbleu.ca">boutique</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="../login.html">espace client</a></li>
|
<li class="nav-item"><a class="nav-link" href="../login.html">espace client</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="../about.html">à propos</a></li>
|
<li class="nav-item"><a class="nav-link" href="../about.html">à propos</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<?php
|
|
||||||
include 'db.php';
|
|
||||||
$dog = $_COOKIE["user"];
|
|
||||||
$cat = $_COOKIE["pass"];
|
|
||||||
$user_sql = "SELECT user FROM users where user LIKE '". $dog ."'";
|
|
||||||
$pass_sql = "SELECT pass FROM users where user LIKE '". $dog ."'";
|
|
||||||
$rus = mysqli_query($conn, $user_sql);
|
|
||||||
$rps = mysqli_query($conn, $pass_sql);
|
|
||||||
|
|
||||||
if ($rus->num_rows > 0) {
|
|
||||||
while($row = $rps->fetch_assoc()) {
|
|
||||||
if ($cat == $row["pass"])
|
|
||||||
{
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo $cat;
|
|
||||||
echo "_____ IN BETWEEN _____";
|
|
||||||
echo $row["pass"];
|
|
||||||
die("DENIED");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "no result :(";
|
|
||||||
}
|
|
||||||
$conn->close();
|
|
||||||
?>
|
|
||||||
<section class="page-section cta">
|
<section class="page-section cta">
|
||||||
|
<center>
|
||||||
|
<form action="javascript:deleteCookies('user');javascript:deleteCookies('pass')">
|
||||||
|
<input type="submit" value="Se déconnecter">
|
||||||
|
</form>
|
||||||
|
</center>
|
||||||
|
<br>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xl-9 mx-auto">
|
<div class="col-xl-9 mx-auto">
|
||||||
<div class="cta-inner rounded">
|
<div class="cta-inner rounded">
|
||||||
<nav class="navbar navbar-default">
|
<a href="https://docs.nopcommerce.com/en/running-your-store/catalog/index.html">Procédure utilisateur</a>
|
||||||
<ul>
|
<p>
|
||||||
<li><a href="https://docs.nopcommerce.com/en/running-your-store/catalog/index.html">Procédure utilisateur</a></li>
|
|
||||||
<li><a href="https://theuselessweb.com/">Sites web?</a></li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
<br>
|
|
||||||
<?php
|
|
||||||
$thelist = '';
|
|
||||||
if ($handle = opendir("./client_files/")) {
|
|
||||||
while (false !== ($file = readdir($handle))) {
|
|
||||||
if ($file != "." && $file != "..") {
|
|
||||||
$thelist .= '<li><a href="client_files/'.$file.'">'.$file.'</a></li>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closedir($handle);
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<h3>Fichiers:</h3>
|
<h3>Fichiers:</h3>
|
||||||
<ul><?php echo $thelist; ?></ul>
|
<ul>
|
||||||
|
$thelist
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -95,3 +87,20 @@
|
|||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
GFG;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "YOU DONT BELONG HERE YOU BLUE BREAD EATER";
|
||||||
|
die("DENIED");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "you shall not pass at this time, sorry :(";
|
||||||
|
}
|
||||||
|
$conn->close();
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
admin:password123
|
||||||
|
woof:miaw
|
||||||
|
ez:clap
|
||||||
|
slayer:rainingblood
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
oof
|
||||||
|
|
||||||
|
10/10
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$servername = "127.0.0.1";
|
$servername = "database";
|
||||||
$username = "root";
|
$username = "admin";
|
||||||
$password = "";
|
$password = "l[k8]ww(/mwHfO.*";
|
||||||
$dbname = "oof";
|
$dbname = "web";
|
||||||
|
|
||||||
$conn = new mysqli($servername,$username,$password,$dbname);
|
$conn = new mysqli($servername,$username,$password,$dbname);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
var str = "Aucun pain bleu ici, malheureusement. keep looking tho, may find something.";
|
var str = "Aucun pain bleu ici, malheureusement. keep looking tho, may find something.";
|
||||||
console.log(str);
|
console.log(str);
|
||||||
|
console.log(getCookie("user"));
|
||||||
|
console.log(getCookie("pass"));
|
||||||
|
|
||||||
|
function redirect() {
|
||||||
|
if (getCookie("user") !== null && getCookie("pass") !== null)
|
||||||
|
{
|
||||||
|
console.log("Redirect oof");
|
||||||
|
window.location = "./api/client.php";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
console.log("nope");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function chkLogin(woof, miaw) {
|
function chkLogin(woof, miaw) {
|
||||||
$.post( "./api/yeet.php", { dog: woof, cat: miaw }, function(data) {
|
$.post( "./api/yeet.php", { dog: woof, cat: miaw }, function(data) {
|
||||||
@@ -15,4 +29,42 @@ function chkLogin(woof, miaw) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getCookie(name) {
|
||||||
|
var value = "; " + document.cookie;
|
||||||
|
var parts = value.split("; " + name + "=");
|
||||||
|
if (parts.length == 2) return parts.pop().split(";").shift();
|
||||||
|
else return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setCookie(name, value, options = {}) {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
path: '/',
|
||||||
|
// add other defaults here if necessary
|
||||||
|
...options
|
||||||
|
};
|
||||||
|
|
||||||
|
if (options.expires instanceof Date) {
|
||||||
|
options.expires = options.expires.toUTCString();
|
||||||
|
}
|
||||||
|
|
||||||
|
let updatedCookie = encodeURIComponent(name) + "=" + encodeURIComponent(value);
|
||||||
|
|
||||||
|
for (let optionKey in options) {
|
||||||
|
updatedCookie += "; " + optionKey;
|
||||||
|
let optionValue = options[optionKey];
|
||||||
|
if (optionValue !== true) {
|
||||||
|
updatedCookie += "=" + optionValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.cookie = updatedCookie;
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteCookies(name) {
|
||||||
|
console.log("no more cookies");
|
||||||
|
setCookie(name, "", {
|
||||||
|
'max-age': -1
|
||||||
|
})
|
||||||
|
window.location = '../index.html';
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 345 KiB After Width: | Height: | Size: 345 KiB |
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 382 KiB After Width: | Height: | Size: 382 KiB |
|
Before Width: | Height: | Size: 359 KiB After Width: | Height: | Size: 359 KiB |
|
Before Width: | Height: | Size: 407 KiB After Width: | Height: | Size: 407 KiB |
|
Before Width: | Height: | Size: 268 KiB After Width: | Height: | Size: 268 KiB |
|
After Width: | Height: | Size: 1.5 MiB |
@@ -11,14 +11,9 @@
|
|||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i">
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lora:400,400i,700,700i">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lora:400,400i,700,700i">
|
||||||
<script src="./api/mmn.js"></script>
|
<script src="./api/mmn.js"></script>
|
||||||
|
<script>redirect()</script>
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/crypto-js.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/crypto-js.min.js"></script>
|
||||||
<script>
|
|
||||||
if (document.cookie)
|
|
||||||
{
|
|
||||||
window.location = 'api/client.php';
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="background:linear-gradient(rgba(47, 23, 15, 0.65), rgba(47, 23, 15, 0.65)), url('assets/img/bg.jpg');">
|
<body style="background:linear-gradient(rgba(47, 23, 15, 0.65), rgba(47, 23, 15, 0.65)), url('assets/img/bg.jpg');">
|
||||||
@@ -43,7 +38,7 @@
|
|||||||
<div class="text-center cta-inner rounded">
|
<div class="text-center cta-inner rounded">
|
||||||
<form action="javascript:chkLogin($('#nomd').val(),$('#mdp').val())">
|
<form action="javascript:chkLogin($('#nomd').val(),$('#mdp').val())">
|
||||||
<input type="text" id="nomd" placeholder="nom d'utilisateur">
|
<input type="text" id="nomd" placeholder="nom d'utilisateur">
|
||||||
<input type="text" id="mdp" placeholder="mot de passe">
|
<input type="password" id="mdp" placeholder="mot de passe">
|
||||||
<input type="submit" value=">">
|
<input type="submit" value=">">
|
||||||
</form>
|
</form>
|
||||||
<br>
|
<br>
|
||||||
|
|||||||