Esempio n. 1
0
if ($medecin_ville) {
    $where["ville"] = $ds->prepareLike("%{$medecin_ville}%");
}
if ($medecin_type) {
    $where["type"] = "= '{$medecin_type}'";
}
$order = "nom, prenom";
if ($order_col == "cp") {
    $order = "cp {$order_way}, nom, prenom";
} else {
    if ($order_col == "ville") {
        $order = "ville {$order_way}, nom, prenom";
    }
}
$medecin = new CMedecin();
$count_medecins = $medecin->countList($where);
/** @var CMedecin[] $medecins */
$medecins = $medecin->loadList($where, $order, "{$start_med}, {$step_med}");
foreach ($medecins as $_medecin) {
    $_medecin->loadRefFunction();
}
$list_types = $medecin->_specs['type']->_locales;
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("is_admin", $is_admin);
$smarty->assign("dialog", $dialog);
$smarty->assign("annuaire", $annuaire);
$smarty->assign("nom", $medecin_nom);
$smarty->assign("prenom", $medecin_prenom);
$smarty->assign("cp", $medecin_cp);
$smarty->assign("type", $medecin_type);