Example #1
0
 function frog_tags_main($page)
 {
     $content = FrogTagsHacks::get_page_layout($page);
     $parser = new FrogTagsParser($page);
     $content = $parser->parse($content);
     echo $content;
 }
Example #2
0
 public function tag_include()
 {
     $filename = $this->require_argument('file');
     $public = realpath(FROG_ROOT . '/public/');
     $filename = realpath($public . '/' . $filename);
     if (substr_compare($public, $filename, 0, strlen($public)) != 0) {
         throw new Exception('Only files in the public directory are allowed to be included!');
     }
     $content = file_get_contents($filename);
     $content = FrogTagsHacks::execute($content, $this->page);
     /*		if (ALLOW_PHP) {
     			ob_start();
     			eval('?>'.$content);
     			$string = ob_get_contents();
     			ob_end_clean();
     		}*/
     $content = $this->parse($content, $this);
     return $content;
 }