cs_putch
- Messages postés
-
624
- Date d'inscription
- mardi 6 mai 2003
- Statut
- Membre
- Dernière intervention
- 14 décembre 2009
1
6 déc. 2005 à 16:54
c'est la justement que je bloque !
j'en suis à la lecture des balises et donc
qu'est ce que je dois faire si c'est un TABLE, un TR ou un TD et de meme pour les fins de ses balises ...
function OpenTag($tag,$attr)
{
//Balise ouvrante
if($tag= ='B' or $tag=='I' or $tag=='U')
$this->SetStyle($tag,true);
if($tag=='A')
$this->HREF=$attr['HREF'];
if($tag=='BR')
$this->Ln(4);
if($tag=='IMG')
$this->PutLink($attr['SRC'],'[ Image ]');
if($tag=='FONT')
{
switch(strtolower($attr['COLOR']))
{
case "red":
$this->SetTextColor(255,0,0);
break;
case "darkred":
$this->SetTextColor(139,0,0); break;
case "orange":
$this->SetTextColor(255,165,0); break;
case "brown":
$this->SetTextColor(165,42,42); break;
case "yellow":
$this->SetTextColor(255,255,0); break;
case "green":
$this->SetTextColor(0,128,0); break;
case "olive":
$this->SetTextColor(128,128,0); break;
case "cyan":
$this->SetTextColor(0,255,255); break;
case "blue":
$this->SetTextColor(0,0,255); break;
case
"darkblue": $this->SetTextColor(0,0,139); break;
case "indigo":
$this->SetTextColor(75,0,130); break;
case "violet":
$this->SetTextColor(238,130,238); break;
case "white":
$this->SetTextColor(0,0,0); break;
case "black":
$this->SetTextColor(0,0,0); break;
case
"cadetblue": $this->SetTextColor(95,158,160);
break;
case "coral":
$this->SetTextColor(255,127,80); break;
case "crimson":
$this->SetTextColor(220,20,60); break;
case "tomato":
$this->SetTextColor(255,99,71); break;
case
"seagreen": $this->SetTextColor(46,139,87); break;
case
"darkorchid": $this->SetTextColor(153,50,204);
break;
case
"chocolate": $this->SetTextColor(210,105,30);
break;
case
"deepskyblue": $this->SetTextColor(0,191,255);
break;
case "gold":
$this->SetTextColor(255,215,0); break;
case "grey":
$this->SetTextColor(128,128,128); break;
case
"midnightblue":$this->SetTextColor(25,25,112); break;
case
"darkgreen": $this->SetTextColor(0,100,0); break;
default:
$this->SetTextColor(0);
}
switch(strtolower($attr['SIZE']))
{
case '7':
$this->SetFont('Arial','',6); break;
case '9':
$this->SetFont('Arial','',7); break;
case '12':
$this->SetFont('Arial','',8); break;
case '18':
$this->SetFont('Arial','',10); break;
case '24':
$this->SetFont('Arial','',12); break;
default:
$this->SetFont('Arial','',9);
}
}
if($tag=='TD')
{
???
}
}
function CloseTag($tag)
{
//Balise fermante
if($tag =='B' or $tag=='I' or $tag=='U')
$this->SetStyle($tag,false);
if($tag=='A')
$this->HREF='';
if($tag=='FONTC')
{
$this->SetTextColor(0);
}
if($tag=='FONTS')
{
$this->SetFont('Arial','',8);
}
}