Exemplo n.º 1
0
} elseif ($controller == "user" && $action == "view") {
    require_once $_SERVER['DOCUMENT_ROOT'] . "/imie/boutique/controllers/edit.php";
    $controllerView = new Controller_Edit();
    $controllerView->infoProfil();
} elseif ($controller == "user" && $action == "edit") {
    require_once $_SERVER['DOCUMENT_ROOT'] . "/imie/boutique/controllers/edit.php";
    $controllerEdit = new Controller_Edit();
    $controllerEdit->edit();
} elseif ($controller == "article" && $action == "add") {
    require_once $_SERVER['DOCUMENT_ROOT'] . "/imie/boutique/controllers/article.php";
    $controller_Article = new Controller_Article();
    $controller_Article->addArticle();
} elseif ($controller == "article" && $action == "delete") {
    require_once $_SERVER['DOCUMENT_ROOT'] . "/imie/boutique/controllers/article.php";
    $controller_Article = new Controller_Article();
    $controller_Article->deleteArticle();
} elseif ($controller == "article" && $action == "detail") {
    $id = $_GET['id'];
    require_once $_SERVER['DOCUMENT_ROOT'] . "/imie/boutique/controllers/article.php";
    $controller_article = new Controller_Article();
    $controller_article->detailArticle($id);
} elseif ($controller == "article" && $action == "list") {
    require_once $_SERVER['DOCUMENT_ROOT'] . "/imie/boutique/controllers/article.php";
    $controller_article = new Controller_Article();
    $controller_article->listArticle();
} elseif ($controller == "user" && $action == "list") {
    require_once $_SERVER['DOCUMENT_ROOT'] . "/imie/boutique/controllers/inscription.php";
    $Controller_Inscription = new Controller_Inscription();
    $Controller_Inscription->listUser();
} elseif ($controller == "contact" && $action == "contact") {
    require_once $_SERVER['DOCUMENT_ROOT'] . "/imie/boutique/controllers/contact.php";
Exemplo n.º 2
0
    $controller_admin_addArticle = new Controller_Article();
    $controller_admin_addArticle->addArticle();
    // Page Ajout d'article
} elseif ($controller == "article" && $action == "list") {
    require_once $_SERVER['DOCUMENT_ROOT'] . "/ecommerce/controllers/admin.php";
    $controller_admin_listArticle = new Controller_Admin();
    $controller_admin_listArticle->listeArticles();
    // Page Liste d'article
} elseif ($controller == "article" && $action == "delete") {
    if (empty($_GET['id'])) {
        echo "<p>Il manque l'identifiant du produit pour pouvoir supprimer l'article</p>";
    } else {
        $id_articles = intval($_GET['id']);
        require_once $_SERVER['DOCUMENT_ROOT'] . "/ecommerce/controllers/article.php";
        $controller_admin_deleteArticle = new Controller_Article();
        $controller_admin_deleteArticle->deleteArticle($id_articles);
    }
    // Page de suppression d'article
} elseif ($controller == "article" && $action == "update") {
    if (empty($_GET['id'])) {
        echo "<p>Il manque l'identifiant du produit</p>";
    } else {
        $id_articles = intval($_GET['id']);
        require_once $_SERVER['DOCUMENT_ROOT'] . "/ecommerce/controllers/article.php";
        $controller_admin_updateArticle = new Controller_Article();
        $controller_admin_updateArticle->updateArticle($id_articles);
    }
    // Page Modifier un article
} elseif ($controller == "users" && $action == "add") {
    require_once $_SERVER['DOCUMENT_ROOT'] . "/ecommerce/controllers/users.php";
    $controller_admin_addUser = new Controller_Users();
Exemplo n.º 3
0
    if (!isset($_GET['id_art']) || $_GET['id_art'] < 0) {
        echo "<p>Il manque l'identifiant du produit </p>";
    } else {
        $id_art = intval($_GET['id_art']);
        require_once $_SERVER['DOCUMENT_ROOT'] . "IMIE/Equipedia/controllers/articleadmin.php";
        $controller_article = new Controller_Article();
        $controller_article->confirmDelete($id_art);
    }
} elseif ($controller == "admins" && $action == "delete") {
    if (!isset($_GET['id_art']) || $_GET['id_art'] < 0) {
        echo "<p>Il manque l'identifiant du produit </p>";
    } else {
        $id_art = intval($_GET['id_art']);
        require_once $_SERVER['DOCUMENT_ROOT'] . "IMIE/Equipedia/controllers/articleadmin.php";
        $controller_article = new Controller_Article();
        $controller_article->deleteArticle($id_art);
    }
} elseif ($controller == "admins" && $action == "confirmEquipement") {
    if (!isset($_GET['id_equip']) || $_GET['id_equip'] < 0) {
        echo "<p>Il manque l'identifiant du produit </p>";
    } else {
        $id_equip = intval($_GET['id_equip']);
        require_once $_SERVER['DOCUMENT_ROOT'] . "IMIE/Equipedia/controllers/equipementadmin.php";
        $controller_equipement = new Controller_Equipement();
        $controller_equipement->confirmDeleteequip($id_equip);
    }
} elseif ($controller == "admins" && $action == "deleteEquipement") {
    if (!isset($_GET['id_equip']) || $_GET['id_equip'] < 0) {
        echo "<p>Il manque l'identifiant du produit </p>";
    } else {
        $id_art = intval($_GET['id_equip']);