function show_exer_form($id_entite, $id_exer = 0)
{
    global $msg;
    global $charset;
    global $exer_form, $date_deb_mod, $date_fin_mod;
    global $ptab;
    $exer_form = str_replace('!!id_entite!!', $id_entite, $exer_form);
    $exer_form = str_replace('!!id_exer!!', $id_exer, $exer_form);
    if (!$id_exer) {
        $exer_form = str_replace('!!form_title!!', htmlentities($msg[acquisition_ajout_exer], ENT_QUOTES, $charset), $exer_form);
        $exer_form = str_replace('!!libelle!!', '', $exer_form);
        $exer_form = str_replace('!!date_deb!!', $date_deb_mod, $exer_form);
        $exer_form = str_replace('!!date_deb!!', '', $exer_form);
        $exer_form = str_replace('!!date_fin!!', $date_fin_mod, $exer_form);
        $exer_form = str_replace('!!date_fin!!', '', $exer_form);
        $exer_form = str_replace('!!statut!!', htmlentities($msg[acquisition_statut_actif], ENT_QUOTES, $charset), $exer_form);
    } else {
        $exer = new exercices($id_exer);
        $exer_form = str_replace('!!form_title!!', htmlentities($msg[acquisition_modif_exer], ENT_QUOTES, $charset), $exer_form);
        $exer_form = str_replace('!!libelle!!', htmlentities($exer->libelle, ENT_QUOTES, $charset), $exer_form);
        if (exercices::hasBudgets($id_exer) || exercices::hasActes($id_exer)) {
            $exer_form = str_replace('!!date_deb!!', formatdate($exer->date_debut), $exer_form);
            $exer_form = str_replace('!!date_fin!!', formatdate($exer->date_fin), $exer_form);
        } else {
            $exer_form = str_replace('!!date_deb!!', $date_deb_mod, $exer_form);
            $exer_form = str_replace('!!date_deb!!', formatdate($exer->date_debut), $exer_form);
            $exer_form = str_replace('!!date_fin!!', $date_fin_mod, $exer_form);
            $exer_form = str_replace('!!date_fin!!', formatdate($exer->date_fin), $exer_form);
        }
        switch ($exer->statut) {
            case STA_EXE_CLO:
                $ms = $msg['acquisition_statut_clot'];
                $aff_bt_def = FALSE;
                break;
            case STA_EXE_DEF:
                $ms = $msg['acquisition_statut_def'];
                $aff_bt_def = FALSE;
                break;
            default:
                $ms = $msg['acquisition_statut_actif'];
                $aff_bt_def = TRUE;
                break;
        }
        $exer_form = str_replace('!!statut!!', htmlentities($ms, ENT_QUOTES, $charset), $exer_form);
        if ($aff_bt_def) {
            $exer_form = str_replace('<!-- case_def -->', $ptab[2], $exer_form);
        } else {
            $exer_form = str_replace('<!-- case_def -->', '', $exer_form);
        }
        $ptab = str_replace('!!id!!', $id_exer, $ptab);
        $ptab = str_replace('!!libelle_suppr!!', addslashes($exer->libelle), $ptab);
        //Affichage du bouton de cloture
        if ($exer->statut != STA_EXE_CLO) {
            $exer_form = str_replace('<!-- bouton_clot -->', $ptab[0], $exer_form);
        }
        $exer_form = str_replace('<!-- bouton_sup -->', $ptab[1], $exer_form);
    }
    print confirmation_suppression("./admin.php?categ=acquisition&sub=compta&action=del&ent=" . $id_entite . "&id=");
    print confirmation_cloture("./admin.php?categ=acquisition&sub=compta&action=clot&ent=" . $id_entite . "&id=");
    $biblio = new entites($id_entite);
    print "<div class='row'><label class='etiquette'>" . htmlentities($biblio->raison_sociale, ENT_QUOTES, $charset) . "</label></div>";
    print $exer_form;
}