Пример #1
0
    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>";
    echo TXT_DECO;
    echo "</b></button> </form>\n\t\t<div class = \"connexion\">\n\t\t<form name =\"NewTask\" method=\"post\" action=\"gestion_task.php\">\n\t\t<select class = \"input-form\" name=\"code\" id=\"code\">\n\t\t\t<option value=\"1\"";
    if ($code == 1) {
        echo "selected";
    }
    echo ">To do</option>\n\t\t\t<option value=\"2\"";
    if ($code == 2) {
        echo "selected";
    }
Пример #2
0
function unescapetohtml($desc)
{
    $desc = unescapedesc($desc);
    $desc = str_replace("\n", "<br>", $desc);
    return $desc;
}