Files
Cleo/models/mclients.php
Pierre 99021b4f42 Initial commit: CLEO ERP avec améliorations debug
- Configuration du debug conditionnel pour dev/recette
- Fonction debug() globale avec niveaux
- Logging des requêtes SQL
- Handlers d'exceptions et d'erreurs globaux

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-04 10:24:52 +02:00

17 lines
644 B
PHP

<?php
$sch = "";
if ($_POST) {
if (isset($_POST["schClients"])) {
$search = nettoie_input(trim($_POST["schClients"]));
$sch = 'c.libelle LIKE "%' . $search . '%" OR c.adresse1 LIKE "%' . $search . '%" OR c.cp LIKE "%' . $search . '%" OR c.ville LIKE "%' . $search . '%" OR c.contact_nom LIKE "%' . $search . '%" OR c.contact_prenom LIKE "%' . $search . '%" OR c.contact_fonction LIKE "%' . $search . '%" ';
}
}
//! On récupère la liste des clients
$sql = 'SELECT c.* FROM clients c ';
if ($sch != "") {
$sql .= 'WHERE ' . $sch;
}
$sql .= 'ORDER BY c.libelle';
$aModel["clients"] = getinfos($sql, "gen");