Merge branch 'master' of https://codefirst.iut.uca.fr/git/nathan.boileau/Scripted
continuous-integration/drone/push Build is passing Details

ServeurDeTest
Noé GARNIER 2 years ago
commit 957d32d00c

@ -48,17 +48,7 @@ class UtilisateurGateway
':email' => array($email,SQLITE3_TEXT)
));
$results=$this->con->getResults();
if ($results == null){
return new Utilisateur("null", "null", "null", false);
}
foreach($results as $row)
{
$email = $row['email'];
$pseudo=$row['pseudo'];
$mdp = $row['mdp'];
$estAdmin = $row['estAdmin'];
}
return new Utilisateur($email, $pseudo, $mdp, $estAdmin);
return UtilisateurFactory::createUtilisateur($results);
}
public function getMdpByEmail(string $email) : string{

@ -2,7 +2,20 @@
class UtilisateurFactory
{
public static function create(array $results){
public static function createUtilisateur(array $results){
if ($results == null){
return new Utilisateur("null", "null", "null", false);
}
foreach($results as $row)
{
$email = $row['email'];
$pseudo=$row['pseudo'];
$mdp = $row['mdp'];
$estAdmin = $row['estAdmin'];
}
return new Utilisateur($email, $pseudo, $mdp, $estAdmin);
}
public static function createTabUtilisateur(array $results){
$tabUtilisateur=array();
foreach($results as $row)
{
@ -10,5 +23,4 @@ class UtilisateurFactory
}
return $tabUtilisateur;
}
}

@ -17,7 +17,6 @@ body {
background-attachment: fixed;
background-repeat: no-repeat;
background-size: cover;
/* background-image: url("../../assets/img/Background5.jpg"); */
background-color: #050E15;
}
@ -123,6 +122,5 @@ h1, h2, h3, h4, h5, h6 {
justify-content: center;
align-items: center;
text-transform: uppercase;
letter-spacing: 1.5px;
color: #fff;
}

@ -0,0 +1,94 @@
@font-face {
font-family: Fauna;
src: url("../../assets/fonts/Fauna.ttf");
}
@font-face {
font-family: Equinox;
src: url("../../assets/fonts/Equinox.otf");
}
body {
min-height: 100vh;
font-family: "Equinox", sans-serif;
color: white;
scroll-behavior: smooth;
background-color: #050e15;
}
nav {
background-color: #050e15;
}
p {
font-family: "Fauna", sans-serif;
font-size: 14px;
}
#editor {
width: 100%;
min-height: 80vh;
height: auto;
}
#console {
font-family: DejaVu Sans Mono, monospace;
font-size: 0.8rem;
letter-spacing: 1px;
background-color: #222831;
resize: none;
color: #fff;
border: 1px solid #44fff6;
box-shadow: 0 0 1px #fff, 0 0 1px #fff, 0 0 5px #44fff6, 0 0 5px #44fff6,
inset 0 0 5px #44fff6;
}
.btn {
position: relative;
width: 120px;
height: 60px;
background: transparent;
}
.btn:before,
.btn:after {
content: "";
position: absolute;
inset: 0;
transition: 0.5s;
background: #f00;
}
.btn:nth-child(1):before,
.btn:nth-child(1):after {
background: linear-gradient(45deg, #00ccff, #0e1538, #d400d4);
}
.btn:nth-child(2):before,
.btn:nth-child(2):after {
background: linear-gradient(45deg, #d400d4, #0e1538, #fb5942);
}
.btn:hover:before {
inset: -3px;
}
.btn:hover:after {
inset: -3px;
filter: blur(10px);
}
.btn span {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #0e1538;
z-index: 10;
display: flex;
justify-content: center;
align-items: center;
text-transform: uppercase;
letter-spacing: 2px;
color: #fff;
}

@ -67,4 +67,5 @@ section{
p {
font-family: "Fauna", sans-serif;
font-size: 20px;
}
}

@ -0,0 +1,3 @@
var secondTest1 = "Pour ce second test, nous allons voir comment déclarer une variable et le manipuler. Pour créer une variable en python il est inutile de déclarer son type, il suffit de faire : ";
var secondTest2 = "x = 1"
var secondTest3 = "Pour la manipuler";

@ -1,48 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>First Test</title>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/css/bootstrap.min.css"
integrity="sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I"
crossorigin="anonymous"
/>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js"
integrity="sha384-oesi62hOLfzrys4LxRF63OJCXdXDipiYWBnvTl9Y9/TRlw5xlKIEHpNyvvDShgf/"
crossorigin="anonymous"
></script>
<link rel="stylesheet" href="../CSS/Presentation.css">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark fixed-top" style="border-bottom: 1px solid #fff;">
<div class="container-fluid mx-0">
<div class="nav-item nav-link">
<a class="navbar-brand" href="index.php?action=goToHome">Home</a>
</div>
<div class="mx-auto">
<h5
class="m-1 text-uppercase"
style="color: #fff; font-weight: bold; font-size: 22px"
>
Northgan
</h5>
</div>
<div class="nav-link">
<a class="navbar-brand" href="index.php?action=goToEnigme">Next</a>
</div>
</div>
</nav>
</body>
</html>

@ -0,0 +1,144 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>First Test</title>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/css/bootstrap.min.css"
integrity="sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I"
crossorigin="anonymous"
/>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js"
integrity="sha384-oesi62hOLfzrys4LxRF63OJCXdXDipiYWBnvTl9Y9/TRlw5xlKIEHpNyvvDShgf/"
crossorigin="anonymous"
></script>
<link rel="stylesheet" href="../../CSS/FirstTest.css" />
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark pb-5">
<div class="container-fluid mx-0">
<div class="nav-item nav-link">
<a class="navbar-brand" href="index.php?action=goToHome">Home</a>
</div>
<div class="mx-auto">
<h5
class="m-1 text-uppercase"
style="color: #fff; font-weight: bold; font-size: 22px"
>
Northgan
</h5>
</div>
<div class="nav-link">
<a class="navbar-brand" href="index.php?action=goToEnigme">Next</a>
</div>
</div>
</nav>
<div class="container">
<!-- First Test -->
<div
class="row rounded p-3 m-3"
style="
background: #16222a; /* fallback for old browsers */
background: -webkit-linear-gradient(
to right,
#3a6073,
#16222a
); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #3a6073, #16222a);
"
>
<div class="row">
<div class="col-10">
<section
style="background-color: #222831; min-height: 0"
class="p-3 rounded m-0"
>
<p>
Nous voici dans votre premier test, pour savoir si vous ètes
qualifié pour maider. Attention je suis très méticuleux, alors
soit bien sur dêtre précis dans ce que tu fais !
</p>
<br />
<p>
Tout dabord, vous allez devoir afficher
<b style="color: violet">"Hello World !"</b> en utilisant la
fonction intégrée de python,<code style="font-size: 18px">
print()</code
>.
</p>
<p></p>
<!-- <code>print("Hello World !")</code> -->
</section>
</div>
<div class="col-2 align-self-center">
<img
src="../../../assets/img/Foxy.png"
alt="Logo"
class="img-fluid rounded-circle"
style="
border: 2px solid #44fff6;
background-image: url('../../../assets/img/BackgroundMain.jpg');
background-size: cover;
background-position: center;
"
/>
</div>
</div>
<div class="row mt-5">
<!-- Editor -->
<div class="col-8">
<div class="ace rounded ace-1" id="editor" style="min-height: 40vh">print("Hello World !")</div>
</div>
<!-- End Editor -->
<!-- Console -->
<div class="col-4" style="min-height: 40vh">
<textarea
id="console"
readonly
style="width: 100%; height: 60%"
class="p-3 rounded"
></textarea>
<!-- End Return Code -->
<!-- Buttons -->
<div
class="row pt-5 text-center"
style="cursor: pointer; height: 20%"
>
<div class="col">
<a onclick="run_init()" class="btn">
<span>Run</span>
</a>
</div>
</div>
<!-- End Buttons -->
</div>
<!-- End Console -->
</div>
</div>
<!-- End First Test -->
</div>
<script
src="https://ajaxorg.github.io/ace-builds/src-noconflict/ace.js"
type="text/javascript"
charset="utf-8"
></script>
<script
src="https://raw.githack.com/pythonpad/brython-runner/master/lib/brython-runner.bundle.js"
type="text/javascript"
charset="utf-8"
></script>
<script src="../../JS/base.js"></script>
</body>
</html>

@ -0,0 +1,155 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>First Test</title>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/css/bootstrap.min.css"
integrity="sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I"
crossorigin="anonymous"
/>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js"
integrity="sha384-oesi62hOLfzrys4LxRF63OJCXdXDipiYWBnvTl9Y9/TRlw5xlKIEHpNyvvDShgf/"
crossorigin="anonymous"
></script>
<link rel="stylesheet" href="../../CSS/FirstTest.css" />
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark pb-5">
<div class="container-fluid mx-0">
<div class="nav-item nav-link">
<a class="navbar-brand" href="index.php?action=goToHome">Home</a>
</div>
<div class="mx-auto">
<h5
class="m-1 text-uppercase"
style="color: #fff; font-weight: bold; font-size: 22px"
>
Northgan
</h5>
</div>
<div class="nav-link">
<a class="navbar-brand" href="index.php?action=goToEnigme">Next</a>
</div>
</div>
</nav>
<div class="container">
<!-- First Test -->
<div
class="row rounded p-3 m-3"
style="
background: #16222a; /* fallback for old browsers */
background: -webkit-linear-gradient(
to right,
#3a6073,
#16222a
); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #3a6073, #16222a);
"
>
<div class="row">
<div class="col-10">
<section
style="background-color: #222831; min-height: 0"
class="p-3 rounded m-0"
>
<p>
Pour ce second test, nous allons voir comment déclarer une
variable et le manipuler. Pour créer une variable en python il
est inutile de déclarer son type, il suffit de faire :
</p>
<code style="font-size: 18px">x = 1</code>
<br /><br />
<p>
Ici, nous avons créé une variable x qui contient la valeur 1.
Nous pouvons maintenant manipuler cette variable en faisant :
</p>
<code style="font-size: 18px">x = x + 1</code>
<br /><br />
<p>
Ici, nous avons incrémenté la valeur de x de 1. Nous pouvons
également faire tout autre opération mathématique avec cette
même variable. Par exemple :
</p>
<code style="font-size: 18px">x = x * 2</code><br />
<code style="font-size: 18px">x = x / 2</code><br />
<code style="font-size: 18px">x = x - 1</code>
<br /> <br />
<!-- Afficher x -->
<p>Nous pouvons afficher la valeur de x en faisant :</p>
<code style="font-size: 18px">print(x)</code>
</section>
</div>
<div class="col-2 align-self-center">
<img
src="../../../assets/img/Foxy.png"
alt="Logo"
class="img-fluid rounded-circle"
style="
border: 2px solid #44fff6;
background-image: url('../../../assets/img/BackgroundMain.jpg');
background-size: cover;
background-position: center;
"
/>
</div>
</div>
<div class="row mt-5">
<!-- Editor -->
<div class="col-8">
<div class="ace rounded ace-1" id="editor" style="min-height: 40vh">x = 1
print(x)</div>
</div>
<!-- End Editor -->
<!-- Console -->
<div class="col-4" style="min-height: 40vh">
<textarea
id="console"
readonly
style="width: 100%; height: 60%"
class="p-3 rounded"
></textarea>
<!-- End Return Code -->
<!-- Buttons -->
<div
class="row pt-5 text-center"
style="cursor: pointer; height: 20%"
>
<div class="col">
<a onclick="run_init()" class="btn">
<span>Run</span>
</a>
</div>
</div>
<!-- End Buttons -->
</div>
<!-- End Console -->
</div>
</div>
<!-- End First Test -->
</div>
<script
src="https://ajaxorg.github.io/ace-builds/src-noconflict/ace.js"
type="text/javascript"
charset="utf-8"
></script>
<script
src="https://raw.githack.com/pythonpad/brython-runner/master/lib/brython-runner.bundle.js"
type="text/javascript"
charset="utf-8"
></script>
<script src="../../JS/base.js"></script>
</body>
</html>

@ -0,0 +1,155 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>First Test</title>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/css/bootstrap.min.css"
integrity="sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I"
crossorigin="anonymous"
/>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js"
integrity="sha384-oesi62hOLfzrys4LxRF63OJCXdXDipiYWBnvTl9Y9/TRlw5xlKIEHpNyvvDShgf/"
crossorigin="anonymous"
></script>
<link rel="stylesheet" href="../../CSS/FirstTest.css" />
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark pb-5">
<div class="container-fluid mx-0">
<div class="nav-item nav-link">
<a class="navbar-brand" href="index.php?action=goToHome">Home</a>
</div>
<div class="mx-auto">
<h5
class="m-1 text-uppercase"
style="color: #fff; font-weight: bold; font-size: 22px"
>
Northgan
</h5>
</div>
<div class="nav-link">
<a class="navbar-brand" href="index.php?action=goToEnigme">Next</a>
</div>
</div>
</nav>
<div class="container">
<!-- First Test -->
<div
class="row rounded p-3 m-3"
style="
background: #16222a; /* fallback for old browsers */
background: -webkit-linear-gradient(
to right,
#3a6073,
#16222a
); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #3a6073, #16222a);
"
>
<div class="row">
<div class="col-10">
<section
style="background-color: #222831; min-height: 0"
class="p-3 rounded m-0"
>
<p>
Pour ce second test, nous allons voir comment déclarer une
variable et le manipuler. Pour créer une variable en python il
est inutile de déclarer son type, il suffit de faire :
</p>
<code style="font-size: 18px">x = 1</code>
<br /><br />
<p>
Ici, nous avons créé une variable x qui contient la valeur 1.
Nous pouvons maintenant manipuler cette variable en faisant :
</p>
<code style="font-size: 18px">x = x + 1</code>
<br /><br />
<p>
Ici, nous avons incrémenté la valeur de x de 1. Nous pouvons
également faire tout autre opération mathématique avec cette
même variable. Par exemple :
</p>
<code style="font-size: 18px">x = x * 2</code><br />
<code style="font-size: 18px">x = x / 2</code><br />
<code style="font-size: 18px">x = x - 1</code>
<br /> <br />
<!-- Afficher x -->
<p>Nous pouvons afficher la valeur de x en faisant :</p>
<code style="font-size: 18px">print(x)</code>
</section>
</div>
<div class="col-2 align-self-center">
<img
src="../../../assets/img/Foxy.png"
alt="Logo"
class="img-fluid rounded-circle"
style="
border: 2px solid #44fff6;
background-image: url('../../../assets/img/BackgroundMain.jpg');
background-size: cover;
background-position: center;
"
/>
</div>
</div>
<div class="row mt-5">
<!-- Editor -->
<div class="col-8">
<div class="ace rounded ace-1" id="editor" style="min-height: 40vh">x = 1
print(x)</div>
</div>
<!-- End Editor -->
<!-- Console -->
<div class="col-4" style="min-height: 40vh">
<textarea
id="console"
readonly
style="width: 100%; height: 60%"
class="p-3 rounded"
></textarea>
<!-- End Return Code -->
<!-- Buttons -->
<div
class="row pt-5 text-center"
style="cursor: pointer; height: 20%"
>
<div class="col">
<a onclick="run_init()" class="btn">
<span>Run</span>
</a>
</div>
</div>
<!-- End Buttons -->
</div>
<!-- End Console -->
</div>
</div>
<!-- End First Test -->
</div>
<script
src="https://ajaxorg.github.io/ace-builds/src-noconflict/ace.js"
type="text/javascript"
charset="utf-8"
></script>
<script
src="https://raw.githack.com/pythonpad/brython-runner/master/lib/brython-runner.bundle.js"
type="text/javascript"
charset="utf-8"
></script>
<script src="../../JS/base.js"></script>
</body>
</html>

@ -24,7 +24,7 @@
rel="stylesheet"
href="https://fonts.googleapis.com/icon?family=Material+Icons"
/>
<link rel="stylesheet" href="View/src/CSS/Eni.css" />
<link rel="stylesheet" href="View/src/CSS/Enigme.css" />
</head>
<body>
<div class="container-fluid px-5">

Loading…
Cancel
Save