$aff .= '			</div>';
        $aff .= '		</div>';
        $aff .= '	</div>';
        $aff .= '</a>';
        if (isset($_SESSION['utilisateur']['id_utilisateur']) && in_array($_SESSION['utilisateur']['id_utilisateur'], $allowed)) {
            $aff .= '		<a href="c/c.black_listing.php?id_video=' . $resultat['link'] . '&id_utilisateur=' . $resultat['id_utilisateur'] . '">';
            $aff .= '			<div class="del_s"></div>';
            $aff .= '		</a>';
        }
    }
    if ($i == 0) {
        $aff .= '	<div class="center less_dark">No video found for your search...</div>';
    }
    return $aff;
}
// $req = $bdd->query(generer_sql_filtre($req, $filtre, $date));
// echo generer_sql_filtre(generer_sql_filtre($req, $filtre, $date), $filtre, $date);
if (isset($_POST['keyword'])) {
    $_SESSION['count'] = generer_sql_filtre($req, $filtre, $date);
    $_SESSION['pagination'] = pagination(generer_sql_filtre($req, $filtre, $date), $nb_elem_page, $bdd, 1);
    $_SESSION['afficher_resultat'] = requetetoecho(generer_sql_filtre($select, $filtre, $date), 1, $nb_elem_page, $bdd);
    $_SESSION['req'] = generer_sql_filtre($select, $filtre, $date);
    $_SESSION['checkbox'] = $filtre;
    $_SESSION['date'] = $date;
} else {
    if (isset($_SESSION['pagination'])) {
        $_SESSION['pagination'] = pagination($_SESSION['count'], $nb_elem_page, $bdd, $_GET['page']);
        $_SESSION['afficher_resultat'] = requetetoecho($_SESSION['req'], $_GET['page'], $nb_elem_page, $bdd);
    }
}
header('location: ../index.php?p=search&page=' . $_GET['page']);
        $aff .= '				<span class="less_dark size14">' . (!empty($resultat['description']) ? substr($resultat['description'], 0, 40) . (strlen($resultat['description']) > 40 ? '...' : '') : 'No description yet ...') . '</span>';
        $aff .= '			</div>';
        $aff .= '			<div class="info_search">';
        $aff .= '				<span class="size12">views :</span> <span class="blue size12">' . afficher_nb_vues("../", $resultat['id_cover'], $resultat['id_utilisateur']) . '</span>
							<span class="size12"> by : </span><span class="blue size12">' . $resultat['login'] . '</span>';
        $aff .= '			</div>';
        $aff .= '		</div>';
        $aff .= '	</div>';
        $aff .= '</a>';
        if (isset($_SESSION['utilisateur']['id_utilisateur']) && in_array($_SESSION['utilisateur']['id_utilisateur'], $allowed)) {
            $aff .= '		<a href="c/c.black_listing.php?id_video=' . $resultat['link'] . '&id_utilisateur=' . $resultat['id_utilisateur'] . '">';
            $aff .= '			<div class="del_s"></div>';
            $aff .= '		</a>';
        }
    }
    if ($i == 0) {
        $aff .= '	<div class="center less_dark">No video found for your search...</div>';
    }
    return $aff;
}
if (isset($_POST['keyword'])) {
    $_SESSION['count'] = generer_sql_filtre($req, $filtre, $date);
    $_SESSION['pagination'] = pagination(generer_sql_filtre($req, $filtre, $date), $nb_elem_page, $bdd, 1);
    $_SESSION['afficher_resultat'] = requetetoecho(generer_sql_filtre($select, $filtre, $date), 1, $nb_elem_page, $bdd);
} else {
    if (isset($_SESSION['pagination'])) {
        $_SESSION['pagination'] = pagination($_SESSION['count'], $nb_elem_page, $bdd, $_GET['page']);
        $_SESSION['afficher_resultat'] = requetetoecho($_SESSION['req'], $_GET['page'], $nb_elem_page, $bdd);
    }
}
header('location: ../index.php?p=search&page=' . $_GET['page']);