This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* \\Author: Thibault Napoléon "Imothep" | |
* \\Company: ISEN Yncréa Ouest | |
* \\Email: [email protected] | |
* \\Created Date: 05-Apr-2023 - 12:25:38 | |
* \\Last Modified: 13-Apr-2023 - 10:26:05 | |
*/ | |
define('CHARACTERS', array('*', '#', 'o', 'x')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* \\Author: Thibault Napoléon "Imothep" | |
* \\Company: ISEN Yncréa Ouest | |
* \\Email: [email protected] | |
* \\Created Date: 05-Apr-2023 - 12:25:38 | |
* \\Last Modified: 13-Apr-2023 - 10:36:33 | |
*/ | |
//---------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Organisation | |
1-Positionnement | |
2-Dimensions | |
3-Texte | |
4-Bordures et fonds | |
5-Propriétés CSS3 ou spécifiques navigateurs | |
*/ | |
h1 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
min-height: 100vh; | |
font-family: Arial, Helvetica, sans-serif; | |
background: radial-gradient(rgb(233, 233, 233), rgb(187, 187, 187)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Todo List</h1> | |
<h2>Gestionnaire de tâches</h2> | |
<form> | |
<label for="item">Ajouter une tâche</label> | |
<div class="fields"> | |
<input type="text" id="item" placeholder="Intitulé de la tâche" /> | |
</div> | |
<button type="submit">Ajouter</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- phpMyAdmin SQL Dump | |
-- version 5.1.0 | |
-- https://www.phpmyadmin.net/ | |
-- | |
-- Host: localhost:8889 | |
-- Generation Time: Jun 06, 2023 at 09:18 AM | |
-- Server version: 5.7.34 | |
-- PHP Version: 8.0.8 | |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
session_start(); | |
$notice = ''; | |
$_SESSION['tasks'] = $_SESSION['tasks'] ?? []; | |
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $_POST['mode'] === 'add') { | |
$taskName = !empty($_POST['field-task']) ? $_POST['field-task'] : ($_POST['select-task'] ?? ''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
session_start(); | |
include('functions.php'); | |
$notice = controllerTask(); | |
$tasks = $_SESSION['tasks']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function checkTaskDeadline($task) { | |
$currentDate = new DateTime(); | |
$taskDate = DateTime::createFromFormat('Y-m-d', $task['date']); | |
$dateFormatted = $taskDate->format('d-m-Y'); | |
if ($taskDate < $currentDate) { | |
$daysPassed = $currentDate->diff($taskDate)->format('%a'); | |
$daysLimits = ['1' => 1, '2' => 3, '3' => 7]; |
OlderNewer