} else { $adherent['activite_adh'] = _T("Inactive"); } $adherent['info_adh'] = nl2br($adherent['info_adh']); $adherent['info_public_adh'] = nl2br($adherent['info_public_adh']); $requete = "SELECT libelle_statut\n\t\t FROM " . PREFIX_DB . "statuts\n\t\t WHERE id_statut=" . $adherent['id_statut'] . "\n\t\t ORDER BY priorite_statut"; $result =& $DB->Execute($requete); if (!$result->EOF) { $adherent['libelle_statut'] = _T($result->fields['libelle_statut']); } $result->Close(); // declare dynamic field values $adherent['dyn'] = get_dynamic_fields($DB, 'adh', $adherent["id_adh"], true); // - declare dynamic fields for display $disabled['dyn'] = array(); $dynamic_fields = prepare_dynamic_fields_for_display($DB, 'adh', $_SESSION["admin_status"], $adherent['dyn'], $disabled['dyn'], 0); $adherent['pref_lang_img'] = 'lang/' . $adherent['pref_lang'] . '.gif'; $adherent['pref_lang'] = ucfirst(_T($adherent['pref_lang'])); // picture size $picture = new picture($id_adh); $adherent['picture_height'] = $picture->getOptimalHeight(); $adherent['picture_width'] = $picture->getOptimalWidth(); if (isset($error_detected)) { $tpl->assign("error_detected", $error_detected); } $tpl->assign("data", $adherent); $tpl->assign("dynamic_fields", $dynamic_fields); $tpl->assign("time", time()); if (isset($_SESSION['galette']['mail_warning'])) { $tpl->assign('mail_warning', $_SESSION['galette']['mail_warning']); unset($_SESSION['galette']['mail_warning']);
if (!$result) { print $DB->ErrorMsg(); } while (!$result->EOF) { $type_cotis_options[$result->fields[0]] = htmlentities(stripslashes(_T($result->fields[1])), ENT_QUOTES); $result->MoveNext(); } $result->Close(); $tpl->assign("type_cotis_options", $type_cotis_options); // members $requete = "SELECT id_adh, nom_adh, prenom_adh\n\t\t\tFROM " . PREFIX_DB . "adherents\n\t\t\tORDER BY nom_adh, prenom_adh"; $result =& $DB->Execute($requete); if ($result->EOF) { $adh_options = array('' => _T("You must first register a member")); } else { while (!$result->EOF) { $adh_options[$result->fields[0]] = htmlentities(stripslashes(strtoupper($result->fields[1]) . " " . $result->fields[2]), ENT_QUOTES); $result->MoveNext(); } } $result->Close(); $tpl->assign("adh_options", $adh_options); $tpl->assign("pref_membership_ext", $cotis_extension ? PREF_MEMBERSHIP_EXT : ""); $tpl->assign("cotis_extension", $cotis_extension); // - declare dynamic fields for display $dynamic_fields = prepare_dynamic_fields_for_display($DB, 'contrib', $_SESSION["admin_status"], $contribution['dyn'], array(), 1); $tpl->assign("dynamic_fields", $dynamic_fields); // page generation $content = $tpl->fetch("ajouter_contribution.tpl"); $tpl->assign("content", $content); $tpl->display("page.tpl");
// reformat dates $transaction['trans_date'] = date_db2text($transaction['trans_date']); } // dynamic fields $transaction['dyn'] = get_dynamic_fields($DB, 'trans', $transaction["trans_id"], false); } } // template variable declaration $tpl->assign("required", $required); $tpl->assign("data", $transaction); $tpl->assign("error_detected", $error_detected); // members $requete = "SELECT id_adh, nom_adh, prenom_adh\n\t\tFROM " . PREFIX_DB . "adherents\n\t\tORDER BY nom_adh, prenom_adh"; $result =& $DB->Execute($requete); if ($result->EOF) { $adh_options = array('' => _T("You must first register a member")); } else { while (!$result->EOF) { $adh_options[$result->fields[0]] = htmlentities(stripslashes(strtoupper($result->fields[1]) . " " . $result->fields[2]), ENT_QUOTES); $result->MoveNext(); } } $result->Close(); $tpl->assign("adh_options", $adh_options); // - declare dynamic fields for display $dynamic_fields = prepare_dynamic_fields_for_display($DB, 'trans', $_SESSION["admin_status"], $transaction['dyn'], array(), 1); $tpl->assign("dynamic_fields", $dynamic_fields); // page generation $content = $tpl->fetch("ajouter_transaction.tpl"); $tpl->assign("content", $content); $tpl->display("page.tpl");