Exemplo n.º 1
0
 /**
  * Fonction permettant de modifier des articles
  * @param  Int $id_articles Id de l'article
  */
 public function updateArticle($id_articles)
 {
     $articles = new Model_Article();
     $categories = new Model_Categorie();
     if (!empty($_POST)) {
         $id_articles = $_POST['id_articles'];
         $nom = $_POST['title-new'];
         $description = $_POST['description-new'];
         $url = $_POST['url-new'];
         $prix = $_POST['prix-new'];
         $quantite = $_POST['quantite-new'];
         $id_admin = $_POST['id_admin'];
         $categories_post = $_POST['categories'];
         $articles->updateArticle($nom, $description, $url, $prix, $quantite, $id_admin, $id_articles);
         foreach ($categories_post as $id_categories) {
             $categories->asso_art_categ($id_articles, $id_categories);
         }
     }
     $articleDetails = $articles->loadArticle($id_articles);
     $articlesAdminDetails = $articles->adminArticleView($id_articles);
     $categorieOneDetails = $categories->categorieOneNews($id_articles);
     require_once $_SERVER['DOCUMENT_ROOT'] . "/ecommerce/views/admin/articles/update_article.php";
 }
Exemplo n.º 2
0
 public function viewArticle($id)
 {
     $articles = new Model_Article();
     $articleDetails = $articles->loadArticle($id);
     require_once $_SERVER['DOCUMENT_ROOT'] . "IMIE/Equipedia/views/admins/viewart.php";
 }
 /**
  * Fonction permettant de voir un articles en particulier
  */
 public function viewArticle($id)
 {
     $article = new Model_Article();
     $articleDetails = $article->loadArticle($id);
     //var_dump($articleDetails);
     require_once $_SERVER['DOCUMENT_ROOT'] . 'boutique/views/articles/view.php';
 }
Exemplo n.º 4
0
 public function detailArticle($id)
 {
     $articles = new Model_Article();
     $detailArticle = $articles->loadArticle($id);
     require_once $_SERVER['DOCUMENT_ROOT'] . '/imie/boutique/views/articles/detail.php';
 }
Exemplo n.º 5
0
 public function viewArticle($id)
 {
     $articles = new Model_Article();
     $articleDetails = $articles->loadArticle($id);
     require_once $_SERVER['DOCUMENT_ROOT'] . 'exo-circulaire/views/articles/view.php';
 }