1163 |
alexandre_ |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
//vim: set expandtab tabstop=4 shiftwidth=4:
|
|
|
4 |
// +-----------------------------------------------------------------------------------------------+
|
|
|
5 |
// | PHP version 4.0 |
|
|
|
6 |
// +-----------------------------------------------------------------------------------------------+
|
|
|
7 |
// | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group |
|
|
|
8 |
// +-----------------------------------------------------------------------------------------------+
|
|
|
9 |
// | This source file is subject to version 2.0 of the PHP license, |
|
|
|
10 |
// | that is bundled with this package in the file LICENSE, and is |
|
|
|
11 |
// | available at through the world-wide-web at |
|
|
|
12 |
// | http://www.php.net/license/2_02.txt. |
|
|
|
13 |
// | If you did not receive a copy of the PHP license and are unable to |
|
|
|
14 |
// | obtain it through the world-wide-web, please send a note to |
|
|
|
15 |
// | license@php.net so we can mail you a copy immediately. |
|
|
|
16 |
// +-----------------------------------------------------------------------------------------------+
|
|
|
17 |
/**
|
|
|
18 |
*
|
|
|
19 |
*Fichier des fonctions du bottin
|
|
|
20 |
*
|
|
|
21 |
*@package bottin
|
|
|
22 |
//Auteur original :
|
|
|
23 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org.org>
|
|
|
24 |
//Autres auteurs :
|
|
|
25 |
*@copyright Outils-reseaux 2006-2040
|
|
|
26 |
*@version 05 avril 2006
|
|
|
27 |
// +-----------------------------------------------------------------------------------------------+
|
|
|
28 |
//
|
|
|
29 |
// $Id: bottin.class.php,v 1.1 2006-12-13 13:26:52 alexandre_tb Exp $
|
|
|
30 |
// FICHIER : $RCSfile: bottin.class.php,v $
|
|
|
31 |
// AUTEUR : $Author: alexandre_tb $
|
|
|
32 |
// VERSION : $Revision: 1.1 $
|
|
|
33 |
// DATE : $Date: 2006-12-13 13:26:52 $
|
|
|
34 |
*/
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
38 |
// | ENTETE du PROGRAMME |
|
|
|
39 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
40 |
|
|
|
41 |
require_once PAP_CHEMIN_API_PEAR.'PEAR.php';
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
class lettresAlphabet extends PEAR {
|
|
|
45 |
|
|
|
46 |
var $url;
|
|
|
47 |
|
|
|
48 |
var $variable_lettre ;
|
|
|
49 |
|
|
|
50 |
/**
|
|
|
51 |
* Constructeur
|
|
|
52 |
*
|
|
|
53 |
* @param Net_URL un objet Net_URL
|
|
|
54 |
* @param string $variable_lettre le nom de la variable $_GET qui sera place dans l URL
|
|
|
55 |
* @return void
|
|
|
56 |
* @access public
|
|
|
57 |
*/
|
|
|
58 |
function lettresAlphabet($url, $variable_lettre = 'lettre') {
|
|
|
59 |
$this->url = $url ;
|
|
|
60 |
$this->variable_lettre = $variable_lettre ;
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
/**
|
|
|
64 |
* Renvoie le code HTML d une liste avec les lettres
|
|
|
65 |
*
|
|
|
66 |
* @return string HTML
|
|
|
67 |
* @access public
|
|
|
68 |
*/
|
|
|
69 |
function toHMTL() {
|
|
|
70 |
|
|
|
71 |
$res = '<ul class="liste_lettre">'."\n" ;
|
|
|
72 |
for ($i = 65 ; $i <91 ; $i++) {
|
|
|
73 |
$this->url->addQueryString($this->variable_lettre, chr($i)) ;
|
|
|
74 |
$res .= "\t".'<li class="liste_lettre"><a class="lien_alphabet" '.
|
|
|
75 |
'href="'.
|
|
|
76 |
$this->url->getURL().'">';
|
|
|
77 |
$res .= chr($i) ;
|
|
|
78 |
$res .= '</a></li>'."\n";
|
|
|
79 |
}
|
|
|
80 |
$res .= '</ul>';
|
|
|
81 |
return $res ;
|
|
|
82 |
}
|
|
|
83 |
}
|
|
|
84 |
|
|
|
85 |
//-- Fin du code source ------------------------------------------------------------
|
|
|
86 |
/*
|
|
|
87 |
* $Log: not supported by cvs2svn $
|
|
|
88 |
*/
|
|
|
89 |
?>
|