Exemple #1
0
<?php

if (isset($_GET["cat"])) {
    $cat = CategoryData::getByPreffix($_GET["cat"]);
    $products = ProductData::getPublicsByCategoryId($cat->id);
} else {
    if (isset($_GET["opt"])) {
        if ($_GET["opt"] == "news") {
            $products = ProductData::getNews();
        } else {
            if ($_GET["opt"] == "offers") {
                $products = ProductData::getOffers();
            }
        }
    } else {
        if (isset($_GET["act"]) && $_GET["act"] == "search") {
            $products = ProductData::getLike($_GET["q"]);
        }
    }
}
?>
<section>
  <div class="container">

  <div class="row">

  <div class="col-md-12">
    <div style="background:#333;font-size:25px;color:white;padding:5px;"><?php 
if (isset($_GET["act"]) && $_GET["act"] != "") {
    echo "Busqueda: " . $_GET["q"];
} else {