X-Git-Url: https://git.p6c8.net/form-email.git/blobdiff_plain/20040faad95ad57d60b149ed262f92b3a6eee100..cecad9c666f3f19827ee52ad1032e7fa91b7137e:/form-email/mailer.php diff --git a/form-email/mailer.php b/form-email/mailer.php index 93fd0cb..3133919 100644 --- a/form-email/mailer.php +++ b/form-email/mailer.php @@ -7,7 +7,7 @@ # geschrieben wurde. # # Autor: Patrick Canterino -# Letzte Aenderung: 27.12.2011 +# Letzte Aenderung: 02.01.2012 # # Copyright (C) 2002-2011 Patrick Canterino # @@ -410,6 +410,19 @@ else { $stpl->set_var('TEXT', plain($text)); $stpl->set_var('TIME', plain($time)); + reset($user_fields); + + while(list($user_field,$user_field_data) = each($user_fields)) { + if(isset($user_field_data['tpl_var']) && $user_field_data['tpl_var'] != '') { + $tpl_var = $user_field_data['tpl_var']; + } + else { + $tpl_var = 'USER_'.$user_field; + } + + $stpl->set_var($tpl_var,htmlspecialchars(formdata($user_field))); + } + $stpl->parse(); print $stpl->get_template();