[ Index ]
 

Code source de SPIP Agora 1.4

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

title

Body

[fermer]

/Agora1-4/ecrire/include/typologie/ -> groupemotcle.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  require_once dirname(__FILE__). "/filter.php";
  20  
  21  require_once dirname(__FILE__). "/../bd/inc_mot_factory.php";
  22  require_once dirname(__FILE__). "/../bd/inc_groupe_mot_factory.php";
  23  
  24  class Groupemotcle extends Filter {
  25      var $_groupeName;
  26  
  27      // {{{ Constructor
  28  
  29  	function Groupemotcle () { }
  30  
  31      // }}}
  32  
  33      // {{{ applyRule
  34  	function _applyRule () {
  35          $mot_cle = &recuperer_instance_mot();
  36          $mot_cle->load($this->_ruleValue);
  37          $aMots = &$mot_cle->getAllFromMotsAndAnotherTable('articles', 'id_article', 1);
  38  
  39          while (list(, $obj) = each($aMots)) {
  40              if ($this->_ruleValue == $obj->_groupeId) {
  41                  return true;
  42              }
  43          }
  44  
  45          $groupe_mot = &recuperer_instance_groupe_mot();
  46          $groupe_mot->load($this->_ruleValue);
  47          $this->_groupeName = $groupe_mot->getTitre();
  48          return false;
  49      }
  50  
  51      // }}}
  52  
  53      // {{{ _getErrMsg
  54  	function _getErrMsg () {
  55          return _T("err_groupemot", array("groupemot" => $this->_groupeName));
  56      }
  57  // }}}
  58  }
  59  ?>


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