Specifications

var $keywords = “TLA Consulting, Three Letter Abbreviation,
some of my best friends are search engines”;
var $buttons = array( “Home” => “home.php”,
“Contact” => “contact.php”,
“Services” => “services.php”,
“Site Map” => “map.php”
);
// class Page’s operations
function SetContent($newcontent)
{
$this->content = $newcontent;
}
function SetTitle($newtitle)
{
$this->title = $newtitle;
}
function SetKeywords($newkeywords)
{
$this->keywords = $newkeywords;
}
function SetButtons($newbuttons)
{
$this->buttons = $newbuttons;
}
function Display()
{
echo “<html>\n<head>\n”;
$this -> DisplayTitle();
$this -> DisplayKeywords();
$this -> DisplayStyles();
echo “</head>\n<body>\n”;
$this -> DisplayHeader();
$this -> DisplayMenu($this->buttons);
echo $this->content;
$this -> DisplayFooter();
echo “</body>\n</html>\n”;
}
Using PHP
P
ART I
162
LISTING 6.1 Continued
08 7842 CH06 3/6/01 3:34 PM Page 162