Subversion Repositories Applications.papyrus

Rev

Rev 1372 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php

//vim: set expandtab tabstop=4 shiftwidth=4: 
// +-----------------------------------------------------------------------------------------------+
// | PHP version 4.0                                                                               |
// +-----------------------------------------------------------------------------------------------+
// | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group                                      |
// +-----------------------------------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the PHP license,                                | 
// | that is bundled with this package in the file LICENSE, and is                                 |
// | available at through the world-wide-web at                                                    |
// | http://www.php.net/license/2_02.txt.                                                          |
// | If you did not receive a copy of the PHP license and are unable to                            |
// | obtain it through the world-wide-web, please send a note to                                   |
// | license@php.net so we can mail you a copy immediately.                                        |
// +-----------------------------------------------------------------------------------------------+
/**
*
*Fichier des fonctions du bottin
*
*@package bottin
//Auteur original :
*@author                Alexandre GRANIER <alexandre@tela-botanica.org.org>
//Autres auteurs :
*@copyright         Outils-reseaux 2006-2040
*@version           05 avril 2006
// +-----------------------------------------------------------------------------------------------+
//
// $Id: bottin.class.php,v 1.1 2006-12-13 13:26:52 alexandre_tb Exp $
// FICHIER : $RCSfile: bottin.class.php,v $
// AUTEUR    : $Author: alexandre_tb $
// VERSION : $Revision: 1.1 $
// DATE        : $Date: 2006-12-13 13:26:52 $
*/


// +------------------------------------------------------------------------------------------------------+
// |                                            ENTETE du PROGRAMME                                       |
// +------------------------------------------------------------------------------------------------------+

require_once PAP_CHEMIN_API_PEAR.'PEAR.php';


class lettresAlphabet extends PEAR {
        
        var $url;
        
        var $variable_lettre ;
        
        /**
     * Constructeur
     *
     * @param Net_URL un objet Net_URL
     * @param string $variable_lettre le nom de la variable $_GET qui sera place dans l URL
     * @return void
     * @access public
     */
        function lettresAlphabet($url, $variable_lettre = 'lettre') {
                $this->url = $url ;
                $this->variable_lettre = $variable_lettre ;     
        }
        
        /**
         * Renvoie le code HTML d une liste avec les lettres
         * 
         * @return string HTML
         * @access public
         */
        function toHMTL() {
                
                $res = '<ul class="liste_lettre">'."\n" ;
                for ($i = 65 ; $i <91 ; $i++) {
                        $this->url->addQueryString($this->variable_lettre, chr($i)) ;
                        $res .= "\t".'<li class="liste_lettre"><a class="lien_alphabet" '.
                                        'href="'.
                                        $this->url->getURL().'">';
                        $res .= chr($i) ;
                        $res .= '</a></li>'."\n";
                }
                $res .= '</ul>';
                return $res ;
        }       
}

//-- Fin du code source    ------------------------------------------------------------
/*
* $Log: not supported by cvs2svn $
*/
?>