Esempio n. 1
0
 public function Display()
 {
     global $config, $lpaths;
     // render header/footer
     $this->outputs['header'] = RenderHTML::LoadHTML('header.php');
     $this->outputs['footer'] = RenderHTML::LoadHTML('footer.php');
     $this->outputs['header'] = str_replace('{AddToHeader}', $this->tempHeader, $this->outputs['header']);
     // insert css
     $this->outputs['css'] = trim($this->outputs['css']);
     if (!empty($this->outputs['css'])) {
         $this->outputs['css'] = "\n" . $this->outputs['css'] . "\n";
     }
     $this->outputs['header'] = str_replace('{css}', $this->outputs['css'], $this->outputs['header']);
     // common tags
     $this->tags['site title'] = $config['site title'];
     $this->tags['page title'] = $config['title'];
     $this->tags['lastpage'] = getLastPage();
     $this->tags['sitepage title'] = $config['site title'] . (empty($config['title']) ? '' : ' - ' . $config['title']);
     $this->tags['token'] = CSRF::getTokenURL();
     $this->tags['token form'] = CSRF::getTokenForm();
     // finish rendering page
     $output = $this->outputs['header'] . "\n" . $this->outputs['body'] . "\n" . $this->outputs['footer'] . "\n";
     RenderHTML::RenderTags($output, $this->tags);
     echo $output;
     unset($output, $this->outputs);
 }