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; ?>