[ Index ]
 

Code source de Plume CMS 1.2.2

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/manager/mtemplates/ -> comments-list.php (source)

   1  <?php
   2  /* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
   3  /*
   4  # ***** BEGIN LICENSE BLOCK *****
   5  # This file is part of Plume CMS, a website management application.
   6  # Copyright (C) 2001-2005 Loic d'Anterroches and contributors.
   7  #
   8  # Plume CMS is free software; you can redistribute it and/or modify
   9  # it under the terms of the GNU General Public License as published by
  10  # the Free Software Foundation; either version 2 of the License, or
  11  # (at your option) any later version.
  12  #
  13  # Plume CMS is distributed in the hope that it will be useful,
  14  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16  # GNU General Public License for more details.
  17  #
  18  # You should have received a copy of the GNU General Public License
  19  # along with this program; if not, write to the Free Software
  20  # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  21  #
  22  # ***** END LICENSE BLOCK ***** */
  23  
  24  if (basename($_SERVER['SCRIPT_NAME']) == 'comments-list.php') exit;
  25  
  26  
  27  if ($ct->isEmpty()) {
  28      echo '<p>'.__('No comments.').'</p>'."\n\n";
  29  } else {
  30      while (!$ct->EOF()) {
  31          switch ((int) $ct->f('comment_status')) {
  32          case PX_RESOURCE_STATUS_OFFLINE:
  33              $ct_class = 'cancel';
  34              $ct_img = '<img src="themes/'.$_px_theme
  35                  .'/images/check_off.png" alt="'.__('Comment off-line')
  36                  .'" class="status" />';
  37              break;
  38          case PX_RESOURCE_STATUS_VALIDE:
  39              $ct_class = 'published';
  40              $ct_img = '<img src="themes/'.$_px_theme
  41                  .'/images/check_on.png" alt="'.__('Comment on-line')
  42                  .'" class="status" />';
  43              break;
  44          case PX_RESOURCE_STATUS_JUNK:
  45              $ct_class = 'cancel';
  46              $ct_img = '<img src="themes/'.$_px_theme
  47                  .'/images/ico_bin.png" alt="'.__('Comment is junk')
  48                  .'" class="status" />';
  49              break;
  50          case PX_RESOURCE_STATUS_TOBEVALIDATED:
  51          default:
  52              $ct_class = 'published';
  53              $ct_img = '<img src="themes/'.$_px_theme
  54                  .'/images/check_wait.png" alt="'
  55                  .__('Comment waiting for validation').'" class="status" />';
  56              break;
  57          }
  58          echo '<div class="line '.$ct_class.'" id="c'.$ct->f('comment_id').'">'
  59              .'<p>'.__('To').' <cite><a href="'.$ct->f('type_id')
  60              .'.php?resource_id='.$ct->f('resource_id').'">'.$ct->f('title')
  61              .'</a></cite> - '.__('by')
  62              .' <strong>'.$ct->f('comment_author').'</strong><br />'."\n";
  63          echo $ct_img.'<strong>'
  64              .date(__('Y/m/d \a\t H:i:s'), date::unix($ct->f('comment_update')))
  65              .'</strong></p>'."\n";
  66          echo $ct->getContent();
  67  
  68          echo "</div>\n\n";    
  69          $ct->moveNext();
  70      }
  71  }
  72      
  73      
  74  ?>


Généré le : Mon Nov 26 11:57:01 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics