tpl = new TemplatePower ($tplFile); $this->tpl->prepare (); $this->parse(); $this->tpl->printToScreen (); } public function parse() { $this->tpl->assign ("indexactive"," class=\"active\""); $this->tpl->assign ("pagetitle","MessagesWithValue"); $attr = array(); $attr["paid"] = 1; $messages = Record::getLastRecordsFiltered(10,$attr,"Message"); foreach($messages as $message) { $this->tpl->newblock ("message"); $this->tpl->assign ("text",$message->text); $this->tpl->assign ("name",$message->name); if($message->url!="" && $message->url!="http://" && $message->url!="https://") { $this->tpl->assign ("urlbegin","url."\" rel=\"external\">"); $this->tpl->assign ("urlend",""); } $this->tpl->assign ("date",DateHelper::toDate($message->date)); } } } $index = new Index(); ?>