class style
{
var $text;
var $alink;
var $vlink;
var $link;
var $bgcol;
var $face;
var $size;
var $align;
var $valign;
function style($text="#000000",$alink="#aaooaa",$vlink="#aa00aa",$link="#3333ff",$bgcol="#999999",
$face="verdana",$size=3,$align="center",$valign="top")
{
$this->text=$text;
$this->alink=$alink;
$this->vlink=$vlink;
$this->link=$link;
$this->bgcol=$bgcol;
$this->face=$face;
$this->size=$size;
$this->align=$align;
$this->valign=$valign;
}
function set($var,$value)
{
$this->$var=$value;
}
function body()
{
print"<body bgcolor=\"$this->bgcol\"";
print"text=\"$this->text\""."link=\"$this->link\"><font ". "face=\"$this->face\" size=\"$this->size\">\n";
}
function textout($message=" ")
{
print "<font face=\"$this->face\" color=\"$this->text\" size=$this->size > $message </font>\n";
}
function tdout($mess=" ",$colspan=1,$bgcol="#ffffff")
{
print"<td colspan=$colspan bgcolor=$bgcol";
print"align=\"$this->align\" valign=\"$this->valign\">";
$this->textout($mess);
print"</td>\n";
}
function trout($message=" ")
{
print"<tr>\n";
$cell=explode("|",$message);
$cellcount=count($cell);
$i=0;
while($i<$cellcount)
{
list($message,$span)=explode(":",$cell[$i]);
if (strlen($message)<1)
$message=" ";
if ($span)
{
$this->tdout($message,$span);
}
else
{$this->tdout($message);}
$i++;
}
print"</td>\n";
}
} |