summaryrefslogtreecommitdiffstats
path: root/templates/phpexec.inc.php
blob: 0d0404d48f4b7f10140e0e210a11f12854bf9cda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?PHP
  require_once('code/message.inc.php');
  require_once('code/links.inc.php');
  
  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;
?>