thchazot1 2 years ago
parent f5647d0c44
commit 37fe5306c1

@ -0,0 +1,90 @@
body{
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
font-family: 'Jost', sans-serif;
background: linear-gradient(to bottom, #0f0c29, #302b63, #24243e);
}
.main{
width: 350px;
height: 500px;
background: red;
overflow: hidden;
background: url("https://doc-08-2c-docs.googleusercontent.com/docs/securesc/68c90smiglihng9534mvqmq1946dmis5/fo0picsp1nhiucmc0l25s29respgpr4j/1631524275000/03522360960922298374/03522360960922298374/1Sx0jhdpEpnNIydS4rnN4kHSJtU1EyWka?e=view&authuser=0&nonce=gcrocepgbb17m&user=03522360960922298374&hash=tfhgbs86ka6divo3llbvp93mg4csvb38") no-repeat center/ cover;
border-radius: 10px;
box-shadow: 5px 20px 50px #000;
}
#chk{
display: none;
}
.signup{
position: relative;
width:100%;
height: 100%;
}
label{
color: #fff;
font-size: 2.3em;
justify-content: center;
display: flex;
margin: 60px;
font-weight: bold;
cursor: pointer;
transition: .5s ease-in-out;
}
input{
width: 60%;
height: 20px;
background: #e0dede;
justify-content: center;
display: flex;
margin: 20px auto;
padding: 10px;
border: none;
outline: none;
border-radius: 5px;
}
button{
width: 60%;
height: 40px;
margin: 10px auto;
justify-content: center;
display: block;
color: #fff;
background: #573b8a;
font-size: 1em;
font-weight: bold;
margin-top: 20px;
outline: none;
border: none;
border-radius: 5px;
transition: .2s ease-in;
cursor: pointer;
}
button:hover{
background: #6d44b8;
}
.login{
height: 460px;
background: #eee;
border-radius: 60% / 10%;
transform: translateY(-180px);
transition: .8s ease-in-out;
}
.login label{
color: #573b8a;
transform: scale(.6);
}
#chk:checked ~ .login{
transform: translateY(-500px);
}
#chk:checked ~ .login label{
transform: scale(1);
}
#chk:checked ~ .signup label{
transform: scale(.6);
}

@ -0,0 +1,155 @@
body {
background-color: #9f9da7;
font-size: 1.6rem;
font-family: "Open Sans", sans-serif;
color: #2b3e51;
}
h2 {
font-weight: 300;
text-align: center;
}
p {
position: relative;
}
a,
a:link,
a:visited,
a:active {
color: #3ca9e2;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}
a:focus, a:hover,
a:link:focus,
a:link:hover,
a:visited:focus,
a:visited:hover,
a:active:focus,
a:active:hover {
color: #329dd5;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}
#login-form-wrap {
background-color: #fff;
width: 35%;
margin: 30px auto;
text-align: center;
padding: 20px 0 0 0;
border-radius: 4px;
box-shadow: 0px 30px 50px 0px rgba(0, 0, 0, 0.2);
}
#login-form {
padding: 0 60px;
}
input {
display: block;
box-sizing: border-box;
width: 100%;
outline: none;
height: 60px;
line-height: 60px;
border-radius: 4px;
}
input[type="text"],
input[type="email"] {
width: 100%;
padding: 0 0 0 10px;
margin: 0;
color: #8a8b8e;
border: 1px solid #c2c0ca;
font-style: normal;
font-size: 16px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
position: relative;
display: inline-block;
background: none;
}
input[type="text"]:focus,
input[type="email"]:focus {
border-color: #3ca9e2;
}
input[type="text"]:focus:invalid,
input[type="email"]:focus:invalid {
color: #cc1e2b;
border-color: #cc1e2b;
}
input[type="text"]:valid ~ .validation,
input[type="email"]:valid ~ .validation {
display: block;
border-color: #0C0;
}
input[type="text"]:valid ~ .validation span,
input[type="email"]:valid ~ .validation span {
background: #0C0;
position: absolute;
border-radius: 6px;
}
input[type="text"]:valid ~ .validation span:first-child,
input[type="email"]:valid ~ .validation span:first-child {
top: 30px;
left: 14px;
width: 20px;
height: 3px;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
}
input[type="text"]:valid ~ .validation span:last-child,
input[type="email"]:valid ~ .validation span:last-child {
top: 35px;
left: 8px;
width: 11px;
height: 3px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
.validation {
display: none;
position: absolute;
content: " ";
height: 60px;
width: 30px;
right: 15px;
top: 0px;
}
input[type="submit"] {
border: none;
display: block;
background-color: #3ca9e2;
color: #fff;
font-weight: bold;
text-transform: uppercase;
cursor: pointer;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
font-size: 18px;
position: relative;
display: inline-block;
cursor: pointer;
text-align: center;
}
input[type="submit"]:hover {
background-color: #329dd5;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}
#create-account-wrap {
background-color: #eeedf1;
color: #8a8b8e;
font-size: 14px;
width: 100%;
padding: 10px 0;
border-radius: 0 0 4px 4px;
}

@ -1,27 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Ajouter une Liste</title>
<link rel="stylesheet" href="../Style/bootstrap.css">
<link rel="stylesheet" href="../Style/mycoolstyle.css">
</head>
<body>
<ul class="navbar">
<li><button onclick="location.href='addList.html'" type="button" class="addList">Ajouter une Liste</button>
<li><button onclick="location.href='addTask.html'" type="button" class="addTask">Ajouter une Tache</button>
</ul>
<h1>Ajouter</h1>
<input type="text" id="name" name="name" placeholder="name">
<br>
<div>
Liste privee ?
<input type="checkbox" id="private" name="private">
</div>
<br>
<button class="valider" onclick="location.href='page.html'">Valider</button>
</body>

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<title>Ajouter une Liste</title>
<link rel="stylesheet" href="Style/bootstrap.css">
<link rel="stylesheet" href="Style/mycoolstyle.css">
</head>
<body>
<ul class="navbar">
<li><button onclick="location.href='addList.php'" type="button" class="addList">Ajouter une Liste</button>
<li><button onclick="location.href='addTask.php'" type="button" class="addTask">Ajouter une Tache</button>
</ul>
<h1>Ajouter</h1>
<input type="text" id="name" name="name" placeholder="name">
<br>
<div>
Liste privee ?
<input type="checkbox" id="private" name="private">
</div>
<br>
<button class="valider" onclick="location.href='page.php'">Valider</button>
</body>

@ -1,24 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Ajouter une Tache</title>
<link rel="stylesheet" href="../Style/bootstrap.css">
<link rel="stylesheet" href="../Style/mycoolstyle.css">
</head>
<body>
<ul class="navbar">
<li><button onclick="location.href='addList.html'" type="button" class="addList">Ajouter une Liste</button>
<li><button onclick="location.href='addTask.html'" type="button" class="addTask">Ajouter une Tache</button>
</ul>
<h1>Ajouter</h1>
<input type="text" id="name" name="name" placeholder="name">
<br>
<input type="text" id="content" name="content" placeholder="content">
<br>
<button class="valider" onclick="location.href='page.html'">Valider</button>
</body>

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<title>Ajouter une Tache</title>
<link rel="stylesheet" href="Style/bootstrap.css">
<link rel="stylesheet" href="Style/mycoolstyle.css">
</head>
<body>
<ul class="navbar">
<li><button onclick="location.href='addList.php'" type="button" class="addList">Ajouter une Liste</button>
<li><button onclick="location.href='addTask.php'" type="button" class="addTask">Ajouter une Tache</button>
</ul>
<h1>Ajouter</h1>
<input type="text" id="name" name="name" placeholder="name">
<br>
<input type="text" id="content" name="content" placeholder="content">
<br>
<button class="valider" onclick="location.href='page.php'">Valider</button>
</body>

@ -1,25 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Connexion</title>
<link rel="stylesheet" href="../Style/bootstrap.css">
<link rel="stylesheet" href="../Style/connexion.css">
<link rel="stylesheet" href="../Style/mycoolstyle.css">
</head>
<body>
<ul class="navbar">
<li><button onclick="location.href='addList.html'" type="button" class="addList">Ajouter une Liste</button>
<li><button onclick="location.href='addTask.html'" type="button" class="addTask">Ajouter une Tache</button>
</ul>
<h1>Connexion</h1>
<input type="text" id="username" name="username" placeholder="username">
<br>
<input type="password" id="password" name="password" placeholder="password" >
<br>
<button class="valider" onclick="location.href='page.html'">Valider</button>
</body>

@ -1,26 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Accueil</title>
<link rel="stylesheet" href="../Style/bootstrap.css">
<link rel="stylesheet" href="../Style/mycoolstyle.css">
</head>
<body>
<!-- Navigation menu -->
<ul class="navbar">
<li><button onclick="location.href='addList.html'" type="button" class="addList">Ajouter une Liste</button>
<li><button onclick="location.href='addTask.html'" type="button" class="addTask">Ajouter une Tache</button>
</ul>
<!-- Main Content -->
<h1>To Do List !</h1>
<button onclick="location.href='connexion.html'" type="button" class="connexion">Se connecter</button>
<!-- my footer -->
</body>
</html>

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html>
<head>
<title>Slide Navbar</title>
<link rel="stylesheet" type="text/css" href="slide navbar style.css">
<link href="Style/signUp.css" rel="stylesheet">
</head>
<body>
<div class="main">
<input type="checkbox" id="chk" aria-hidden="true">
<div class="signup">
<form>
<label for="chk" aria-hidden="true">Login</label>
<input type="txt" name="username" placeholder="Username" required="">
<input type="password" name="password" placeholder="Password" required="">
<button>Login</button>
</form>
</div>
<div class="login">
<form>
<label for="chk" aria-hidden="true">Sign up</label>
<input type="txt" name="username" placeholder="Username" required="">
<input type="password" name="password" placeholder="Password" required="">
<input type="password" name="paswwordConf" placeholder="Password confirmation" required="">
<button>Sign up</button>
</form>
</div>
</div>
</body>
</html>

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="fr">
<body>
<h1>ERREUR !!!!!</h1>
<?php
if (isset($dataVueErreur)) {
foreach ($dataVueErreur as $value){
echo $value;
}
}
?>
</body>
</html>

@ -0,0 +1,17 @@
<?php
$rep=__DIR__.'/../';
$base="votre_base";
$login="";
$mdp="";
$vues['erreur']='Vues/erreur.php';
$vues['accueil']='Vues/accueil.php';
$vues['signUp']='Vues/signUp.php';
$vues['addList']='Vues/addList.php';
$vues['addTask']='Vues/addTask.php';
$vues['accueilPrive']='Vues/accueilPrive.php';
?>

@ -15,6 +15,7 @@ require_once('modeles/mdlUser.php');
require_once('modeles/mdlListe.php'); require_once('modeles/mdlListe.php');
//A CHANGER //A CHANGER
$user= 'thchazot1'; $user= 'thchazot1';
$pass='achanger'; $pass='achanger';
@ -26,34 +27,8 @@ $content='Argent, Encore de l\'argent';
try{ try{
$con=new Connection($dsn,$user,$pass);
$u=new User(2, "boby", "test");
$t=new Tache($id, $name, $content, true);
$t1=new Tache(478, "TEST", $content, false);
$tacheGateway=new TacheGateway($con);
$userGateway=new UserGateway($con);
$listeGateway=new ListeGateway($con);
$mdlUser=new MdlUser($con);
$mdlListe=new MdlListe($con);
$list=$mdlListe->update($u);
echo ($list[0]);
/*
$tacheGateway->delete($t);
$user=$userGateway->insert(new User(1, "test", "mdp"));
$user=$userGateway->findByNamePassword("test", "mdp");
print($user);
$gateway->insert($t, 1);
$tabTache=$gateway->getTacheFromIdList(1); require("Vues/signUp.php");
foreach($tabTache as $tache){
print($tache);
echo "<br>";
}
*/
} }
catch( PDOException $Exception ) { catch( PDOException $Exception ) {
echo 'erreur'; echo 'erreur';

@ -24,10 +24,9 @@ class MdlListe{
$gate->delete($liste); $gate->delete($liste);
} }
public function update(Liste $liste, string $name, string $content, bool $private){ public function update(Liste $liste, string $name, bool $private){
$gate=new ListeGateway($this->con); $gate=new ListeGateway($this->con);
$liste->setName($name); $liste->setName($name);
$liste->setContent($content);
if ($liste->getCreator()!=null){ if ($liste->getCreator()!=null){
$liste->setPrivate($private); $liste->setPrivate($private);
} }

@ -11,7 +11,6 @@ class MdlUser{
public function getUserForConnection(string $username, string $password): ?User{ public function getUserForConnection(string $username, string $password): ?User{
if (!empty($username) && !empty($password)){ if (!empty($username) && !empty($password)){
$results=[];
$gate=new UserGateway($this->con); $gate=new UserGateway($this->con);
$results=$gate->findByNamePassword($username, $password); $results=$gate->findByNamePassword($username, $password);
if (!empty($results)){ if (!empty($results)){

Loading…
Cancel
Save