[ Index ]
 

Code source de SPIP Agora 1.4

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

title

Body

[fermer]

/Agora1-4/ecrire/ -> forum.php (source)

   1  <?php
   2  /*****************************************************
   3  * This file is part of Agora, web based content management system.
   4  *
   5  * Agora is free software; you can redistribute it and/or modify
   6  * it under the terms of the GNU General Public License as published by
   7  * the Free Software Foundation; version 2 of the License.
   8  *
   9  * Agora is distributed in the hope that it will be useful,
  10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12  * GNU General Public License for more details (file "COPYING").
  13  *
  14  * Copyright © Arnaud Martin, Antoine Pitrou et Philippe Rivière.
  15  * List of authors detailed in "copyright_fr.html" file.
  16  * E-mail : agora@sig.premier-ministre.gouv.fr
  17  * Web site : http://www.agora.gouv.fr
  18  *****************************************************/
  19  include  ("inc.php");
  20  require_once (dirname(__FILE__). "/include/bd/inc_forum_factory.php");
  21  require_once dirname(__FILE__). "/include/bd/inc_forum_list_factory.php";
  22  
  23  // cette page gere les deux types de forums ; forum_admin.php n'est qu'une coquille vide
  24  if ($admin == 'oui') {
  25      debut_page(_T('titre_page_forum'), "redacteurs", "forum-admin");
  26      $statutforum = 'privadm';
  27      $urlforum = 'forum_admin.php';
  28  }
  29  else {
  30      debut_page(_T('titre_forum'), "redacteurs", "forum-interne");
  31      $statutforum = 'privrac';
  32      $urlforum = 'forum.php';
  33  }
  34  
  35  debut_gauche();
  36  
  37  //
  38  // Raccourcis
  39  //
  40  
  41  debut_droite();
  42  
  43  if ($admin == 'oui')
  44      gros_titre (_T('titre_cadre_forum_administrateur'));
  45  else
  46      gros_titre (_T('titre_cadre_forum_interne'));
  47  
  48  $authorization = &recuperer_instance_authorization('afficherForumPriveAdmin', $GLOBALS['connect_id_auteur']);
  49  
  50  if ($admin == 'oui' AND !$authorization->isAuthorizedAction()) {
  51      echo _T('avis_non_acces_page');
  52      exit;
  53  }
  54  
  55  echo "<div class='serif2'>";
  56  
  57  if (!$debut)
  58      $debut = 0;
  59  
  60  $forumMetier = &recuperer_instance_forum();
  61  $total = $forumMetier->howManyPostByForumsIdAndStatut($statutforum);
  62  
  63  if (PEAR::isError($total)) {
  64      die ($total->getMessage());
  65  }
  66  
  67  if ($total > 10) {
  68      echo "<p>";
  69      for ($i = 0; $i < $total; $i = $i + 10){
  70          if ($i > 0) echo " | ";
  71          if ($i == $debut)
  72              echo "<FONT SIZE=3><B>$i</B></FONT>";
  73          else
  74              echo "<A HREF='$urlforum?debut=$i'>$i</A>";
  75      }
  76  }
  77  
  78  echo "<p><div align='center'>";
  79  icone (_T('icone_poster_message'), 
  80          "forum_envoi.php?statut=$statutforum&adresse_retour=$urlforum&titre_message=".urlencode(filtrer_entites(_T('texte_nouveau_message'))), 
  81          "forum-interne-24.gif", 
  82          "creer.gif");
  83  echo "</div>\n";
  84  echo "<p align='left'>";
  85  
  86  $forumList = &recuperer_instance_list_forum();
  87  $queryParams = array();
  88  $queryParams[] = $statutforum;
  89  $forumList->displayHTMLList(FORUM_BY_STATE, $queryParams, $urlforum, 'non', 'oui', $debut, 10);
  90  
  91  echo "</div>\n";
  92  
  93  fin_page();
  94  ?>


Généré le : Sat Feb 24 14:40:03 2007 par Balluche grâce à PHPXref 0.7