*/
function error($error = null)
{
- global $bugsys;
- global $doctype, $header, $headinclude, $footer, $focus, $show, $stylevar;
-
if ($error == null)
{
$error = $this->errorBox;
}
- eval('$bugsys->template->flush("' . $bugsys->template->fetch('std_error') . '");');
+ $tpl = new BSTemplate('std_error');
+ $tpl->vars = array('error' => $error);
+ $tpl->evaluate()->flush();
exit;
}
*/
function redirect($message, $url)
{
- global $bugsys;
- global $doctype, $header, $headinclude, $footer, $focus, $show, $stylevar;
-
if (bugdar::$options['redirectheaders'])
{
header("Location: $url");
exit;
}
- eval('$bugsys->template->flush("' . $bugsys->template->fetch('std_redirect') . '");');
+ $tpl = new BSTemplate('std_redirect');
+ $tpl->vars = array(
+ 'message' => $message,
+ 'url' => $url
+ );
+ $tpl->evaluate()->flush();
exit;
}
*/
function message($message)
{
- global $bugsys;
- global $doctype, $header, $headinclude, $footer, $focus, $show, $stylevar;
-
- eval('$bugsys->template->flush("' . $bugsys->template->fetch('std_message') . '");');
+ $tpl = new BSTemplate('std_message');
+ $tpl->vars = array(
+ 'message' => $message
+ );
+ $tpl->evaluate()->flush();
exit;
}
*/
function confirm($message, $action, $do, $button, $cancel, $arrextra)
{
- global $bugsys;
- global $doctype, $header, $headinclude, $footer, $focus, $show, $stylevar;
+ global $show;
$show['confirm'] = true;
- foreach ($arrextra AS $name => $value)
+ foreach ($arrextra as $name => $value)
{
$extra .= '<input type="hidden" name="' . $name . '" value="' . $value . '" />' . "\n";
}
- eval('$bugsys->template->flush("' . $bugsys->template->fetch('std_message') . '");');
+ $tpl = new BSTemplate('std_confirm');
+ $tpl->vars = array(
+ 'message' => $message,
+ 'action' => $action,
+ 'do' => $do,
+ 'button' => $button,
+ 'cancel' => $cancel,
+ 'extra' => $extra
+ );
+ $tpl->evaluate()->flush();
exit;
}
}