fid = $fid; $sfpt = new SharedFootprint($fid); $this->sharedfootprint = $sfpt; $tr = new PHPTAL_GetTextTranslator(); $language = constant('LOCALE_EST'); $tr->setLanguage($language.DEFAULT_ENCODING, $language.DEFAULT_ENCODING); $tr->addDomain('kesa', 'i18n'); $tr->useDomain('kesa'); $this->translator = $tr; if ($sfpt->getShared()) { $this->template = "footprint_widget.html"; } else { $this->template = "footprint_not_shared.html"; } } function finalize() { $templ = new PHPTAL(); $templ->setTemplateRepository("templates/"); $templ->setTemplate($this->template); $templ->setTranslator($this->translator); $templ->here = $this->sharedfootprint; $templ->request = $_GET; echo $templ->execute(); } } if (isset($_GET['id']) && is_numeric($_GET['id'])) { $shared_footprint = new SharedFootprintWidget($_GET['id']); $shared_footprint->finalize(); } else { echo "Vabandust! Kood on nihu läinud, kopeeri avaldamise lehelt uuesti."; } ?>