<?php include '../config.php'; include '../model/TodoSocieteManager.php'; $todoManager = new TodoSocieteManager($pdo); $task_id = $_GET['idTask']; $idSociete = $_GET['idSociete']; $todoManager->delete($task_id); header('Location:../todo-societe.php?idSociete=' . $idSociete);
{ if (file_exists('model/' . $myClass . '.php')) { include 'model/' . $myClass . '.php'; } elseif (file_exists('controller/' . $myClass . '.php')) { include 'controller/' . $myClass . '.php'; } } spl_autoload_register("classLoad"); include 'config.php'; //classes loading end session_start(); if (isset($_SESSION['userMerlaTrav'])) { //classes managers $usersManager = new UserManager($pdo); $mailManager = new MailManager($pdo); $todoManager = new TodoSocieteManager($pdo); $societeManager = new SocieteManager($pdo); //classes and vars //users number $users = $usersManager->getUsers(); //$mails = $mailManager->getMails(); $idSociete = $_GET['idSociete']; $societe = $societeManager->getSocieteById($idSociete); $todos = $todoManager->getTodos(); ?> <!DOCTYPE html> <!--[if IE 8]> <html lang="en" class="ie8"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9"> <![endif]--> <!--[if !IE]><!--> <html lang="en"> <!--<![endif]--> <!-- BEGIN HEAD --> <head>
include '../controller/' . $myClass . '.php'; } } spl_autoload_register("classLoad"); include '../config.php'; include '../lib/image-processing.php'; //classes loading end session_start(); //post input processing $action = htmlentities($_POST['action']); //This var contains result message of CRUD action $actionMessage = ""; $typeMessage = ""; $idSociete = htmlentities($_POST['idSociete']); //Component Class Manager $todoManager = new TodoSocieteManager($pdo); //Action Add Processing Begin if ($action == "add") { if (!empty($_POST['todo'])) { $todo = htmlentities($_POST['todo']); $priority = htmlentities($_POST['priority']); $status = 0; $createdBy = $_SESSION['userMerlaTrav']->login(); $created = date('Y-m-d h:i:s'); //create object $todo = new TodoSociete(array('todo' => $todo, 'priority' => $priority, 'status' => $status, 'idSociete' => $idSociete, 'created' => $created, 'createdBy' => $createdBy)); //add it to db $todoManager->add($todo); $actionMessage = "Opération Valide : Todo Ajouté(e) avec succès."; $typeMessage = "success"; } else {