Exemplo n.º 1
0
        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();
    $controller_admin_addUser->addUser();
    // Page Ajout de membre
} elseif ($controller == "users" && $action == "list") {
    require_once $_SERVER['DOCUMENT_ROOT'] . "/ecommerce/controllers/users.php";
    $controller_user = new Controller_Users();
    $controller_user->listUser();
    // Page Liste des membres
} elseif ($controller == "users" && $action == "delete") {
    if (empty($_GET['id'])) {
        echo "<p>Il manque l'identifiant de l'utilisateur</p>";