function afficher_form_prefs($erreurs = '') { afficher_html_head($GLOBALS['lang']['preferences']); echo '<div id="top">'; afficher_msg(); afficher_topnav(basename($_SERVER['PHP_SELF']), $GLOBALS['lang']['preferences']); echo '</div>'; echo '<div id="axe">' . "\n"; echo '<div id="page">' . "\n"; echo erreurs($erreurs); echo '<form id="preferences" class="bordered-formbloc" method="post" action="' . basename($_SERVER['PHP_SELF']) . '" >'; $fld_user = '******'; /* no fieldset because browset can’t style them correctly */ $fld_user .= '<div class="form-legend">' . legend($GLOBALS['lang']['prefs_legend_utilisateur'], 'legend-user') . '</div>' . "\n"; $fld_user .= '<div class="form-lines">' . "\n"; $fld_user .= '<p>' . "\n"; $fld_user .= "\t" . '<label for="auteur">' . $GLOBALS['lang']['pref_auteur'] . '</label>' . "\n"; $fld_user .= "\t" . '<input type="text" id="auteur" name="auteur" size="30" value="' . (empty($GLOBALS['auteur']) ? $GLOBALS['identifiant'] : $GLOBALS['auteur']) . '" class="text" />' . "\n"; $fld_user .= '</p>' . "\n"; $fld_user .= '<p>' . "\n"; $fld_user .= "\t" . '<label for="email">' . $GLOBALS['lang']['pref_email'] . '</label>' . "\n"; $fld_user .= "\t" . '<input type="text" id="email" name="email" size="30" value="' . $GLOBALS['email'] . '" class="text" />' . "\n"; $fld_user .= '</p>' . "\n"; $fld_user .= '<p>' . "\n"; $fld_user .= "\t" . '<label for="nomsite">' . $GLOBALS['lang']['pref_nom_site'] . '</label>' . "\n"; $fld_user .= "\t" . '<input type="text" id="nomsite" name="nomsite" size="30" value="' . $GLOBALS['nom_du_site'] . '" class="text" />' . "\n"; $fld_user .= '</p>' . "\n"; $fld_user .= '<p>' . "\n"; $fld_user .= "\t" . '<label for="racine">' . $GLOBALS['lang']['pref_racine'] . '</label>' . "\n"; $fld_user .= "\t" . '<input type="text" id="racine" name="racine" size="30" value="' . $GLOBALS['racine'] . '" class="text" />' . "\n"; $fld_user .= '</p>' . "\n"; $fld_user .= '<p>' . "\n"; $fld_user .= "\t" . '<label for="description">' . $GLOBALS['lang']['label_dp_description'] . '</label>' . "\n"; $fld_user .= "\t" . '<textarea id="description" name="description" cols="35" rows="2" class="text" >' . $GLOBALS['description'] . '</textarea>' . "\n"; $fld_user .= '</p>' . "\n"; $fld_user .= '<p>' . "\n"; $fld_user .= "\t" . '<label for="keywords">' . $GLOBALS['lang']['pref_keywords'] . '</label>'; $fld_user .= "\t" . '<textarea id="keywords" name="keywords" cols="35" rows="2" class="text" >' . $GLOBALS['keywords'] . '</textarea>' . "\n"; $fld_user .= '</p>' . "\n"; $fld_user .= '</div>' . "\n"; $fld_user .= '</div>'; echo $fld_user; $fld_securite = '<div role="group" class="pref">'; $fld_securite .= '<div class="form-legend">' . legend($GLOBALS['lang']['prefs_legend_securite'], 'legend-securite') . '</div>' . "\n"; $fld_securite .= '<div class="form-lines">' . "\n"; $fld_securite .= '<p>' . "\n"; $fld_securite .= "\t" . '<label for="identifiant">' . $GLOBALS['lang']['pref_identifiant'] . '</label>' . "\n"; $fld_securite .= "\t" . '<input type="text" id="identifiant" name="identifiant" size="30" value="' . $GLOBALS['identifiant'] . '" class="text" />' . "\n"; $fld_securite .= '</p>' . "\n"; $fld_securite .= '<p>' . "\n"; $fld_securite .= "\t" . '<label for="mdp">' . $GLOBALS['lang']['pref_mdp'] . '</label>'; $fld_securite .= "\t" . '<input type="password" id="mdp" name="mdp" size="30" value="" class="text" autocomplete="off" />' . "\n"; $fld_securite .= '</p>' . "\n"; $fld_securite .= '<p>' . "\n"; $fld_securite .= "\t" . '<label for="mdp_rep">' . $GLOBALS['lang']['pref_mdp_nouv'] . '</label>'; $fld_securite .= "\t" . '<input type="password" id="mdp_rep" name="mdp_rep" size="30" value="" class="text" autocomplete="off" />' . "\n"; $fld_securite .= '</p>' . "\n"; if (in_array('gd', get_loaded_extensions())) { // captcha only possible if GD library is installed. $fld_securite .= '<p>' . "\n"; $fld_securite .= select_yes_no('connexion_captcha', $GLOBALS['connexion_captcha'], $GLOBALS['lang']['pref_connexion_captcha']); $fld_securite .= '</p>' . "\n"; } else { $fld_securite .= hidden_input('connexion_captcha', '0'); } $fld_securite .= '</div>'; $fld_securite .= '</div>'; echo $fld_securite; $fld_apparence = '<div role="group" class="pref">'; $fld_apparence .= '<div class="form-legend">' . legend($GLOBALS['lang']['prefs_legend_apparence'], 'legend-apparence') . '</div>' . "\n"; $fld_apparence .= '<div class="form-lines">' . "\n"; $fld_apparence .= '<p>' . "\n"; $fld_apparence .= form_select('theme', liste_themes($GLOBALS['BT_ROOT_PATH'] . $GLOBALS['dossier_themes']), $GLOBALS['theme_choisi'], $GLOBALS['lang']['pref_theme']); $fld_apparence .= '</p>' . "\n"; $fld_apparence .= '<p>' . "\n"; $fld_apparence .= form_select('nb_maxi', array('5' => '5', '10' => '10', '15' => '15', '20' => '20', '25' => '25', '50' => '50'), $GLOBALS['max_bill_acceuil'], $GLOBALS['lang']['pref_nb_maxi']); $fld_apparence .= '</p>' . "\n"; $fld_apparence .= '<p>' . "\n"; $fld_apparence .= select_yes_no('aff_onglet_rss', $GLOBALS['onglet_rss'], $GLOBALS['lang']['pref_afficher_rss']); $fld_apparence .= '</p>' . "\n"; $fld_apparence .= '<p>' . "\n"; $fld_apparence .= select_yes_no('aff_onglet_liens', $GLOBALS['onglet_liens'], $GLOBALS['lang']['pref_afficher_liens']); $fld_apparence .= '</p>' . "\n"; $fld_apparence .= '</div>' . "\n"; $fld_apparence .= '</div>'; echo $fld_apparence; $fld_dateheure = '<div role="group" class="pref">'; $fld_dateheure .= '<div class="form-legend">' . legend($GLOBALS['lang']['prefs_legend_langdateheure'], 'legend-dateheure') . '</div>' . "\n"; $fld_dateheure .= '<div class="form-lines">' . "\n"; $fld_dateheure .= '<p>' . "\n"; $fld_dateheure .= form_langue($GLOBALS['lang']['id']); $fld_dateheure .= '</p>' . "\n"; $fld_dateheure .= '<p>' . "\n"; $fld_dateheure .= form_format_date($GLOBALS['format_date']); $fld_dateheure .= '</p>' . "\n"; $fld_dateheure .= '<p>' . "\n"; $fld_dateheure .= form_format_heure($GLOBALS['format_heure']); $fld_dateheure .= '</p>' . "\n"; $fld_dateheure .= '<p>' . "\n"; $fld_dateheure .= form_fuseau_horaire($GLOBALS['fuseau_horaire']); $fld_dateheure .= '</p>' . "\n"; $fld_dateheure .= '</div>' . "\n"; $fld_dateheure .= '</div>'; echo $fld_dateheure; $fld_cfg_blog = '<div role="group" class="pref">'; $fld_cfg_blog .= '<div class="form-legend">' . legend($GLOBALS['lang']['prefs_legend_configblog'], 'legend-config') . '</div>' . "\n"; $fld_cfg_blog .= '<div class="form-lines">' . "\n"; $nbs = array('10' => '10', '25' => '25', '50' => '50', '100' => '100', '300' => '300', '-1' => $GLOBALS['lang']['pref_all']); $fld_cfg_blog .= '<p>' . "\n"; $fld_cfg_blog .= form_select('nb_list', $nbs, $GLOBALS['max_bill_admin'], $GLOBALS['lang']['pref_nb_list']); $fld_cfg_blog .= '</p>' . "\n"; $fld_cfg_blog .= '<p>' . "\n"; $fld_cfg_blog .= form_select('nb_list_com', $nbs, $GLOBALS['max_comm_admin'], $GLOBALS['lang']['pref_nb_list_com']); $fld_cfg_blog .= '</p>' . "\n"; $fld_cfg_blog .= '<p>' . "\n"; $fld_cfg_blog .= select_yes_no('activer_categories', $GLOBALS['activer_categories'], $GLOBALS['lang']['pref_categories']); $fld_cfg_blog .= '</p>' . "\n"; $fld_cfg_blog .= '<p>' . "\n"; $fld_cfg_blog .= select_yes_no('auto_keywords', $GLOBALS['automatic_keywords'], $GLOBALS['lang']['pref_automatic_keywords']); $fld_cfg_blog .= '</p>' . "\n"; $fld_cfg_blog .= '<p>' . "\n"; $fld_cfg_blog .= select_yes_no('global_comments', $GLOBALS['global_com_rule'], $GLOBALS['lang']['pref_allow_global_coms']); $fld_cfg_blog .= '</p>' . "\n"; $fld_cfg_blog .= '<p>' . "\n"; $fld_cfg_blog .= select_yes_no('require_email', $GLOBALS['require_email'], $GLOBALS['lang']['pref_force_email']); $fld_cfg_blog .= '</p>' . "\n"; $fld_cfg_blog .= '<p>' . "\n"; $fld_cfg_blog .= form_select('comm_defaut_status', array('1' => $GLOBALS['lang']['pref_comm_black_list'], '0' => $GLOBALS['lang']['pref_comm_white_list']), $GLOBALS['comm_defaut_status'], $GLOBALS['lang']['pref_comm_BoW_list']); $fld_cfg_blog .= '</p>' . "\n"; $fld_cfg_blog .= '</div>' . "\n"; $fld_cfg_blog .= '</div>'; echo $fld_cfg_blog; $fld_cfg_linx = '<div role="group" class="pref">'; $fld_cfg_linx .= '<div class="form-legend">' . legend($GLOBALS['lang']['prefs_legend_configlinx'], 'legend-config') . '</div>' . "\n"; $fld_cfg_linx .= '<div class="form-lines">' . "\n"; // nb liens côté admin $nbs = array('50' => '50', '100' => '100', '200' => '200', '300' => '300', '500' => '500', '-1' => $GLOBALS['lang']['pref_all']); $fld_cfg_linx .= '<p>' . "\n"; $fld_cfg_linx .= form_select('nb_list_linx', $nbs, $GLOBALS['max_linx_admin'], $GLOBALS['lang']['pref_nb_list_linx']); $fld_cfg_linx .= '</p>' . "\n"; // partage de fichiers !pages : télécharger dans fichiers automatiquement ? $nbs = array('0' => $GLOBALS['lang']['non'], '1' => $GLOBALS['lang']['oui'], '2' => $GLOBALS['lang']['pref_ask_everytime']); $fld_cfg_linx .= '<p>' . "\n"; $fld_cfg_linx .= form_select('dl_link_to_files', $nbs, $GLOBALS['dl_link_to_files'], $GLOBALS['lang']['pref_linx_dl_auto']); $fld_cfg_linx .= '</p>' . "\n"; // lien à glisser sur la barre des favoris $a = explode('/', dirname($_SERVER['PHP_SELF'])); $fld_cfg_linx .= '<p>'; $fld_cfg_linx .= '<label>' . $GLOBALS['lang']['pref_label_bookmark_lien'] . '</label>' . "\n"; $fld_cfg_linx .= '<a class="dnd-to-favs" onclick="alert(\'' . $GLOBALS['lang']['pref_alert_bookmark_link'] . '\');return false;" href="javascript:javascript:(function(){window.open(\'' . $GLOBALS['racine'] . $a[count($a) - 1] . '/links.php?url=\'+encodeURIComponent(location.href));})();"><b>Save link</b></a>'; $fld_cfg_linx .= '</p>' . "\n"; $fld_cfg_linx .= '</div>' . "\n"; $fld_cfg_linx .= '</div>'; echo $fld_cfg_linx; $fld_maintenance = '<div role="group" class="pref">'; $fld_maintenance .= '<div class="form-legend">' . legend($GLOBALS['lang']['titre_maintenance'], 'legend-sweep') . '</div>' . "\n"; $fld_maintenance .= '<div class="form-lines">' . "\n"; $fld_maintenance .= '<p>' . "\n"; $fld_maintenance .= select_yes_no('check_update', $GLOBALS['check_update'], $GLOBALS['lang']['pref_check_update']); $fld_maintenance .= '</p>' . "\n"; $fld_maintenance .= '<p>' . "\n"; $fld_maintenance .= "\t" . '<label>' . $GLOBALS['lang']['pref_go_to_maintenance'] . '</label>' . "\n"; $fld_maintenance .= "\t" . '<a href="maintenance.php">Maintenance</a>' . "\n"; $fld_maintenance .= '</p>' . "\n"; $fld_maintenance .= '</div>' . "\n"; $fld_maintenance .= '</div>'; echo $fld_maintenance; // check if a new Blogotext version is available (code from Shaarli, by Sebsauvage). // Get latest version number at most once a day. if ($GLOBALS['check_update'] == 1) { if (!is_file($GLOBALS['last-online-file']) or filemtime($GLOBALS['last-online-file']) < time() - 24 * 60 * 60) { $last_version = get_external_file('http://lehollandaisvolant.net/blogotext/version.php', 6); if (empty($last_version['body'])) { $last_version = $GLOBALS['version']; } // If failed, nevermind. We don't want to bother the user with that. file_put_contents($GLOBALS['last-online-file'], $last_version['body']); // touch file date } // Compare versions: $newestversion = file_get_contents($GLOBALS['last-online-file']); if (version_compare($newestversion, $GLOBALS['version']) == 1) { $fld_update = '<div role="group" class="pref">'; $fld_update .= '<div class="form-legend">' . legend($GLOBALS['lang']['maint_chk_update'], 'legend-update') . '</div>' . "\n"; $fld_update .= '<div class="form-lines">' . "\n"; $fld_update .= '<p>' . "\n"; $fld_update .= "\t" . '<label>' . $GLOBALS['lang']['maint_update_youisbad'] . ' (' . $newestversion . '). ' . $GLOBALS['lang']['maint_update_go_dl_it'] . '</label>' . "\n"; $fld_update .= "\t" . '<a href="http://lehollandaisvolant.net/blogotext/">lehollandaisvolant.net/blogotext</a>.'; $fld_update .= '</p>' . "\n"; $fld_update .= '</div>' . "\n"; $fld_update .= '</div>' . "\n"; echo $fld_update; } } echo '<div class="submit-bttns">'; echo hidden_input('_verif_envoi', '1'); echo hidden_input('token', new_token()); echo '<button class="submit white-square" type="button" onclick="annuler(\'preferences.php\');" >' . $GLOBALS['lang']['annuler'] . '</button>' . "\n"; echo '<input class="submit blue-square" type="submit" name="enregistrer" value="' . $GLOBALS['lang']['enregistrer'] . '" />' . "\n"; echo '</div>'; echo '</form>'; }
function afficher_form_link($step, $erreurs, $editlink = '') { if ($erreurs) { echo erreurs($erreurs); } $form = ''; if ($step == 1) { // postage de l'URL : un champ affiché en GET $form .= '<form method="get" class="bordered-formbloc" id="post-new-lien" action="' . 'links.php' . '">' . "\n"; // not using PHP_SELF because of if the form is loaded on index.php $form .= '<fieldset>' . "\n"; $form .= "\t" . '<input type="text" name="url" value="" size="70" placeholder="http://www.example.com/" class="text" autofocus />' . "\n"; $form .= "\t" . '<p class="centrer">' . "\n"; $form .= "\t\t" . '<input type="submit" value="' . $GLOBALS['lang']['envoyer'] . '" class="submit blue-square" />' . "\n"; $form .= "\t" . '</p>'; $form .= '</fieldset>' . "\n"; $form .= '</form>' . "\n\n"; } elseif ($step == 2) { // Form de l'URL, avec titre, description, en POST cette fois, et qu'il faut vérifier avant de stoquer dans la BDD. $form .= '<form method="post" onsubmit="return moveTag();" class="bordered-formbloc" id="post-lien" action="' . $_SERVER['PHP_SELF'] . '">' . "\n"; $form .= '<fieldset>' . "\n"; $url = $_GET['url']; $type = 'url'; $title = htmlspecialchars($url); $new_id = date('YmdHis'); // URL vide : c’est une "note" et on masque le champ du lien if (empty($url)) { $type = 'note'; $title = 'Note'; $url = $GLOBALS['racine'] . '?mode=links&id=' . $new_id; $form .= hidden_input('url', $url); $form .= hidden_input('type', 'note'); $form .= "\t" . '<div class="wrap-fields wrap-fields-note">' . "\n"; // URL non vide } else { // Test du type de fichier $rep_hdr = get_headers($url, 1); $cnt_type = isset($rep_hdr['Content-Type']) ? $rep_hdr['Content-Type'] : 'text/'; $cnt_type = is_array($cnt_type) ? $cnt_type[0] : $cnt_type; // lien est une image if (strpos($cnt_type, 'image/') === 0) { $title = $GLOBALS['lang']['label_image']; if (list($width, $height) = @getimagesize($url)) { $fdata = $url; $type = 'image'; $title .= ' - ' . $width . 'x' . $height . 'px '; } } elseif (strpos($cnt_type, 'text/') !== 0) { if ($GLOBALS['dl_link_to_files'] == 2) { $type = 'file'; } } elseif ($ext_file = get_external_file($url, 15)) { $charset = 'utf-8'; // cherche le charset dans les headers if (preg_match('#charset=(.*);?#', $cnt_type, $hdr_charset) and !empty($hdr_charset[1])) { $charset = $hdr_charset[1]; } else { // cherche la balise "meta charset" preg_match('#<meta .*charset=([^\\s]*)\\s*/?>#Usi', $ext_file, $meta); $charset = !empty($meta[1]) ? strtolower(str_replace(array("'", '"'), array('', ''), $meta[1])) : 'utf-8'; } // récupère le titre, dans le tableau $titles, rempli par preg_match() $ext_file = html_entity_decode($charset == 'iso-8859-1' ? utf8_encode($ext_file) : $ext_file, ENT_QUOTES | ENT_HTML5, 'UTF-8'); preg_match('#<title>(.*)</title>#Usi', $ext_file, $titles); if (!empty($titles[1])) { $html_title = trim($titles[1]); $title = htmlspecialchars($html_title); // si pas de titre : on utilise l’URL. } else { $title = htmlspecialchars($url); } } $form .= "\t" . '<div class="wrap-fields wrap-fields-' . $type . '">' . "\n"; $form .= "\t" . '<input type="text" name="url" value="' . htmlspecialchars($url) . '" placeholder="' . ucfirst($GLOBALS['lang']['placeholder_url']) . '" size="50" class="text readonly-like" />' . "\n"; $form .= hidden_input('type', 'link'); } $link = array('title' => $title, 'url' => htmlspecialchars($url)); $form .= "\t" . '<input type="text" name="title" placeholder="' . ucfirst($GLOBALS['lang']['placeholder_titre']) . '" required="" value="' . $link['title'] . '" size="50" class="text" autofocus />' . "\n"; if ($type == 'image') { // si le lien est une image, on ajoute une miniature de l’image; $form .= "\t" . '<span id="description-box" class="space-left">' . "\n"; $form .= "\t\t" . '<img src="' . $fdata . '" alt="img" class="preview-img" />'; } else { $form .= "\t" . '<span id="description-box">' . "\n"; } $form .= "\t\t" . '<textarea class="text" name="description" cols="40" rows="7" placeholder="' . ucfirst($GLOBALS['lang']['placeholder_description']) . '"></textarea>' . "\n"; $form .= "\t" . '</span>' . "\n"; $form .= form_categories_links('links', ''); $form .= "\t" . '<input list="htmlListTags" type="text" class="text" id="type_tags" name="tags" onkeydown="chkHit(event);" placeholder="' . ucfirst($GLOBALS['lang']['placeholder_tags']) . '"/>' . "\n"; $form .= "\t" . '<input type="hidden" id="categories" name="categories" value="" />' . "\n"; $form .= "\t" . '<label>' . $GLOBALS['lang']['label_lien_priv'] . '<input type="checkbox" name="statut" />' . '</label>'; // download of file is asked if (($type == 'image' or $type == 'file') and $GLOBALS['dl_link_to_files'] == 2) { $form .= "\t" . '<label>' . $GLOBALS['lang']['label_dl_fichier'] . '<input type="checkbox" name="add_to_files" /></label>' . "\n"; } elseif (($type == 'image' or $type == 'file') and $GLOBALS['dl_link_to_files'] == 1) { $form .= hidden_input('add_to_files', 'on'); } $form .= "\t" . '<p class="centrer">' . "\n"; $form .= "\t\t" . '<input class="submit blue-square" type="submit" name="enregistrer" id="valid-link" value="' . $GLOBALS['lang']['envoyer'] . '" />' . "\n"; $form .= "\t" . '</p>' . "\n"; $form .= hidden_input('_verif_envoi', '1'); $form .= hidden_input('bt_id', $new_id); $form .= hidden_input('bt_author', $GLOBALS['auteur']); $form .= hidden_input('token', new_token()); $form .= hidden_input('dossier', ''); $form .= '</div>' . "\n"; $form .= '</fieldset>' . "\n"; $form .= '</form>' . "\n\n"; } elseif ($step == 'edit') { // Form pour l'édition d'un lien : les champs sont remplis avec le "wiki_content" et il y a les boutons suppr/activer en plus. $form = '<form method="post" onsubmit="return moveTag();" class="bordered-formbloc" id="post-lien" action="' . $_SERVER['PHP_SELF'] . '?id=' . $editlink['bt_id'] . '">' . "\n"; $form .= "\t" . '<fieldset class="pref">' . "\n"; $form .= "\t" . '<div class="wrap-fields wrap-fields-links">' . "\n"; $form .= "\t" . '<input type="text" name="url" placeholder="' . ucfirst($GLOBALS['lang']['placeholder_url']) . '" required="" value="' . $editlink['bt_link'] . '" size="70" class="text readonly-like" /></label>' . "\n"; $form .= "\t" . '<input type="text" name="title" placeholder="' . ucfirst($GLOBALS['lang']['placeholder_titre']) . '" required="" value="' . $editlink['bt_title'] . '" size="70" class="text" autofocus /></label>' . "\n"; $form .= "\t" . '<span id="description-box">' . "\n"; $form .= "\t\t" . '<textarea class="description text" name="description" cols="70" rows="7" placeholder="' . ucfirst($GLOBALS['lang']['placeholder_description']) . '" >' . $editlink['bt_wiki_content'] . '</textarea>' . "\n"; $form .= "\t" . '</span>' . "\n"; $form .= form_categories_links('links', $editlink['bt_tags']); $form .= "\t" . '<input list="htmlListTags" type="text" class="text" id="type_tags" name="tags" onkeydown="chkHit(event);" placeholder="' . ucfirst($GLOBALS['lang']['placeholder_tags']) . '"/>' . "\n"; $form .= "\t" . '<input type="hidden" id="categories" name="categories" value="" />' . "\n"; $form .= "\t" . '<label>' . $GLOBALS['lang']['label_lien_priv'] . '<input type="checkbox" name="statut" ' . ($editlink['bt_statut'] == 0 ? 'checked ' : '') . '/>' . '</label>' . "\n"; $form .= "\t" . '<p class="centrer">' . "\n"; $form .= "\t" . '<input class="submit blue-square" type="submit" name="editer" value="' . $GLOBALS['lang']['envoyer'] . '" />' . "\n"; $form .= "\t" . '<input class="submit red-square" type="submit" name="supprimer" value="' . $GLOBALS['lang']['supprimer'] . '" onclick="return window.confirm(\'' . $GLOBALS['lang']['question_suppr_article'] . '\')" />' . "\n"; $form .= "\t" . '</p>' . "\n"; $form .= hidden_input('ID', $editlink['ID']); $form .= hidden_input('bt_id', $editlink['bt_id']); $form .= hidden_input('bt_author', $editlink['bt_author']); $form .= hidden_input('_verif_envoi', '1'); $form .= hidden_input('is_it_edit', 'yes'); $form .= hidden_input('token', new_token()); $form .= hidden_input('type', $editlink['bt_type']); $form .= "\t" . '</div>' . "\n"; $form .= "\t" . '</fieldset>' . "\n"; $form .= '</form>' . "\n\n"; } return $form; }