Subversion Repositories Applications.papyrus

Rev

Rev 1061 | Rev 1498 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1061 Rev 1062
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
19
// | License along with this library; if not, write to the Free Software                                  |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: afficheur.php,v 1.12 2006-11-21 15:50:05 jp_milcent Exp $
22
// CVS : $Id: afficheur.php,v 1.13 2006-11-21 18:52:20 jp_milcent Exp $
23
/**
23
/**
24
* Application réalisant l'affichage du contenu stocké dans Papyrus.
24
* Application réalisant l'affichage du contenu stocké dans Papyrus.
25
*
25
*
26
* Récupère le dernier contenu lié à un menu et le retourne.
26
* Récupère le dernier contenu lié à un menu et le retourne.
27
*
27
*
Line 29... Line 29...
29
//Auteur original :
29
//Auteur original :
30
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
30
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
31
//Autres auteurs :
31
//Autres auteurs :
32
*@author        Alexandre GRANIER <alexandrel@tela-botanica.org>
32
*@author        Alexandre GRANIER <alexandrel@tela-botanica.org>
33
*@copyright     Tela-Botanica 2000-2004
33
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.12 $ $Date: 2006-11-21 15:50:05 $
34
*@version       $Revision: 1.13 $ $Date: 2006-11-21 18:52:20 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
Line 300... Line 300...
300
	// +---------------------------------------------------------------------------------------------------------------+
300
	// +---------------------------------------------------------------------------------------------------------------+
301
	// Nous regardons si nous voulons surligner ou pas des mots
301
	// Nous regardons si nous voulons surligner ou pas des mots
302
	if (isset($_GET['var_recherche'])) {
302
	if (isset($_GET['var_recherche'])) {
303
		$tab_mots = explode(' ', rawurldecode($_GET['var_recherche']));
303
		$tab_mots = explode(' ', rawurldecode($_GET['var_recherche']));
304
		foreach ($tab_mots as $mot) {
304
		foreach ($tab_mots as $mot) {
-
 
305
			if (strlen($mot) >= 2) {
-
 
306
				$regexp = '/(>[^<]*)('.$mot.'\b)/Uis';
305
			$retour = str_replace($mot, '<span class="surlignage">'.$mot.'</span>', $retour);
307
				$retour = preg_replace($regexp, '$1<span class="surlignage">$2</span>', $retour);
-
 
308
			}
306
		}
309
		}
307
	}
310
	}
Line 308... Line 311...
308
 
311
 
309
    //----------------------------------------------------------------------------
312
    //----------------------------------------------------------------------------
Line 323... Line 326...
323
 
326
 
324
 
327
 
325
/* +--Fin du code ----------------------------------------------------------------------------------------+
328
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
329
*
-
 
330
* $Log: not supported by cvs2svn $
-
 
331
* Revision 1.12  2006/11/21 15:50:05  jp_milcent
326
*
332
* Ajout du surlignage des mots passé dans la query string via la variable var_recherche.
327
* $Log: not supported by cvs2svn $
333
*
328
* Revision 1.11  2006/10/16 15:49:07  ddelon
334
* Revision 1.11  2006/10/16 15:49:07  ddelon
329
* Refactorisation code mulitlinguisme et gestion menu invisibles
335
* Refactorisation code mulitlinguisme et gestion menu invisibles
330
*
336
*