p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: RES: Re: I am a php code MONSTER


Message #1 by "Rodrigo Penloski - Som Livre.com" <Rodrigo@s...> on Wed, 30 Oct 2002 15:27:28 -0300
Was that?
Just to translate to Portuguese?
Ok, next time leave it to me, I'm brazilian... I'm still learning php,
but I'm fluent on portuguese...

Ps. Jamal where are you from?
=C1frica?

-----Mensagem original-----
De: Jamal [mailto:new_mojam@y...]
Enviada em: quarta-feira, 30 de outubro de 2002 14:19
Para: beginning php
Assunto: [beginning_php] Re: I am a php code MONSTER


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
/> /    =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
/> /    Classes para criar tabelas em php
/> /    =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 >    
/> /    ----------
/> /    <TABLE>
/> /    ----------
c> lass cTABLE
{> 
 >    var $sAtributos =3D array (
 >            "ALIGN"=3D>"",
 >            "BACKGROUND"=3D>"",
 >            "BGCOLOR"=3D>"",
 >            "BORDER"=3D>"",
 >            "BORDERCOLOR"=3D>"",
 >            "BORDERCOLORLIGHT"=3D>"",
 >            "BORDERCOLORDARK"=3D>"",
 >            "CELLPADDING"=3D>"",
 >            "CELLSPACING"=3D>"",
 >            "CLASS"=3D>"",
 >            "COLS"=3D>"",
 >            "DATAPAGESIZE"=3D>"",
 >            "DATAFLD"=3D>"",
 >            "DATASRC"=3D>"",
 >            "FRAME"=3D>"",
 >            "HEIGHT"=3D>"",
 >            "ID"=3D>"",
 >            "LANG"=3D>"",
 >            "LANGUAGE"=3D>"",
 >            "RULES"=3D>"",
 >            "STYLE"=3D>"",
 >            "TITLE"=3D>"",
 >            "VALIGN"=3D>"",
 >            "WIDTH"=3D>""
 >        );
 >    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"] =3D $sValor;
 >    }

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

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

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

>         //    Posiciona a matriz de atributos na primeira posi=E7=E3o
 >        reset($this->sAtributos);

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

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

> //    ----------
/> /    <TR>
/> /    ----------
c> lass cTR
{> 
 >    var $sAtributos =3D array (
 >            "ALIGN"=3D>"",
 >            "BACKGROUND"=3D>"",
 >            "BGCOLOR"=3D>"",
 >            "BORDERCOLOR"=3D>"",
 >            "BORDERCOLORLIGHT"=3D>"",
 >            "BORDERCOLORDARK"=3D>"",
 >            "CLASS"=3D>"",
 >            "ID"=3D>"",
 >            "LANG"=3D>"",
 >            "LANGUAGE"=3D>"",
 >            "STYLE"=3D>"",
 >            "TITLE"=3D>"",
 >            "VALIGN"=3D>""
 >        );
 >    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"] =3D $sValor;
 >    }

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

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

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

>         //    Posiciona a matriz de atributos na primeira posi=E7=E3o
 >        reset($this->sAtributos);

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

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

> //    ----------
/> /    <TD>
/> /    ----------
c> lass cTD
{> 
 >    var $sAtributos =3D array (
 >            "ALIGN"=3D>"",
 >            "BACKGROUND"=3D>"",
 >            "BGCOLOR"=3D>"",
 >            "BORDERCOLOR"=3D>"",
 >            "BORDERCOLORLIGHT"=3D>"",
 >            "BORDERCOLORDARK"=3D>"",
 >            "CLASS"=3D>"",
 >            "COLSPAN"=3D>"",
 >            "HEIGHT"=3D>"",
 >            "ID"=3D>"",
 >            "LANG"=3D>"",
 >            "LANGUAGE"=3D>"",
 >            "NOWRAP"=3D>"",
 >            "ROWSPAN"=3D>"",
 >            "STYLE"=3D>"",
 >            "TITLE"=3D>"",
 >            "VALIGN"=3D>"",
 >            "WIDTH"=3D>""
 >        );
 >    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"] =3D $sValor;
 >    }

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

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

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

>         //    Posiciona a matriz de atributos na primeira posi=E7=E3o
 >        reset($this->sAtributos);

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

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

>
t> hanks
j> amal
Message #2 by "jorge" <jorge@d...> on Thu, 31 Oct 2002 15:38:27 -0600
Rodrigo r U doing it or should I ?
Regards

Jorge
----- Original Message -----
From: "Rodrigo Penloski - Som Livre.com" <Rodrigo@s...>
To: "beginning php" <beginning_php@p...>
Sent: Wednesday, October 30, 2002 12:27 PM
Subject: [beginning_php] RES: Re: I am a php code MONSTER


> Was that?
> Just to translate to Portuguese?
> Ok, next time leave it to me, I'm brazilian... I'm still learning php,
> but I'm fluent on portuguese...
>
> Ps. Jamal where are you from?
> África?
>
> -----Mensagem original-----
> De: Jamal [mailto:new_mojam@y...]
> Enviada em: quarta-feira, 30 de outubro de 2002 14:19
> Para: beginning php
> Assunto: [beginning_php] Re: I am a php code MONSTER
>
>
> 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
>
>



  Return to Index