summaryrefslogtreecommitdiffstats
path: root/templates/phpexec.inc.php
blob: 3e542df5c20c39e562c2f7622a43c727f2922145 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?PHP
  Uses('message', 'links');
  
  class phpexec_template {
    function Get($data) {
      $title = strtr($data['_page'], array(':' => ' - '));
      
      ob_start();
      
      eval('?>' . $data['code']);
      
      $content = ob_get_contents();
      ob_end_clean();
      
      return array('title' => $title, 'content' => $content);
    }
  }
  
  $GLOBALS['templates']['phpexec'] = new phpexec_template;
?>