<?php
ini_set ( 'error_reporting' , E_ALL & ~
E_STRICT & ~E_DEPRECATED
) ; // & ~E_NOTICE
ini_set ( 'default_charset' , CHARSET
) ;
header ( 'Content-Type: text/html; charset=' . CHARSET
) ;
array ( 'tro_Qtd' => 1 , 'bri_Desc' => 'test 1' ) , array ( 'tro_Qtd' => 1 , 'bri_Desc' => 'test 2' ) , array ( 'tro_Qtd' => 1 , 'bri_Desc' => 'test 2' ) , ) ;
$nome = 'foo' ;
$numTroca = 'foo 1' ;
$strDestin = 'foo 2' ;
$html = "<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://w...content-available-to-author-only...3.org/TR/html4/loose.dtd'>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'/>
<title>Email html</title>
</head>
<body style='margin: 0; padding: 0;'>
<!-- Tabela grande extrena -->
<table border='0' width='100%' c ellpadding='0' cellspacing='0'>
<tr>
<td>
<!-- Tabela interna 1 com 600px -->
<table border='1' align='center' width='600px' style='border-collapse: collapse;' cellpadding='0' cellspacing='0'>
<tr><td colspan='2' align='center' style='padding: 30px 0 30px 0;'><img src='http://z...content-available-to-author-only...m.br/gui/Imagens/Logo_eMail.png' alt='Zoiha' width='50' height='50' style='display: block;' /></td></tr>
<tr>
<td style='padding:30px 30px 30px 30px'>
<!-- Tabela mais interna-->
<table border='1' cellpadding='0' cellspacing='0' width='100%'>
<tr><td colspan='2'><p>Olá, " . $nome . "!<br>Seu pedido foi realizado com sucesso no portal da Zoiha, conforme detalhes abaixo:<br><br></p></td></tr>
<tr><th colspan='2' bgcolor='#9CC6F7'>DETALHAMENTO DE PEDIDO</th></tr>
<tr><td colspan='2'>PEDIDO n. : " . $numTroca . "</td></tr>
<tr><td colspan='2'>DESTINATÁRIO : " . $strDestin . "</td></tr>
<tr><td bgcolor='#9CC6F7' align='center' width='15%'><b>QTD</b></td><td bgcolor='#9CC6F7' align='center' width='85%'><b>DESCRIÇÃO</b></td></tr>" ;
//MONTAGEM DINÂMICA DO MEIO DA TABELA
foreach ( $resTroca as $value ) {
$html .= "<tr><td width='15%'>" . $value [ 'tro_Qtd' ] . "</td><td width='85%'>" . $value [ 'bri_Desc' ] . "</td></tr>" ;
}
$html .= "</table>" ;
$html .= "</td>
</tr>
<tr><td><p><br>Gratos pela preferência, logo mais você receberá novo email com instruções e endereço de retirada do brinde.<br>Atenciosamente, <br>Zoiha</p></td></tr>
</table>
<!-- Fim da Tabela 1 -->
</td>
</tr>
</table>
<!-- Fim da Tabela grande externa -->
</body>
</html>" ;
PD9waHAKZGF0ZV9kZWZhdWx0X3RpbWV6b25lX3NldCgnQXNpYS9Ub2t5bycpOwoKaW5pX3NldCgnZXJyb3JfcmVwb3J0aW5nJywgRV9BTEwgJiB+RV9TVFJJQ1QgJiB+RV9ERVBSRUNBVEVEKTsgLy8gJiB+RV9OT1RJQ0UKaW5pX3NldCgnbG9nX2Vycm9ycycsIHRydWUpOwppbmlfc2V0KCdodG1sX2Vycm9ycycsIGZhbHNlKTsKaW5pX3NldCgnZGlzcGxheV9lcnJvcnMnLCB0cnVlKTsKCmRlZmluZSgnQ0hBUlNFVCcsICdVVEYtOCcpOwoKaW5pX3NldCgnZGVmYXVsdF9jaGFyc2V0JywgQ0hBUlNFVCk7Cm1iX2h0dHBfb3V0cHV0KENIQVJTRVQpOwptYl9pbnRlcm5hbF9lbmNvZGluZyhDSEFSU0VUKTsKCmhlYWRlcignQ29udGVudC1UeXBlOiB0ZXh0L2h0bWw7IGNoYXJzZXQ9Jy5DSEFSU0VUKTsKCiRyZXNUcm9jYSA9IGFycmF5KAoJYXJyYXkoJ3Ryb19RdGQnID0+IDEsICdicmlfRGVzYycgPT4gJ3Rlc3QgMScpLAoJYXJyYXkoJ3Ryb19RdGQnID0+IDEsICdicmlfRGVzYycgPT4gJ3Rlc3QgMicpLAoJYXJyYXkoJ3Ryb19RdGQnID0+IDEsICdicmlfRGVzYycgPT4gJ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gICAgPHRyPjx0ZCBjb2xzcGFuPScyJyBhbGlnbj0nY2VudGVyJyBzdHlsZT0ncGFkZGluZzogMzBweCAwIDMwcHggMDsnPjxpbWcgc3JjPSdodHRwOi8vei4uLmNvbnRlbnQtYXZhaWxhYmxlLXRvLWF1dGhvci1vbmx5Li4ubS5ici9ndWkvSW1hZ2Vucy9Mb2dvX2VNYWlsLnBuZycgYWx0PSdab2loYScgd2lkdGg9JzUwJyBoZWlnaHQ9JzUwJyBzdHlsZT0nZGlzcGxheTogYmxvY2s7JyAvPjwvdGQ+PC90cj4KICAgICAgICAgICAgICAgICAgICAgICAgIDx0cj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBzdHlsZT0ncGFkZGluZzozMHB4IDMwcHggMzBweCAzMHB4Jz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8IS0tIFRhYmVsYSBtYWlzIGludGVybmEtLT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGFibGUgYm9yZGVyPScxJyBjZWxscGFkZGluZz0nMCcgY2VsbHNwYWNpbmc9JzAnIHdpZHRoPScxMDAlJz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0cj48dGQgY29sc3Bhbj0nMic+PHA+T2zDoSwgIi4kbm9tZS4iITxicj5TZXUgcGVkaWRvIGZvaSByZWFsaXphZG8gY29tIHN1Y2Vzc28gbm8gcG9ydGFsIGRhIFpvaWhhLCBjb25mb3JtZSBkZXRhbGhlcyBhYmFpeG86PGJyPjxicj48L3A+PC90ZD48L3RyPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRyPjx0aCBjb2xzcGFuPScyJyBiZ2NvbG9yPScjOUNDNkY3Jz5ERVRBTEhBTUVOVE8gREUgUEVESURPPC90aD48L3RyPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRyPjx0ZCBjb2xzcGFuPScyJz5QRURJRE8gbi4gOiAiLiRudW1Ucm9jYS4iPC90ZD48L3RyPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRyPjx0ZCBjb2xzcGFuPScyJz5ERVNUSU5BVMOBUklPIDogIi4kc3RyRGVzdGluLiI8L3RkPjwvdHI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHI+PHRkIGJnY29sb3I9JyM5Q0M2RjcnIGFsaWduPSdjZW50ZXInIHdpZHRoPScxNSUnPjxiPlFURDwvYj48L3RkPjx0ZCBiZ2NvbG9yPScjOUNDNkY3JyBhbGlnbj0nY2VudGVyJyB3aWR0aD0nODUlJz48Yj5ERVNDUknDh8ODTzwvYj48L3RkPjwvdHI+IjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vTU9OVEFHRU0gRElOw4JNSUNBIERPIE1FSU8gREEgVEFCRUxBCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoICgkcmVzVHJvY2EgYXMgJHZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGh0bWwgLj0gIjx0cj48dGQgd2lkdGg9JzE1JSc+Ii4kdmFsdWVbJ3Ryb19RdGQnXS4iPC90ZD48dGQgd2lkdGg9Jzg1JSc+Ii4kdmFsdWVbJ2JyaV9EZXNjJ10uIjwvdGQ+PC90cj4iOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICRodG1sIC49IjwvdGFibGU+IjsKICAgICAgICAgICAgICAgICRodG1sIC49IjwvdGQ+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgICAgICAgICAgIDx0cj48dGQ+PHA+PGJyPkdyYXRvcyBwZWxhIHByZWZlcsOqbmNpYSwgbG9nbyBtYWlzIHZvY8OqIHJlY2ViZXLDoSBub3ZvIGVtYWlsIGNvbSBpbnN0cnXDp8O1ZXMgZSBlbmRlcmXDp28gZGUgcmV0aXJhZGEgZG8gYnJpbmRlLjxicj5BdGVuY2lvc2FtZW50ZSwgPGJyPlpvaWhhPC9wPjwvdGQ+PC90cj4KICAgICAgICAgICAgICAgICAgICA8L3RhYmxlPgogICAgICAgICAgICAgICAgPCEtLSBGaW0gZGEgVGFiZWxhIDEgLS0+CiAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICA8L3RyPgogICAgICAgIDwvdGFibGU+CiAgICA8IS0tIEZpbSBkYSBUYWJlbGEgZ3JhbmRlIGV4dGVybmEgLS0+CiAgICA8L2JvZHk+CjwvaHRtbD4iOwoKCmVjaG8gY2h1bmtfc3BsaXQoJGh0bWwsIDY0KTs=