Compare commits
No commits in common. 'master' and 'list-Gtw-Mdl' have entirely different histories.
master
...
list-Gtw-M
@ -1,52 +0,0 @@
|
||||
Anna BOUDOUL
|
||||
|
||||
Nicolas FRANCO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#### Ce qui a été fait depuis l'oral:
|
||||
|
||||
- fonction `loadPrivateList` de la classe `TaskModel`
|
||||
* utilise deux nouvelles fonctions: `findUserList` et `findListTask` du gateway pour charger les listes privées d'un user
|
||||
|
||||
- fonction `loadPublicLists` de la classe `TaskModel`
|
||||
* utilise deux fonctions: `findPublicList` et `findListTask` du gateway pour charger les listes publiques
|
||||
|
||||
- vue home.php
|
||||
* correction de la fonction `isConnected` qui est nécessaire dans cette vue
|
||||
|
||||
- contrôleur user
|
||||
* constructeur
|
||||
* méthode `deconnexion` associée à l'action `deconnecter`
|
||||
* méthode `newListPrivate` associée à l'action `creerListePriv`
|
||||
* méthode `loadListePriv` associée à l'action `voirListePriv`
|
||||
* méthode `erasePrivList` associée à l'action `supprimerListePriv`
|
||||
|
||||
- vue connection.php
|
||||
- vue newList.php
|
||||
- vue register.php
|
||||
- vue about.php
|
||||
- vue newTask.php
|
||||
- vue homePriv.php
|
||||
- fin de la vue erreur.php
|
||||
|
||||
- navigation entre les pages avec `href=index.php?action=...`
|
||||
- classe Validation
|
||||
- utilisation de la classe validation dans le code
|
||||
- "binding" des bouttons avec les actions correspondantes (pour les deux controlleurs, visitor et user)
|
||||
- tableau de vues et tableau des messages d'erreurs
|
||||
- corrections de bugs
|
||||
|
||||
#### Ce qui reste à faire
|
||||
|
||||
Nous avions envisagé de permettre à l'utilisateur d'afficher de plus amples informations sur les tâches, comme leurs dates de début et de fin et leur description, à l'aide d'un bouton sur nos vue home et home privé cependant nous n'avons pas eu le temps de le faire et par souci d'esthétisme et de lisibilité nous n'avons pas mis toutes ces informations dans le tableau des tâches pour chaque liste.
|
||||
|
||||
Nous souhaitions également afficher un compte des tâches faites sur le nombre de tâches total par liste mais nous n'avons pas eu le temps de terminer cette fonctionnalité.
|
||||
|
||||
Nous avons tout de même conservé les attributs qui étaient censés être utilisés dans ces fonctionnalités dans notre base de données et dans nos classes métiers en vue d'une possible amélioration de notre site.
|
||||
|
||||
#### Plus de détails
|
||||
* vous pouvez trouver plus de détail sur notre dépot git disponible ici `https://codefirst.iut.uca.fr/git/anna.boudoul/ProjetPHP`, en regardant les commits qui ont été fait tout au long du projet.
|
||||
|
Binary file not shown.
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
class Validation {
|
||||
|
||||
static function val_form_texte(&$texte, &$TMessage) {
|
||||
if (!isset($texte)||$texte=="") {
|
||||
$TMessage[] ="Empty fields";
|
||||
$texte="";
|
||||
}
|
||||
|
||||
if ($texte != filter_var($texte, FILTER_SANITIZE_STRING))
|
||||
{
|
||||
$TMessage[]="Attempt to inject code (security attack)";
|
||||
$texte="";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static function val_form_mdp(&$mdp, &$TMessage) {
|
||||
if (!isset($mdp)||$mdp=="") {
|
||||
$TMessage[] ="Password not specified";
|
||||
$mdp="";
|
||||
}
|
||||
|
||||
if ($mdp != filter_var($mdp, FILTER_SANITIZE_SPECIAL_CHARS))
|
||||
{
|
||||
$TMessage[] ="Password must not contain special characters";
|
||||
$mdp="";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,21 +1,7 @@
|
||||
<?php
|
||||
require('dal/Connection.php');
|
||||
|
||||
//gen
|
||||
$rep=__DIR__.'/../';
|
||||
|
||||
//$con = new Connection('mysql:host=localhost;dbname=phpproject', 'nifranco', 'achanger');
|
||||
$con = new Connection('mysql:host=localhost;dbname=dbanboudoul', 'anboudoul', 'mdpMYSQL');
|
||||
|
||||
$TMessage = array();
|
||||
|
||||
$TabVues = array();
|
||||
$TabVues["erreur"] = "view/erreur.php";
|
||||
$TabVues["home"] = "view/home.php";
|
||||
$TabVues["connection"] = "view/connection.php";
|
||||
$TabVues["register"] = "view/register.php";
|
||||
$TabVues["newList"] = "view/newList.php";
|
||||
$TabVues["liste"] = "view/liste.php";
|
||||
$TabVues["about"] = "view/about.php";
|
||||
$TabVues["prives"] = "view/privHome.php";
|
||||
|
||||
require('dal/Connection.php');
|
||||
$con = new Connection('mysql:host=localhost;dbname=dbanboudoul', 'anboudoul', 'achanger');
|
||||
?>
|
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
class CtrlUser{
|
||||
function __construct(){
|
||||
global $vues;
|
||||
$rep=__DIR__.'/../';
|
||||
|
||||
$dVueEreur = array ();
|
||||
try{
|
||||
$action=$_REQUEST['action'];
|
||||
|
||||
switch($action) {
|
||||
case NULL:
|
||||
$this->Reinit();
|
||||
break;
|
||||
case "validationFormulaire":
|
||||
$this->ValidationFormulaire($dVueEreur);
|
||||
break;
|
||||
//mauvaise action
|
||||
default:
|
||||
$dVueEreur[] = "Erreur d'appel php";
|
||||
require ($rep.$vues['vuephp1']);
|
||||
break;
|
||||
}
|
||||
} catch (PDOException $e)
|
||||
{
|
||||
//si erreur BD, pas le cas ici
|
||||
$dVueEreur[] = "Erreur inattendue!!! ";
|
||||
require ($rep.$vues['erreur']);
|
||||
}
|
||||
catch (Exception $e2)
|
||||
{
|
||||
$dVueEreur[] = "Erreur inattendue!!! ";
|
||||
require ($rep.$vues['erreur']);
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -1,77 +1,58 @@
|
||||
<?php
|
||||
require_once("model/TaskModel.php");
|
||||
|
||||
class UserCtrl
|
||||
require('../dal/UserGateway.php');
|
||||
require('../model/UserModel.php');
|
||||
|
||||
class CtrlUser
|
||||
{
|
||||
private $model;
|
||||
private $view;
|
||||
private $con;
|
||||
private $taskModel;
|
||||
private $userModel;
|
||||
private $TabVues;
|
||||
|
||||
public function __construct(Connection $con, $TabVues){
|
||||
$this->TabVues = $TabVues;
|
||||
public function __construct(Connection $con){
|
||||
$this->model = new UserModel();
|
||||
$this->con = $con;
|
||||
$this->userModel = new UserModel($this->con);
|
||||
$this->taskModel = new TaskModel($this->con);
|
||||
try{
|
||||
$action=$_REQUEST['action'];
|
||||
switch($action){
|
||||
|
||||
// voir les listes privees
|
||||
case 'voirListePriv':
|
||||
$this->loadListePriv();
|
||||
break;
|
||||
// pas d'action afficher la home page avec toutes les listes
|
||||
// case NULL:
|
||||
// $this->home();
|
||||
// break;
|
||||
|
||||
// ajouter une liste privee
|
||||
case 'creerListePriv':
|
||||
$this->newListPrivate();
|
||||
break;
|
||||
|
||||
// supprimer une liste privee
|
||||
case 'supprimerListePriv':
|
||||
$this->erasePrivList();
|
||||
// voir les listes privees
|
||||
case 'voir_liste_priv':
|
||||
$this->listepriv();
|
||||
break;
|
||||
|
||||
case 'deconnecter':
|
||||
$this->deconnexion();
|
||||
break;
|
||||
default:
|
||||
$TMessage[] = 'Unexpected error';
|
||||
require($this->TabVues["erreur"]);
|
||||
break;
|
||||
// // ajouter une liste publique
|
||||
// case 'creer_liste_pub':
|
||||
// $this->newList('public');
|
||||
// break;
|
||||
|
||||
// // ajouter une liste privee
|
||||
// case 'creer_liste_priv':
|
||||
// $this->newList('private');
|
||||
// break;
|
||||
|
||||
// // supprimer une liste
|
||||
// case 'supprimer_liste':
|
||||
// $this->delList();
|
||||
// break;
|
||||
|
||||
// // changer nom de la liste
|
||||
// case 'changer_nom':
|
||||
// $this->changeListName();
|
||||
// break;
|
||||
|
||||
// ajouter une tache
|
||||
|
||||
// completer tache
|
||||
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
$TMessage[] = $e->getMessage();
|
||||
require($this->TabVues["erreur"]);
|
||||
require("../view/erreur.php");
|
||||
}
|
||||
}
|
||||
|
||||
public function loadListePriv(){
|
||||
$user = $_SESSION['login'];
|
||||
$private_lists = $this->taskModel->loadPrivateLists($user);
|
||||
require($this->TabVues["prives"]);
|
||||
}
|
||||
|
||||
public function newListPrivate(){
|
||||
$this->taskModel->addList($_POST['listName'],$_SESSION['login']);
|
||||
$this->loadListePriv();
|
||||
}
|
||||
|
||||
function erasePrivList(){
|
||||
$this->taskModel->supList($_POST['listId']);
|
||||
$this->loadListePriv();
|
||||
}
|
||||
|
||||
function loadHome(){
|
||||
$public_lists = $this->taskModel->loadPublicLists();
|
||||
require($this->TabVues["home"]);
|
||||
}
|
||||
|
||||
public function deconnexion(){
|
||||
$this->userModel->deconnexion();
|
||||
header("Location:index.php");
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -1,191 +0,0 @@
|
||||
<?php
|
||||
require("model/TaskModel.php");
|
||||
|
||||
class VisitorCtrl
|
||||
{
|
||||
private $taskModel;
|
||||
private $userModel;
|
||||
private $isUser;
|
||||
private $TabVues;
|
||||
|
||||
function __construct($con, $TabVues, $isUser){
|
||||
$this->TabVues = $TabVues;
|
||||
$this->isUser = $isUser;
|
||||
$dvueErreur = array();
|
||||
$this->taskModel = new TaskModel($con);
|
||||
$this->userModel = new UserModel($con);
|
||||
try{
|
||||
if(isset($_REQUEST['action']))
|
||||
$action = $_REQUEST['action'];
|
||||
else
|
||||
$action = null;
|
||||
|
||||
switch($action){
|
||||
case null:
|
||||
$this->loadHome();
|
||||
# initialize la page home avec tout les listes
|
||||
break;
|
||||
|
||||
case 'pageConnection':
|
||||
$this->go_connection();
|
||||
break;
|
||||
|
||||
case 'pageAbout':
|
||||
$this->go_about();
|
||||
break;
|
||||
|
||||
case 'connecter':
|
||||
$this->connection();
|
||||
# charge la vue de connexion
|
||||
break;
|
||||
|
||||
case 'pageRegister':
|
||||
$this->go_register();
|
||||
break;
|
||||
|
||||
case 'register':
|
||||
$this->register();
|
||||
# charge la vue de connexion
|
||||
break;
|
||||
|
||||
case 'pageListe':
|
||||
$this->go_list();
|
||||
break;
|
||||
|
||||
case 'creerListe':
|
||||
$this->makeList();
|
||||
# creer une liste publique
|
||||
break;
|
||||
|
||||
case 'supprimerListe':
|
||||
$this->eraseList();
|
||||
# supprime une liste publique
|
||||
break;
|
||||
|
||||
case 'pageTache':
|
||||
$this->go_task();
|
||||
break;
|
||||
|
||||
case 'ajouterTache':
|
||||
$this->addTask();
|
||||
# ajouter une tache a une liste pub
|
||||
break;
|
||||
|
||||
case 'supprimerTache':
|
||||
$this->eraseTask();
|
||||
# supprimer une tache
|
||||
break;
|
||||
|
||||
case 'isDone':
|
||||
$this->isDone();
|
||||
break;
|
||||
|
||||
default:
|
||||
$TMessage[] = 'Unexpected error';
|
||||
require($this->TabVues["erreur"]);
|
||||
$this->loadHome();
|
||||
break;
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
var_dump($_POST);
|
||||
$TMessage[] = $e->getMessage();
|
||||
require($this->TabVues["erreur"]);
|
||||
}
|
||||
}
|
||||
function loadHome(){
|
||||
$public_lists = $this->taskModel->loadPublicLists();
|
||||
# le if suivant est nécéssaire dans le cas ou l'action
|
||||
# connection a été appeller. Dans ce cas, loadHome doit
|
||||
# prendre en compte le user qui vient d'être ajouter a
|
||||
# $_SESSION['login']
|
||||
if(isset($_SESSION['login']) && $_SESSION['login'] != "")
|
||||
$user = $_SESSION['login'];
|
||||
else
|
||||
$user = $this->isUser;
|
||||
|
||||
require($this->TabVues["home"]);
|
||||
}
|
||||
|
||||
function go_connection(){
|
||||
$user = $this->isUser;
|
||||
require($this->TabVues["connection"]);
|
||||
}
|
||||
|
||||
function go_about(){
|
||||
$user = $this->isUser;
|
||||
require($this->TabVues["about"]);
|
||||
}
|
||||
|
||||
function connection(){
|
||||
$isCo = $this->userModel->connexion($_POST['username'],$_POST['password']);
|
||||
if(!$isCo){
|
||||
$TMessage[] = 'This user does not exist'; require($this->TabVues["erreur"]);
|
||||
$this->loadHome();
|
||||
}
|
||||
else
|
||||
$this->loadHome();
|
||||
}
|
||||
|
||||
function go_register(){
|
||||
$user = $this->isUser;
|
||||
require($this->TabVues["register"]);
|
||||
}
|
||||
|
||||
function register(){
|
||||
$this->userModel->ajouter($_POST['username'],$_POST['password']);
|
||||
$this->go_connection();
|
||||
}
|
||||
|
||||
function go_list(){
|
||||
$user = $this->isUser;
|
||||
require("view/newList.php");
|
||||
}
|
||||
|
||||
function makeList(){
|
||||
$this->taskModel->addList($_POST['listName']);
|
||||
$this->loadHome();
|
||||
}
|
||||
|
||||
function eraseList(){
|
||||
$this->taskModel->supList($_POST['listId']);
|
||||
$this->loadHome();
|
||||
}
|
||||
|
||||
function go_task(){
|
||||
$user = $this->isUser;
|
||||
if(isset($_POST['listId'])) $_SESSION['listId'] = $_POST['listId'];
|
||||
if(isset($_POST['isPriv'])) $_SESSION['isPriv'] = $_POST['isPriv'];
|
||||
require("view/newTask.php");
|
||||
}
|
||||
|
||||
function addTask(){
|
||||
$this->taskModel->addTask($_POST['titreT'],$_POST['descT'],
|
||||
$_POST['prioriteT'],$_SESSION['listId'],$_POST['dateDebT'],$_POST['dateFinT']);
|
||||
|
||||
if(isset($_SESSION['isPriv']) && $_SESSION['isPriv'])
|
||||
header("Location:index.php?action=voirListePriv");
|
||||
else
|
||||
$this->loadHome();
|
||||
}
|
||||
|
||||
function eraseTask(){
|
||||
$this->taskModel->supTask($_POST['idT']);
|
||||
if(!empty($_POST['isPriv']))
|
||||
header("Location:index.php?action=voirListePriv");
|
||||
else
|
||||
$this->loadHome();
|
||||
}
|
||||
|
||||
function isDone(){
|
||||
if ($_POST['Tdone'])
|
||||
$this->taskModel->modifTask($_POST['idT'],'isDone',false);
|
||||
else
|
||||
$this->taskModel->modifTask($_POST['idT'],'isDone',true);
|
||||
if(!empty($_POST['isPriv']))
|
||||
header("Location:index.php?action=voirListePriv");
|
||||
else
|
||||
$this->loadHome();
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,58 +0,0 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 5.2.0
|
||||
-- https://www.phpmyadmin.net/
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
START TRANSACTION;
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `tache`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `tache`;
|
||||
CREATE TABLE IF NOT EXISTS `tache` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`titre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`dateDebut` date DEFAULT NULL,
|
||||
`dateFin` date DEFAULT NULL,
|
||||
`priorite` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`idList` int NOT NULL,
|
||||
`isDone` tinyint(1) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FK_list` (`idList`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `ulist`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `ulist`;
|
||||
CREATE TABLE IF NOT EXISTS `ulist` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`nom` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`user` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`dc` int NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FK_list_owner` (`user`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `user`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `user`;
|
||||
CREATE TABLE IF NOT EXISTS `user` (
|
||||
`login` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`mdp` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
PRIMARY KEY (`login`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
COMMIT;
|
||||
|
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
require("config/config.php");
|
||||
require('config/Validation.php');
|
||||
require_once("controller/FrontCtrl.php");
|
||||
$fc = new FrontCtrl($con, $TabVues);
|
||||
$fc = new FrontCtrl();
|
||||
$TMessage = array();
|
||||
|
||||
require_once(controller/FrontCtrl.php);
|
||||
require(erreur.php);
|
||||
?>
|
||||
|
||||
|
@ -1,119 +0,0 @@
|
||||
<?php
|
||||
require_once("business/Task.php");
|
||||
require_once("business/ListTask.php");
|
||||
require_once("dal/TaskGateway.php");
|
||||
require_once("controller/VisitorCtrl.php");
|
||||
require_once("dal/Connection.php");
|
||||
//echo "<h1>2do test</h1>";
|
||||
|
||||
# Test de la Gateway Tache
|
||||
# nouvelle tache
|
||||
# $t = new Task(5,'tacheNotErr','desc.','urgent','001');
|
||||
|
||||
# connection
|
||||
$con = new Connection('mysql:host=localhost;dbname=phpproject', 'nifranco', 'achanger');
|
||||
|
||||
# gateway
|
||||
// $t = new Task(3,'richarlison voltar pro flu','desc.','urgent','0');
|
||||
// $tgt = new TaskGateway($con);
|
||||
// $tgt->insertT($t);
|
||||
//$tgt->delete('10');
|
||||
//$taches = $tgt->findUserList('nifranco');
|
||||
// foreach($taches as $t){
|
||||
// echo $t->get_id()." ".$t->get_idList()."<br>";
|
||||
// }
|
||||
|
||||
# test find
|
||||
// $tasks=$tgt->find('idList','001');
|
||||
// foreach($tasks as $i)
|
||||
// echo $i->get_id()."<br>";
|
||||
|
||||
# Test du modele Tache
|
||||
// $mt= new TaskModel($con);
|
||||
//$mt->addTask('3','testIsDone','desc.','urgent','001');
|
||||
//$mt->modifTask('3','isDone','1');
|
||||
//$tasks = $mt->getTaskBy('titre','tache1');
|
||||
// $tasks = $mt->getAllTask();
|
||||
// foreach($tasks as $i)
|
||||
// echo $i->get_id()."<br>";
|
||||
|
||||
# Test LOAD PRIVATE TASKS
|
||||
$mt= new TaskModel($con);
|
||||
$mt->addList('Nicolas2do');
|
||||
# Test LOAD PRIVATE TASKS
|
||||
// $mt= new TaskModel($con);
|
||||
// $mt->addList('private','nifranco');
|
||||
// $lists = $mt->loadPublicLists();
|
||||
|
||||
// foreach($lists as $l){
|
||||
// echo 'List: '.$l->get_id()."<br>";
|
||||
// echo "Tasks: <br>";
|
||||
// foreach($l->get_taches() as $t){
|
||||
// echo $t->get_id()."<br>";
|
||||
// }
|
||||
// }
|
||||
// //$tasks = $mt->getTaskBy('titre','tache1');
|
||||
// $tasks = $mt->getAllTask();
|
||||
// foreach($tasks as $i)
|
||||
// echo $i->get_id()."<br>";
|
||||
// $tasks = $mt->loadPublicLists();
|
||||
// foreach($tasks as $i)
|
||||
// echo $i->get_id()."<br>";
|
||||
|
||||
// $mt->addList('002','todo2','nifranco');
|
||||
// $mt->modifList('2','nom','22do');
|
||||
//mt->supList('2');
|
||||
// $public_lists = $mt->loadPrivateLists('nifranco');
|
||||
// $user = true;
|
||||
//require("../view/home.php");
|
||||
//require("../view/register.php");
|
||||
//require("../view/connection.php");
|
||||
/* -------------
|
||||
TEST ANNA
|
||||
----------------*/
|
||||
|
||||
require('../dal/UserGateway.php');
|
||||
require('../model/UserModel.php');
|
||||
require('../controller/UserCtrl.php');
|
||||
|
||||
// Test Gateway User
|
||||
|
||||
// $gat = new UserGateway($con);
|
||||
// $gat->create('Nicolas', 'tranquilloubilou');
|
||||
// $gat->updateLogin('Nicolas', 'RicharlisonR9');
|
||||
// $gat->updateMdp('RicharlisonR9', 'hexachampion');
|
||||
// $tab = $gat->find('RicharlisonR9', 'login');
|
||||
// $gat->delete('RicharlisonR9');
|
||||
|
||||
// Test Modèle User
|
||||
|
||||
//$mu = new UserModel($con);
|
||||
//$res = $mu->connexion('nifranco','achanger');
|
||||
//var_dump($res);
|
||||
$mdl = new UserModel($con);
|
||||
// $mdl->ajouter('Anna', 'unmdptrescomplique');
|
||||
// $mdl->modifLogin('Anna', 'Aeryn');
|
||||
// $mdl->modifMdp('Aeryn', 'wtfmec');
|
||||
// $mdl->supprimer('Aeryn');
|
||||
// $mdl->connexion('Aeryn', 'wtfmec');
|
||||
|
||||
// $mt->addList("Test Liste");
|
||||
// $mt->addList("Liste publique");
|
||||
// $mt->addList("Liste privée", "Aeryn");
|
||||
// $mt->addList("Projet de PHP", "Aeryn");
|
||||
// $mt->addList("Projet Blazor", "Aeryn");
|
||||
// $mt->addList("Projet de PHP", "RicharlisonR9");
|
||||
// $mt->addList("Projet Blazor", "RicharlisonR9");
|
||||
|
||||
// TEST USER CONTROLLER
|
||||
|
||||
|
||||
// session_start();
|
||||
// $_SESSION['login'] = 'RicharlisonR9';
|
||||
// $usrctrl = new UserCtrl($con);
|
||||
// $usrctrl->loadHome();
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
static $user = 'anboudoul';
|
||||
static $pass = 'mdpMYSQL';
|
||||
static $user = 'nifranco';
|
||||
static $pass = 'achanger';
|
||||
?>
|
||||
|
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
require_once("../business/Task.php");
|
||||
require_once("../business/ListTask.php");
|
||||
require_once("../dal/TaskGateway.php");
|
||||
require_once("../model/TaskModel.php");
|
||||
echo "<h1>2do test</h1>";
|
||||
|
||||
# Test de la Gateway Tache
|
||||
# nouvelle tache
|
||||
$t = new Task(5,'tacheNotErr','desc.','urgent','001');
|
||||
|
||||
# connection
|
||||
include("credentials.php");
|
||||
$con = new Connection('mysql:host=localhost;dbname=dbanboudoul', 'anboudoul', 'achanger');
|
||||
|
||||
# gateway
|
||||
// $tgt = new TaskGateway($con);
|
||||
//$tgt->insert($t);
|
||||
//$tgt->delete('10');
|
||||
|
||||
# test find
|
||||
/*$tasks=$tgt->find('idList','001');
|
||||
foreach($tasks as $i)
|
||||
echo $i->get_id()."<br>"; */
|
||||
|
||||
# Test du modele Tache
|
||||
// $mt= new TaskModel($con);
|
||||
//$mt->addTask('3','testIsDone','desc.','urgent','001');
|
||||
//$mt->modifTask('3','isDone','1');
|
||||
//$tasks = $mt->getTaskBy('titre','tache1');
|
||||
// $tasks = $mt->getAllTask();
|
||||
// foreach($tasks as $i)
|
||||
// echo $i->get_id()."<br>";
|
||||
|
||||
// $mt->addList('002','todo2','nifranco');
|
||||
// $mt->modifList('2','nom','22do');
|
||||
//mt->supList('2');
|
||||
|
||||
/* -------------
|
||||
TEST ANNA
|
||||
----------------*/
|
||||
|
||||
require('../dal/UserGateway.php');
|
||||
require('../model/UserModel.php');
|
||||
|
||||
// Test Gateway User
|
||||
|
||||
// $gat = new UserGateway($con);
|
||||
// $gat->create('Nicolas', 'tranquilloubilou');
|
||||
// $gat->updateLogin('Nicolas', 'RicharlisonR9');
|
||||
// $gat->updateMdp('RicharlisonR9', 'hexachampion');
|
||||
// $tab = $gat->find('RicharlisonR9', 'login');
|
||||
// $gat->delete('RicharlisonR9');
|
||||
|
||||
// Test Modèle User
|
||||
|
||||
$mdl = new UserModel($con);
|
||||
// $mdl->ajouter('Anna', 'unmdptrescomplique');
|
||||
// $mdl->modifLogin('Anna', 'Aeryn');
|
||||
// $mdl->modifMdp('Aeryn', 'wtfmec');
|
||||
// $mdl->supprimer('Aeryn');
|
||||
$mdl->connexion('Aeryn', 'wtfmec');
|
||||
|
||||
?>
|
||||
|
@ -1,74 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<!-- Core theme CSS (includes Bootstrap)-->
|
||||
<link href="view/css/home.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="d-flex" id="wrapper">
|
||||
<!-- Sidebar-->
|
||||
<div class="border-end bg-white" id="sidebar-wrapper">
|
||||
<div class="sidebar-heading border-bottom bg-light">2do</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php">Home</a>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageListe">New List +</a>
|
||||
<?php
|
||||
if($user){
|
||||
echo '<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=voirListePriv">My Lists 🔒</a>';
|
||||
}
|
||||
?>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageAbout">About</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Page content wrapper-->
|
||||
<div id="page-content-wrapper">
|
||||
<!-- Top navigation-->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
|
||||
<div class="container-fluid">
|
||||
<button class="btn btn-primary" id="sidebarToggle">Toggle Menu</button>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ms-auto mt-2 mt-lg-0">
|
||||
<?php
|
||||
if($user){
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=deconnecter">Log out</a></li>';
|
||||
} else {
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=pageConnection">Log In</a></li>';
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=pageRegister">Register</a></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!--Contenu de la page ici-->
|
||||
<div class="container-fluid">
|
||||
<center>
|
||||
<div class="col-lg-4 mb-5 mb-lg-0 text-center">
|
||||
<div>
|
||||
<div class="rounded-5 shadow-3-soft p-4" style="background-color: #fff9f2">
|
||||
<div class="border-top border-dark mx-auto" style="width: 100px"></div>
|
||||
<p class="text-muted mt-4 mb-2">2Do</p>
|
||||
<p class="h5 mb-4" style="color: #344e41">A PHP project</p>
|
||||
<p class="pb-4 mb-4">
|
||||
A little PHP project realised by two french students studying Computer Science at the IUT of
|
||||
Clermont Auvergne in France. The main goal of this project was to create a little To Do List
|
||||
using the PHP language. We hope that you will find it useful.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- Core theme JS-->
|
||||
<script src="../view/js/home.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,28 @@
|
||||
body{
|
||||
text-align : center;
|
||||
}
|
||||
|
||||
form{
|
||||
display : flex;
|
||||
flex-flow : column nowrap;
|
||||
align-items : center;
|
||||
}
|
||||
|
||||
input{
|
||||
width : 90%;
|
||||
border-radius : 5px;
|
||||
color : #595959;
|
||||
}
|
||||
|
||||
label{
|
||||
margin-top : 20px;
|
||||
}
|
||||
|
||||
#envoyer{
|
||||
width : 150px;
|
||||
height : 30px;
|
||||
}
|
||||
|
||||
#btnEnvoi{
|
||||
margin: 20px;
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<!-- Core theme CSS (includes Bootstrap)-->
|
||||
<link href="view/css/home.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="d-flex" id="wrapper">
|
||||
<!-- Sidebar-->
|
||||
<div class="border-end bg-white" id="sidebar-wrapper">
|
||||
<div class="sidebar-heading border-bottom bg-light">2do</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php">Home</a>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageListe">New List +</a>
|
||||
<?php
|
||||
if($user){
|
||||
echo '<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=voirListePriv">My Lists 🔒</a>';
|
||||
}
|
||||
?>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageAbout">About</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Page content wrapper-->
|
||||
<div id="page-content-wrapper">
|
||||
<!-- Top navigation-->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
|
||||
<div class="container-fluid">
|
||||
<button class="btn btn-primary" id="sidebarToggle">Toggle Menu</button>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ms-auto mt-2 mt-lg-0">
|
||||
<?php
|
||||
if($user){
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=deconnecter">Log out</a></li>';
|
||||
} else {
|
||||
echo '<li class="nav-item"><a class="nav-link" href="#!">Log In</a></li>';
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=pageRegister">Register</a></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!--Contenue de la page ici-->
|
||||
<div class="container-fluid">
|
||||
<h1 class="text-center my-3 pb-3">Welcome back!</h1>
|
||||
<form action="index.php" method="post">
|
||||
<!-- Login input -->
|
||||
<div class="form-outline mb-4 align-items-center">
|
||||
<input name="username" type="text" id="form2Example1" class="form-control" required/>
|
||||
<label class="form-label" for="form2Example1">Username</label>
|
||||
</div>
|
||||
|
||||
<!-- Password input -->
|
||||
<div class="form-outline mb-4">
|
||||
<input name="password" type="password" id="form2Example2" class="form-control" required/>
|
||||
<label class="form-label" for="form2Example2">Password</label>
|
||||
</div>
|
||||
|
||||
<!-- Submit button -->
|
||||
<button type="submit" class="btn btn-primary btn-block mb-4">Log In</button>
|
||||
<input type="hidden" name="action" value="connecter" ></input>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- Core theme JS-->
|
||||
<script src="view/js/home.js"></script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
@ -1,18 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
|
||||
rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
|
||||
crossorigin="anonymous">
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
foreach($TMessage as $err) {
|
||||
echo '<div class="alert alert-danger alert-dismissible d-flex align-items-center fade show">
|
||||
<i class="bi-exclamation-octagon-fill"></i>
|
||||
<strong class="mx-2">Error!</strong>' . $err . "</div>";
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
foreach($TMessage as $err) {
|
||||
echo $err . "<br/>";
|
||||
}
|
||||
?>
|
@ -0,0 +1 @@
|
||||
<a href="CtrlUser.php?action=exaction&id=1"
|
@ -1,152 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<!-- Core theme CSS (includes Bootstrap)-->
|
||||
<link href="view/css/home.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="d-flex" id="wrapper">
|
||||
<!-- Sidebar-->
|
||||
<div class="border-end bg-white" id="sidebar-wrapper">
|
||||
<div class="sidebar-heading border-bottom bg-light">2do</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php">Home</a>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageListe">New List +</a>
|
||||
<?php
|
||||
if($user){
|
||||
echo '<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=voirListePriv">My Lists 🔒</a>';
|
||||
}
|
||||
?>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageAbout">About</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Page content wrapper-->
|
||||
<div id="page-content-wrapper">
|
||||
<!-- Top navigation-->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
|
||||
<div class="container-fluid">
|
||||
<button class="btn btn-primary" id="sidebarToggle">Toggle Menu</button>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ms-auto mt-2 mt-lg-0">
|
||||
<?php
|
||||
if($user){
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=deconnecter">Log out</a></li>';
|
||||
} else {
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=pageConnection">Log In</a></li>';
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=pageRegister">Register</a></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!-- Page content-->
|
||||
<div class="container-fluid">
|
||||
<h1 class="mt-4">Public lists</h1>
|
||||
|
||||
<?php
|
||||
# check if set
|
||||
foreach($public_lists as $l){
|
||||
echo '
|
||||
<section class="vh-0" style="background-color: #eee;">
|
||||
<div class="container py-5 h-100">
|
||||
<div class="row d-flex justify-content-center align-items-center h-100">
|
||||
<div class="col col-lg-9 col-xl-7">
|
||||
<div class="card rounded-3"><div class="card rounded-3">
|
||||
<div class="card-body p-4">
|
||||
<form action="index.php" method="post" class="row row-cols-lg-auto g-3 justify-content-center align-items-center mb-4 pb-2">
|
||||
<div class="col-12 position-absolute top-0 start-0">
|
||||
<button type="submit" class="btn btn-danger">🗑</button>
|
||||
<input type="hidden" name="listId" value="'.$l->get_id().'"></input>
|
||||
<input type="hidden" name="action" value="supprimerListe"></input>
|
||||
</div>
|
||||
</form>
|
||||
<h4 class="text-center my-3 pb-3">'.$l->get_nom().'</h4>
|
||||
<form action="index.php" method="post" class="row row-cols-lg-auto g-3 justify-content-center align-items-center mb-4 pb-2">
|
||||
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-primary">New task 📝</button>
|
||||
<input type="hidden" name="listId" value="'.$l->get_id().'"></input>
|
||||
<input type="hidden" name="action" value="pageTache"></input>
|
||||
</div>
|
||||
</form>
|
||||
<table class="table mb-4">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Task</th>
|
||||
<th scope="col">Importance</th>
|
||||
<th scope="col">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
# IF NO TASKS, display NO TASKS
|
||||
if(!empty($l->get_taches())){
|
||||
foreach($l->get_taches() as $t){
|
||||
if(!$t->get_isDone()){
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$t->get_titre().'</td>
|
||||
<td>'.$t->get_priorite().'</td>';
|
||||
} else {
|
||||
echo '
|
||||
<tr>
|
||||
<td><del>'.$t->get_titre().'</del></td>
|
||||
<td><del>'.$t->get_priorite().'</del></td>';
|
||||
}
|
||||
echo '
|
||||
<td>
|
||||
<form action="index.php" method="post" class="d-inline-block">';
|
||||
if(!$t->get_isDone()){
|
||||
echo '<button type="submit" class="btn btn-success ms-1">✔
|
||||
<input type="hidden" name="idT" value="'.$t->get_id().'"></input>
|
||||
<input type="hidden" name="Tdone" value="'.$t->get_isDone().'"></input>
|
||||
<input type="hidden" name="action" value="isDone">
|
||||
</button>';
|
||||
} else {
|
||||
echo '<button type="submit" class="btn btn-secondary ms-1">✖
|
||||
<input type="hidden" name="idT" value="'.$t->get_id().'"></input>
|
||||
<input type="hidden" name="Tdone" value="'.$t->get_isDone().'"></input>
|
||||
<input type="hidden" name="action" value="isDone">
|
||||
</button>';
|
||||
}
|
||||
echo '
|
||||
</form>
|
||||
<form action="index.php" method="post" class="d-inline-block">
|
||||
<button type="submit" class="btn btn-danger">🗑
|
||||
<input type="hidden" name="idT" value="'.$t->get_id().'"></input>
|
||||
<input type="hidden" name="action" value="supprimerTache">
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
} else {
|
||||
echo '<h6 class="text-center my-3 pb-3">No tasks here yet!</h6>';
|
||||
}
|
||||
|
||||
echo ' </tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>';
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Bootstrap core JS-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- Core theme JS-->
|
||||
<script src="view/js/home.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,59 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<!-- Core theme CSS (includes Bootstrap)-->
|
||||
<link href="../view/css/home.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="d-flex" id="wrapper">
|
||||
<!-- Sidebar-->
|
||||
<div class="border-end bg-white" id="sidebar-wrapper">
|
||||
<div class="sidebar-heading border-bottom bg-light">2do</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php">Home</a>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageListe">New List +</a>
|
||||
<?php
|
||||
if($user){
|
||||
echo '<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=voirListePriv">My Lists 🔒</a>';
|
||||
}
|
||||
?>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageAbout">About</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Page content wrapper-->
|
||||
<div id="page-content-wrapper">
|
||||
<!-- Top navigation-->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
|
||||
<div class="container-fluid">
|
||||
<button class="btn btn-primary" id="sidebarToggle">Toggle Menu</button>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ms-auto mt-2 mt-lg-0">
|
||||
<?php
|
||||
if($user){
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=deconnecter">Log out</a></li>';
|
||||
} else {
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=pageConnection">Log In</a></li>';
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=pageRegister">Register</a></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!--Contenue de la page ici-->
|
||||
<div class="container-fluid">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- Core theme JS-->
|
||||
<script src="../view/js/home.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,35 +0,0 @@
|
||||
/*!
|
||||
* Start Bootstrap - Simple Sidebar v6.0.5 (https://startbootstrap.com/template/simple-sidebar)
|
||||
* Copyright 2013-2022 Start Bootstrap
|
||||
* Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-simple-sidebar/blob/master/LICENSE)
|
||||
*/
|
||||
//
|
||||
// Scripts
|
||||
//
|
||||
|
||||
window.addEventListener('DOMContentLoaded', event => {
|
||||
|
||||
// Toggle the side navigation
|
||||
const sidebarToggle = document.body.querySelector('#sidebarToggle');
|
||||
if (sidebarToggle) {
|
||||
// Uncomment Below to persist sidebar toggle between refreshes
|
||||
// if (localStorage.getItem('sb|sidebar-toggle') === 'true') {
|
||||
// document.body.classList.toggle('sb-sidenav-toggled');
|
||||
// }
|
||||
sidebarToggle.addEventListener('click', event => {
|
||||
event.preventDefault();
|
||||
document.body.classList.toggle('sb-sidenav-toggled');
|
||||
localStorage.setItem('sb|sidebar-toggle', document.body.classList.contains('sb-sidenav-toggled'));
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function hideShow() {
|
||||
var x = document.getElementById("myDIV");
|
||||
if (x.style.display === "none") {
|
||||
x.style.display = "block";
|
||||
} else {
|
||||
x.style.display = "none";
|
||||
}
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<!-- Core theme CSS (includes Bootstrap)-->
|
||||
<link href="view/css/home.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="d-flex" id="wrapper">
|
||||
<!-- Sidebar-->
|
||||
<div class="border-end bg-white" id="sidebar-wrapper">
|
||||
<div class="sidebar-heading border-bottom bg-light">2do</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php">Home</a>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageListe">New List +</a>
|
||||
<?php
|
||||
if($user){
|
||||
echo '<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=voirListePriv">My Lists 🔒</a>';
|
||||
}
|
||||
?>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageAbout">About</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Page content wrapper-->
|
||||
<div id="page-content-wrapper">
|
||||
<!-- Top navigation-->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
|
||||
<div class="container-fluid">
|
||||
<button class="btn btn-primary" id="sidebarToggle">Toggle Menu</button>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ms-auto mt-2 mt-lg-0">
|
||||
<?php
|
||||
if($user){
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=deconnecter">Log out</a></li>';
|
||||
} else {
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=pageConnection">Log In</a></li>';
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=pageRegister">Register</a></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!--Contenue de la page ici-->
|
||||
<div class="container-fluid">
|
||||
<section class="vh-50" style="background-color: #eee;">
|
||||
<div class="container py-5 h-100">
|
||||
<div class="row d-flex justify-content-center align-items-center h-100">
|
||||
<div class="col col-lg-9 col-xl-7">
|
||||
<div class="card rounded-3"><div class="card rounded-3">
|
||||
<div class="card-body p-4">
|
||||
|
||||
<h4 class="text-center my-3 pb-3">New List</h4>
|
||||
<form action="index.php" class="row row-cols-lg-auto g-3 justify-content-center align-items-center mb-4 pb-2" method="post">
|
||||
<div class="col-12">
|
||||
<div class="form-outline">
|
||||
<input type="text" id="form1" class="form-control" name="listName" required/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Add</button>
|
||||
<input type="hidden" name="action" value="creerListe"></input>
|
||||
|
||||
<?php
|
||||
if($user){
|
||||
echo '
|
||||
<label for="privateRadio" class="form-check-label">
|
||||
<input class="form-check-input" type="radio" name="action" value="creerListePriv"> Private 🔒
|
||||
</label>';
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- Core theme JS-->
|
||||
<script src="view/js/home.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,100 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<!-- Core theme CSS (includes Bootstrap)-->
|
||||
<link href="view/css/home.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="d-flex" id="wrapper">
|
||||
<!-- Sidebar-->
|
||||
<div class="border-end bg-white" id="sidebar-wrapper">
|
||||
<div class="sidebar-heading border-bottom bg-light">2do</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php">Home</a>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageListe">New List +</a>
|
||||
<?php
|
||||
if($user){
|
||||
echo '<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=voirListePriv">My Lists 🔒</a>';
|
||||
}
|
||||
?>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageAbout">About</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Page content wrapper-->
|
||||
<div id="page-content-wrapper">
|
||||
<!-- Top navigation-->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
|
||||
<div class="container-fluid">
|
||||
<button class="btn btn-primary" id="sidebarToggle">Toggle Menu</button>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ms-auto mt-2 mt-lg-0">
|
||||
<?php
|
||||
if($user){
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=deconnecter">Log out</a></li>';
|
||||
} else {
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=pageConnection">Log In</a></li>';
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=pageRegister">Register</a></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!--Contenue de la page ici-->
|
||||
<div class="container-fluid">
|
||||
<h4 class="text-center my-3 pb-3">New Task</h4>
|
||||
<form method="post" action="index.php">
|
||||
<div class="form-outline mb-4 align-items-center">
|
||||
<label class="form-label" for="form2title">Name</label>
|
||||
<input name="titreT" type="text" id="form2title" class="form-control" required minlength="0" maxlength="250"/>
|
||||
</div>
|
||||
|
||||
<div class="form-outline mb-4">
|
||||
<label class="form-label" for="form2description">Description</label>
|
||||
<input name="descT" type="text" id="form2description" class="form-control" minlength="0" maxlength="250">
|
||||
</div>
|
||||
|
||||
<div class="form-outline mb-4">
|
||||
<label class="form-label" for="form2dateDeb">Starting date</label>
|
||||
<input name="dateDebT" type="date" id="form2dateDeb" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="form-outline mb-4">
|
||||
<label class="form-label" for="form2dateFin">Ending date</label>
|
||||
<input name="dateFinT" type="date" id="form2dateFin" class="form-control">
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-outline mb-4">
|
||||
<input name="prioriteT" type="text" id="form2importance" class="form-control" />
|
||||
<label class="form-label" for="form2importance">Importance</label>
|
||||
</div> -->
|
||||
|
||||
<div class="form-outline mb-4">
|
||||
<label class="form-label" for="form2importance">Importance</label>
|
||||
<select name="prioriteT" id="form2importance" class="form-control">
|
||||
<option value="">--Please choose an option--</option>
|
||||
<option value="Urgent">Urgent</option>
|
||||
<option value="Important">Important</option>
|
||||
<option value="Medium">Medium</option>
|
||||
<option value="Low">Low</option>
|
||||
<option value="None">None</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Submit button -->
|
||||
<button type="submit" class="btn btn-primary btn-block mb-4" >Save</button>
|
||||
<input type="hidden" name="action" value="ajouterTache"></input>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- Core theme JS-->
|
||||
<script src="view/js/home.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,150 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<!-- Core theme CSS (includes Bootstrap)-->
|
||||
<link href="view/css/home.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="d-flex" id="wrapper">
|
||||
<!-- Sidebar-->
|
||||
<div class="border-end bg-white" id="sidebar-wrapper">
|
||||
<div class="sidebar-heading border-bottom bg-light">2do</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php">Home</a>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageListe">New List +</a>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=voirListePriv">My Lists 🔒</a>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageAbout">About</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Page content wrapper-->
|
||||
<div id="page-content-wrapper">
|
||||
<!-- Top navigation-->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
|
||||
<div class="container-fluid">
|
||||
<button class="btn btn-primary" id="sidebarToggle">Toggle Menu</button>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ms-auto mt-2 mt-lg-0">
|
||||
<li class="nav-item"><a class="nav-link" href="index.php?action=deconnecter">Log out</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!-- Page content-->
|
||||
<div class="container-fluid">
|
||||
<h1 class="mt-4">My Lists</h1>
|
||||
|
||||
<?php
|
||||
if(empty($private_lists)){
|
||||
echo'
|
||||
<div class="d-flex align-items-center justify-content-center">
|
||||
<a href="index.php?action=pageListe" class="btn btn-default btn-lg"><span class="glyphicon glyphicon-envelope"></span>Add List ➕</a>
|
||||
</div>';
|
||||
}
|
||||
foreach($private_lists as $l){
|
||||
echo '
|
||||
<section class="vh-0" style="background-color: #eee;">
|
||||
<div class="container py-5 h-100">
|
||||
<div class="row d-flex justify-content-center align-items-center h-100">
|
||||
<div class="col col-lg-9 col-xl-7">
|
||||
<div class="card rounded-3"><div class="card rounded-3">
|
||||
<div class="card-body p-4">
|
||||
<form action="index.php" method="post" class="row row-cols-lg-auto g-3 justify-content-center align-items-center mb-4 pb-2">
|
||||
<div class="col-12 position-absolute top-0 start-0">
|
||||
<button type="submit" class="btn btn-danger">🗑</button>
|
||||
<input type="hidden" name="listId" value="'.$l->get_id().'"></input>
|
||||
<input type="hidden" name="action" value="supprimerListePriv"></input>
|
||||
</div>
|
||||
</form>
|
||||
<h4 class="text-center my-3 pb-3">'.$l->get_nom().'</h4>
|
||||
<form action="index.php" method="post" class="row row-cols-lg-auto g-3 justify-content-center align-items-center mb-4 pb-2">
|
||||
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-primary">New task 📝</button>
|
||||
<input type="hidden" name="listId" value="'.$l->get_id().'"></input>
|
||||
<input type="hidden" name="action" value="pageTache"></input>
|
||||
<input type="hidden" name="isPriv" value="true"></input>
|
||||
</div>
|
||||
</form>
|
||||
<table class="table mb-4">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Task</th>
|
||||
<th scope="col">Importance</th>
|
||||
<th scope="col">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
# IF NO TASKS, display NO TASKS
|
||||
if(!empty($l->get_taches())){
|
||||
foreach($l->get_taches() as $t){
|
||||
if(!$t->get_isDone()){
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$t->get_titre().'</td>
|
||||
<td>'.$t->get_priorite().'</td>';
|
||||
} else {
|
||||
echo '
|
||||
<tr>
|
||||
<td><del>'.$t->get_titre().'</del></td>
|
||||
<td><del>'.$t->get_priorite().'</del></td>';
|
||||
}
|
||||
echo '
|
||||
<td>
|
||||
<form action="index.php" method="post" class="d-inline-block">';
|
||||
if(!$t->get_isDone()){
|
||||
echo '<button type="submit" class="btn btn-success ms-1">✔
|
||||
<input type="hidden" name="idT" value="'.$t->get_id().'"></input>
|
||||
<input type="hidden" name="Tdone" value="'.$t->get_isDone().'"></input>
|
||||
<input type="hidden" name="action" value="isDone">
|
||||
<input type="hidden" name="isPriv" value="true">
|
||||
</button>';
|
||||
} else {
|
||||
echo '<button type="submit" class="btn btn-secondary ms-1">✖
|
||||
<input type="hidden" name="idT" value="'.$t->get_id().'"></input>
|
||||
<input type="hidden" name="Tdone" value="'.$t->get_isDone().'"></input>
|
||||
<input type="hidden" name="action" value="isDone">
|
||||
<input type="hidden" name="isPriv" value="true">
|
||||
</button>';
|
||||
}
|
||||
echo '
|
||||
</form>
|
||||
<form action="index.php" method="post" class="d-inline-block">
|
||||
<button type="submit" class="btn btn-danger">🗑
|
||||
<input type="hidden" name="idT" value="'.$t->get_id().'"></input>
|
||||
<input type="hidden" name="action" value="supprimerTache">
|
||||
<input type="hidden" name="isPriv" value="true">
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
} else {
|
||||
echo '<h6 class="text-center my-3 pb-3">No tasks here yet!</h6>';
|
||||
}
|
||||
|
||||
echo ' </tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>';
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Bootstrap core JS-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- Core theme JS-->
|
||||
<script src="view/js/home.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,76 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<!-- Core theme CSS (includes Bootstrap)-->
|
||||
<link href="view/css/home.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="d-flex" id="wrapper">
|
||||
<!-- Sidebar-->
|
||||
<div class="border-end bg-white" id="sidebar-wrapper">
|
||||
<div class="sidebar-heading border-bottom bg-light">2do</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php">Home</a>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageListe">New List +</a>
|
||||
<?php
|
||||
if($user){
|
||||
echo '<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=voirListePriv">My Lists 🔒</a>';
|
||||
}
|
||||
?>
|
||||
<a class="list-group-item list-group-item-action list-group-item-light p-3" href="index.php?action=pageAbout">About</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Page content wrapper-->
|
||||
<div id="page-content-wrapper">
|
||||
<!-- Top navigation-->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
|
||||
<div class="container-fluid">
|
||||
<button class="btn btn-primary" id="sidebarToggle">Toggle Menu</button>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ms-auto mt-2 mt-lg-0">
|
||||
<?php
|
||||
if($user){
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=deconnecter">Log out</a></li>';
|
||||
} else {
|
||||
echo '<li class="nav-item"><a class="nav-link" href="index.php?action=pageConnection">Log In</a></li>';
|
||||
echo '<li class="nav-item"><a class="nav-link" href="#!">Register</a></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!--Contenue de la page ici-->
|
||||
<div class="container-fluid">
|
||||
<h2 class="text-center my-3 pb-3">Make private lists with a personnal account</h2>
|
||||
<form action="index.php" method="post">
|
||||
<!-- Login input -->
|
||||
<div class="form-outline mb-4 align-items-center">
|
||||
<input name="username" type="text" id="form2Example1" class="form-control" required/>
|
||||
<label class="form-label" for="form2Example1">Username</label>
|
||||
</div>
|
||||
|
||||
<!-- Password input -->
|
||||
<div class="form-outline mb-4">
|
||||
<input name="password" type="password" id="form2Example2" class="form-control" required/>
|
||||
<label class="form-label" for="form2Example2">Password</label>
|
||||
</div>
|
||||
|
||||
<!-- Submit button -->
|
||||
<button type="submit" class="btn btn-primary btn-block mb-4">Register</button>
|
||||
<input type="hidden" name="action" value="register" ></input>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- Core theme JS-->
|
||||
<script src="view/js/home.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,56 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
|
||||
rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
|
||||
crossorigin="anonymous">
|
||||
</head>
|
||||
<body>
|
||||
<section class="vh-100" style="background-color: #eee;">
|
||||
<div class="container py-5 h-100">
|
||||
<div class="row d-flex justify-content-center align-items-center h-100">
|
||||
<div class="col col-lg-9 col-xl-7">
|
||||
<div class="card rounded-3"><div class="card rounded-3">
|
||||
<div class="card-body p-4">
|
||||
|
||||
<h4 class="text-center my-3 pb-3">My List</h4>
|
||||
<form class="row row-cols-lg-auto g-3 justify-content-center align-items-center mb-4 pb-2">
|
||||
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-primary">New task 📝</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<table class="table mb-4">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Task</th>
|
||||
<th scope="col">Importance</th>
|
||||
<th scope="col">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach($TabTask as $task){
|
||||
echo '<tr>
|
||||
<td scope="col">'.$task->get_titre().'</td>
|
||||
<td scope="col">'.$task->get_priorite().'</td>
|
||||
<td>
|
||||
<button type="submit" class="btn btn-success ms-1">Done</button>
|
||||
<button type="submit" class="btn btn-danger">🗑</button>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue