[ Index ]
 

Code source de Dotclear 1.2.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/ecrire/ -> redac_list.php (source)

   1  <?php
   2  # ***** BEGIN LICENSE BLOCK *****
   3  # This file is part of DotClear.
   4  # Copyright (c) 2004 Olivier Meunier and contributors. All rights
   5  # reserved.
   6  #
   7  # DotClear is free software; you can redistribute it and/or modify
   8  # it under the terms of the GNU General Public License as published by
   9  # the Free Software Foundation; either version 2 of the License, or
  10  # (at your option) any later version.
  11  # 
  12  # DotClear is distributed in the hope that it will be useful,
  13  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15  # GNU General Public License for more details.
  16  # 
  17  # You should have received a copy of the GNU General Public License
  18  # along with DotClear; if not, write to the Free Software
  19  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  20  #
  21  # ***** END LICENSE BLOCK *****
  22  
  23  require dirname(__FILE__).'/inc/prepend.php';
  24  
  25  $auth->check(9);
  26  
  27  include dirname(__FILE__).'/inc/connexion.php';
  28  
  29  $mySubMenu->addItem('<strong>'.__('New editor').'</strong>','redacteur.php','images/ico_new.png',false);
  30  
  31  openPage(__('List of editors'));
  32  
  33  echo '<h2>'.__('List of editors').'</h2>';
  34  
  35  $rsUser = $blog->getUser();
  36  
  37  while(!$rsUser->EOF())
  38  {
  39      $user_level = $rsUser->field('user_level');
  40      $user_nb_post = $rsUser->field('nb_post');
  41          
  42      if ($user_level == 9) {
  43          $user_level = __('administrator');
  44      } elseif ($user_level == 5) {
  45          $user_level = __('advanced editor');
  46      } elseif ($user_level == 1) {
  47          $user_level = __('editor');
  48      } elseif ($user_level == 0) {
  49          $user_level = __('inactive');
  50      }
  51      
  52      $style = ($rsUser->f('user_level') == 0) ? ' style="color:#999;"' : '';
  53      
  54      echo '<div class="ligne clear"'.$style.'>'.
  55          '<h3 class="ligneTitre">'.$rsUser->field('user_id').'</h3>'.
  56          '<p class="semi">'.
  57          $rsUser->field('user_prenom').' '.$rsUser->field('user_nom').
  58          ' ('.$user_level.')'.
  59          ' [ <strong><a href="redacteur.php?id='.rawurlencode($rsUser->field('user_id')).'">'.
  60          __('edit').'</a></strong> - ';
  61      
  62      if ($user_nb_post > 0) {
  63          echo $user_nb_post.' billet';
  64          echo ($user_nb_post > 1) ? 's' : '';
  65      } else {
  66          echo '<a href="redacteur.php?id='.rawurlencode($rsUser->field('user_id')).'&amp;del=1"'.
  67          'onclick="return window.confirm(\''.__('Are you sure you want to delete this editor?').'\')">'.
  68          __('delete').'</a>';
  69      }
  70      
  71      echo ' ]</p></div>';
  72      
  73      $rsUser->moveNext();
  74  }
  75  
  76  closePage();
  77  ?>


Généré le : Fri Feb 23 21:40:15 2007 par Balluche grâce à PHPXref 0.7