} elseif (file_exists('../controller/' . $myClass . '.php')) {
        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 = "";
//Component Class Manager
$todoManager = new TodoManager($pdo);
//Action Add Processing Begin
if ($action == "add") {
    if (!empty($_POST['todo'])) {
        $todo = htmlentities($_POST['todo']);
        $priority = htmlentities($_POST['priority']);
        $status = 0;
        $date = htmlentities($_POST['date']);
        $createdBy = $_SESSION['userMerlaTrav']->login();
        $created = date('Y-m-d h:i:s');
        //create object
        $todo = new Todo(array('todo' => $todo, 'priority' => $priority, 'status' => $status, 'date' => $date, 'created' => $created, 'createdBy' => $createdBy));
        //add it to db
        $todoManager->add($todo);
        $actionMessage = "Opération Valide : Todo Ajouté(e) avec succès.";
        $typeMessage = "success";
Exemple #2
0
<?php

include '../config.php';
include '../model/TodoManager.php';
$todoManager = new TodoManager($pdo);
$task_id = $_GET['idTask'];
//mysql_query("DELETE FROM tasks WHERE id='$task_id'");
$todoManager->delete($task_id);
header('Location:../todo.php');
Exemple #3
0
		<img src="assets/img/big-logo-new.png" alt="logo" />
		</a>
		<!-- END LOGO -->
		<!-- BEGIN RESPONSIVE MENU TOGGLER -->
		<a href="javascript:;" class="btn-navbar collapsed" data-toggle="collapse" data-target=".nav-collapse">
		<img src="assets/img/menu-toggler.png" alt="" />
		</a>          
		<!-- END RESPONSIVE MENU TOGGLER -->				
		<!-- BEGIN TOP NAVIGATION MENU -->		
		<?php 
//In this section we will count the number of tasks assigned to the current session user
//classes managers
$bugManager = new BugManager($pdo);
$taskManager = new TaskManager($pdo);
$alertManager = new AlertManager($pdo);
$todoManager = new TodoManager($pdo);
//obj and vars
$taskNumber = $taskManager->getTaskNumberByUser($_SESSION['userMerlaTrav']->login());
$bugNumber = $bugManager->getBugsNumber();
$alertNumber = $alertManager->getAlertsNumber();
$todoNumber = $todoManager->getTodosNumberByUser($_SESSION['userMerlaTrav']->login());
$todosToday = $todoManager->getTodosToday();
$todosTodayInformation = $todoManager->getTodosTodayInformation();
$todosOld = $todoManager->getTodosOld();
?>
			
		<ul class="nav pull-right">
		    <li class="dropdown" id="header_inbox_bar">
                <a href="collaboration.php" class="dropdown-toggle">
                <i class="icon-edit"></i>
                <span class="badge"></span>