thchazot1 2 years ago
parent 4d19f270ee
commit 0bee2dcc22

@ -24,7 +24,7 @@
<div class="check">
<text>Private</text>
<input type="checkbox" name="private"></input>
<input type="checkbox" name="private"/>
</div>
<input type="submit" value="Submit"/>

@ -33,7 +33,7 @@
?>
<div class="check">
<text>Complete</text>
<input type="checkbox" name="completed" checked></input>
<input type="checkbox" name="completed" checked/>
</div>
<?php
}
@ -41,7 +41,7 @@
?>
<div class="check">
<text>Complete</text>
<input type="checkbox" name="completed"></input>
<input type="checkbox" name="completed"/>
</div>
<?php
}
@ -49,8 +49,8 @@
<input type="submit" value="Submit"/>
<input type="hidden" name='task' value="<?=$dataView->getId()?>"/>
<input type="hidden" name="action" value="modifyTask"/>
<input type="hidden" name="list" value="<?=$dataView->getId()?>"/>
</form>
</div>

@ -2,9 +2,9 @@
$rep = __DIR__ . '/../';
$login="root";
$password="root";
$dsn="mysql:host=localhost;port=8888;dbname=bddDeQualite"; // chemin vers bd (mysql:host=londres.uca.local;dbname=dblibreton => pour l'iut)
$login="thchazot1";
$password="achanger";
$dsn="mysql:host=localhost;dbname=dbthchazot1";// chemin vers bd (mysql:host=londres.uca.local;dbname=dblibreton => pour l'iut)
//$dsn="mysql:host=localhost;port=8888;dbname=bddDeQualite";
/*
$login="thchazot1";

@ -233,14 +233,20 @@ class VisitorController {
function UpdateTask($dVueEreur) {
global $rep,$vues,$dataView;
$idTache=$_POST['task'];
$tache=$_POST['task'];
$name=$_POST['name'];
$content=$_POST['content'];
$completed=$_POST['completed'];
if ($_POST['completed']===null){
$completed=false;
}
else{
$completed=true;
}
$model = new MdlTache();
$model->update($idTache, $name, $content, $completed);
$_REQUEST['action']="accessListInfos";
$this->accessListInfos($dVueEreur);
$tache=$model->findById($_POST['task']);
$model->update($tache, $name, $content, $completed);
$_REQUEST['action']="goHome";
$this->Reinit();
$dVueEreur= array();
}
}

@ -34,7 +34,7 @@ class MdlTache{
$gate->update($tache);
}
public function findById(int $id){
public function findById(int $id): Tache{
$gate=new TacheGateway($this->con);
return $gate->findById($id);

Loading…
Cancel
Save