Location: PHPKode > scripts > HTML Classes > html-classes/htmlelements.php
<?
# -----------The PloucNet® Project - Copyright© LOGIQ Systèmes 2003-2007
#
# This file : class.htmlelements.php
# Contents  : HTML Description and Writing
#
# History :
# 23-09-2006 : PBR - creation
#

# HTML Description and Writing

   class clHtmlParameter {
      public $Type = "";                               # Parameter Name
      public $Value = "";                              # Parameter Value

      public function clHtmlParameter($lo_name, $lo_value){  # Constructor
        $this->Type = $lo_name;                     # Parameter Name
        $this->Value = $lo_value;                   # Parameter Value
      }

      public function GenerateHtml(){                      # Creates the Html Code
//        return " " . $this->Type . "=\"" . addslashes($this->Value). "\"";
        return " " . $this->Type . "=\"" . $this->Value . "\"";
      }
   }

   class clHtmlStylePar {
      public $Type = "";                               # Style Parameter Name
      public $Value = "";                              # Style Parameter Value

      public function clHtmlStylePar($lo_name, $lo_value){  # Constructor
        $this->Type = $lo_name;                     # Style Parameter Name
        $this->Value = $lo_value;                   # Style Parameter Value
      }

      public function GenerateHtml(){                      # Creates the Html Code
//        return " " . $this->Type . "=\"" . addslashes($this->Value). "\"";
        return " " . $this->Type . ":" . $this->Value . ";";
      }
   }

   class clHtmlValue {
      public $Value = "";                              # Parameter Value

      public function clHtmlValue($lo_value){  # Constructor
        $this->Value = $lo_value;                   # Parameter Value
      }

      public function GenerateHtml(){                      # Creates the Html Code
//        return " " . $this->Type . "=\"" . addslashes($this->Value). "\"";
        return " " . $this->Value;
      }
   }

   class clHtmlElements {
      public $Type = "";                               # Type of HtmlElements
      public $Parameters =  array();                   # Parameters List
      public $Styles =  array();                       # Style Parameters List
      public $Values =  array();                       # Values List
      public $Tag  = "";                               # HTML Tag of the Element
      public $Content  = "";                           # Data within Tags
      public $Indent  = 0;                             # Output Indent
      public $Close = true;                            # Tag Must be Closed
      public $Id = "";                                 # The Id of the element
      public $Name = "";                               # The Name of the element

      public function __construct($lo_id="",$lo_name="",$lo_class=""){  # Constructor
        if ($lo_id <> "") {$this->AddId($lo_id);}
        if ($lo_name <> "") {$this->AddName($lo_name);}
        if ($lo_class <> "") {$this->AddClass($lo_class);}
      }

      public function AddParameter($lo_name, $lo_value = ""){ # Add a new Parameter
        $lo_existing = $this->ParameterExists($lo_name);   # Test if Parameter already exists
        if ($lo_existing)
          # Change Value
          $lo_existing->Value = $lo_value;
        else
          # Add New Value
          $this->Parameters[count($this->Parameters) + 1] = new clHtmlParameter($lo_name, $lo_value);
      }

      public function ParameterExists($lo_name){  # Test if a Parameter already exists
        for ($lo_count=1;$lo_count <= count($this->Parameters);$lo_count++){
          if ($this->Parameters[$lo_count]->Type == $lo_name) {
             return $this->Parameters[$lo_count];
          }
        }
        return false;
      }

      public function AddStyle($lo_name, $lo_value = ""){ # Add a new Style Parameter
        $lo_existing = $this->StyleExists($lo_name);   # Test if Style Parameter already exists
        if ($lo_existing)
          # Change Value
          $lo_existing->Value = $lo_value;
        else
          # Add New Value
          $this->Styles[count($this->Styles) + 1] = new clHtmlStylePar($lo_name, $lo_value);
      }

      public function StyleExists($lo_name){  # Test if a style parameter laready exists
        for ($lo_count=1;$lo_count <= count($this->Styles);$lo_count++){
          if ($this->Styles[$lo_count]->Type == $lo_name) {
             return $this->Styles[$lo_count];
          }
        }
        return false;
      }

      public function AddValue($lo_value = ""){ # Add a new value, typically "checked" for input/checkbox
        $this->Values[count($this->Values) + 1] = new clHtmlValue($lo_value);
      }

      public function AddId($lo_value){                # Add Id to the Tag
        $this->Parameters[count($this->Parameters) + 1] = new clHtmlParameter("id", $lo_value);
        $this->Id = $lo_value;                         # Memorize Id,(used for unique check)
      }

      public function AddName($lo_value){                # Add Name to the Tag
        $this->Parameters[count($this->Parameters) + 1] = new clHtmlParameter("name", $lo_value);
        $this->Name = $lo_value;                         # Memorize Name,(used for unique check)
      }

      public function AddClass($lo_value){                # Add Name to the Tag
        $this->Parameters[count($this->Parameters) + 1] = new clHtmlParameter("class", $lo_value);
      }

      public function GenerateHtml($lo_nonewline = false){       # Creates the Html Code
        # $lo_nonewline indicates we want begintag-content-endtag on the same output line (needed for href tag)
        # Begin Tag
        $lo_str = str_repeat(" ",$this->Indent) . "<" . $this->Tag;

        # Parameters
        $i = 0;
        for ($i=1;$i <= count($this->Parameters);$i++){
          $lo_str .= $this->Parameters[$i]->GenerateHtml();
          }
        # Styles
        if (count($this->Styles) > 0){
          $i = 0;
          $lo_str .= " Style=\"";
          for ($i=1;$i <= count($this->Styles);$i++){
            $lo_str .= $this->Styles[$i]->GenerateHtml();
          }
          $lo_str .= "\"";
        }
        # values
        $i = 0;
        for ($i=1;$i <= count($this->Values);$i++){
          $lo_str .= $this->Values[$i]->GenerateHtml();
          }

        # End Tag
        $lo_str .= ">".($lo_nonewline?"":"\n");

        # Content
        $lo_str .= $this->Content;

        # End Tag
        if ($this->Close){ # Must the Tag be Closed ?
           $lo_str .=  ($lo_nonewline?"":"\n") . str_repeat(" ",$this->Indent) ."</" . $this->Tag .">" . ($lo_nonewline?"":"\n");
           }
        return $lo_str;
      }

   }

   class clHtmlA extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "ancre";
        $this->Tag = "a";
      }
      public function GenerateHtml(){                         # Suppress \n on Hrefs
          $this->Content = str_replace("\n", "", $this->Content);
        return parent::GenerateHtml(true);
      }
   }

   class clHtmlAbbr extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "abbréviation";
        $this->Tag = "abbr";
      }
   }

   class clHtmlAcronym extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "acronyme";
        $this->Tag = "acronym";
      }
   }

   class clHtmlAddress extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "addresse";
        $this->Tag = "address";
      }
   }

   class clHtmlApplet extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "applette";
        $this->Tag = "applet";
        $this->Close = false;
      }
   }

   class clHtmlArea extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "zone";
        $this->Tag = "area";
        $this->Close = false;
      }
   }

   class clHtmlB extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "gras";
        $this->Tag = "b";
      }
   }

   class clHtmlBase extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "URI de base du document";
        $this->Tag = "base";
        $this->Close = false;
      }
   }

   class clHtmlBasefont extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "changement de fonte de base";
        $this->Tag = "basefont";
        $this->Close = false;
      }
   }

   class clHtmlBdo extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "pas d'écriture bidirectionnelle";
        $this->Tag = "bdo";
      }
   }

   class clHtmlBig extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "grand";
        $this->Tag = "big";
      }
   }

   class clHtmlBlockquote extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "bloc de citation";
        $this->Tag = "blockquote";
      }
   }

   class clHtmlBody extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "corps";
        $this->Tag = "body";
      }
   }

   class clHtmlBr extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "saut de ligne forcé";
        $this->Tag = "br";
        $this->Close = false;
      }
   }

   class clHtmlButton extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "bouton";
        $this->Tag = "button";
      }
   }

   class clHtmlCaption extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "légende de table";
        $this->Tag = "caption";
      }
   }

   class clHtmlCenter extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "centrer";
        $this->Tag = "center";
      }
   }

   class clHtmlCite extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "source de citation";
        $this->Tag = "cite";
      }
   }

   class clHtmlCode extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "code informatique";
        $this->Tag = "code";
      }
   }

   class clHtmlCol extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "colonne";
        $this->Tag = "col";
        $this->Close = false;
      }
   }

   class clHtmlColgroup extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "groupe de colonnes";
        $this->Tag = "colgroup";
        $this->Close = false;
      }
   }

   class clHtmlDd extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "description d'une définition";
        $this->Tag = "dd";
        $this->Close = false;
      }
   }

   class clHtmlDel extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "texte effacé";
        $this->Tag = "del";
      }
   }

   class clHtmlDfn extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "définition";
        $this->Tag = "dfn";
      }
   }

   class clHtmlDir extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "contenu de répertoire";
        $this->Tag = "dir";
      }
   }

   class clHtmlDiv extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "élément de type bloc";
        $this->Tag = "div";
      }
   }

   class clHtmlDl extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "liste de définition";
        $this->Tag = "dl";
      }
   }

   class clHtmlDt extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        $this->Type = "définition d'un terme";
        $this->Tag = "dt";
        $this->Close = false;
      }
   }

   class clHtmlEm extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "emphase";
        $this->Tag = "em";
      }
   }

   class clHtmlFieldset extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "Groupe de champs";
        $this->Tag = "fieldset";
      }
   }

   class clHtmlFont extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "changement local de police";
        $this->Tag = "font";
      }
   }

   class clHtmlForm extends clHtmlElements{
      public function __construct($lo_name,$lo_action){        # Constructor
        $this->Type = "formulaire";
        $this->Tag = "form";
        $this->AddParameter("name",$lo_name); # We need  a from name in all cases
        $this->AddParameter("method","post"); # We use Post method
        $this->AddParameter("action",$lo_action); # We use Post method
      }
   }

   class clHtmlFrame extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "sous-fenêtre (cadre)";
        $this->Tag = "frame";
        $this->Close = false;
      }
   }

   class clHtmlFrameset extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "ensemble de sous-fenêtres";
        $this->Tag = "frameset";
      }
   }

   class clHtmlH1 extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "titre 1";
        $this->Tag = "h1";
      }
   }

   class clHtmlH2 extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "titre 2";
        $this->Tag = "h2";
      }
   }

   class clHtmlH3 extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "titre 3";
        $this->Tag = "h3";
      }
   }

   class clHtmlH4 extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "titre 4";
        $this->Tag = "h4";
      }
   }

   class clHtmlH5 extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "titre 5";
        $this->Tag = "h5";
      }
   }

   class clHtmlH6 extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "titre 6";
        $this->Tag = "h6";
      }
   }

   class clHtmlHead extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "tête";
        $this->Tag = "head";
      }
   }

  // @@@ Add JBe 15/03/2007
   class clHtmlHidden extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "contrôle de formulaire (caché))";
        $this->Tag = "input";
        $this->AddParameter ("type","hidden");
//        $this->Close = false;
      }
   }

  // @@@ Add JBe 15/03/2007
   class clHtmlRadio extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "contrôle de formulaire (radio))";
        $this->Tag = "input";
        $this->AddParameter ("type","radio");
        $this->Close = false;
      }
   }

   class clHtmlHr extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "règle horizontale";
        $this->Tag = "hr";
        $this->Close = false;
      }
   }

   class clHtmlHtml extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "html";
        $this->Tag = "html";
      }
   }

   class clHtmlI extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "italiques";
        $this->Tag = "i";
      }
   }

   class clHtmlIframe extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "sous-fenêtre inline";
        $this->Tag = "iframe";
      }
   }

   class clHtmlImg extends clHtmlElements{
      public $Hint = "";                                       # Hint Of Image

      public function __construct($lo_image="",$lo_Hint=""){               # Constructor
        $this->Close = false;
        $this->Type = "image";
        $this->Tag = "img";
        $this->Hint = $lo_Hint;
        $this->AddParameter("src",$lo_image);
      }
      public function GenerateHtml($lo_nonewline = false){                             # Creates the Html Code
        $this->AddParameter("alt",$this->Hint);
        return parent::GenerateHtml($lo_nonewline);
      }
   }

   class clHtmlInput extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "contrôle de formulaire";
        $this->Tag = "input";
        $this->Close = false;
      }
   }

   class clHtmlIns extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "texte inséré";
        $this->Tag = "ins";
      }
   }

   class clHtmlIsindex extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "champ de saisie";
        $this->Tag = "isindex";
        $this->Close = false;
      }
   }

   class clHtmlKbd extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "clavier";
        $this->Tag = "kbd";
      }
   }

   class clHtmlLabel extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "text d'étiquette de champ";
        $this->Tag = "label";
      }
   }

   class clHtmlLegend extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "légende de groupe de champs";
        $this->Tag = "legend";
      }
   }

   class clHtmlLi extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "élément de liste";
        $this->Tag = "li";
      }
   }

   class clHtmlLink extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "lien";
        $this->Tag = "link";
        $this->Close = false;
      }
      public function AddStyleFile($lo_file){                  # Add an external style File
        $this->AddParameter("rel", "stylesheet");
        $this->AddParameter("type", "text/css");
        $this->AddParameter("href", CSS_PATH . $lo_file);
      }
   }

   class clHtmlListing extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "listing d'ordinateur";
        $this->Tag = "listing";
      }
   }

   class clHtmlMap extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "carte";
        $this->Tag = "map";
      }
   }

   class clHtmlMenu extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "menu";
        $this->Tag = "menu";
      }
   }

   class clHtmlMeta extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "meta";
        $this->Tag = "meta";
        $this->Close = false;
      }
      public function AddEquiv($lo_equiv, $lo_content){        # Add "http-equiv Meta"
        $this->AddParameter("http-equiv", $lo_equiv);
        $this->AddParameter("content", $lo_content);
      }
      public function AddStandard($lo_name, $lo_content){      # Add "name Meta"
        $this->AddParameter("name", $lo_name);
        $this->AddParameter("content", $lo_content);
      }
   }

   class clHtmlNoframes extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "pas de frames";
        $this->Tag = "noframes";
      }
   }

   class clHtmlNoscript extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "pas de script";
        $this->Tag = "noscript";
      }
   }

   class clHtmlObject extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "objet";
        $this->Tag = "object";
      }
   }

   class clHtmlOl extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "liste ordonnée";
        $this->Tag = "ol";
      }
   }

   class clHtmlOptgroup extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "groupe d'options";
        $this->Tag = "optgroup";
      }
   }

   class clHtmlOption extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "option";
        $this->Tag = "option";
      }
   }

   class clHtmlP extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "paragraphe";
        $this->Tag = "p";
      }
   }

   class clHtmlParam extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "paramètre";
        $this->Tag = "param";
        $this->Close = false;
      }
   }

  // @@@ Add JBe 15/03/2007
   class clHtmlPassword extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "contrôle de formulaire (mot de passe))";
        $this->Tag = "input";
        $this->AddParameter ("type","password");
//        $this->Close = false;
      }
   }

   class clHtmlPlaintext extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "texte seul";
        $this->Tag = "plaintext";
      }
   }

   class clHtmlPre extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "texte préformaté";
        $this->Tag = "pre";
      }
   }

   class clHtmlQ extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "citation";
        $this->Tag = "q";
      }
   }

   class clHtmlS extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "barré";
        $this->Tag = "s";
      }
   }

   class clHtmlSamp extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "échantillon";
        $this->Tag = "samp";
      }
   }

   class clHtmlScript extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "script";
        $this->Tag = "script";
      }

      public function AddScriptFile($lo_type,$lo_file){        # Add an external script File
        $this->AddParameter("language", $lo_type);
        $this->AddParameter("src", $lo_file);
        $this->AddParameter("type", "text/javascript");
        $this->AddParameter("charset", "ISO-8859-1");
      }
   }

   class clHtmlSelect extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "liste déroulante";
        $this->Tag = "select";
      }
   }

   class clHtmlSmall extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "petit";
        $this->Tag = "small";
      }
   }

   class clHtmlSpan extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "span";
        $this->Tag = "span";
      }
   }

   class clHtmlStrike extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "barré";
        $this->Tag = "strike";
      }
   }

   class clHtmlStrong extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "fort";
        $this->Tag = "strong";
      }
   }

   class clHtmlStyle extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                           # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "style";
        $this->Tag = "style";
      }

      public function AddStyleFile($lo_file){                  # Add an external style File
        $this->AddParameter("type", "text/css");
        $this->Content = "@import url(\"" . CSS_PATH . $lo_file . "\");";
      }
   }

   class clHtmlSub extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "indices";
        $this->Tag = "sub";
      }
   }

   class clHtmlSup extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "exposant";
        $this->Tag = "sup";
      }
   }

   class clHtmlTable extends clHtmlElements{
      var $Rows = array();                                        # Table Rows List

      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "table";
        $this->Tag = "table";
      }

      public function AddRow($lo_id="",$lo_name="",$lo_class=""){ # Add a new Parameter
        $this->Rows[count($this->Rows) + 1] = new clHtmlTr($lo_id,$lo_name,$lo_class);
        # Set indentation
        $this->Rows[count($this->Rows)]->Indent = $this->Indent + 2;
        # Return Created Row
        return $this->Rows[count($this->Rows)];
      }

      public function GenerateHtml($lo_nonewline=false){                             # Creates the Html Code
        $this->Content = "";
        # Rows
        $i = 0;
        for ($i=1;$i <= count($this->Rows);$i++){
          $this->Content .= $this->Rows[$i]->GenerateHtml($lo_nonewline);
          }
        return parent::GenerateHtml($lo_nonewline);
      }
   }

   class clHtmlTbody extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "corps de table";
        $this->Tag = "tbody";
      }
   }

   class clHtmlTd extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "cellule de données de table";
        $this->Tag = "td";
      }
   }

   class clHtmlTextarea extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "Champ de saisie multiligne";
        $this->Tag = "textarea";
      }
   }

   class clHtmlTfoot extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "pied de page de table";
        $this->Tag = "tfoot";
      }
   }

   class clHtmlTh extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "cellule d'en-tête de table";
        $this->Tag = "th";
      }
   }

   class clHtmlThead extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "en-tête de table";
        $this->Tag = "thead";
      }
   }

   class clHtmlTitle extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "titre";
        $this->Tag = "title";
      }
   }

   class clHtmlTr extends clHtmlElements{
      var $Cells = array();                                       # Row Cells List

      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "row";
        $this->Tag = "tr";
      }

      public function AddCell($lo_id="",$lo_name="",$lo_class=""){                                  # Add a new Cell in Row
        $this->Cells[count($this->Cells) + 1] = new clHtmlTd($lo_id,$lo_name,$lo_class);
        # Set indentation
        $this->Cells[count($this->Cells)]->Indent = $this->Indent + 2;
        # Return Created Cell
        return $this->Cells[count($this->Cells)];
      }

      public function GenerateHtml($lo_nonewline=false){                             # Creates the Html Code
        $this->Content = "";
        # Cells
        $i = 0;
        for ($i=1;$i <= count($this->Cells);$i++){
          $this->Content .= $this->Cells[$i]->GenerateHtml($lo_nonewline);
          }
        return parent::GenerateHtml($lo_nonewline);
      }
   }

   class clHtmlTt extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "teletype";
        $this->Tag = "tt";
      }
   }

   class clHtmlU extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "souligné";
        $this->Tag = "u";
      }
   }

   class clHtmlUl extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "liste non ordonnée";
        $this->Tag = "ul";
      }
   }

   class clHtmlVar extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "variable";
        $this->Tag = "var";
      }
   }

   class clHtmlXmp extends clHtmlElements{
      public function __construct($lo_id="",$lo_name="",$lo_class=""){                              # Constructor
        parent::__construct($lo_id,$lo_name,$lo_class);
        $this->Type = "exemple";
        $this->Tag = "xmp";
      }
   }
?>
Return current item: HTML Classes