{ 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 TodoProjetManager($pdo); $societeManager = new SocieteManager($pdo); $projetManager = new ProjetManager($pdo); //classes and vars //users number $users = $usersManager->getUsers(); //$mails = $mailManager->getMails(); $projets = $projetManager->getProjets(); $todos = 0; $societes = $societeManager->getSocietes(); if (isset($_POST['idSociete'])) { $idSociete = htmlentities($_POST['idSociete']); $mois = htmlentities($_POST['mois']); $annee = htmlentities($_POST['annee']); $todos = $todoManager->getTodosHiddenByIdSociete($idSociete, $mois, $annee); } else {
} 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 = ""; $idProjet = htmlentities($_POST['idProjet']); $idSociete = ""; //$idSociete = htmlentities($_POST['idSociete']); //Component Class Manager $todoManager = new TodoProjetManager($pdo); $projetManager = new ProjetManager($pdo); $projet = $projetManager->getProjetById($idProjet); //Action Add Processing Begin if ($action == "add") { if (!empty($_POST['todo'])) { $todo = htmlentities($_POST['todo']); $priority = htmlentities($_POST['priority']); $responsable = htmlentities($_POST['responsable']); $description = htmlentities($_POST['description']); $status = 0; $createdBy = $_SESSION['userMerlaTrav']->login(); $created = date('Y-m-d h:i:s'); if ($idProjet == 0) { $idSociete = htmlentities($_POST['idSociete']); } else {
{ 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 TodoProjetManager($pdo); $societeManager = new SocieteManager($pdo); $projetManager = new ProjetManager($pdo); //classes and vars //users number $users = $usersManager->getUsers(); //$mails = $mailManager->getMails(); $projets = $projetManager->getProjets(); $todos = 0; //$todoManager->getTodosNotHidden(); $societes = $societeManager->getSocietes(); if (isset($_POST['idSociete'])) { $idSociete = htmlentities($_POST['idSociete']); $todos = $todoManager->getTodosNotHiddenByIdSociete($idSociete); } else { if (isset($_GET['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 TodoProjetManager($pdo); $societeManager = new SocieteManager($pdo); $projetManager = new ProjetManager($pdo); //classes and vars //users number $users = $usersManager->getUsers(); //$mails = $mailManager->getMails(); $idProjet = $_GET['idProjet']; $idSociete = $_GET['idSociete']; $projet = $projetManager->getProjetById($idProjet); $societe = $societeManager->getSocieteById($projet->idSociete()); $todos = $todoManager->getTodos(); ?> <!DOCTYPE html> <!--[if IE 8]> <html lang="en" class="ie8"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<?php include '../config.php'; include '../model/TodoProjetManager.php'; $todoManager = new TodoProjetManager($pdo); $task_id = $_GET['idTask']; $idSociete = $_GET['idSociete']; //mysql_query("DELETE FROM tasks WHERE id='$task_id'"); $todoManager->delete($task_id); $redirektLink = "Location:../todos.php?idSociete=" . $idSociete; if (isset($_GET['source']) and $_GET['source'] == "todos-archive") { $redirektLink = "Location:../todos-archive.php"; } header($redirektLink);