p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: I am a php code MONSTER


Message #1 by "Jamal" <new_mojam@y...> on Fri, 25 Oct 2002 09:31:49
Hi guys,
is there any portugese origin to translate the comments in this class code 
to english for me?? I cannot leave the code alone. Why? Because I am a php 
code monster.
Here is the code
<?php 
//    ========== 
//    Classes para criar tabelas em php 
//    ========== 
     
//    ---------- 
//    <TABLE> 
//    ---------- 
class cTABLE 
{ 
    var $sAtributos = array ( 
            "ALIGN"=>"", 
            "BACKGROUND"=>"", 
            "BGCOLOR"=>"", 
            "BORDER"=>"", 
            "BORDERCOLOR"=>"", 
            "BORDERCOLORLIGHT"=>"", 
            "BORDERCOLORDARK"=>"", 
            "CELLPADDING"=>"", 
            "CELLSPACING"=>"", 
            "CLASS"=>"", 
            "COLS"=>"", 
            "DATAPAGESIZE"=>"", 
            "DATAFLD"=>"", 
            "DATASRC"=>"", 
            "FRAME"=>"", 
            "HEIGHT"=>"", 
            "ID"=>"", 
            "LANG"=>"", 
            "LANGUAGE"=>"", 
            "RULES"=>"", 
            "STYLE"=>"", 
            "TITLE"=>"", 
            "VALIGN"=>"", 
            "WIDTH"=>"" 
        ); 
    var    $sConteudo; 

    //    ---------- 
    //    Coloca valor em algum atributo 
    //    ---------- 
    function poeAtributo( $sAtributo, $sValor ) 
    { 
        //    Existe o atributo informado? 
        if( array_key_exists( $sAtributo, $this->sAtributos ) ) 
            //    Sim. Coloca o valor nela. 
            $this->sAtributos["$sAtributo"] = $sValor; 
    } 

    //    ---------- 
    //    Coloca valor no conteúdo 
    //    ---------- 
    function poeConteudo( $sConteudo ) 
    { 
        $this->sConteudo = $sConteudo; 
    } 
     
    //    ---------- 
    //    Limpa os atributos da tabela 
    //    ---------- 
    function limpaAtributos() 
    { 
        $iTotal    = 0; 
        $iPos    = 0; 
        $sAtributo = ""; 
         
        //    Limpa os atributos. 
        $iTotal = count( $this->sAtributos ); 
        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
        { 
            $sAtributo = key($this->sAtributos); 
            $this->sAtributos["$sAtributo"] = ""; 
            next($this->sAtributos); 
        } 
         
    } 

    //    -------------------------- 
    //    Limpa o conteúdo da tabela 
    //    -------------------------- 
    function limpaConteudo() 
    { 
        $this->poeConteudo( "" ); 
    } 
     
    //    ---------- 
    //    Limpa a tabela 
    //    ---------- 
    function limpaTABLE() 
    { 
        $this->limpaAtributos(); 
        $this->limpaConteudo(); 
    } 
     
    //    ---------- 
    //    montaTABLE 
    //    ---------- 
    function montaTABLE() 
    { 
        $iPos = 0; 
        $iTotal = 0; 
        $sHTML =""; 
        $sAtributo = ""; 

        //    Abre a tag 
        $sHTML .= sprintf( "<TABLE" ); 

        //    Posiciona a matriz de atributos na primeira posição 
        reset($this->sAtributos); 

        //    Coloca o atributo na tag se ele tiver algum valor. 
        $iTotal = count( $this->sAtributos ); 
        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
        { 
            $sAtributo = key($this->sAtributos); 
            if( $this->sAtributos["$sAtributo"] ) 
            { 
                $sAtributo = key($this->sAtributos); 
                $sHTML .= sprintf( " %s='%s'",  
                            $sAtributo ,  
                            $this->sAtributos["$sAtributo"] ); 
            } 
            next($this->sAtributos); 
        } 
                 
        //    Fecha a parte inicial da tag 
        $sHTML .= sprintf( ">n" ); 
         
        //    Coloca o miolo da tabela 
        $sHTML .= sprintf( "%s", $this->sConteudo ); 

        //    Fecha a tag 
        $sHTML .= sprintf( "</TABLE>n" ); 
        return $sHTML; 
    } 
} 

//    ---------- 
//    <TR> 
//    ---------- 
class cTR 
{ 
    var $sAtributos = array ( 
            "ALIGN"=>"", 
            "BACKGROUND"=>"", 
            "BGCOLOR"=>"", 
            "BORDERCOLOR"=>"", 
            "BORDERCOLORLIGHT"=>"", 
            "BORDERCOLORDARK"=>"", 
            "CLASS"=>"", 
            "ID"=>"", 
            "LANG"=>"", 
            "LANGUAGE"=>"", 
            "STYLE"=>"", 
            "TITLE"=>"", 
            "VALIGN"=>"" 
        ); 
    var    $sConteudo; 

    //    ---------- 
    //    Coloca valor em algum atributo 
    //    ---------- 
    function poeAtributo( $sAtributo, $sValor ) 
    { 
        //    Existe o atributo informado? 
        if( array_key_exists( $sAtributo, $this->sAtributos ) ) 
            //    Sim. Coloca o valor nela. 
            $this->sAtributos["$sAtributo"] = $sValor; 
    } 

    //    ---------- 
    //    Coloca valor no conteúdo 
    //    ---------- 
    function poeConteudo( $sConteudo ) 
    { 
        $this->sConteudo = $sConteudo; 
    } 
     
    //    ------------------------ 
    //    Limpa os atributos do TR 
    //    ------------------------ 
    function limpaAtributos() 
    { 
        $iTotal    = 0; 
        $iPos    = 0; 
        $sAtributo = ""; 
         
        //    Limpa os atributos. 
        $iTotal = count( $this->sAtributos ); 
        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
        { 
            $sAtributo = key($this->sAtributos); 
            $this->sAtributos["$sAtributo"] = ""; 
            next($this->sAtributos); 
        } 
         
    } 

    //    ---------------------- 
    //    Limpa o conteúdo do TR 
    //    ---------------------- 
    function limpaConteudo() 
    { 
        $this->poeConteudo( "" ); 
    } 
     
    //    ---------- 
    //    Limpa o TR 
    //    ---------- 
    function limpaTR() 
    { 
        $this->limpaAtributos(); 
        $this->limpaConteudo(); 
    } 
     
    //    ---------- 
    //    montaTR 
    //    ---------- 
    function montaTR() 
    { 
        $iPos = 0; 
        $iTotal = 0; 
        $sHTML =""; 
        $sAtributo = ""; 

        //    Abre a tag 
        $sHTML .= sprintf( "<TR" ); 

        //    Posiciona a matriz de atributos na primeira posição 
        reset($this->sAtributos); 

        //    Coloca o atributo na tag se ele tiver algum valor. 
        $iTotal = count( $this->sAtributos ); 
        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
        { 
            $sAtributo = key($this->sAtributos); 
            if( $this->sAtributos["$sAtributo"] ) 
            { 
                $sAtributo = key($this->sAtributos); 
                $sHTML .= sprintf( " %s='%s'",  
                            $sAtributo ,  
                            $this->sAtributos["$sAtributo"] ); 
            } 
            next($this->sAtributos); 
        } 
                 
        //    Fecha a parte inicial da tag 
        $sHTML .= sprintf( ">n" ); 
         
        //    Coloca o miolo da tabela 
        $sHTML .= sprintf( "%s", $this->sConteudo ); 

        //    Fecha a tag 
        $sHTML .= sprintf( "</TR>n" ); 
        return $sHTML; 
    } 
} 

//    ---------- 
//    <TD> 
//    ---------- 
class cTD 
{ 
    var $sAtributos = array ( 
            "ALIGN"=>"", 
            "BACKGROUND"=>"", 
            "BGCOLOR"=>"", 
            "BORDERCOLOR"=>"", 
            "BORDERCOLORLIGHT"=>"", 
            "BORDERCOLORDARK"=>"", 
            "CLASS"=>"", 
            "COLSPAN"=>"", 
            "HEIGHT"=>"", 
            "ID"=>"", 
            "LANG"=>"", 
            "LANGUAGE"=>"", 
            "NOWRAP"=>"", 
            "ROWSPAN"=>"", 
            "STYLE"=>"", 
            "TITLE"=>"", 
            "VALIGN"=>"", 
            "WIDTH"=>"" 
        ); 
    var    $sConteudo; 

    //    ---------- 
    //    Coloca valor em algum atributo 
    //    ---------- 
    function poeAtributo( $sAtributo, $sValor ) 
    { 
        //    Existe o atributo informado? 
        if( array_key_exists( $sAtributo, $this->sAtributos ) ) 
            //    Sim. Coloca o valor nela. 
            $this->sAtributos["$sAtributo"] = $sValor; 
    } 

    //    ---------- 
    //    Coloca valor no conteúdo 
    //    ---------- 
    function poeConteudo( $sConteudo ) 
    { 
        $this->sConteudo = $sConteudo; 
    } 
     
    //    ------------------------ 
    //    Limpa os atributos do TD 
    //    ------------------------ 
    function limpaAtributos() 
    { 
        $iTotal    = 0; 
        $iPos    = 0; 
        $sAtributo = ""; 
         
        //    Limpa os atributos. 
        $iTotal = count( $this->sAtributos ); 
        reset( $this->sAtributos); 
        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
        { 
            $sAtributo = key( $this->sAtributos ); 
            $this->sAtributos["$sAtributo"] = ""; 
            next($this->sAtributos); 
        } 
         
    } 

    //    ---------------------- 
    //    Limpa o conteúdo do TD 
    //    ---------------------- 
    function limpaConteudo() 
    { 
        $this->poeConteudo( "" ); 
    } 
     
    //    ---------- 
    //    Limpa o TD 
    //    ---------- 
    function limpaTD() 
    { 
        $this->limpaAtributos(); 
        $this->limpaConteudo(); 
    } 
     
    //    ------- 
    //    montaTD 
    //    ------- 
    function montaTD() 
    { 
        $iPos = 0; 
        $iTotal = 0; 
        $sHTML =""; 
        $sAtributo = ""; 

        //    Abre a tag 
        $sHTML .= sprintf( "<TD" ); 

        //    Posiciona a matriz de atributos na primeira posição 
        reset($this->sAtributos); 

        //    Coloca o atributo na tag se ele tiver algum valor. 
        $iTotal = count( $this->sAtributos ); 
        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
        { 
            $sAtributo = key($this->sAtributos); 
            if( $this->sAtributos["$sAtributo"] ) 
            { 
                $sAtributo = key($this->sAtributos); 
                $sHTML .= sprintf( " %s='%s'",  
                            $sAtributo ,  
                            $this->sAtributos["$sAtributo"] ); 
            } 
            next($this->sAtributos); 
        } 
                 
        //    Fecha a parte inicial da tag 
        $sHTML .= sprintf( ">" ); 
         
        //    Coloca o miolo da tabela 
        $sHTML .= sprintf( "%s", $this->sConteudo ); 

        //    Fecha a tag 
        $sHTML .= sprintf( "</TD>n" ); 
        return $sHTML; 
    } 
} 
?>


thanks
jamal
Message #2 by tekronx@a... on Fri, 25 Oct 2002 11:51:16
Well I am no wiz at spanish but I can give you an idea of what the firs 
one says.

the first is 

Classes for  _________ tables in PHP

that is all I can give you I do not
have a large vocabulary in Spanish.  Hope that give you an idea.



> Hi guys,
i> s there any portugese origin to translate the comments in this class 
code 
t> o english for me?? I cannot leave the code alone. Why? Because I am a 
php 
c> ode monster.
H> ere is the code
<> ?php 
/> /    ========== 
/> /    Classes para criar tabelas em php 
/> /    ========== 
 >     
/> /    ---------- 
/> /    <TABLE> 
/> /    ---------- 
c> lass cTABLE 
{>  
 >    var $sAtributos = array ( 
 >            "ALIGN"=>"", 
 >            "BACKGROUND"=>"", 
 >            "BGCOLOR"=>"", 
 >            "BORDER"=>"", 
 >            "BORDERCOLOR"=>"", 
 >            "BORDERCOLORLIGHT"=>"", 
 >            "BORDERCOLORDARK"=>"", 
 >            "CELLPADDING"=>"", 
 >            "CELLSPACING"=>"", 
 >            "CLASS"=>"", 
 >            "COLS"=>"", 
 >            "DATAPAGESIZE"=>"", 
 >            "DATAFLD"=>"", 
 >            "DATASRC"=>"", 
 >            "FRAME"=>"", 
 >            "HEIGHT"=>"", 
 >            "ID"=>"", 
 >            "LANG"=>"", 
 >            "LANGUAGE"=>"", 
 >            "RULES"=>"", 
 >            "STYLE"=>"", 
 >            "TITLE"=>"", 
 >            "VALIGN"=>"", 
 >            "WIDTH"=>"" 
 >        ); 
 >    var    $sConteudo; 

>     //    ---------- 
 >    //    Coloca valor em algum atributo 
 >    //    ---------- 
 >    function poeAtributo( $sAtributo, $sValor ) 
 >    { 
 >        //    Existe o atributo informado? 
 >        if( array_key_exists( $sAtributo, $this->sAtributos ) ) 
 >            //    Sim. Coloca o valor nela. 
 >            $this->sAtributos["$sAtributo"] = $sValor; 
 >    } 

>     //    ---------- 
 >    //    Coloca valor no conteúdo 
 >    //    ---------- 
 >    function poeConteudo( $sConteudo ) 
 >    { 
 >        $this->sConteudo = $sConteudo; 
 >    } 
 >     
 >    //    ---------- 
 >    //    Limpa os atributos da tabela 
 >    //    ---------- 
 >    function limpaAtributos() 
 >    { 
 >        $iTotal    = 0; 
 >        $iPos    = 0; 
 >        $sAtributo = ""; 
 >         
 >        //    Limpa os atributos. 
 >        $iTotal = count( $this->sAtributos ); 
 >        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
 >        { 
 >            $sAtributo = key($this->sAtributos); 
 >            $this->sAtributos["$sAtributo"] = ""; 
 >            next($this->sAtributos); 
 >        } 
 >         
 >    } 

>     //    -------------------------- 
 >    //    Limpa o conteúdo da tabela 
 >    //    -------------------------- 
 >    function limpaConteudo() 
 >    { 
 >        $this->poeConteudo( "" ); 
 >    } 
 >     
 >    //    ---------- 
 >    //    Limpa a tabela 
 >    //    ---------- 
 >    function limpaTABLE() 
 >    { 
 >        $this->limpaAtributos(); 
 >        $this->limpaConteudo(); 
 >    } 
 >     
 >    //    ---------- 
 >    //    montaTABLE 
 >    //    ---------- 
 >    function montaTABLE() 
 >    { 
 >        $iPos = 0; 
 >        $iTotal = 0; 
 >        $sHTML =""; 
 >        $sAtributo = ""; 

>         //    Abre a tag 
 >        $sHTML .= sprintf( "<TABLE" ); 

>         //    Posiciona a matriz de atributos na primeira posição 
 >        reset($this->sAtributos); 

>         //    Coloca o atributo na tag se ele tiver algum valor. 
 >        $iTotal = count( $this->sAtributos ); 
 >        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
 >        { 
 >            $sAtributo = key($this->sAtributos); 
 >            if( $this->sAtributos["$sAtributo"] ) 
 >            { 
 >                $sAtributo = key($this->sAtributos); 
 >                $sHTML .= sprintf( " %s='%s'",  
 >                            $sAtributo ,  
 >                            $this->sAtributos["$sAtributo"] ); 
 >            } 
 >            next($this->sAtributos); 
 >        } 
 >                 
 >        //    Fecha a parte inicial da tag 
 >        $sHTML .= sprintf( ">n" ); 
 >         
 >        //    Coloca o miolo da tabela 
 >        $sHTML .= sprintf( "%s", $this->sConteudo ); 

>         //    Fecha a tag 
 >        $sHTML .= sprintf( "</TABLE>n" ); 
 >        return $sHTML; 
 >    } 
}>  

> //    ---------- 
/> /    <TR> 
/> /    ---------- 
c> lass cTR 
{>  
 >    var $sAtributos = array ( 
 >            "ALIGN"=>"", 
 >            "BACKGROUND"=>"", 
 >            "BGCOLOR"=>"", 
 >            "BORDERCOLOR"=>"", 
 >            "BORDERCOLORLIGHT"=>"", 
 >            "BORDERCOLORDARK"=>"", 
 >            "CLASS"=>"", 
 >            "ID"=>"", 
 >            "LANG"=>"", 
 >            "LANGUAGE"=>"", 
 >            "STYLE"=>"", 
 >            "TITLE"=>"", 
 >            "VALIGN"=>"" 
 >        ); 
 >    var    $sConteudo; 

>     //    ---------- 
 >    //    Coloca valor em algum atributo 
 >    //    ---------- 
 >    function poeAtributo( $sAtributo, $sValor ) 
 >    { 
 >        //    Existe o atributo informado? 
 >        if( array_key_exists( $sAtributo, $this->sAtributos ) ) 
 >            //    Sim. Coloca o valor nela. 
 >            $this->sAtributos["$sAtributo"] = $sValor; 
 >    } 

>     //    ---------- 
 >    //    Coloca valor no conteúdo 
 >    //    ---------- 
 >    function poeConteudo( $sConteudo ) 
 >    { 
 >        $this->sConteudo = $sConteudo; 
 >    } 
 >     
 >    //    ------------------------ 
 >    //    Limpa os atributos do TR 
 >    //    ------------------------ 
 >    function limpaAtributos() 
 >    { 
 >        $iTotal    = 0; 
 >        $iPos    = 0; 
 >        $sAtributo = ""; 
 >         
 >        //    Limpa os atributos. 
 >        $iTotal = count( $this->sAtributos ); 
 >        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
 >        { 
 >            $sAtributo = key($this->sAtributos); 
 >            $this->sAtributos["$sAtributo"] = ""; 
 >            next($this->sAtributos); 
 >        } 
 >         
 >    } 

>     //    ---------------------- 
 >    //    Limpa o conteúdo do TR 
 >    //    ---------------------- 
 >    function limpaConteudo() 
 >    { 
 >        $this->poeConteudo( "" ); 
 >    } 
 >     
 >    //    ---------- 
 >    //    Limpa o TR 
 >    //    ---------- 
 >    function limpaTR() 
 >    { 
 >        $this->limpaAtributos(); 
 >        $this->limpaConteudo(); 
 >    } 
 >     
 >    //    ---------- 
 >    //    montaTR 
 >    //    ---------- 
 >    function montaTR() 
 >    { 
 >        $iPos = 0; 
 >        $iTotal = 0; 
 >        $sHTML =""; 
 >        $sAtributo = ""; 

>         //    Abre a tag 
 >        $sHTML .= sprintf( "<TR" ); 

>         //    Posiciona a matriz de atributos na primeira posição 
 >        reset($this->sAtributos); 

>         //    Coloca o atributo na tag se ele tiver algum valor. 
 >        $iTotal = count( $this->sAtributos ); 
 >        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
 >        { 
 >            $sAtributo = key($this->sAtributos); 
 >            if( $this->sAtributos["$sAtributo"] ) 
 >            { 
 >                $sAtributo = key($this->sAtributos); 
 >                $sHTML .= sprintf( " %s='%s'",  
 >                            $sAtributo ,  
 >                            $this->sAtributos["$sAtributo"] ); 
 >            } 
 >            next($this->sAtributos); 
 >        } 
 >                 
 >        //    Fecha a parte inicial da tag 
 >        $sHTML .= sprintf( ">n" ); 
 >         
 >        //    Coloca o miolo da tabela 
 >        $sHTML .= sprintf( "%s", $this->sConteudo ); 

>         //    Fecha a tag 
 >        $sHTML .= sprintf( "</TR>n" ); 
 >        return $sHTML; 
 >    } 
}>  

> //    ---------- 
/> /    <TD> 
/> /    ---------- 
c> lass cTD 
{>  
 >    var $sAtributos = array ( 
 >            "ALIGN"=>"", 
 >            "BACKGROUND"=>"", 
 >            "BGCOLOR"=>"", 
 >            "BORDERCOLOR"=>"", 
 >            "BORDERCOLORLIGHT"=>"", 
 >            "BORDERCOLORDARK"=>"", 
 >            "CLASS"=>"", 
 >            "COLSPAN"=>"", 
 >            "HEIGHT"=>"", 
 >            "ID"=>"", 
 >            "LANG"=>"", 
 >            "LANGUAGE"=>"", 
 >            "NOWRAP"=>"", 
 >            "ROWSPAN"=>"", 
 >            "STYLE"=>"", 
 >            "TITLE"=>"", 
 >            "VALIGN"=>"", 
 >            "WIDTH"=>"" 
 >        ); 
 >    var    $sConteudo; 

>     //    ---------- 
 >    //    Coloca valor em algum atributo 
 >    //    ---------- 
 >    function poeAtributo( $sAtributo, $sValor ) 
 >    { 
 >        //    Existe o atributo informado? 
 >        if( array_key_exists( $sAtributo, $this->sAtributos ) ) 
 >            //    Sim. Coloca o valor nela. 
 >            $this->sAtributos["$sAtributo"] = $sValor; 
 >    } 

>     //    ---------- 
 >    //    Coloca valor no conteúdo 
 >    //    ---------- 
 >    function poeConteudo( $sConteudo ) 
 >    { 
 >        $this->sConteudo = $sConteudo; 
 >    } 
 >     
 >    //    ------------------------ 
 >    //    Limpa os atributos do TD 
 >    //    ------------------------ 
 >    function limpaAtributos() 
 >    { 
 >        $iTotal    = 0; 
 >        $iPos    = 0; 
 >        $sAtributo = ""; 
 >         
 >        //    Limpa os atributos. 
 >        $iTotal = count( $this->sAtributos ); 
 >        reset( $this->sAtributos); 
 >        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
 >        { 
 >            $sAtributo = key( $this->sAtributos ); 
 >            $this->sAtributos["$sAtributo"] = ""; 
 >            next($this->sAtributos); 
 >        } 
 >         
 >    } 

>     //    ---------------------- 
 >    //    Limpa o conteúdo do TD 
 >    //    ---------------------- 
 >    function limpaConteudo() 
 >    { 
 >        $this->poeConteudo( "" ); 
 >    } 
 >     
 >    //    ---------- 
 >    //    Limpa o TD 
 >    //    ---------- 
 >    function limpaTD() 
 >    { 
 >        $this->limpaAtributos(); 
 >        $this->limpaConteudo(); 
 >    } 
 >     
 >    //    ------- 
 >    //    montaTD 
 >    //    ------- 
 >    function montaTD() 
 >    { 
 >        $iPos = 0; 
 >        $iTotal = 0; 
 >        $sHTML =""; 
 >        $sAtributo = ""; 

>         //    Abre a tag 
 >        $sHTML .= sprintf( "<TD" ); 

>         //    Posiciona a matriz de atributos na primeira posição 
 >        reset($this->sAtributos); 

>         //    Coloca o atributo na tag se ele tiver algum valor. 
 >        $iTotal = count( $this->sAtributos ); 
 >        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
 >        { 
 >            $sAtributo = key($this->sAtributos); 
 >            if( $this->sAtributos["$sAtributo"] ) 
 >            { 
 >                $sAtributo = key($this->sAtributos); 
 >                $sHTML .= sprintf( " %s='%s'",  
 >                            $sAtributo ,  
 >                            $this->sAtributos["$sAtributo"] ); 
 >            } 
 >            next($this->sAtributos); 
 >        } 
 >                 
 >        //    Fecha a parte inicial da tag 
 >        $sHTML .= sprintf( ">" ); 
 >         
 >        //    Coloca o miolo da tabela 
 >        $sHTML .= sprintf( "%s", $this->sConteudo ); 

>         //    Fecha a tag 
 >        $sHTML .= sprintf( "</TD>n" ); 
 >        return $sHTML; 
 >    } 
}>  
?> >

> 
t> hanks
j> amal
Message #3 by "jorge" <jorge@d...> on Fri, 25 Oct 2002 10:11:07 -0500
ok here what you need
> //    Classes para criar tabelas em php = Classes to create tables in PHP
//    Coloca valor em algum atributo = Sets value to some atribute
>     //    Limpa os atributos da tabela = Cleans table attributes

if this is what you want please let me know i 'll send you the rest

Jorge
----- Original Message -----
From: "Jamal" <new_mojam@y...>
To: "beginning php" <beginning_php@p...>
Sent: Friday, October 25, 2002 9:31 AM
Subject: [beginning_php] I am a php code MONSTER


> Hi guys,
> is there any portugese origin to translate the comments in this class code
> to english for me?? I cannot leave the code alone. Why? Because I am a php
> code monster.
> Here is the code
> <?php
> //    ==========
> //    Classes para criar tabelas em php
> //    ==========
>
> //    ----------
> //    <TABLE>
> //    ----------
> class cTABLE
> {
>     var $sAtributos = array (
>             "ALIGN"=>"",
>             "BACKGROUND"=>"",
>             "BGCOLOR"=>"",
>             "BORDER"=>"",
>             "BORDERCOLOR"=>"",
>             "BORDERCOLORLIGHT"=>"",
>             "BORDERCOLORDARK"=>"",
>             "CELLPADDING"=>"",
>             "CELLSPACING"=>"",
>             "CLASS"=>"",
>             "COLS"=>"",
>             "DATAPAGESIZE"=>"",
>             "DATAFLD"=>"",
>             "DATASRC"=>"",
>             "FRAME"=>"",
>             "HEIGHT"=>"",
>             "ID"=>"",
>             "LANG"=>"",
>             "LANGUAGE"=>"",
>             "RULES"=>"",
>             "STYLE"=>"",
>             "TITLE"=>"",
>             "VALIGN"=>"",
>             "WIDTH"=>""
>         );
>     var    $sConteudo;
>
>     //    ----------
>     //    Coloca valor em algum atributo
>     //    ----------
>     function poeAtributo( $sAtributo, $sValor )
>     {
>         //    Existe o atributo informado?
>         if( array_key_exists( $sAtributo, $this->sAtributos ) )
>             //    Sim. Coloca o valor nela.
>             $this->sAtributos["$sAtributo"] = $sValor;
>     }
>
>     //    ----------
>     //    Coloca valor no conteúdo
>     //    ----------
>     function poeConteudo( $sConteudo )
>     {
>         $this->sConteudo = $sConteudo;
>     }
>
>     //    ----------
>     //    Limpa os atributos da tabela
>     //    ----------
>     function limpaAtributos()
>     {
>         $iTotal    = 0;
>         $iPos    = 0;
>         $sAtributo = "";
>
>         //    Limpa os atributos.
>         $iTotal = count( $this->sAtributos );
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key($this->sAtributos);
>             $this->sAtributos["$sAtributo"] = "";
>             next($this->sAtributos);
>         }
>
>     }
>
>     //    --------------------------
>     //    Limpa o conteúdo da tabela
>     //    --------------------------
>     function limpaConteudo()
>     {
>         $this->poeConteudo( "" );
>     }
>
>     //    ----------
>     //    Limpa a tabela
>     //    ----------
>     function limpaTABLE()
>     {
>         $this->limpaAtributos();
>         $this->limpaConteudo();
>     }
>
>     //    ----------
>     //    montaTABLE
>     //    ----------
>     function montaTABLE()
>     {
>         $iPos = 0;
>         $iTotal = 0;
>         $sHTML ="";
>         $sAtributo = "";
>
>         //    Abre a tag
>         $sHTML .= sprintf( "<TABLE" );
>
>         //    Posiciona a matriz de atributos na primeira posição
>         reset($this->sAtributos);
>
>         //    Coloca o atributo na tag se ele tiver algum valor.
>         $iTotal = count( $this->sAtributos );
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key($this->sAtributos);
>             if( $this->sAtributos["$sAtributo"] )
>             {
>                 $sAtributo = key($this->sAtributos);
>                 $sHTML .= sprintf( " %s='%s'",
>                             $sAtributo ,
>                             $this->sAtributos["$sAtributo"] );
>             }
>             next($this->sAtributos);
>         }
>
>         //    Fecha a parte inicial da tag
>         $sHTML .= sprintf( ">n" );
>
>         //    Coloca o miolo da tabela
>         $sHTML .= sprintf( "%s", $this->sConteudo );
>
>         //    Fecha a tag
>         $sHTML .= sprintf( "</TABLE>n" );
>         return $sHTML;
>     }
> }
>
> //    ----------
> //    <TR>
> //    ----------
> class cTR
> {
>     var $sAtributos = array (
>             "ALIGN"=>"",
>             "BACKGROUND"=>"",
>             "BGCOLOR"=>"",
>             "BORDERCOLOR"=>"",
>             "BORDERCOLORLIGHT"=>"",
>             "BORDERCOLORDARK"=>"",
>             "CLASS"=>"",
>             "ID"=>"",
>             "LANG"=>"",
>             "LANGUAGE"=>"",
>             "STYLE"=>"",
>             "TITLE"=>"",
>             "VALIGN"=>""
>         );
>     var    $sConteudo;
>
>     //    ----------
>     //    Coloca valor em algum atributo
>     //    ----------
>     function poeAtributo( $sAtributo, $sValor )
>     {
>         //    Existe o atributo informado?
>         if( array_key_exists( $sAtributo, $this->sAtributos ) )
>             //    Sim. Coloca o valor nela.
>             $this->sAtributos["$sAtributo"] = $sValor;
>     }
>
>     //    ----------
>     //    Coloca valor no conteúdo
>     //    ----------
>     function poeConteudo( $sConteudo )
>     {
>         $this->sConteudo = $sConteudo;
>     }
>
>     //    ------------------------
>     //    Limpa os atributos do TR
>     //    ------------------------
>     function limpaAtributos()
>     {
>         $iTotal    = 0;
>         $iPos    = 0;
>         $sAtributo = "";
>
>         //    Limpa os atributos.
>         $iTotal = count( $this->sAtributos );
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key($this->sAtributos);
>             $this->sAtributos["$sAtributo"] = "";
>             next($this->sAtributos);
>         }
>
>     }
>
>     //    ----------------------
>     //    Limpa o conteúdo do TR
>     //    ----------------------
>     function limpaConteudo()
>     {
>         $this->poeConteudo( "" );
>     }
>
>     //    ----------
>     //    Limpa o TR
>     //    ----------
>     function limpaTR()
>     {
>         $this->limpaAtributos();
>         $this->limpaConteudo();
>     }
>
>     //    ----------
>     //    montaTR
>     //    ----------
>     function montaTR()
>     {
>         $iPos = 0;
>         $iTotal = 0;
>         $sHTML ="";
>         $sAtributo = "";
>
>         //    Abre a tag
>         $sHTML .= sprintf( "<TR" );
>
>         //    Posiciona a matriz de atributos na primeira posição
>         reset($this->sAtributos);
>
>         //    Coloca o atributo na tag se ele tiver algum valor.
>         $iTotal = count( $this->sAtributos );
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key($this->sAtributos);
>             if( $this->sAtributos["$sAtributo"] )
>             {
>                 $sAtributo = key($this->sAtributos);
>                 $sHTML .= sprintf( " %s='%s'",
>                             $sAtributo ,
>                             $this->sAtributos["$sAtributo"] );
>             }
>             next($this->sAtributos);
>         }
>
>         //    Fecha a parte inicial da tag
>         $sHTML .= sprintf( ">n" );
>
>         //    Coloca o miolo da tabela
>         $sHTML .= sprintf( "%s", $this->sConteudo );
>
>         //    Fecha a tag
>         $sHTML .= sprintf( "</TR>n" );
>         return $sHTML;
>     }
> }
>
> //    ----------
> //    <TD>
> //    ----------
> class cTD
> {
>     var $sAtributos = array (
>             "ALIGN"=>"",
>             "BACKGROUND"=>"",
>             "BGCOLOR"=>"",
>             "BORDERCOLOR"=>"",
>             "BORDERCOLORLIGHT"=>"",
>             "BORDERCOLORDARK"=>"",
>             "CLASS"=>"",
>             "COLSPAN"=>"",
>             "HEIGHT"=>"",
>             "ID"=>"",
>             "LANG"=>"",
>             "LANGUAGE"=>"",
>             "NOWRAP"=>"",
>             "ROWSPAN"=>"",
>             "STYLE"=>"",
>             "TITLE"=>"",
>             "VALIGN"=>"",
>             "WIDTH"=>""
>         );
>     var    $sConteudo;
>
>     //    ----------
>     //    Coloca valor em algum atributo
>     //    ----------
>     function poeAtributo( $sAtributo, $sValor )
>     {
>         //    Existe o atributo informado?
>         if( array_key_exists( $sAtributo, $this->sAtributos ) )
>             //    Sim. Coloca o valor nela.
>             $this->sAtributos["$sAtributo"] = $sValor;
>     }
>
>     //    ----------
>     //    Coloca valor no conteúdo
>     //    ----------
>     function poeConteudo( $sConteudo )
>     {
>         $this->sConteudo = $sConteudo;
>     }
>
>     //    ------------------------
>     //    Limpa os atributos do TD
>     //    ------------------------
>     function limpaAtributos()
>     {
>         $iTotal    = 0;
>         $iPos    = 0;
>         $sAtributo = "";
>
>         //    Limpa os atributos.
>         $iTotal = count( $this->sAtributos );
>         reset( $this->sAtributos);
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key( $this->sAtributos );
>             $this->sAtributos["$sAtributo"] = "";
>             next($this->sAtributos);
>         }
>
>     }
>
>     //    ----------------------
>     //    Limpa o conteúdo do TD
>     //    ----------------------
>     function limpaConteudo()
>     {
>         $this->poeConteudo( "" );
>     }
>
>     //    ----------
>     //    Limpa o TD
>     //    ----------
>     function limpaTD()
>     {
>         $this->limpaAtributos();
>         $this->limpaConteudo();
>     }
>
>     //    -------
>     //    montaTD
>     //    -------
>     function montaTD()
>     {
>         $iPos = 0;
>         $iTotal = 0;
>         $sHTML ="";
>         $sAtributo = "";
>
>         //    Abre a tag
>         $sHTML .= sprintf( "<TD" );
>
>         //    Posiciona a matriz de atributos na primeira posição
>         reset($this->sAtributos);
>
>         //    Coloca o atributo na tag se ele tiver algum valor.
>         $iTotal = count( $this->sAtributos );
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key($this->sAtributos);
>             if( $this->sAtributos["$sAtributo"] )
>             {
>                 $sAtributo = key($this->sAtributos);
>                 $sHTML .= sprintf( " %s='%s'",
>                             $sAtributo ,
>                             $this->sAtributos["$sAtributo"] );
>             }
>             next($this->sAtributos);
>         }
>
>         //    Fecha a parte inicial da tag
>         $sHTML .= sprintf( ">" );
>
>         //    Coloca o miolo da tabela
>         $sHTML .= sprintf( "%s", $this->sConteudo );
>
>         //    Fecha a tag
>         $sHTML .= sprintf( "</TD>n" );
>         return $sHTML;
>     }
> }
> ?>
>
>
> thanks
> jamal
>


Message #4 by =?iso-8859-1?Q?M=E1rio_Ramos?= <mjpr@f...> on Fri, 25 Oct 2002 20:04:05 +0100
I'll try.... translation in english after the portuguese comments.


> <?php
> //    ==========
> //    Classes para criar tabelas em php
  //Class to create tables in php
> //    ==========
>
> //    ----------
> //    <TABLE>
> //    ----------
> class cTABLE
> {
    //an array called attributes
>     var $sAtributos = array (
>             "ALIGN"=>"",
>             "BACKGROUND"=>"",
>             "BGCOLOR"=>"",
>             "BORDER"=>"",
>             "BORDERCOLOR"=>"",
>             "BORDERCOLORLIGHT"=>"",
>             "BORDERCOLORDARK"=>"",
>             "CELLPADDING"=>"",
>             "CELLSPACING"=>"",
>             "CLASS"=>"",
>             "COLS"=>"",
>             "DATAPAGESIZE"=>"",
>             "DATAFLD"=>"",
>             "DATASRC"=>"",
>             "FRAME"=>"",
>             "HEIGHT"=>"",
>             "ID"=>"",
>             "LANG"=>"",
>             "LANGUAGE"=>"",
>             "RULES"=>"",
>             "STYLE"=>"",
>             "TITLE"=>"",
>             "VALIGN"=>"",
>             "WIDTH"=>""
>         );
>     var    $sConteudo; //a var called content
>
>     //    ----------
>     //    Coloca valor em algum atributo
      // assign a value to an attribute
>     //    ----------
>     function poeAtributo( $sAtributo, $sValor )  //funtion assign
attribute
>     {
>         //    Existe o atributo informado?
           //does attribute existe?
>         if( array_key_exists( $sAtributo, $this->sAtributos ) )
>             //    Sim. Coloca o valor nela.
              // yes. assign the value
>             $this->sAtributos["$sAtributo"] = $sValor;
>     }
>
>     //    ----------
>     //    Coloca valor no conteúdo
       //assign a value to var content
>     //    ----------
>     function poeConteudo( $sConteudo ) //function assign content
>     {
>         $this->sConteudo = $sConteudo;
>     }
>
>     //    ----------
>     //    Limpa os atributos da tabela
       //cleans the tables attributes
>     //    ----------
>     function limpaAtributos()  //function clean attributes
>     {
>         $iTotal    = 0;
>         $iPos    = 0;
>         $sAtributo = "";
>
>         //    Limpa os atributos.
            // cleans the attributes
>         $iTotal = count( $this->sAtributos );
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key($this->sAtributos);
>             $this->sAtributos["$sAtributo"] = "";
>             next($this->sAtributos);
>         }
>
>     }
>
>     //    --------------------------
>     //    Limpa o conteúdo da tabela
       // clean the table's content
>     //    --------------------------
>     function limpaConteudo()  //funtion clean table's content
>     {
>         $this->poeConteudo( "" );
>     }
>
>     //    ----------
>     //    Limpa a tabela
      // clean the table
>     //    ----------
>     function limpaTABLE()
>     {
>         $this->limpaAtributos();
>         $this->limpaConteudo();
>     }
>
>     //    ----------
>     //    montaTABLE
        //build table
>     //    ----------
>     function montaTABLE()  //funtion build table
>     {
>         $iPos = 0;
>         $iTotal = 0;
>         $sHTML ="";
>         $sAtributo = "";
>
>         //    Abre a tag
            // open the tag
>         $sHTML .= sprintf( "<TABLE" );
>
>         //    Posiciona a matriz de atributos na primeira posição
           // position the attribute's array to the first position
>         reset($this->sAtributos);
>
>         //    Coloca o atributo na tag se ele tiver algum valor.
          // assigns the attribute to the tag if it has any value
>         $iTotal = count( $this->sAtributos );
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key($this->sAtributos);
>             if( $this->sAtributos["$sAtributo"] )
>             {
>                 $sAtributo = key($this->sAtributos);
>                 $sHTML .= sprintf( " %s='%s'",
>                             $sAtributo ,
>                             $this->sAtributos["$sAtributo"] );
>             }
>             next($this->sAtributos);
>         }
>
>         //    Fecha a parte inicial da tag
            // closes initial parte of the tag
>         $sHTML .= sprintf( ">n" );
>
>         //    Coloca o miolo da tabela
            // assigns the content of the table
>         $sHTML .= sprintf( "%s", $this->sConteudo );
>
>         //    Fecha a tag
            // closes the tag
>         $sHTML .= sprintf( "</TABLE>n" );
>         return $sHTML;
>     }
> }
>
> //    ----------
> //    <TR>
> //    ----------
> class cTR
> {
>     var $sAtributos = array (
>             "ALIGN"=>"",
>             "BACKGROUND"=>"",
>             "BGCOLOR"=>"",
>             "BORDERCOLOR"=>"",
>             "BORDERCOLORLIGHT"=>"",
>             "BORDERCOLORDARK"=>"",
>             "CLASS"=>"",
>             "ID"=>"",
>             "LANG"=>"",
>             "LANGUAGE"=>"",
>             "STYLE"=>"",
>             "TITLE"=>"",
>             "VALIGN"=>""
>         );
>     var    $sConteudo;
>
>     //    ----------
>     //    Coloca valor em algum atributo
        // assigns a value to an attribute
>     //    ----------
>     function poeAtributo( $sAtributo, $sValor )  //function assign
attribute
>     {
>         //    Existe o atributo informado?
          //does the attribute existe?
>         if( array_key_exists( $sAtributo, $this->sAtributos ) )
>             //    Sim. Coloca o valor nela.
                Yes. Assign value
>             $this->sAtributos["$sAtributo"] = $sValor;
>     }
>
>     //    ----------
>     //    Coloca valor no conteúdo
        //assign a value to the content
>     //    ----------
>     function poeConteudo( $sConteudo )  ////function assign content
>     {
>         $this->sConteudo = $sConteudo;
>     }
>
>     //    ------------------------
>     //    Limpa os atributos do TR
        //cleans the TR's attributes
>     //    ------------------------
>     function limpaAtributos() ////function clean attributes
>     {
>         $iTotal    = 0;
>         $iPos    = 0;
>         $sAtributo = "";
>
>         //    Limpa os atributos.
            //cleans the attributes
>         $iTotal = count( $this->sAtributos );
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key($this->sAtributos);
>             $this->sAtributos["$sAtributo"] = "";
>             next($this->sAtributos);
>         }
>
>     }
>
>     //    ----------------------
>     //    Limpa o conteúdo do TR
        // //cleans the TR's content
>     //    ----------------------
>     function limpaConteudo()  //function clean content
>     {
>         $this->poeConteudo( "" );
>     }
>
>     //    ----------
>     //    Limpa o TR
        //cleans the TR
>     //    ----------
>     function limpaTR()  //function clean TR
>     {
>         $this->limpaAtributos();
>         $this->limpaConteudo();
>     }
>
>     //    ----------
>     //    montaTR
        //build TR
>     //    ----------
>     function montaTR()  //function build TR
>     {
>         $iPos = 0;
>         $iTotal = 0;
>         $sHTML ="";
>         $sAtributo = "";
>
>         //    Abre a tag
            // open the tag
>         $sHTML .= sprintf( "<TR" );
>
>         //    Posiciona a matriz de atributos na primeira posição
            // // position the attribute's array to the first position
>         reset($this->sAtributos);
>
>         //    Coloca o atributo na tag se ele tiver algum valor
            // assigns the attribute to the tag if has any value.
>         $iTotal = count( $this->sAtributos );
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key($this->sAtributos);
>             if( $this->sAtributos["$sAtributo"] )
>             {
>                 $sAtributo = key($this->sAtributos);
>                 $sHTML .= sprintf( " %s='%s'",
>                             $sAtributo ,
>                             $this->sAtributos["$sAtributo"] );
>             }
>             next($this->sAtributos);
>         }
>
>         //    Fecha a parte inicial da tag
            // closes tag's inicial parte
>         $sHTML .= sprintf( ">n" );
>
>         //    Coloca o miolo da tabela
            //assigns the content of the table
>         $sHTML .= sprintf( "%s", $this->sConteudo );
>
>         //    Fecha a tag
            //closes the tag
>         $sHTML .= sprintf( "</TR>n" );
>         return $sHTML;
>     }
> }
>
> //    ----------
> //    <TD>
> //    ----------
> class cTD
> {
>     var $sAtributos = array (
>             "ALIGN"=>"",
>             "BACKGROUND"=>"",
>             "BGCOLOR"=>"",
>             "BORDERCOLOR"=>"",
>             "BORDERCOLORLIGHT"=>"",
>             "BORDERCOLORDARK"=>"",
>             "CLASS"=>"",
>             "COLSPAN"=>"",
>             "HEIGHT"=>"",
>             "ID"=>"",
>             "LANG"=>"",
>             "LANGUAGE"=>"",
>             "NOWRAP"=>"",
>             "ROWSPAN"=>"",
>             "STYLE"=>"",
>             "TITLE"=>"",
>             "VALIGN"=>"",
>             "WIDTH"=>""
>         );
>     var    $sConteudo;
>
>     //    ----------
>     //    Coloca valor em algum atributo
        // assigns a value to an attribute
>     //    ----------
>     function poeAtributo( $sAtributo, $sValor )  //function assign
attribute
>     {
>         //    Existe o atributo informado?
            // does attribute exist?
>         if( array_key_exists( $sAtributo, $this->sAtributos ) )
>             //    Sim. Coloca o valor nela.
                // yes. assign value
>             $this->sAtributos["$sAtributo"] = $sValor;
>     }
>
>     //    ----------
>     //    Coloca valor no conteúdo
        //assign value to content
>     //    ----------
>     function poeConteudo( $sConteudo )  //function assign content
>     {
>         $this->sConteudo = $sConteudo;
>     }
>
>     //    ------------------------
>     //    Limpa os atributos do TD
        //cleans TD's attributes
>     //    ------------------------
>     function limpaAtributos()
>     {
>         $iTotal    = 0;
>         $iPos    = 0;
>         $sAtributo = "";
>
>         //    Limpa os atributos.
            // cleans the attributes
>         $iTotal = count( $this->sAtributos );
>         reset( $this->sAtributos);
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key( $this->sAtributos );
>             $this->sAtributos["$sAtributo"] = "";
>             next($this->sAtributos);
>         }
>
>     }
>
>     //    ----------------------
>     //    Limpa o conteúdo do TD
        //cleans the content of the TD
>     //    ----------------------
>     function limpaConteudo()
>     {
>         $this->poeConteudo( "" );
>     }
>
>     //    ----------
>     //    Limpa o TD
        //clean the TD
>     //    ----------
>     function limpaTD()
>     {
>         $this->limpaAtributos();
>         $this->limpaConteudo();
>     }
>
>     //    -------
>     //    montaTD
        // builds a TD
>     //    -------
>     function montaTD()
>     {
>         $iPos = 0;
>         $iTotal = 0;
>         $sHTML ="";
>         $sAtributo = "";
>
>         //    Abre a tag
            // opens the tag
>         $sHTML .= sprintf( "<TD" );
>
>         //    Posiciona a matriz de atributos na primeira posição
            // put the attribute's array to the first position
>         reset($this->sAtributos);
>
>         //    Coloca o atributo na tag se ele tiver algum valor.
            // assign the attribute to the tag if any value
>         $iTotal = count( $this->sAtributos );
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key($this->sAtributos);
>             if( $this->sAtributos["$sAtributo"] )
>             {
>                 $sAtributo = key($this->sAtributos);
>                 $sHTML .= sprintf( " %s='%s'",
>                             $sAtributo ,
>                             $this->sAtributos["$sAtributo"] );
>             }
>             next($this->sAtributos);
>         }
>
>         //    Fecha a parte inicial da tag
            //close the inicial tag's parte
>         $sHTML .= sprintf( ">" );
>
>         //    Coloca o miolo da tabela
            // put the table's content
>         $sHTML .= sprintf( "%s", $this->sConteudo );
>
>         //    Fecha a tag
           //close the tag
>         $sHTML .= sprintf( "</TD>n" );
>         return $sHTML;
>     }
> }
> ?>

Message #5 by "Jamal" <new_mojam@y...> on Wed, 30 Oct 2002 17:19:15
Jorge
yes please it is what I want. Sorry for the delay in reply to your 
question.
God Bless You
Jamal

> Hi guys,
i> s there any portugese origin to translate the comments in this class 
code 
t> o english for me?? I cannot leave the code alone. Why? Because I am a 
php 
c> ode monster.
H> ere is the code
<> ?php 
/> /    ========== 
/> /    Classes para criar tabelas em php 
/> /    ========== 
 >     
/> /    ---------- 
/> /    <TABLE> 
/> /    ---------- 
c> lass cTABLE 
{>  
 >    var $sAtributos = array ( 
 >            "ALIGN"=>"", 
 >            "BACKGROUND"=>"", 
 >            "BGCOLOR"=>"", 
 >            "BORDER"=>"", 
 >            "BORDERCOLOR"=>"", 
 >            "BORDERCOLORLIGHT"=>"", 
 >            "BORDERCOLORDARK"=>"", 
 >            "CELLPADDING"=>"", 
 >            "CELLSPACING"=>"", 
 >            "CLASS"=>"", 
 >            "COLS"=>"", 
 >            "DATAPAGESIZE"=>"", 
 >            "DATAFLD"=>"", 
 >            "DATASRC"=>"", 
 >            "FRAME"=>"", 
 >            "HEIGHT"=>"", 
 >            "ID"=>"", 
 >            "LANG"=>"", 
 >            "LANGUAGE"=>"", 
 >            "RULES"=>"", 
 >            "STYLE"=>"", 
 >            "TITLE"=>"", 
 >            "VALIGN"=>"", 
 >            "WIDTH"=>"" 
 >        ); 
 >    var    $sConteudo; 

>     //    ---------- 
 >    //    Coloca valor em algum atributo 
 >    //    ---------- 
 >    function poeAtributo( $sAtributo, $sValor ) 
 >    { 
 >        //    Existe o atributo informado? 
 >        if( array_key_exists( $sAtributo, $this->sAtributos ) ) 
 >            //    Sim. Coloca o valor nela. 
 >            $this->sAtributos["$sAtributo"] = $sValor; 
 >    } 

>     //    ---------- 
 >    //    Coloca valor no conteúdo 
 >    //    ---------- 
 >    function poeConteudo( $sConteudo ) 
 >    { 
 >        $this->sConteudo = $sConteudo; 
 >    } 
 >     
 >    //    ---------- 
 >    //    Limpa os atributos da tabela 
 >    //    ---------- 
 >    function limpaAtributos() 
 >    { 
 >        $iTotal    = 0; 
 >        $iPos    = 0; 
 >        $sAtributo = ""; 
 >         
 >        //    Limpa os atributos. 
 >        $iTotal = count( $this->sAtributos ); 
 >        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
 >        { 
 >            $sAtributo = key($this->sAtributos); 
 >            $this->sAtributos["$sAtributo"] = ""; 
 >            next($this->sAtributos); 
 >        } 
 >         
 >    } 

>     //    -------------------------- 
 >    //    Limpa o conteúdo da tabela 
 >    //    -------------------------- 
 >    function limpaConteudo() 
 >    { 
 >        $this->poeConteudo( "" ); 
 >    } 
 >     
 >    //    ---------- 
 >    //    Limpa a tabela 
 >    //    ---------- 
 >    function limpaTABLE() 
 >    { 
 >        $this->limpaAtributos(); 
 >        $this->limpaConteudo(); 
 >    } 
 >     
 >    //    ---------- 
 >    //    montaTABLE 
 >    //    ---------- 
 >    function montaTABLE() 
 >    { 
 >        $iPos = 0; 
 >        $iTotal = 0; 
 >        $sHTML =""; 
 >        $sAtributo = ""; 

>         //    Abre a tag 
 >        $sHTML .= sprintf( "<TABLE" ); 

>         //    Posiciona a matriz de atributos na primeira posição 
 >        reset($this->sAtributos); 

>         //    Coloca o atributo na tag se ele tiver algum valor. 
 >        $iTotal = count( $this->sAtributos ); 
 >        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
 >        { 
 >            $sAtributo = key($this->sAtributos); 
 >            if( $this->sAtributos["$sAtributo"] ) 
 >            { 
 >                $sAtributo = key($this->sAtributos); 
 >                $sHTML .= sprintf( " %s='%s'",  
 >                            $sAtributo ,  
 >                            $this->sAtributos["$sAtributo"] ); 
 >            } 
 >            next($this->sAtributos); 
 >        } 
 >                 
 >        //    Fecha a parte inicial da tag 
 >        $sHTML .= sprintf( ">n" ); 
 >         
 >        //    Coloca o miolo da tabela 
 >        $sHTML .= sprintf( "%s", $this->sConteudo ); 

>         //    Fecha a tag 
 >        $sHTML .= sprintf( "</TABLE>n" ); 
 >        return $sHTML; 
 >    } 
}>  

> //    ---------- 
/> /    <TR> 
/> /    ---------- 
c> lass cTR 
{>  
 >    var $sAtributos = array ( 
 >            "ALIGN"=>"", 
 >            "BACKGROUND"=>"", 
 >            "BGCOLOR"=>"", 
 >            "BORDERCOLOR"=>"", 
 >            "BORDERCOLORLIGHT"=>"", 
 >            "BORDERCOLORDARK"=>"", 
 >            "CLASS"=>"", 
 >            "ID"=>"", 
 >            "LANG"=>"", 
 >            "LANGUAGE"=>"", 
 >            "STYLE"=>"", 
 >            "TITLE"=>"", 
 >            "VALIGN"=>"" 
 >        ); 
 >    var    $sConteudo; 

>     //    ---------- 
 >    //    Coloca valor em algum atributo 
 >    //    ---------- 
 >    function poeAtributo( $sAtributo, $sValor ) 
 >    { 
 >        //    Existe o atributo informado? 
 >        if( array_key_exists( $sAtributo, $this->sAtributos ) ) 
 >            //    Sim. Coloca o valor nela. 
 >            $this->sAtributos["$sAtributo"] = $sValor; 
 >    } 

>     //    ---------- 
 >    //    Coloca valor no conteúdo 
 >    //    ---------- 
 >    function poeConteudo( $sConteudo ) 
 >    { 
 >        $this->sConteudo = $sConteudo; 
 >    } 
 >     
 >    //    ------------------------ 
 >    //    Limpa os atributos do TR 
 >    //    ------------------------ 
 >    function limpaAtributos() 
 >    { 
 >        $iTotal    = 0; 
 >        $iPos    = 0; 
 >        $sAtributo = ""; 
 >         
 >        //    Limpa os atributos. 
 >        $iTotal = count( $this->sAtributos ); 
 >        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
 >        { 
 >            $sAtributo = key($this->sAtributos); 
 >            $this->sAtributos["$sAtributo"] = ""; 
 >            next($this->sAtributos); 
 >        } 
 >         
 >    } 

>     //    ---------------------- 
 >    //    Limpa o conteúdo do TR 
 >    //    ---------------------- 
 >    function limpaConteudo() 
 >    { 
 >        $this->poeConteudo( "" ); 
 >    } 
 >     
 >    //    ---------- 
 >    //    Limpa o TR 
 >    //    ---------- 
 >    function limpaTR() 
 >    { 
 >        $this->limpaAtributos(); 
 >        $this->limpaConteudo(); 
 >    } 
 >     
 >    //    ---------- 
 >    //    montaTR 
 >    //    ---------- 
 >    function montaTR() 
 >    { 
 >        $iPos = 0; 
 >        $iTotal = 0; 
 >        $sHTML =""; 
 >        $sAtributo = ""; 

>         //    Abre a tag 
 >        $sHTML .= sprintf( "<TR" ); 

>         //    Posiciona a matriz de atributos na primeira posição 
 >        reset($this->sAtributos); 

>         //    Coloca o atributo na tag se ele tiver algum valor. 
 >        $iTotal = count( $this->sAtributos ); 
 >        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
 >        { 
 >            $sAtributo = key($this->sAtributos); 
 >            if( $this->sAtributos["$sAtributo"] ) 
 >            { 
 >                $sAtributo = key($this->sAtributos); 
 >                $sHTML .= sprintf( " %s='%s'",  
 >                            $sAtributo ,  
 >                            $this->sAtributos["$sAtributo"] ); 
 >            } 
 >            next($this->sAtributos); 
 >        } 
 >                 
 >        //    Fecha a parte inicial da tag 
 >        $sHTML .= sprintf( ">n" ); 
 >         
 >        //    Coloca o miolo da tabela 
 >        $sHTML .= sprintf( "%s", $this->sConteudo ); 

>         //    Fecha a tag 
 >        $sHTML .= sprintf( "</TR>n" ); 
 >        return $sHTML; 
 >    } 
}>  

> //    ---------- 
/> /    <TD> 
/> /    ---------- 
c> lass cTD 
{>  
 >    var $sAtributos = array ( 
 >            "ALIGN"=>"", 
 >            "BACKGROUND"=>"", 
 >            "BGCOLOR"=>"", 
 >            "BORDERCOLOR"=>"", 
 >            "BORDERCOLORLIGHT"=>"", 
 >            "BORDERCOLORDARK"=>"", 
 >            "CLASS"=>"", 
 >            "COLSPAN"=>"", 
 >            "HEIGHT"=>"", 
 >            "ID"=>"", 
 >            "LANG"=>"", 
 >            "LANGUAGE"=>"", 
 >            "NOWRAP"=>"", 
 >            "ROWSPAN"=>"", 
 >            "STYLE"=>"", 
 >            "TITLE"=>"", 
 >            "VALIGN"=>"", 
 >            "WIDTH"=>"" 
 >        ); 
 >    var    $sConteudo; 

>     //    ---------- 
 >    //    Coloca valor em algum atributo 
 >    //    ---------- 
 >    function poeAtributo( $sAtributo, $sValor ) 
 >    { 
 >        //    Existe o atributo informado? 
 >        if( array_key_exists( $sAtributo, $this->sAtributos ) ) 
 >            //    Sim. Coloca o valor nela. 
 >            $this->sAtributos["$sAtributo"] = $sValor; 
 >    } 

>     //    ---------- 
 >    //    Coloca valor no conteúdo 
 >    //    ---------- 
 >    function poeConteudo( $sConteudo ) 
 >    { 
 >        $this->sConteudo = $sConteudo; 
 >    } 
 >     
 >    //    ------------------------ 
 >    //    Limpa os atributos do TD 
 >    //    ------------------------ 
 >    function limpaAtributos() 
 >    { 
 >        $iTotal    = 0; 
 >        $iPos    = 0; 
 >        $sAtributo = ""; 
 >         
 >        //    Limpa os atributos. 
 >        $iTotal = count( $this->sAtributos ); 
 >        reset( $this->sAtributos); 
 >        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
 >        { 
 >            $sAtributo = key( $this->sAtributos ); 
 >            $this->sAtributos["$sAtributo"] = ""; 
 >            next($this->sAtributos); 
 >        } 
 >         
 >    } 

>     //    ---------------------- 
 >    //    Limpa o conteúdo do TD 
 >    //    ---------------------- 
 >    function limpaConteudo() 
 >    { 
 >        $this->poeConteudo( "" ); 
 >    } 
 >     
 >    //    ---------- 
 >    //    Limpa o TD 
 >    //    ---------- 
 >    function limpaTD() 
 >    { 
 >        $this->limpaAtributos(); 
 >        $this->limpaConteudo(); 
 >    } 
 >     
 >    //    ------- 
 >    //    montaTD 
 >    //    ------- 
 >    function montaTD() 
 >    { 
 >        $iPos = 0; 
 >        $iTotal = 0; 
 >        $sHTML =""; 
 >        $sAtributo = ""; 

>         //    Abre a tag 
 >        $sHTML .= sprintf( "<TD" ); 

>         //    Posiciona a matriz de atributos na primeira posição 
 >        reset($this->sAtributos); 

>         //    Coloca o atributo na tag se ele tiver algum valor. 
 >        $iTotal = count( $this->sAtributos ); 
 >        for( $iPos = 0; $iPos < $iTotal; $iPos++ ) 
 >        { 
 >            $sAtributo = key($this->sAtributos); 
 >            if( $this->sAtributos["$sAtributo"] ) 
 >            { 
 >                $sAtributo = key($this->sAtributos); 
 >                $sHTML .= sprintf( " %s='%s'",  
 >                            $sAtributo ,  
 >                            $this->sAtributos["$sAtributo"] ); 
 >            } 
 >            next($this->sAtributos); 
 >        } 
 >                 
 >        //    Fecha a parte inicial da tag 
 >        $sHTML .= sprintf( ">" ); 
 >         
 >        //    Coloca o miolo da tabela 
 >        $sHTML .= sprintf( "%s", $this->sConteudo ); 

>         //    Fecha a tag 
 >        $sHTML .= sprintf( "</TD>n" ); 
 >        return $sHTML; 
 >    } 
}>  
?> >

> 
t> hanks
j> amal
Message #6 by "Jamal" <new_mojam@y...> on Wed, 30 Oct 2002 21:01:03
hi Jorge
whoever you are and where ever you are I bless you deep down in mind with 
abundant blessings of God "The Mighty Everlastin Father.
Thanks for your support.
Jamal

> I'll try.... translation in english after the portuguese comments.


> <?php
> //    ==========
> //    Classes para criar tabelas em php
  //Class to create tables in php
> //    ==========
>
> //    ----------
> //    <TABLE>
> //    ----------
> class cTABLE
> {
    //an array called attributes
>     var $sAtributos = array (
>             "ALIGN"=>"",
>             "BACKGROUND"=>"",
>             "BGCOLOR"=>"",
>             "BORDER"=>"",
>             "BORDERCOLOR"=>"",
>             "BORDERCOLORLIGHT"=>"",
>             "BORDERCOLORDARK"=>"",
>             "CELLPADDING"=>"",
>             "CELLSPACING"=>"",
>             "CLASS"=>"",
>             "COLS"=>"",
>             "DATAPAGESIZE"=>"",
>             "DATAFLD"=>"",
>             "DATASRC"=>"",
>             "FRAME"=>"",
>             "HEIGHT"=>"",
>             "ID"=>"",
>             "LANG"=>"",
>             "LANGUAGE"=>"",
>             "RULES"=>"",
>             "STYLE"=>"",
>             "TITLE"=>"",
>             "VALIGN"=>"",
>             "WIDTH"=>""
>         );
>     var    $sConteudo; //a var called content
>
>     //    ----------
>     //    Coloca valor em algum atributo
      // assign a value to an attribute
>     //    ----------
>     function poeAtributo( $sAtributo, $sValor )  //funtion assign
attribute
>     {
>         //    Existe o atributo informado?
           //does attribute existe?
>         if( array_key_exists( $sAtributo, $this->sAtributos ) )
>             //    Sim. Coloca o valor nela.
              // yes. assign the value
>             $this->sAtributos["$sAtributo"] = $sValor;
>     }
>
>     //    ----------
>     //    Coloca valor no conteúdo
       //assign a value to var content
>     //    ----------
>     function poeConteudo( $sConteudo ) //function assign content
>     {
>         $this->sConteudo = $sConteudo;
>     }
>
>     //    ----------
>     //    Limpa os atributos da tabela
       //cleans the tables attributes
>     //    ----------
>     function limpaAtributos()  //function clean attributes
>     {
>         $iTotal    = 0;
>         $iPos    = 0;
>         $sAtributo = "";
>
>         //    Limpa os atributos.
            // cleans the attributes
>         $iTotal = count( $this->sAtributos );
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key($this->sAtributos);
>             $this->sAtributos["$sAtributo"] = "";
>             next($this->sAtributos);
>         }
>
>     }
>
>     //    --------------------------
>     //    Limpa o conteúdo da tabela
       // clean the table's content
>     //    --------------------------
>     function limpaConteudo()  //funtion clean table's content
>     {
>         $this->poeConteudo( "" );
>     }
>
>     //    ----------
>     //    Limpa a tabela
      // clean the table
>     //    ----------
>     function limpaTABLE()
>     {
>         $this->limpaAtributos();
>         $this->limpaConteudo();
>     }
>
>     //    ----------
>     //    montaTABLE
        //build table
>     //    ----------
>     function montaTABLE()  //funtion build table
>     {
>         $iPos = 0;
>         $iTotal = 0;
>         $sHTML ="";
>         $sAtributo = "";
>
>         //    Abre a tag
            // open the tag
>         $sHTML .= sprintf( "<TABLE" );
>
>         //    Posiciona a matriz de atributos na primeira posição
           // position the attribute's array to the first position
>         reset($this->sAtributos);
>
>         //    Coloca o atributo na tag se ele tiver algum valor.
          // assigns the attribute to the tag if it has any value
>         $iTotal = count( $this->sAtributos );
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key($this->sAtributos);
>             if( $this->sAtributos["$sAtributo"] )
>             {
>                 $sAtributo = key($this->sAtributos);
>                 $sHTML .= sprintf( " %s='%s'",
>                             $sAtributo ,
>                             $this->sAtributos["$sAtributo"] );
>             }
>             next($this->sAtributos);
>         }
>
>         //    Fecha a parte inicial da tag
            // closes initial parte of the tag
>         $sHTML .= sprintf( ">n" );
>
>         //    Coloca o miolo da tabela
            // assigns the content of the table
>         $sHTML .= sprintf( "%s", $this->sConteudo );
>
>         //    Fecha a tag
            // closes the tag
>         $sHTML .= sprintf( "</TABLE>n" );
>         return $sHTML;
>     }
> }
>
> //    ----------
> //    <TR>
> //    ----------
> class cTR
> {
>     var $sAtributos = array (
>             "ALIGN"=>"",
>             "BACKGROUND"=>"",
>             "BGCOLOR"=>"",
>             "BORDERCOLOR"=>"",
>             "BORDERCOLORLIGHT"=>"",
>             "BORDERCOLORDARK"=>"",
>             "CLASS"=>"",
>             "ID"=>"",
>             "LANG"=>"",
>             "LANGUAGE"=>"",
>             "STYLE"=>"",
>             "TITLE"=>"",
>             "VALIGN"=>""
>         );
>     var    $sConteudo;
>
>     //    ----------
>     //    Coloca valor em algum atributo
        // assigns a value to an attribute
>     //    ----------
>     function poeAtributo( $sAtributo, $sValor )  //function assign
attribute
>     {
>         //    Existe o atributo informado?
          //does the attribute existe?
>         if( array_key_exists( $sAtributo, $this->sAtributos ) )
>             //    Sim. Coloca o valor nela.
                Yes. Assign value
>             $this->sAtributos["$sAtributo"] = $sValor;
>     }
>
>     //    ----------
>     //    Coloca valor no conteúdo
        //assign a value to the content
>     //    ----------
>     function poeConteudo( $sConteudo )  ////function assign content
>     {
>         $this->sConteudo = $sConteudo;
>     }
>
>     //    ------------------------
>     //    Limpa os atributos do TR
        //cleans the TR's attributes
>     //    ------------------------
>     function limpaAtributos() ////function clean attributes
>     {
>         $iTotal    = 0;
>         $iPos    = 0;
>         $sAtributo = "";
>
>         //    Limpa os atributos.
            //cleans the attributes
>         $iTotal = count( $this->sAtributos );
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key($this->sAtributos);
>             $this->sAtributos["$sAtributo"] = "";
>             next($this->sAtributos);
>         }
>
>     }
>
>     //    ----------------------
>     //    Limpa o conteúdo do TR
        // //cleans the TR's content
>     //    ----------------------
>     function limpaConteudo()  //function clean content
>     {
>         $this->poeConteudo( "" );
>     }
>
>     //    ----------
>     //    Limpa o TR
        //cleans the TR
>     //    ----------
>     function limpaTR()  //function clean TR
>     {
>         $this->limpaAtributos();
>         $this->limpaConteudo();
>     }
>
>     //    ----------
>     //    montaTR
        //build TR
>     //    ----------
>     function montaTR()  //function build TR
>     {
>         $iPos = 0;
>         $iTotal = 0;
>         $sHTML ="";
>         $sAtributo = "";
>
>         //    Abre a tag
            // open the tag
>         $sHTML .= sprintf( "<TR" );
>
>         //    Posiciona a matriz de atributos na primeira posição
            // // position the attribute's array to the first position
>         reset($this->sAtributos);
>
>         //    Coloca o atributo na tag se ele tiver algum valor
            // assigns the attribute to the tag if has any value.
>         $iTotal = count( $this->sAtributos );
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key($this->sAtributos);
>             if( $this->sAtributos["$sAtributo"] )
>             {
>                 $sAtributo = key($this->sAtributos);
>                 $sHTML .= sprintf( " %s='%s'",
>                             $sAtributo ,
>                             $this->sAtributos["$sAtributo"] );
>             }
>             next($this->sAtributos);
>         }
>
>         //    Fecha a parte inicial da tag
            // closes tag's inicial parte
>         $sHTML .= sprintf( ">n" );
>
>         //    Coloca o miolo da tabela
            //assigns the content of the table
>         $sHTML .= sprintf( "%s", $this->sConteudo );
>
>         //    Fecha a tag
            //closes the tag
>         $sHTML .= sprintf( "</TR>n" );
>         return $sHTML;
>     }
> }
>
> //    ----------
> //    <TD>
> //    ----------
> class cTD
> {
>     var $sAtributos = array (
>             "ALIGN"=>"",
>             "BACKGROUND"=>"",
>             "BGCOLOR"=>"",
>             "BORDERCOLOR"=>"",
>             "BORDERCOLORLIGHT"=>"",
>             "BORDERCOLORDARK"=>"",
>             "CLASS"=>"",
>             "COLSPAN"=>"",
>             "HEIGHT"=>"",
>             "ID"=>"",
>             "LANG"=>"",
>             "LANGUAGE"=>"",
>             "NOWRAP"=>"",
>             "ROWSPAN"=>"",
>             "STYLE"=>"",
>             "TITLE"=>"",
>             "VALIGN"=>"",
>             "WIDTH"=>""
>         );
>     var    $sConteudo;
>
>     //    ----------
>     //    Coloca valor em algum atributo
        // assigns a value to an attribute
>     //    ----------
>     function poeAtributo( $sAtributo, $sValor )  //function assign
attribute
>     {
>         //    Existe o atributo informado?
            // does attribute exist?
>         if( array_key_exists( $sAtributo, $this->sAtributos ) )
>             //    Sim. Coloca o valor nela.
                // yes. assign value
>             $this->sAtributos["$sAtributo"] = $sValor;
>     }
>
>     //    ----------
>     //    Coloca valor no conteúdo
        //assign value to content
>     //    ----------
>     function poeConteudo( $sConteudo )  //function assign content
>     {
>         $this->sConteudo = $sConteudo;
>     }
>
>     //    ------------------------
>     //    Limpa os atributos do TD
        //cleans TD's attributes
>     //    ------------------------
>     function limpaAtributos()
>     {
>         $iTotal    = 0;
>         $iPos    = 0;
>         $sAtributo = "";
>
>         //    Limpa os atributos.
            // cleans the attributes
>         $iTotal = count( $this->sAtributos );
>         reset( $this->sAtributos);
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key( $this->sAtributos );
>             $this->sAtributos["$sAtributo"] = "";
>             next($this->sAtributos);
>         }
>
>     }
>
>     //    ----------------------
>     //    Limpa o conteúdo do TD
        //cleans the content of the TD
>     //    ----------------------
>     function limpaConteudo()
>     {
>         $this->poeConteudo( "" );
>     }
>
>     //    ----------
>     //    Limpa o TD
        //clean the TD
>     //    ----------
>     function limpaTD()
>     {
>         $this->limpaAtributos();
>         $this->limpaConteudo();
>     }
>
>     //    -------
>     //    montaTD
        // builds a TD
>     //    -------
>     function montaTD()
>     {
>         $iPos = 0;
>         $iTotal = 0;
>         $sHTML ="";
>         $sAtributo = "";
>
>         //    Abre a tag
            // opens the tag
>         $sHTML .= sprintf( "<TD" );
>
>         //    Posiciona a matriz de atributos na primeira posição
            // put the attribute's array to the first position
>         reset($this->sAtributos);
>
>         //    Coloca o atributo na tag se ele tiver algum valor.
            // assign the attribute to the tag if any value
>         $iTotal = count( $this->sAtributos );
>         for( $iPos = 0; $iPos < $iTotal; $iPos++ )
>         {
>             $sAtributo = key($this->sAtributos);
>             if( $this->sAtributos["$sAtributo"] )
>             {
>                 $sAtributo = key($this->sAtributos);
>                 $sHTML .= sprintf( " %s='%s'",
>                             $sAtributo ,
>                             $this->sAtributos["$sAtributo"] );
>             }
>             next($this->sAtributos);
>         }
>
>         //    Fecha a parte inicial da tag
            //close the inicial tag's parte
>         $sHTML .= sprintf( ">" );
>
>         //    Coloca o miolo da tabela
            // put the table's content
>         $sHTML .= sprintf( "%s", $this->sConteudo );
>
>         //    Fecha a tag
           //close the tag
>         $sHTML .= sprintf( "</TD>n" );
>         return $sHTML;
>     }
> }
> ?>


  Return to Index