$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']); } $content = $tpl->fetch("voir_adherent.tpl"); $tpl->assign("content", $content); $tpl->display("page.tpl");
$result =& $DB->Execute($requete); if ($result->EOF) { header("location: index.php"); } else { while (!$result->EOF) { $pref[$result->fields['nom_pref']] = htmlentities(stripslashes(addslashes($result->fields['val_pref'])), ENT_QUOTES); $result->MoveNext(); } } $result->Close(); } // logo data $picture = new picture(0); if ($picture->hasPicture()) { $pref["has_logo"] = 1; } else { $pref["has_logo"] = 0; } $pref['picture_height'] = $picture->getOptimalHeight(); $pref['picture_width'] = $picture->getOptimalWidth(); $tpl->assign("time", time()); $tpl->assign("pref", $pref); $tpl->assign('pref_numrows_options', array(10 => "10", 20 => "20", 50 => "50", 100 => "100", 0 => _T("All"))); $tpl->assign("required", $required); $tpl->assign("languages", drapeaux()); $tpl->assign("error_detected", $error_detected); $tpl->assign("warning_detected", $warning_detected); // page generation $content = $tpl->fetch("preferences.tpl"); $tpl->assign("content", $content); $tpl->display("page.tpl");