X-Git-Url: https://git.p6c8.net/form-email.git/blobdiff_plain/e727168305eaf781e5640690a0369eaa4614ffc6..c715b5507a92eea0180b640db399e0144e100bf6:/form-email/functions.php?ds=sidebyside diff --git a/form-email/functions.php b/form-email/functions.php index d8d6f71..2374b7b 100644 --- a/form-email/functions.php +++ b/form-email/functions.php @@ -7,7 +7,7 @@ # geschrieben wurde. # # Autor: Patrick Canterino -# Letzte Aenderung: 3.12.2011 +# Letzte Aenderung: 12.12.2011 # # Copyright (C) 2002-2011 Patrick Canterino # @@ -103,13 +103,21 @@ function semicolon_split($string) { # # Parameter: Fehlermeldung -function show_fatal(&$errmsg) { +function show_fatal(&$errmsg,$vars=array()) { global $tpl_fatal; $tpl = new Template; $tpl->read_file($tpl_fatal); - $tpl->fillin('ERROR',$errmsg); + if(sizeof($vars) > 0) { + while(list($var,$content) = each($vars)) { + $errmsg = str_replace('{'.htmlspecialchars($var).'}',htmlspecialchars($content),$errmsg); + } + } + + $tpl->set_var('ERROR',$errmsg); + + $tpl->parse(); print $tpl->get_template(); exit;