- $Page = $GLOBALS['Page'];
- $Args = $GLOBALS['Args'] . $params;
- include "$name.php";
- $html = ob_get_clean();
+ $Page = $GLOBALS['Page'] . $GLOBALS['Args'];
+ $Args = '';
+ $Place = $GLOBALS['Place'];
+ foreach (explode(' ', $params) as $param) {
+ if ($set = strpos($param, '=')) {
+ $Place[ substr($param, 0, $set) ] = substr($param, $set + 1);
+ }
+ elseif (!empty($param)) {
+ $Args .= '/'.$param;
+ }
+ }
+ try {
+ include "$name.php";
+ $html = ob_get_clean();
+ }
+ catch (Exception $e) {
+ $html = sprintf('<strong class="warn">%s</strong>',
+ "fout in <em>$name</em>: {$e->getMessage()}"
+ );
+ }