{
    if (file_exists('../admin/model/' . $myClass . '.php')) {
        include '../admin/model/' . $myClass . '.php';
    } elseif (file_exists('../admin/controller/' . $myClass . '.php')) {
        include '../admin/controller/' . $myClass . '.php';
    }
}
spl_autoload_register("classLoad");
//classes loading end
//session_start();
include '../include/config.php';
$idProjet = $_GET['idProjet'];
//class managers
$projetManager = new ProjetManager($pdo);
$imageManager = new ImageManager($pdo);
$videoManager = new VideoManager($pdo);
//class and vars
$projets = $projetManager->getProjets();
$projet = $projetManager->getProjetById($idProjet);
$images = $imageManager->getImagesByProjet($idProjet);
$videos = $videoManager->getVideosByProjet($idProjet);
?>
<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="author" content="SemiColonWeb" />

    <!-- Stylesheets
    ============================================= -->
        include '../controller/' . $myClass . '.php';
    }
}
spl_autoload_register("classLoad");
include '../../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']);
//Component Class Manager
$videoManager = new VideoManager($pdo);
//Action Add Processing Begin
if ($action == "add") {
    if (!empty($_POST['name'])) {
        $name = htmlentities($_POST['name']);
        $url = htmlentities($_POST['url']);
        $description = htmlentities($_POST['description']);
        $createdBy = $_SESSION['userAnnahdaSite']->login();
        $created = date('Y-m-d h:i:s');
        //create object
        $video = new Video(array('name' => $name, 'url' => $url, 'description' => $description, 'idProjet' => $idProjet, 'created' => $created, 'createdBy' => $createdBy));
        //add it to db
        $videoManager->add($video);
        $actionMessage = "<strong>Opération Valide</strong> : Video Ajouté(e) avec succès.";
        $typeMessage = "success";
    } else {