<?php\r
\r
function api_post() {\r
- $usagerManager = new PdoUsagerManager();\r
+ $exploitantManager = new PdoExploitantManager();\r
$produitManager = new PdoProduitManager();\r
\r
switch ($_GET['action']) {\r
- case 'create_usager' :\r
- $usager = new Usager($_POST['nom'], $_POST['reference'], $_POST['produits']);\r
- $usagerManager -> createUsager($usager);\r
+ case 'create_exploitant' :\r
+ $exploitant = new Exploitant(null, $_POST['nom'], $_POST['reference'], $_POST['produits']);\r
+ $exploitantManager -> createExploitant($exploitant);\r
break;\r
\r
- case 'update_usager' :\r
- $usager = new Usager($_POST['nom'], $_POST['reference'], $_POST['produits']);\r
- $usagerManager -> updateUsager($usager);\r
+ case 'update_exploitant' :\r
+ $exploitant = new Exploitant($_POST['id'], $_POST['nom'], $_POST['reference'], $_POST['produits']);\r
+ $exploitantManager -> updateExploitant($exploitant);\r
break;\r
\r
case 'add_produit' :\r