<?php

class Page {
   var
$Title;
   var
$Heading;
   var
$Content;
   var
$Text;
   var
$Bgcolor;

   function
Source() {
     
$S='<HTML><HEAD><TITLE>'.$this->Title.'</TITLE></HEAD>';
    
$S.= '<BODY Text="'.$this->Text.'" Bgcolor="'.$this->Bgcolor.'">';;
     
$S.='<H1>'.$this->Heading.'</H1>';
     
$S.=$this->Content;
    
$S.='<HR>'.date('j.m.Y');
    
$S.='</BODY></HTML>';
     echo
$S;
    
$fp = fopen('index.htm', 'wb'); //luuakse tühi fail
    
fwrite($fp, $S);
    
fclose($fp);
   }

   function
Page($Title = '', $Heading = '', $Content = '', $Text = '', $Bgcolor = '') {
     
$this->Title = $Title;
     
$this->Heading = $Heading;
     
$this->Content = $Content;
    
$this->Text = $Text;
    
$this->Bgcolor = $Bgcolor;

   }
}
?>