<html> <body> <?php include 'methodes.php'; include 'check_log.php'; include './lang/lang.php'; $nom_tache = $_GET['Tache']; $type = $_GET['type']; $retour = deletetask($nom_tache, $type); header("Location: http://fc.isima.fr/~rophelizon/devweb_projet/{$retour}?lang={$lang}"); ?> </body> </html>
include 'function_task_admin.php'; include 'sessionstarter.php'; if (isset($_POST['lang'])) { $_SESSION['lang'] = $_POST['lang']; } if (isset($_SESSION['lang']) && $_SESSION['lang'] == "FR") { include 'fr-lang.php'; } else { include 'en-lang.php'; } if (isset($_POST['nom'])) { uptask($_POST['nom']); header('Location:tasklist.php'); } elseif (isset($_POST['del'])) { deletetask($_POST['del']); header('Location:tasklist.php'); } elseif (isset($_POST['edit'])) { $content = ""; $ligne = searchtask($_POST['edit']); if (substr_count($ligne, ';:!:;') == 2) { list($code, $nom, $deadline) = explode(';:!:;', $ligne); } elseif (substr_count($ligne, ';:!:;') > 2) { list($code, $nom, $deadline, $content) = explode(';:!:;', $ligne, 4); $content = unescapedesc($content); } echo "<html>\n\t<header>\n\t\t<meta charset=\"utf_8\">\n\t\t<title>Ajouter une tache</title>\n\t\t<link rel=\"stylesheet\" href=\"back.css\">\n\t</header>\n\t\n\t<body>\n\t\t<form class=\"langue\" method=\"post\" action=\"gestion_task.php\">\n\t\t<input type=\"hidden\" value=\""; echo TXT_LANG; echo "\" name=\"lang\">\n\t\t<input type=\"hidden\" value=\"{$nom}\" name=\"edit\">\n\t\t<button class=\"btn btnl\" type=\"submit\"><b>"; echo TXT_LANG; echo "</b></button> </form>\n\t\t<form class=\"deco\" method=\"post\" action=\"index.php\">\n\t\t<input type=\"hidden\" value=\"1\" name=\"deco\">\n\t\t<button class=\"btn btndeco\" type=\"submit\"><b>";
public function testDeletetask() { deletetask("tache et plus"); $ligne = searchtask("tache et plus"); $this->assertEquals(0, $ligne); }
function edittask($code, $nom, $deadline, $content, $oldname) { deletetask($oldname); newtask($nom, $deadline, $content); uptask($nom, $code - 1); }