function conversions_theme($texte, $solo_art, $cnt_mode) { $texte = str_replace($GLOBALS['balises']['version'], $GLOBALS['version'], $texte); $texte = str_replace($GLOBALS['balises']['app_name'], $GLOBALS['nom_application'], $texte); $texte = str_replace($GLOBALS['balises']['style'], $GLOBALS['theme_style'], $texte); $texte = str_replace($GLOBALS['balises']['blog_description'], $GLOBALS['description'], $texte); $texte = str_replace($GLOBALS['balises']['racine_du_site'], $GLOBALS['racine'], $texte); $texte = str_replace($GLOBALS['balises']['blog_auteur'], $GLOBALS['auteur'], $texte); $texte = str_replace($GLOBALS['balises']['blog_email'], $GLOBALS['email'], $texte); $texte = str_replace($GLOBALS['balises']['blog_nom'], $GLOBALS['nom_du_site'], $texte); if ($cnt_mode == 'post' and !empty($solo_art)) { $texte = str_replace($GLOBALS['balises']['article_titre_page'], $solo_art['bt_title'] . ' - ', $texte); $texte = str_replace($GLOBALS['balises']['article_titre'], $solo_art['bt_title'], $texte); $texte = str_replace($GLOBALS['balises']['article_titre_echape'], urlencode($solo_art['bt_title']), $texte); $texte = str_replace($GLOBALS['balises']['article_lien'], $solo_art['bt_link'], $texte); if ($solo_art['bt_type'] == 'article') { $texte = str_replace($GLOBALS['balises']['article_chapo'], $solo_art['bt_abstract'], $texte); $texte = str_replace($GLOBALS['balises']['blog_motscles'], $solo_art['bt_keywords'], $texte); } if ($solo_art['bt_type'] == 'link' or $solo_art['bt_type'] == 'note') { $texte = str_replace($GLOBALS['balises']['article_titre_page'], $solo_art['bt_title'] . ' - ', $texte); } } // si remplacé, ceci ne sert à rien. Si pas remplacé, ça sert. $texte = str_replace($GLOBALS['balises']['article_titre_page'], '', $texte); $texte = str_replace($GLOBALS['balises']['blog_motscles'], $GLOBALS['keywords'], $texte); $texte = str_replace($GLOBALS['balises']['article_titre_echape'], '', $texte); $texte = str_replace($GLOBALS['balises']['article_lien'], $GLOBALS['racine'], $texte); $texte = str_replace($GLOBALS['balises']['pagination'], lien_pagination(), $texte); if (strpos($texte, $GLOBALS['balises']['form_recherche']) !== FALSE) { $texte = str_replace($GLOBALS['balises']['form_recherche'], moteur_recherche(''), $texte); } if (strpos($texte, $GLOBALS['balises']['form_calendrier']) !== FALSE) { $texte = str_replace($GLOBALS['balises']['form_calendrier'], afficher_calendrier(), $texte); } // Formulaires $texte = str_replace($GLOBALS['balises']['rss'], $GLOBALS['rss'], $texte); $texte = str_replace($GLOBALS['balises']['comm_encart'], encart_commentaires(), $texte); $texte = str_replace($GLOBALS['balises']['cat_encart'], encart_categories(isset($_GET['mode']) ? $_GET['mode'] : ''), $texte); if (isset($GLOBALS['rss_comments'])) { $texte = str_replace($GLOBALS['balises']['rss_comments'], $GLOBALS['rss_comments'], $texte); } return $texte; }
echo $GLOBALS['lang']['le'] . ' ' . date_formate($comment['bt_id']) . ', ' . heure_formate($comment['bt_id']); if ($with_link == 1 and !empty($comment['bt_title'])) { echo ' ' . $GLOBALS['lang']['sur'] . ' <a href="' . $_SERVER['PHP_SELF'] . '?post_id=' . $comment['bt_article_id'] . '">' . $comment['bt_title'] . '</a>'; } echo "\t" . '<button class="comm-link cl-suppr" type="button" onclick="ask_suppr(this);" title="' . $GLOBALS['lang']['supprimer'] . '"></button>' . "\n"; echo "\t" . '<button class="comm-link cl-edit" type="button" onclick="unfold(this);" title="' . $GLOBALS['lang']['editer'] . '"></button> '; echo '</p>' . "\n"; echo $GLOBALS['form_commentaire']; echo '</div>' . "\n\n"; } // DEBUT PAGE $msgg = $GLOBALS['lang']['titre_commentaires'] . (!empty($article_title) ? ' | ' . $article_title : ''); afficher_top($msgg); echo '<div id="top">' . "\n"; afficher_msg($GLOBALS['lang']['titre_commentaires']); echo moteur_recherche($GLOBALS['lang']['search_in_comments']); afficher_menu(pathinfo($_SERVER['PHP_SELF'], PATHINFO_BASENAME)); echo '</div>' . "\n"; echo '<div id="axe">' . "\n"; // SUBNAV echo '<div id="subnav">' . "\n"; // Affichage formulaire filtrage commentaires if (isset($_GET['filtre'])) { afficher_form_filtre('commentaires', htmlspecialchars($_GET['filtre'])); } else { afficher_form_filtre('commentaires', ''); } echo '</div>' . "\n"; echo erreurs($erreurs_form); echo '<div id="page">' . "\n"; echo '<p class="nombre-elem">' . "\n";
} else { $fichiers = $GLOBALS['liste_fichiers']; } // traitement d’une action sur le fichier $erreurs = array(); if (isset($_POST['_verif_envoi'])) { $fichier = init_post_fichier(); $erreurs = valider_form_fichier($fichier); if (empty($erreurs)) { traiter_form_fichier($fichier); } } afficher_html_head($GLOBALS['lang']['titre_fichier']); echo '<div id="top">' . "\n"; afficher_msg(); echo moteur_recherche($GLOBALS['lang']['search_in_files']); afficher_topnav(basename($_SERVER['PHP_SELF']), $GLOBALS['lang']['titre_fichier']); echo '</div>' . "\n"; echo '<div id="axe">' . "\n"; // SUBNAV echo '<div id="subnav">' . "\n"; // Affichage formulaire filtrage liens if (isset($_GET['filtre'])) { afficher_form_filtre('fichiers', htmlspecialchars($_GET['filtre'])); } else { afficher_form_filtre('fichiers', ''); } echo '</div>' . "\n"; // SUBNAV echo '<div id="page">' . "\n"; // vérifie que les fichiers de la liste sont bien présents sur le disque dur
if (!file_exists('../config/user.php') || !file_exists('../config/prefs.php')) { header('Location: install.php'); exit; } $begin = microtime(TRUE); $GLOBALS['BT_ROOT_PATH'] = '../'; require_once '../inc/inc.php'; error_reporting($GLOBALS['show_errors']); operate_session(); // open bases $GLOBALS['db_handle'] = open_base($GLOBALS['db_location']); $GLOBALS['liste_fichiers'] = open_serialzd_file($GLOBALS['fichier_liste_fichiers']); afficher_top($GLOBALS['lang']['label_resume']); echo '<div id="top">' . "\n"; afficher_msg(ucfirst($GLOBALS['lang']['label_resume'])); echo moteur_recherche($GLOBALS['lang']['search_everywhere']); afficher_menu(pathinfo($_SERVER['PHP_SELF'], PATHINFO_BASENAME)); echo '</div>' . "\n"; $total_artic = liste_elements_count("SELECT count(ID) AS nbr FROM articles", array()); $total_links = liste_elements_count("SELECT count(ID) AS nbr FROM links", array()); $total_comms = liste_elements_count("SELECT count(ID) AS nbr FROM commentaires", array()); $total_nb_fichiers = sizeof($GLOBALS['liste_fichiers']); echo '<div id="axe">' . "\n"; echo '<div id="mainpage">' . "\n"; // transforme les valeurs numériques d’un tableau pour les ramener la valeur max du tableau à $maximum. Les autres valeurs du tableau sont à l’échelle function scaled_size($tableau, $maximum) { $ratio = max(array_values($tableau)) / $maximum; $return = array(); foreach ($tableau as $key => $value) { if ($ratio != 0) {
} elseif (!empty($_GET['id']) and is_numeric($_GET['id'])) { // édition d’un lien spécifique $query = "SELECT * FROM links WHERE bt_id=?"; $tableau = liste_elements($query, array($_GET['id']), 'links'); } else { // aucun filtre : affiche TOUT $query = "SELECT * FROM links ORDER BY bt_id DESC LIMIT 0, " . $GLOBALS['max_linx_admin']; $tableau = liste_elements($query, array(), 'links'); } } // count total nb of links $nb_links_displayed = count($tableau); afficher_top($GLOBALS['lang']['mesliens']); echo '<div id="top">' . "\n"; afficher_msg($GLOBALS['lang']['mesliens']); echo moteur_recherche($GLOBALS['lang']['search_in_links']); afficher_menu(pathinfo($_SERVER['PHP_SELF'], PATHINFO_BASENAME)); echo '</div>' . "\n"; echo '<div id="axe">' . "\n"; // SUBNAV echo '<div id="subnav">' . "\n"; // Affichage formulaire filtrage liens if (isset($_GET['filtre'])) { afficher_form_filtre('links', htmlspecialchars($_GET['filtre'])); } else { afficher_form_filtre('links', ''); } echo '</div>' . "\n"; echo '<div id="page">' . "\n"; if ($step == 'edit' and !empty($tableau[0])) { // edit un lien : affiche le lien au dessus du champ d’édit