diff --git a/controllers/Controller_index.php b/controllers/Controller_index.php index 4a3efeb..9537503 100644 --- a/controllers/Controller_index.php +++ b/controllers/Controller_index.php @@ -60,18 +60,18 @@ public function action_orderBy() { $defaultCategorie = -1; $categories = $categoriesManager->getAllCategories(); - if(!empty($_POST) || !empty($_GET)){ + if(!empty($_GET)){ if (isset($_GET["tri"])) { $typeAffichage = $_GET["tri"]; } else { - $typeAffichage = $_POST['ordreSelect'] ?? false; + $typeAffichage = $_GET['ordreSelect'] ?? false; } - $category = $_POST['idCategory'] ?? false; + $category = $_GET['idCategory'] ?? false; - $min = $_POST['min'] ?? false; - $max = $_POST['max'] ?? false; + $min = $_GET['min'] ?? false; + $max = $_GET['max'] ?? false; if(is_numeric($category)){ $category = intval($category); diff --git a/models/class.ArticlesManager.php b/models/class.ArticlesManager.php index 1a4c3f1..45f797c 100644 --- a/models/class.ArticlesManager.php +++ b/models/class.ArticlesManager.php @@ -71,8 +71,8 @@ public function getAllArticles(string $typeAffichage, bool $afficherQuantitePosi $end = min(($offset + $limit), $total); } - $this->prevlink = ($this->page > 1) ? '«
  • ' : '«
  • '; - $this->nextlink = ($this->page < $this->pages) ? '
  • »' : '
  • »'; + $this->prevlink = ($this->page > 1) ? '«
  • ' : '«
  • '; + $this->nextlink = ($this->page < $this->pages) ? '
  • »' : '
  • »'; $sql .=" LIMIT :limit OFFSET :offset"; $req = $this->bdd->prepare($sql); diff --git a/views/view_index.php b/views/view_index.php index fa14809..acccfc6 100644 --- a/views/view_index.php +++ b/views/view_index.php @@ -4,7 +4,10 @@

    Catégories

    -
    + + + +
    $value){ ?> @@ -111,9 +114,9 @@
  • -
  • +
  • -
  • +