// build the top of our HTML page xbuf_xcat(reply, "" "Loan Calculator" "" "" "

Dear %s, your loan goes as follows:


", (*szName && *szName != '-') ? szName : "client"); xbuf_xcat(reply, "" "" "" "" "" "" "
loandetails
Amount%.2F
Rate%.2F%%
Term%u %s(s)
Cost%.2F (%.2F%%)
", amount, rate * 100, ((u32)term)?((u32)term):uceil(12 * term), ((u32)term)?"year":"month", cost, 100 / (amount / cost)); xbuf_xcat(reply, "
" "
YEAR %u
" "" "" "", year);
monthpaymentinterestprincipalbalance