Ejemplo n.º 1
0
function footer($index = '', $begin_time = '')
{
    if ($index != '') {
        $file = '../config/ip.php';
        if (file_exists($file) and is_readable($file)) {
            include $file;
            $new_ip = htmlspecialchars($_SERVER['REMOTE_ADDR']);
            $last_time = strtolower(date_formate($GLOBALS['old_time'])) . ', ' . heure_formate($GLOBALS['old_time']);
            if ($new_ip == $GLOBALS['old_ip']) {
                $msg = '<br/>' . $GLOBALS['lang']['derniere_connexion_le'] . ' ' . $GLOBALS['old_ip'] . ' (' . $GLOBALS['lang']['cet_ordi'] . '), ' . $last_time;
            } else {
                $msg = '<br/>' . $GLOBALS['lang']['derniere_connexion_le'] . ' ' . $GLOBALS['old_ip'] . ' ' . $last_time;
            }
        } else {
            $msg = '';
        }
    } else {
        $msg = '';
    }
    if ($begin_time != '') {
        $end = microtime(TRUE);
        $dt = round($end - $begin_time, 6);
        $msg2 = ' - ' . $GLOBALS['lang']['rendered'] . ' ' . $dt . ' s ' . $GLOBALS['lang']['using'] . ' ' . $GLOBALS['sgdb'];
    } else {
        $msg2 = '';
    }
    echo '</div>' . "\n";
    echo '</div>' . "\n";
    echo '<p id="footer"><a href="' . $GLOBALS['appsite'] . '">' . $GLOBALS['nom_application'] . ' ' . $GLOBALS['version'] . '</a>' . $msg2 . $msg . '</p>' . "\n";
    echo '</body>' . "\n";
    echo '</html>' . "\n";
}
Ejemplo n.º 2
0
function afficher_liste_articles($tableau)
{
    if (!empty($tableau)) {
        mb_internal_encoding('UTF-8');
        $i = 0;
        $out = '<ul id="billets">' . "\n";
        foreach ($tableau as $article) {
            // ICONE SELON STATUT
            $out .= "\t" . '<li>' . "\n";
            // TITRE
            $out .= "\t\t" . '<span class="' . ($article['bt_statut'] == '1' ? 'on' : 'off') . '">' . '<a href="ecrire.php?post_id=' . $article['bt_id'] . '" title="' . htmlspecialchars(trim(mb_substr(strip_tags($article['bt_abstract']), 0, 249)), ENT_QUOTES) . '">' . $article['bt_title'] . '</a>' . '</span>' . "\n";
            // DATE
            $out .= "\t\t" . '<span><a href="' . basename($_SERVER['PHP_SELF']) . '?filtre=' . substr($article['bt_date'], 0, 8) . '">' . date_formate($article['bt_date']) . '</a> @ ' . heure_formate($article['bt_date']) . '</span>' . "\n";
            // NOMBRE COMMENTS
            $texte = $article['bt_nb_comments'];
            $out .= "\t\t" . '<span><a href="commentaires.php?post_id=' . $article['bt_id'] . '">' . $texte . '</a></span>' . "\n";
            // STATUT
            if ($article['bt_statut'] == '1') {
                $out .= "\t\t" . '<span><a href="' . $article['bt_link'] . '">' . $GLOBALS['lang']['lien_article'] . '</a></span>' . "\n";
            } else {
                $out .= "\t\t" . '<span><a href="' . $article['bt_link'] . '">' . $GLOBALS['lang']['preview'] . '</a></span>' . "\n";
            }
            $out .= "\t" . '</li>' . "\n";
            $i++;
        }
        $out .= '</ul>' . "\n\n";
        echo $out;
    } else {
        echo info($GLOBALS['lang']['note_no_article']);
    }
}
Ejemplo n.º 3
0
function afficher_liens($link)
{
    $list = '';
    $list .= '<div class="linkbloc' . (!$link['bt_statut'] ? ' privatebloc' : '') . '">' . "\n";
    $list .= '<div class="link-header">' . "\n";
    $list .= "\t" . '<a class="titre-lien" href="' . $link['bt_link'] . '">' . $link['bt_title'] . '</a>' . "\n";
    $list .= "\t" . '<div class="date">' . date_formate($link['bt_id']) . ', ' . heure_formate($link['bt_id']) . '</div>' . "\n";
    $list .= "\t" . '<div class="link-options">';
    $list .= "\t\t" . '<ul>' . "\n";
    $list .= "\t\t\t" . '<li class="ll-edit"><a href="' . basename($_SERVER['PHP_SELF']) . '?id=' . $link['bt_id'] . '">' . $GLOBALS['lang']['editer'] . '</a></li>' . "\n";
    $list .= $link['bt_statut'] == '1' ? "\t\t\t" . '<li class="ll-seepost"><a href="' . $GLOBALS['racine'] . '?mode=links&amp;id=' . $link['bt_id'] . '">' . $GLOBALS['lang']['voir_sur_le_blog'] . '</a></li>' . "\n" : "";
    //$list .=  "\t\t\t".'<li class="ll-suppr">'.$GLOBALS['lang']['supprimer'].'</li>'."\n";
    $list .= "\t\t" . '</ul>' . "\n";
    $list .= "\t" . '</div>' . "\n";
    $list .= '</div>' . "\n";
    $list .= "\t" . '<p class="link-content">' . $link['bt_content'] . '</p>' . "\n";
    $list .= "\t" . '<div class="link-footer">' . "\n";
    $list .= "\t\t" . '<ul class="link-tags">' . "\n";
    if (!empty($link['bt_tags'])) {
        $tags = explode(',', $link['bt_tags']);
        foreach ($tags as $tag) {
            $list .= "\t\t\t" . '<li class="tag">' . '<a href="?filtre=tag.' . urlencode(trim($tag)) . '">' . trim($tag) . '</a>' . '</li>' . "\n";
        }
    }
    $list .= "\t\t" . '</ul>' . "\n";
    $list .= "\t\t" . '<span class="hard-link">' . $link['bt_link'] . '</span>' . "\n";
    $list .= "\t" . '</div>' . "\n";
    $list .= '</div>' . "\n";
    echo $list;
}
Ejemplo n.º 4
0
function afficher_liens($link)
{
    $list = '';
    $list .= '<div class="linkbloc' . (!$link['bt_statut'] ? ' privatebloc' : '') . '">' . "\n";
    $list .= "\t" . '<p class="lien_editer">' . "\n";
    $list .= "\t\t" . ($link['bt_statut'] == '1' ? '<a href="' . $GLOBALS['racine'] . '?mode=links&amp;id=' . $link['bt_id'] . '" class="links-link ll-see" title="' . $GLOBALS['lang']['voir_sur_le_blog'] . '"></a> ' : '') . (empty($_GET['id']) ? '<a href="' . $_SERVER['PHP_SELF'] . '?id=' . $link['bt_id'] . '" class="links-link ll-edit" title="' . $GLOBALS['lang']['editer'] . '"></a> ' : '') . (!$link['bt_statut'] ? '<img src="style/lock.png" title="' . $GLOBALS['lang']['link_is_private'] . '" alt="private-icon" />' : '');
    $list .= "\t" . '</p>' . "\n";
    $list .= "\t" . '<h3 class="titre-lien"><a href="' . $link['bt_link'] . '">' . $link['bt_title'] . '</a></h3>' . "\n";
    $list .= "\t" . '<p>' . $link['bt_content'] . '</p>' . "\n";
    $list .= "\t" . '<p class="date">' . date_formate($link['bt_id']) . ', ' . heure_formate($link['bt_id']) . ' - ' . $link['bt_link'] . '</p>' . "\n";
    if (!empty($link['bt_tags'])) {
        $tags = explode(',', $link['bt_tags']);
        $list .= '<p class="link-tags">';
        foreach ($tags as $tag) {
            $list .= '<span class="tag">' . '<a href="?filtre=tag.' . urlencode(trim($tag)) . '">' . trim($tag) . '</a>' . '</span> ';
        }
        $list .= '</p>' . "\n";
    }
    $list .= '</div>' . "\n";
    echo $list;
}
Ejemplo n.º 5
0
function afficher_commentaire($comment, $with_link)
{
    afficher_form_commentaire($comment['bt_article_id'], 'admin', '', $comment);
    echo '<div class="commentbloc' . (!$comment['bt_statut'] ? ' privatebloc' : '') . '" id="' . article_anchor($comment['bt_id']) . '">' . "\n";
    if ($comment['bt_statut'] == '0') {
        echo '<img class="img_inv_flag" src="style/deny.png" title="' . $GLOBALS['lang']['comment_is_invisible'] . '" alt="icon"/>';
    }
    echo '<span onclick="reply(\'[b]@[' . str_replace('\'', '\\\'', $comment['bt_author']) . '|#' . article_anchor($comment['bt_id']) . '] :[/b] \'); ">@</span> ';
    echo '<h3 class="titre-commentaire">' . $comment['auteur_lien'] . '</h3>' . "\n";
    echo '<p class="email"><a href="mailto:' . $comment['bt_email'] . '">' . $comment['bt_email'] . '</a></p>' . "\n";
    echo $comment['bt_content'];
    echo '<p class="p-edit-button">' . "\n";
    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";
}
Ejemplo n.º 6
0
function send_rss_json($rss_entries)
{
    // send all the entries data in a JSON format
    $out = '';
    $out .= '<script type="text/javascript">';
    // RSS entries
    $out .= 'var rss_entries = {"list": [' . "\n";
    $count = count($rss_entries) - 1;
    foreach ($rss_entries as $i => $entry) {
        // note : json_encode DOES add « " » on the data, so I use « encode() » and not '"'.encode().'"';
        $out .= '{' . '"id": "' . $entry['bt_id'] . '",' . '"date": "' . date_formate(date('YmdHis', $entry['bt_date'])) . ' - ' . heure_formate(date('YmdHis', $entry['bt_date'])) . '",' . '"title": ' . json_encode($entry['bt_title']) . ',' . '"link": ' . json_encode($entry['bt_link']) . ',' . '"feed": ' . json_encode($entry['bt_feed']) . ',' . '"sitename": ' . json_encode($GLOBALS['liste_flux'][$entry['bt_feed']]['title']) . ',' . '"folder": ' . json_encode($GLOBALS['liste_flux'][$entry['bt_feed']]['folder']) . ',' . '"content": ' . json_encode($entry['bt_content']) . ',' . '"statut": "' . $entry['bt_statut'] . '"' . '}' . ($count == $i ? '' : ',') . "\n";
    }
    $out .= ']' . "\n" . '}';
    $out .= '</script>' . "\n";
    return $out;
}
Ejemplo n.º 7
0
function conversions_theme_lien($texte, $lien)
{
    $texte = str_replace($GLOBALS['balises']['article_titre'], $lien['bt_title'], $texte);
    $texte = str_replace($GLOBALS['balises']['lien_auteur'], $lien['bt_author'], $texte);
    $texte = str_replace($GLOBALS['balises']['lien_titre'], $lien['bt_title'], $texte);
    $texte = str_replace($GLOBALS['balises']['lien_url'], $lien['bt_link'], $texte);
    $texte = str_replace($GLOBALS['balises']['lien_date'], date_formate($lien['bt_id']), $texte);
    $texte = str_replace($GLOBALS['balises']['lien_date_iso'], date_formate_iso($lien['bt_id']), $texte);
    $texte = str_replace($GLOBALS['balises']['lien_heure'], heure_formate($lien['bt_id']), $texte);
    $texte = str_replace($GLOBALS['balises']['lien_permalink'], $lien['bt_id'], $texte);
    $texte = str_replace($GLOBALS['balises']['lien_description'], $lien['bt_content'], $texte);
    $texte = str_replace($GLOBALS['balises']['lien_id'], $lien['ID'], $texte);
    $texte = str_replace($GLOBALS['balises']['lien_tags'], liste_tags($lien, '1'), $texte);
    return $texte;
}
Ejemplo n.º 8
0
function afficher_form_fichier($erreurs, $fichiers, $what)
{
    // ajout d’un fichier
    $max_file_size = taille_formate(min(return_bytes(ini_get('upload_max_filesize')), return_bytes(ini_get('post_max_size'))));
    $max_file_nb = ini_get('max_file_uploads');
    if ($erreurs) {
        echo erreurs($erreurs);
    }
    $form = '<form id="form-image" class="bordered-formbloc" enctype="multipart/form-data" method="post" action="' . basename($_SERVER['PHP_SELF']) . '" onsubmit="submitdnd(event);">' . "\n";
    if (empty($fichiers)) {
        // si PAS fichier donnée : formulaire nouvel envoi.
        $form .= '<fieldset class="pref" >' . "\n";
        $form .= '<div id="form-dragndrop">' . "\n";
        $form .= '<div id="dragndrop-area" ondragover="event.preventDefault();" ondrop="handleDrop(event);" >' . "\n";
        $form .= "\t" . '<div id="dragndrop-title">' . "\n";
        $form .= "\t\t" . $GLOBALS['lang']['img_drop_files_here'] . "\n";
        $form .= "\t\t" . '<div class="upload-info">(' . $GLOBALS['lang']['label_jusqua'] . $max_file_size . $GLOBALS['lang']['label_parfichier'] . ')</div>' . "\n";
        $form .= "\t" . '</div>' . "\n";
        $form .= "\t" . '<div id="file-input-wrapper"><input name="fichier" id="fichier" type="file" required="" /></div>' . "\n";
        $form .= "\t" . '<button type="button" class="specify-link white-square" id="click-change-form" onclick="return switchUploadForm();" data-lang-url="' . $GLOBALS['lang']['img_specifier_url'] . '" data-lang-file="' . $GLOBALS['lang']['img_upload_un_fichier'] . '">' . $GLOBALS['lang']['img_specifier_url'] . '</button>' . "\n";
        $form .= '</div>' . "\n";
        $form .= '<div id="count"></div>' . "\n";
        $form .= '<div id="result"></div>' . "\n";
        $form .= '</div>' . "\n";
        $form .= '<div id="img-others-infos">' . "\n";
        $form .= "\t" . '<p><label for="nom_entree">' . $GLOBALS['lang']['label_dp_nom'] . '</label><input type="text" id="nom_entree" name="nom_entree" placeholder="' . $GLOBALS['lang']['placeholder_nom_fichier'] . '" value="" size="60" class="text" /></p>' . "\n";
        $form .= "\t" . '<p><label for="description">' . $GLOBALS['lang']['label_dp_description'] . '</label><textarea class="text" id="description" name="description" cols="60" rows="5" placeholder="' . $GLOBALS['lang']['placeholder_description'] . '" ></textarea></p>' . "\n";
        $form .= "\t" . '<p><label for="dossier">' . $GLOBALS['lang']['label_dp_dossier'] . '</label><input type="text" id="dossier" name="dossier" placeholder="' . $GLOBALS['lang']['placeholder_folder'] . '" value="" size="60" class="text" /></p>' . "\n";
        $form .= "\t" . '<p><label for="statut">' . $GLOBALS['lang']['label_file_priv'] . '<input type="checkbox" id="statut" name="statut"/></label></p>';
        $form .= hidden_input('token', new_token(), 'id');
        $form .= hidden_input('_verif_envoi', '1');
        $form .= "\t" . '<p class="submit-bttns"><input class="submit blue-square" type="submit" name="upload" value="' . $GLOBALS['lang']['img_upload'] . '" /></p>' . "\n";
        $form .= '</div>' . "\n";
        $form .= '</fieldset>' . "\n";
    } elseif (!empty($fichiers) and isset($_GET['file_id']) and preg_match('/\\d{14}/', $_GET['file_id'])) {
        $myfile = $fichiers[0];
        if ($myfile['bt_type'] == 'image') {
            $dossier = $GLOBALS['racine'] . $GLOBALS['dossier_images'] . $myfile['bt_path'];
        } else {
            $dossier = $GLOBALS['racine'] . $GLOBALS['dossier_fichiers'];
        }
        $form .= '<div class="edit-fichier">' . "\n";
        // codes d’intégrations pour les médias
        // Video
        if ($myfile['bt_type'] == 'video') {
            $form .= '<div class="display-media"><video class="media" src="' . $dossier . '/' . $myfile['bt_filename'] . '" type="video/' . $myfile['bt_fileext'] . '" load controls="controls"></video></div>' . "\n";
        }
        // image
        if ($myfile['bt_type'] == 'image') {
            $form .= '<div class="display-media"><a href="' . $dossier . '/' . $myfile['bt_filename'] . '"><img class="media" src="' . $dossier . '/' . $myfile['bt_filename'] . '" alt="' . $myfile['bt_filename'] . '" width="' . $myfile['bt_dim_w'] . '" height="' . $myfile['bt_dim_h'] . '" /></a></div>' . "\n";
        }
        // audio
        if ($myfile['bt_type'] == 'music') {
            $form .= '<div class="display-media"><audio class="media" src="' . $dossier . '/' . $myfile['bt_filename'] . '" type="audio/' . $myfile['bt_fileext'] . '" load controls="controls"></audio></div>' . "\n";
        }
        // la partie listant les infos du fichier.
        $form .= '<ul id="fichier-meta-info">' . "\n";
        $form .= "\t" . '<li><b>' . $GLOBALS['lang']['label_dp_nom'] . '</b> ' . $myfile['bt_filename'] . '</li>' . "\n";
        $form .= "\t" . '<li><b>' . $GLOBALS['lang']['label_dp_type'] . '</b> ' . $myfile['bt_type'] . ' (.' . $myfile['bt_fileext'] . ')</li>' . "\n";
        if ($myfile['bt_type'] == 'image') {
            // si le fichier est une image, on ajout ses dimensions en pixels
            $form .= "\t" . '<li><b>' . $GLOBALS['lang']['label_dp_dimensions'] . '</b> ' . $myfile['bt_dim_w'] . 'px × ' . $myfile['bt_dim_h'] . 'px' . '</li>' . "\n";
        }
        $form .= "\t" . '<li><b>' . $GLOBALS['lang']['label_dp_date'] . '</b>' . date_formate($myfile['bt_id']) . ', ' . heure_formate($myfile['bt_id']) . '</li>' . "\n";
        $form .= "\t" . '<li><b>' . $GLOBALS['lang']['label_dp_poids'] . '</b>' . taille_formate($myfile['bt_filesize']) . '</li>' . "\n";
        $form .= "\t" . '<li><b>' . $GLOBALS['lang']['label_dp_checksum'] . '</b>' . $myfile['bt_checksum'] . '</li>' . "\n";
        $form .= "\t" . '<li><b>' . $GLOBALS['lang']['label_dp_visibilite'] . '</b>' . ($myfile['bt_statut'] == 1 ? 'Publique' : 'Privée') . '</li>' . "\n";
        $form .= '</ul>' . "\n";
        // la partie des codes d’intégration (bbcode, etc.)
        $form .= '<div id="interg-codes">' . "\n";
        $form .= '<p><strong>' . ucfirst('codes d’intégration :') . '</strong></p>' . "\n";
        $form .= '<input onfocus="this.select()" class="text" type="text" value=\'' . $dossier . '/' . $myfile['bt_filename'] . '\' />' . "\n";
        if ($myfile['bt_type'] == 'image') {
            // si le fichier est une image, on ajout BBCode pour [IMG] et le code en <img/>
            $form .= '<input onfocus="this.select()" class="text" type="text" value=\'<img src="' . $dossier . '/' . $myfile['bt_filename'] . '" alt="i" width="' . $myfile['bt_dim_w'] . '" height="' . $myfile['bt_dim_h'] . '" style="max-width: 100%; height: auto;" />\' />' . "\n";
            $form .= '<input onfocus="this.select()" class="text" type="text" value=\'<img src="/' . $GLOBALS['dossier_images'] . $myfile['bt_path'] . '/' . $myfile['bt_filename'] . '" alt="i" width="' . $myfile['bt_dim_w'] . '" height="' . $myfile['bt_dim_h'] . '" style="max-width: 100%; height: auto;" />\' />' . "\n";
            $form .= '<input onfocus="this.select()" class="text" type="text" value=\'<img src="' . $GLOBALS['dossier_images'] . $myfile['bt_path'] . '/' . $myfile['bt_filename'] . '" alt="i" width="' . $myfile['bt_dim_w'] . '" height="' . $myfile['bt_dim_h'] . '" style="max-width: 100%; height: auto;" />\' />' . "\n";
            $form .= '<input onfocus="this.select()" class="text" type="text" value=\'[img]' . $dossier . '/' . $myfile['bt_filename'] . '[/img]\' />' . "\n";
            $form .= '<input onfocus="this.select()" class="text" type="text" value=\'[spoiler][img]' . $dossier . '/' . $myfile['bt_filename'] . '[/img][/spoiler]\' />' . "\n";
        } else {
            $form .= '<input onfocus="this.select()" class="text" type="text" value=\'<a href="' . $dossier . '/' . $myfile['bt_filename'] . '" />' . $myfile['bt_filename'] . '</a>\' />' . "\n";
            $form .= '<input onfocus="this.select()" class="text" type="text" value=\'[url]' . $dossier . '/' . $myfile['bt_filename'] . '[/url]\' />' . "\n";
        }
        $form .= '</div>' . "\n";
        // la partie avec l’édition du contenu.
        $form .= '<div id="img-others-infos">' . "\n";
        $form .= "\t" . '<p><label for="nom_entree">' . ucfirst($GLOBALS['lang']['label_dp_nom']) . '</label><input type="text" id="nom_entree" name="nom_entree" placeholder="" value="' . pathinfo($myfile['bt_filename'], PATHINFO_FILENAME) . '" size="60" class="text" /></p>' . "\n";
        $form .= "\t" . '<p><label for="description">' . $GLOBALS['lang']['label_dp_description'] . '</label><textarea class="text" name="description" id="description" cols="60" rows="5" placeholder="' . $GLOBALS['lang']['placeholder_description'] . '" >' . $myfile['bt_wiki_content'] . '</textarea></p>' . "\n";
        $form .= "\t" . '<p><label for="dossier">' . $GLOBALS['lang']['label_dp_dossier'] . '</label><input type="text" name="dossier" placeholder="' . $GLOBALS['lang']['placeholder_folder'] . '" value="' . (!empty($myfile['bt_dossier']) ? $myfile['bt_dossier'] : '') . '" size="60" class="text" /></p>' . "\n";
        $checked = $myfile['bt_statut'] == 0 ? 'checked ' : '';
        $form .= "\t" . '<p><label for="statut">' . $GLOBALS['lang']['label_file_priv'] . '<input type="checkbox" id="statut" name="statut" ' . $checked . '/></label></p>';
        $form .= "\t" . '<p class="submit-bttns">' . "\n";
        $form .= "\t\t" . '<input class="submit red-square" type="button" name="supprimer" value="' . $GLOBALS['lang']['supprimer'] . '" onclick="rmFichier(this)" />' . "\n";
        $form .= "\t\t" . '<button class="submit white-square" type="button" onclick="annuler(\'fichiers.php\');">' . $GLOBALS['lang']['annuler'] . '</button>' . "\n";
        $form .= "\t\t" . '<input class="submit blue-square" type="submit" name="editer" value="' . $GLOBALS['lang']['envoyer'] . '" />' . "\n";
        $form .= "\t" . '</p>' . "\n";
        $form .= '</div>' . "\n";
        $form .= hidden_input('_verif_envoi', '1');
        $form .= hidden_input('is_it_edit', 'yes');
        $form .= hidden_input('file_id', $myfile['bt_id']);
        $form .= hidden_input('filename', $myfile['bt_filename']);
        $form .= hidden_input('sha1_file', $myfile['bt_checksum']);
        $form .= hidden_input('path', $myfile['bt_path']);
        $form .= hidden_input('filesize', $myfile['bt_filesize']);
        $form .= hidden_input('token', new_token());
        $form .= '</div>';
    }
    $form .= '</form>' . "\n";
    echo $form;
}
Ejemplo n.º 9
0
function afficher_liste_articles($tableau)
{
    if (!empty($tableau)) {
        $i = 0;
        $out = '<ul id="billets">' . "\n";
        foreach ($tableau as $article) {
            // ICONE SELON STATUT
            $out .= "\t" . '<li>' . "\n";
            // TITRE
            $out .= "\t\t" . '<span><span class="' . ($article['bt_statut'] == '1' ? 'on' : 'off') . '"></span>' . '<a href="ecrire.php?post_id=' . $article['bt_id'] . '" title="' . trim($article['bt_abstract']) . '">' . $article['bt_title'] . '</a>' . '</span>' . "\n";
            // DATE
            $out .= "\t\t" . '<span><a href="' . $_SERVER['PHP_SELF'] . '?filtre=' . substr($article['bt_date'], 0, 8) . '">' . date_formate($article['bt_date']) . '</a> - ' . heure_formate($article['bt_date']) . '</span>' . "\n";
            // NOMBRE COMMENTS
            if ($article['bt_nb_comments'] == 1) {
                $texte = $article['bt_nb_comments'] . ' ' . $GLOBALS['lang']['label_commentaire'];
            } elseif ($article['bt_nb_comments'] > 1) {
                $texte = $article['bt_nb_comments'] . ' ' . $GLOBALS['lang']['label_commentaires'];
            } else {
                $texte = '&nbsp;';
            }
            $out .= "\t\t" . '<span><a href="commentaires.php?post_id=' . $article['bt_id'] . '">' . $texte . '</a></span>' . "\n";
            // STATUT
            if ($article['bt_statut'] == '1') {
                $out .= "\t\t" . '<span><a href="' . $article['bt_link'] . '">' . $GLOBALS['lang']['lien_article'] . '</a></span>' . "\n";
            } else {
                $out .= "\t\t" . '<span><a href="' . $article['bt_link'] . '">' . $GLOBALS['lang']['preview'] . '</a></span>' . "\n";
            }
            $out .= "\t" . '</li>' . "\n";
            $i++;
        }
        $out .= '</ul>' . "\n\n";
        echo $out;
    } else {
        echo info($GLOBALS['lang']['note_no_article']);
    }
}
Ejemplo n.º 10
0
function afficher_commentaire($comment, $with_link)
{
    afficher_form_commentaire($comment['bt_article_id'], 'admin', '', $comment);
    echo '<div class="commentbloc' . (!$comment['bt_statut'] ? ' privatebloc' : '') . '" id="' . article_anchor($comment['bt_id']) . '">' . "\n";
    echo '<div class="comm-header">' . "\n";
    echo "\t" . '<div class="comm-title">' . "\n";
    echo "\t\t" . '<span class="reply" onclick="reply(\'[b]@[' . str_replace('\'', '\\\'', $comment['bt_author']) . '|#' . article_anchor($comment['bt_id']) . '] :[/b] \'); ">@</span> ';
    echo "\t\t" . '<span class="author">' . $comment['auteur_lien'] . '</span>' . "\n";
    echo "\t\t" . '<span class="email"><a href="mailto:' . $comment['bt_email'] . '">' . $comment['bt_email'] . '</a></span>' . "\n";
    echo "\t" . '</div>' . "\n";
    echo "\t" . '<div class="comm-options">' . "\n";
    echo "\t\t" . '<ul>' . "\n";
    echo "\t\t\t" . '<li class="cl-edit" onclick="unfold(this);">' . $GLOBALS['lang']['editer'] . '</li>' . "\n";
    echo "\t\t\t" . '<li class="cl-activ" onclick="activate_comm(this);" data-comm-id="' . $comment['ID'] . '" data-comm-art-id="' . $comment['bt_article_id'] . '">' . $GLOBALS['lang'][(!$comment['bt_statut'] ? '' : 'des') . 'activer'] . '</li>' . "\n";
    echo "\t\t\t" . '<li class="cl-suppr" onclick="suppr_comm(this);" data-comm-id="' . $comment['ID'] . '" data-comm-art-id="' . $comment['bt_article_id'] . '">' . $GLOBALS['lang']['supprimer'] . '</li>' . "\n";
    echo "\t\t" . '</ul>' . "\n";
    echo "\t" . '</div>' . "\n";
    echo '</div>' . "\n";
    echo $comment['bt_content'];
    echo '<p class="p-date-title">' . "\n";
    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="' . basename($_SERVER['PHP_SELF']) . '?post_id=' . $comment['bt_article_id'] . '">' . $comment['bt_title'] . '</a>';
    }
    echo '</p>' . "\n";
    echo $GLOBALS['form_commentaire'];
    echo '</div>' . "\n\n";
}