/** * M�thode qui affiche la date de la derni�re modification de la page statique selon le format choisi * * @param format format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_month, #num_year(4), #num_year(2)) * @return stdout * @scope static * @author Anthony T. **/ public function staticDate($format = '#day #num_day #month #num_year(4)') { # On genere le nom du fichier dont on veux r�cup�rer la date $file = PLX_ROOT . $this->plxMotor->aConf['racine_statiques'] . $this->plxMotor->cible; $file .= '.' . $this->plxMotor->aStats[$this->plxMotor->cible]['url'] . '.php'; # Test de l'existence du fichier if (!file_exists($file)) { return; } # On r�cup�re la date de la derni�re modification du fichier qu'on formate $date = date('Y-m-d\\TH:i:s', filemtime($file)) . $this->plxMotor->aConf['delta']; echo plxDate::dateIsoToHum($date, $format); }
?> <div class="comment type-<?php echo $plxAdmin->plxRecord_coms->f('type'); echo $_GET['c'] == $comId ? ' current' : ''; ?> " id="c<?php echo $plxAdmin->plxRecord_coms->f('numero'); ?> "> <div class="info_comment"> <p>Par <strong><?php echo $plxAdmin->plxRecord_coms->f('author'); ?> </strong> le <?php echo plxDate::dateIsoToHum($plxAdmin->plxRecord_coms->f('date'), '#day #num_day #month #num_year(4) à #hour:#minute'); ?> - <a href="commentaire.php<?php echo !empty($_GET['a']) ? '?c=' . $comId . '&a=' . $_GET['a'] : '?c=' . $comId; ?> " title="Éditer ce commentaire">éditer</a> - <a href="javascript:answerCom('content','<?php echo $plxAdmin->plxRecord_coms->f('numero'); ?> ','<?php echo plxUtils::strCheck($plxAdmin->plxRecord_coms->f('author')); ?> ');" title="RÉpondre à ce commentaire">répondre</a> </p> </div> <blockquote><p><?php
/** * Méthode qui affiche le flux atom des commentaires du site pour l'administration * * @return flux sur stdout * @author Florent MONTHEL **/ public function getAdminCommentaires() { # Traitement initial $last_updated = ''; $entry = ''; if ($this->cible == '_') { # Commentaires hors ligne $link = $this->racine . 'core/admin/commentaires_offline.php?page=1'; $title = $this->aConf['title'] . ' - Commentaires hors ligne'; $link_feed = $this->racine . 'feed.php?admin' . $this->clef . '/commentaires/hors-ligne'; } else { # Commentaires en ligne $link = $this->racine . 'core/admin/commentaires_online.php?page=1'; $title = $this->aConf['title'] . ' - Commentaires en ligne'; $link_feed = $this->racine . 'feed.php?admin' . $this->clef . '/commentaires/en-ligne'; } # On va boucler sur les commentaires (si il y'en a) if ($this->plxRecord_coms) { while ($this->plxRecord_coms->loop()) { $artId = $this->plxRecord_coms->f('article') + 0; $comId = $this->cible . $this->plxRecord_coms->f('article') . '.' . $this->plxRecord_coms->f('numero'); $title_com = $this->plxRecord_coms->f('author') . ' le '; $title_com .= plxDate::dateIsoToHum($this->plxRecord_coms->f('date'), '#day #num_day #month #num_year(4), #hour:#minute'); $link_com = $this->racine . 'core/admin/commentaire.php?c=' . $comId; # On check la date de publication if ($this->plxRecord_coms->f('date') > $last_updated) { $last_updated = $this->plxRecord_coms->f('date'); } # On affiche le flux dans un buffer $entry .= '<entry>' . "\n"; $entry .= "\t" . '<title type="html">' . plxUtils::strCheck($title_com) . '</title> ' . "\n"; $entry .= "\t" . '<link href="' . $link_com . '"/>' . "\n"; $entry .= "\t" . '<id>urn:md5:' . md5($link_com) . '</id>' . "\n"; $entry .= "\t" . '<updated>' . $this->plxRecord_coms->f('date') . '</updated>' . "\n"; $entry .= "\t" . '<author><name>' . plxUtils::strCheck($this->plxRecord_coms->f('author')) . '</name></author>' . "\n"; $entry .= "\t" . '<content type="html">' . plxUtils::strCheck($this->plxRecord_coms->f('content')) . '</content>' . "\n"; $entry .= '</entry>' . "\n"; } } # On affiche le flux header('Content-Type: text/xml; charset=' . PLX_CHARSET); echo '<?xml version="1.0" encoding="' . PLX_CHARSET . '" ?>' . "\n"; echo '<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">' . "\n"; echo '<title type="html">' . plxUtils::strCheck($title) . '</title>' . "\n"; echo '<subtitle type="html">' . plxUtils::strCheck($this->aConf['description']) . '</subtitle>' . "\n"; echo '<link href="' . $link_feed . '" rel="self" type="application/atom+xml"/>' . "\n"; echo '<link href="' . $link . '" rel="alternate" type="text/html"/>' . "\n"; echo '<updated>' . $last_updated . '</updated>' . "\n"; echo '<id>urn:md5:' . md5($link) . '</id>' . "\n"; echo '<generator uri="http://pluxml.org/">PluXml ' . $this->version . '</generator>' . "\n"; echo $entry; echo '</feed>'; }