Merge branch 'master' of https://codefirst.iut.uca.fr/git/celles-qui-obtiendront-la-recompense/phpProject
commit
2a7b0e0572
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 44 KiB |
@ -1,17 +1,33 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
Class Tache {
|
Class Tache {
|
||||||
public int $id;
|
private int $id;
|
||||||
public string $nom;
|
private string $nom;
|
||||||
public bool $isCompleted;
|
private bool $isCompleted;
|
||||||
public int $idListe;
|
private int $idListe;
|
||||||
|
|
||||||
function __construct(int $i, string $in, bool $is, int $idListe){
|
public function __construct(int $i, string $in, bool $is, int $idListe){
|
||||||
$this->id = $i;
|
$this->id = $i;
|
||||||
$this->nom = $in;
|
$this->nom = $in;
|
||||||
$this->isCompleted = $is;
|
$this->isCompleted = $is;
|
||||||
$this->idListe=$idListe;
|
$this->idListe=$idListe;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_id():int{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_nom():string{
|
||||||
|
return $this->nom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_isCompleted():bool{
|
||||||
|
return $this->isCompleted;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_idListe():int{
|
||||||
|
return $this->idListe;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@ -0,0 +1,69 @@
|
|||||||
|
.head-body{
|
||||||
|
display:flex;
|
||||||
|
flex-direction: row;
|
||||||
|
height: 100px;
|
||||||
|
margin-bottom: 50px;
|
||||||
|
place-content: end space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.connection{
|
||||||
|
width: 125px;
|
||||||
|
padding: 15%;
|
||||||
|
background: none;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 20;
|
||||||
|
color: #212F3D;
|
||||||
|
border: solid 2px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border-color: #212F3D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deconnection{
|
||||||
|
width: 125px;
|
||||||
|
padding: 15%;
|
||||||
|
border: none;
|
||||||
|
color:#B2BABB;
|
||||||
|
background-color: #212F3D;
|
||||||
|
font-family: sans-serif;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#accessList{
|
||||||
|
color: #212F3D;
|
||||||
|
background-color: #E4F8FF;
|
||||||
|
margin: 2%;
|
||||||
|
padding: 3%;
|
||||||
|
border-radius: 30px;
|
||||||
|
display: flex;
|
||||||
|
place-content: end space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.private-lists{
|
||||||
|
background: none;
|
||||||
|
border:none;
|
||||||
|
color: #212F3D;
|
||||||
|
background-color: #F7F9F9;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 25;
|
||||||
|
padding : 40px;
|
||||||
|
border-radius: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.create-list{
|
||||||
|
margin-top: 2%;
|
||||||
|
background: none;
|
||||||
|
border:none;
|
||||||
|
color: #212F3D;
|
||||||
|
background-color: #F7F9F9;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 25;
|
||||||
|
padding : 40px;
|
||||||
|
border-radius: 50px;
|
||||||
|
margin-left: 25%;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.private-lists:hover{
|
||||||
|
background-color: #E4F8FF;
|
||||||
|
}
|
@ -1,26 +1,80 @@
|
|||||||
header{
|
header{
|
||||||
|
padding-top: 2%;
|
||||||
|
padding-bottom: 2%;
|
||||||
|
height: 5%;
|
||||||
|
width: 100%;
|
||||||
|
background:none;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
justify-content: center;
|
||||||
background-color: #0971C9;
|
align-items: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
place-content: start space-evenly;
|
||||||
}
|
}
|
||||||
body{
|
body{
|
||||||
background-color: #0D2350;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
align-content: center;
|
||||||
|
}
|
||||||
|
h1{
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 30;
|
||||||
|
}
|
||||||
|
h2{
|
||||||
|
margin-top: 35px;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 25;
|
||||||
|
color: #E4F8FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body{
|
||||||
|
animation: changeColor 5s infinite alternate linear;
|
||||||
|
width: 81%;
|
||||||
|
padding-left: 10%;
|
||||||
|
padding-right: 10%;
|
||||||
|
padding-bottom: 10%;
|
||||||
|
padding-top: 5%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
h1, h2, h3, h4, p{
|
|
||||||
|
@keyframes changeColor{
|
||||||
|
0% {
|
||||||
|
background-color: #004D67;
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
background: #005F80;
|
||||||
|
}
|
||||||
|
50%{
|
||||||
|
background: #007198;
|
||||||
|
}
|
||||||
|
75%{
|
||||||
|
background: #0081AD;
|
||||||
|
}
|
||||||
|
100%{
|
||||||
|
background: #0089B8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
h4{
|
||||||
|
margin-left: 5%;
|
||||||
|
align-self: center;
|
||||||
|
font-size: 20;
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
font-weight: bolder;
|
color: #212F3D;
|
||||||
color: #FFFEFD;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.button{
|
.button{
|
||||||
width: 50%;
|
border: none;
|
||||||
height: 100%;
|
color:#B2BABB;
|
||||||
background-color: #FFFEFD;
|
background-color: #212F3D;
|
||||||
border-radius: 20%;
|
font-family: sans-serif;
|
||||||
border-color: #0971C9;
|
padding:30px;
|
||||||
color: #0D2350;
|
border-radius: 20px;
|
||||||
|
}
|
||||||
}
|
|
||||||
.button:hover{
|
#GoHome > input[type="image"] {
|
||||||
background-color: grey;
|
height: 50px;
|
||||||
|
width: 50px;
|
||||||
}
|
}
|
@ -0,0 +1,66 @@
|
|||||||
|
.body{
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
header{
|
||||||
|
place-content: start center;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1{
|
||||||
|
margin-left: 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#error{
|
||||||
|
margin-top: 5%;
|
||||||
|
margin-bottom: -5%;
|
||||||
|
margin-left: 29%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#connectionForm{
|
||||||
|
background-color: #E4F8FF;
|
||||||
|
width: 50%;
|
||||||
|
padding: 5%;
|
||||||
|
border-radius: 50px;
|
||||||
|
place-content: start center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#connectionForm > input[type="text"]{
|
||||||
|
width: 60%;
|
||||||
|
height: 40px;
|
||||||
|
margin-left: 20%;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid #212F3D;
|
||||||
|
margin-bottom: 3%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#connectionForm > input[type="password"]{
|
||||||
|
width: 60%;
|
||||||
|
height: 40px;
|
||||||
|
margin-left: 20%;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid #212F3D;
|
||||||
|
margin-bottom: 3%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button{
|
||||||
|
border-radius: 50px;
|
||||||
|
width: 50%;
|
||||||
|
margin-left: 25%;
|
||||||
|
margin-top: 10%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accesInscription{
|
||||||
|
margin-top: 2%;
|
||||||
|
background: none;
|
||||||
|
border:none;
|
||||||
|
color: #212F3D;
|
||||||
|
background-color: #F7F9F9;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 25;
|
||||||
|
padding-left : 100px;
|
||||||
|
padding-right : 100px;
|
||||||
|
padding-top:30px;
|
||||||
|
padding-bottom:30px;
|
||||||
|
border-radius: 50px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
header{
|
||||||
|
place-content: start center;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1{
|
||||||
|
margin-left: 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body{
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#creationForm{
|
||||||
|
background-color: #E4F8FF;
|
||||||
|
width: 50%;
|
||||||
|
padding: 5%;
|
||||||
|
border-radius: 50px;
|
||||||
|
place-content: start center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#creationForm > input[type="text"]{
|
||||||
|
width: 60%;
|
||||||
|
height: 40px;
|
||||||
|
margin-left: 20%;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid #212F3D;
|
||||||
|
margin-bottom: 3%;
|
||||||
|
}
|
||||||
|
|
||||||
|
label{
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 20;
|
||||||
|
color: #212F3D;
|
||||||
|
}
|
||||||
|
|
||||||
|
p{
|
||||||
|
margin-left: 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button{
|
||||||
|
border-radius: 50px;
|
||||||
|
width: 50%;
|
||||||
|
margin-left: 25%;
|
||||||
|
margin-top: 10%;
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
header{
|
||||||
|
place-content: start center;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1{
|
||||||
|
margin-left: 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#delTache > input[type='image']{
|
||||||
|
height: 50px;
|
||||||
|
width: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#check > input[type='image']{
|
||||||
|
height: 50px;
|
||||||
|
width: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#uncheck > input[type='image']{
|
||||||
|
height: 50px;
|
||||||
|
width: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tache{
|
||||||
|
color: #212F3D;
|
||||||
|
background-color: #E4F8FF;
|
||||||
|
margin: 2%;
|
||||||
|
padding: 3%;
|
||||||
|
border-radius: 30px;
|
||||||
|
display: flex;
|
||||||
|
place-content: end space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-task{
|
||||||
|
margin-top: 2%;
|
||||||
|
background: none;
|
||||||
|
border:none;
|
||||||
|
color: #212F3D;
|
||||||
|
background-color: #F7F9F9;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 25;
|
||||||
|
padding : 40px;
|
||||||
|
border-radius: 50px;
|
||||||
|
margin-left: 25%;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.del-list{
|
||||||
|
margin-top: 2%;
|
||||||
|
background: none;
|
||||||
|
border:none;
|
||||||
|
color: #212F3D;
|
||||||
|
background-color: #F7F9F9;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 25;
|
||||||
|
padding : 25px;
|
||||||
|
border-radius: 50px;
|
||||||
|
margin-left: 35%;
|
||||||
|
width: 30%;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
|||||||
|
header{
|
||||||
|
place-content: start center;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1{
|
||||||
|
margin-left: 5%;
|
||||||
|
}
|
||||||
|
|
@ -1,63 +1,70 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<header>
|
<head>
|
||||||
<h2><?=$dataView->nom?></h2>
|
<title>detailList</title>
|
||||||
<form method="POST" name="goBackHome" id="Go Home">
|
<link rel="stylesheet" href="styles/commonStyles.css"/>
|
||||||
<input type="submit" value="Home Page"/>
|
<link rel="stylesheet" href="styles/detailsListStyles.css"/>
|
||||||
<input type="hidden" name="action" value="goHome"/>
|
</head>
|
||||||
</form>
|
|
||||||
</header>
|
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<header>
|
||||||
|
<form method="POST" name="goBackHome" id="GoHome">
|
||||||
|
<input type="image" src="assets/logo.png"/>
|
||||||
|
<input type="hidden" name="action" value="goHome"/>
|
||||||
|
</form>
|
||||||
|
<h1><?=$dataView->get_nom()?></h1>
|
||||||
|
</header>
|
||||||
|
<div class="body">
|
||||||
<?php
|
<?php
|
||||||
if (isset($dataView)) {
|
if (isset($dataView)) {
|
||||||
if($dataView->taches != null){
|
if($dataView->get_taches() != null){
|
||||||
foreach($dataView->taches as $tache){
|
foreach($dataView->get_taches() as $tache){
|
||||||
if($tache->isCompleted == true){
|
if($tache->get_isCompleted() == true){
|
||||||
echo '
|
echo '
|
||||||
<input type="checkbox" id="tache'.$tache->id.'" name="tache'.$tache->id.'" value="'.$tache->id.'" disabled checked>
|
<div class="tache">
|
||||||
<label for="tache'.$tache->id.'">'.$tache->nom.'</label>
|
<form method="POST" id="check" name="check">
|
||||||
<form method="POST" id="check'.$tache->id.'" name="check'.$tache->id.'">
|
<input type="image" src="assets/done.png"/>
|
||||||
<input type="submit" value="Undo"/>
|
<input type="hidden" name="action" value="changeCompletedTache"/>
|
||||||
<input type="hidden" name="action" value="changeCompletedTache"/>
|
<input type="hidden" name="tache" value="'.$tache->get_id().'"/>
|
||||||
<input type="hidden" name="tache" value="'.$tache->id.'"/>
|
<input type="hidden" name="liste" value="'.$dataView->get_id().'"/>
|
||||||
<input type="hidden" name="liste" value="'.$dataView->id.'"/>
|
</form>
|
||||||
</form>
|
<h4>'.$tache->get_nom().'</h4>
|
||||||
|
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
echo '
|
echo '
|
||||||
<input type="checkbox" id="tache'.$tache->id.'" name="tache'.$tache->id.'" value="'.$tache->id.'" disabled>
|
<div class="tache">
|
||||||
<label for="tache'.$tache->id.'">'.$tache->nom.'</label>
|
<form method="POST" id="uncheck" name="uncheck">
|
||||||
<form method="POST" id="uncheck'.$tache->id.'" name="uncheck'.$tache->id.'">
|
<input type="image" src="assets/to-do.png"/>
|
||||||
<input type="submit" value="Done"/>
|
<input type="hidden" name="action" value="changeCompletedTache"/>
|
||||||
<input type="hidden" name="action" value="changeCompletedTache"/>
|
<input type="hidden" name="tache" value="'.$tache->get_id().'"/>
|
||||||
<input type="hidden" name="tache" value="'.$tache->id.'"/>
|
<input type="hidden" name="liste" value="'.$dataView->get_id().'"/>
|
||||||
<input type="hidden" name="liste" value="'.$dataView->id.'"/>
|
</form>
|
||||||
</form>
|
<h4>'.$tache->get_nom().'</h4>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
echo '
|
echo '
|
||||||
<form method="POST" id="delTache'.$tache->id.'" name="delTache'.$tache->id.'">
|
<form method="POST" id="delTache" name="delTache">
|
||||||
<input type="submit" value="Delete"/>
|
<input type="image" src="assets/bin.png"/>
|
||||||
<input type="hidden" name="action" value="delTache"/>
|
<input type="hidden" name="action" value="delTache"/>
|
||||||
<input type="hidden" name="tache" value="'.$tache->id.'"/>
|
<input type="hidden" name="tache" value="'.$tache->get_id().'"/>
|
||||||
<input type="hidden" name="liste" value="'.$dataView->id.'"/>
|
<input type="hidden" name="liste" value="'.$dataView->get_id().'"/>
|
||||||
</form>';
|
</form>
|
||||||
|
</div>';
|
||||||
echo '<br/>';
|
echo '<br/>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<form method="POST" id="addTache" name="addTache">
|
<form method="POST" id="addTache" name="addTache">
|
||||||
<input type="submit" value="Add a Task"/></p>
|
<input class="add-task" type="submit" value="Add a Task"/></p>
|
||||||
<input type="hidden" name="action" value="accessCreationTachePage"/>
|
<input type="hidden" name="action" value="accessCreationTachePage"/>
|
||||||
<input type="hidden" name="liste" value="<?=$dataView->id?>"/>
|
<input type="hidden" name="liste" value="<?=$dataView->get_id()?>"/>
|
||||||
</form>
|
</form>
|
||||||
<form method="POST" id="delListe" name="delListe">
|
<form method="POST" id="delListe" name="delListe">
|
||||||
<input type="submit" value="Delete the list"/></p>
|
<input class="del-list" type="submit" value="Delete the list"/></p>
|
||||||
<input type="hidden" name="action" value="delListe"/>
|
<input type="hidden" name="action" value="delListe"/>
|
||||||
<input type="hidden" name="liste" value="<?=$dataView->id?>"/>
|
<input type="hidden" name="liste" value="<?=$dataView->get_id()?>"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,31 +1,44 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<header>
|
<head>
|
||||||
<h2>Private Lists</h2>
|
<title>Acceuil</title>
|
||||||
<form method="POST" name="goBackHome" id="Go Home">
|
<link rel="stylesheet" href="styles/commonStyles.css"/>
|
||||||
<input type="submit" value="Home Page"/>
|
<link rel="stylesheet" href="styles/acceuilStyles.css"/>
|
||||||
<input type="hidden" name="action" value="goHome"/>
|
<link rel="stylesheet" href="styles/privateListsStyles.css"/>
|
||||||
</form>
|
</head>
|
||||||
</header>
|
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<header>
|
||||||
|
<form method="POST" name="goBackHome" id="GoHome">
|
||||||
|
<input type="image" src="assets/logo.png"/>
|
||||||
|
<input type="hidden" name="action" value="goHome"/>
|
||||||
|
</form>
|
||||||
|
<h1>Private lists</h1>
|
||||||
|
</header>
|
||||||
|
<div class="body">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if(isset($dataView)) {
|
if(isset($dataView) && !empty($dataView)) {
|
||||||
foreach ($dataView as $liste){
|
foreach ($dataView as $liste){
|
||||||
echo '
|
echo '
|
||||||
<div>
|
<div>
|
||||||
<form method="post" name="accessList" id="accessList">
|
<form method="post" name="accessList" id="accessList">
|
||||||
<p>• '.$liste->nom.'
|
<h4>• '.$liste->get_nom().'</h4>
|
||||||
<input type="submit" value="View List"/></p>
|
<input class="button" type="submit" value="View List"/>
|
||||||
<input type="hidden" name="action" value="accessListInfos"/>
|
<input type="hidden" name="action" value="accessListInfos"/>
|
||||||
<input type="hidden" name="liste" value="'.$liste->id.'"/>
|
<input type="hidden" name="liste" value="'.$liste->get_id().'"/>
|
||||||
</form>
|
</form>
|
||||||
</div>';
|
</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
echo '
|
||||||
|
<h2>You do not have any list for the moment</h2>';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
<form method="post" name="createList" id="createList">
|
||||||
|
<input class="create-list" type="submit" value="Create List"/>
|
||||||
|
<input type="hidden" name="action" value="accessCreationListePage"/>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -1,19 +0,0 @@
|
|||||||
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<header>
|
|
||||||
<h2>What you wanna do young padawan?</h2>
|
|
||||||
<form method="POST" name="goBackHome" id="Go Home">
|
|
||||||
<input type="submit" value="Home Page"/>
|
|
||||||
<input type="hidden" name="action" value="goHome"/>
|
|
||||||
</form>
|
|
||||||
</header>
|
|
||||||
<body>
|
|
||||||
<div>
|
|
||||||
<form method="POST" name="deconnection">
|
|
||||||
<input class="button" type="submit" value="Déconnection"/>
|
|
||||||
<input type="hidden" name="action" value="deconnection"/>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in new issue