<?php
$html_template = '<style>
    html {
        width: 100%
    }

    ::-moz-selection {
        background: #fff;
        color: #fff;
        text-shadow: 1px 1px 0 #f22b0e
    }

    ::selection {
        background: #fff;
        color: #fff;
        text-shadow: 1px 1px 0 #f22b0e
    }

    body {
        background-color: #fff;
        margin: 0;
        padding: 0
    }

    .ReadMsgBody {
        width: 100%;
        background-color: #fff
    }

    .ExternalClass {
        width: 100%;
        background-color: #fff
    }

    a {
        color: #fff;
        text-decoration: none;
        font-weight: 400;
        font-style: normal
    }

    a:hover {
        color: #262626;
        text-decoration: none;
        font-weight: 400;
        font-style: normal
    }

    p, div {
        margin: 0 !important
    }

    table {
        border-collapse: collapse
    }

    @media only screen and (max-width: 640px) {
        body {
            width: auto !important
        }

        table table {
            width: 100% !important
        }

        td[class=full_width] {
            width: 100% !important
        }

        td[class=spacer] {
            width: 30px !important
        }

        td[class=spacer_spec] {
            display: none !important
        }

        div[class=div_scale] {
            width: 440px !important;
            margin: 0 auto !important
        }

        table[class=table_scale] {
            width: 440px !important;
            margin: 0 auto !important
        }

        td[class=td_scale] {
            width: 440px !important;
            margin: 0 auto !important
        }

        img[class=img_scale] {
            width: 100% !important;
            height: auto !important
        }

        img[class=divider] {
            width: 100% !important;
            height: 2px !important
        }

        td[class=divider] {
            width: 100% !important;
            display: block !important;
            float: left;
            text-align: inherit !important
        }
    }

    @media only screen and (max-width: 479px) {
        body {
            width: auto !important
        }

        table table {
            width: 100% !important
        }

        td[class=full_width] {
            width: 100% !important
        }

        div[class=div_scale] {
            width: 280px !important;
            margin: 0 auto !important
        }

        table[class=table_scale] {
            width: 280px !important;
            margin: 0 auto !important
        }

        td[class=td_scale] {
            width: 280px !important;
            margin: 0 auto !important
        }

        img[class=img_scale] {
            width: 100% !important;
            height: auto !important
        }

        img[class=divider] {
            width: 100% !important;
            height: 2px !important
        }

        td[class=spacer] {
            display: none !important
        }

        td[class=spacer_spec] {
            display: none !important
        }

        td[class=divider] {
            width: 100% !important;
            display: block !important;
            float: left;
            text-align: inherit !important
        }

        td[class=center] {
            text-align: center !important
        }

        td[class=subject_line] {
            float: left;
            width: 240px;
            display: block !important;
            text-align: left !important;
            padding: 15px 20px !important
        }

        td[class=contact] {
            float: left;
            width: 240px;
            display: block !important;
            text-align: left !important;
            padding: 0 20px 15px !important;
            padding-bottom: 20px !important
        }

        td[class=social_left] {
            float: left;
            width: 240px;
            display: block !important;
            text-align: center !important;
            padding: 20px 20px 0 !important
        }

        td[class=social_right] {
            float: left;
            width: 240px;
            display: block !important;
            text-align: center !important;
            padding: 0 20px !important
        }

        td[class=one_one] {
            width: 240px !important;
            display: block !important;
            float: left;
            padding-left: 20px !important;
            padding-right: 20px !important;
            text-align: inherit !important
        }

        td[class=one_half] {
            width: 240px !important;
            padding-bottom: 0 !important;
            display: block !important;
            float: left;
            padding-left: 20px !important;
            text-align: inherit !important
        }

        td[class=one_half_last] {
            width: 240px !important;
            margin-top: 40px !important;
            display: block !important;
            float: left;
            padding-left: 20px !important;
            text-align: inherit !important;
            padding-top: 0 !important
        }

        td[class=one_third_fed] {
            width: 240px !important;
            display: block !important;
            float: left;
            padding-left: 20px !important;
            text-align: inherit !important
        }

        td[class=one_third_fed_sec] {
            width: 240px !important;
            margin-top: 20px !important;
            display: block !important;
            float: left;
            padding-left: 20px !important;
            text-align: inherit !important
        }

        td[class=one_third_fed_last] {
            width: 240px !important;
            margin-top: 20px !important;
            display: block !important;
            float: left;
            padding-left: 20px !important;
            text-align: inherit !important
        }

        td[class=one_third] {
            width: 240px !important;
            display: block !important;
            float: left;
            padding-left: 20px !important;
            text-align: inherit !important
        }

        td[class=one_third_sec] {
            width: 240px !important;
            margin-top: 40px !important;
            display: block !important;
            float: left;
            padding-left: 20px !important;
            text-align: inherit !important
        }

        td[class=two_third_last] {
            width: 240px !important;
            margin-top: 40px !important;
            display: block !important;
            float: left;
            padding-left: 20px !important;
            text-align: inherit !important
        }

        td[class=two_third] {
            width: 240px !important;
            display: block !important;
            float: left;
            margin-left: 20px !important;
            text-align: inherit !important
        }

        td[class=one_third_last] {
            width: 240px !important;
            margin-top: 40px !important;
            display: block !important;
            float: left;
            margin-left: 20px !important;
            text-align: inherit !important
        }

        td[class=one_fourth] {
            width: 110px !important;
            display: block !important;
            float: left;
            margin-left: 20px !important;
            text-align: inherit !important
        }

        td[class=one_fourth_last] {
            width: 110px !important;
            margin-top: 20px !important;
            display: block !important;
            float: left;
            margin-left: 20px !important;
            text-align: inherit !important
        }
    }
</style>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#d0d0d0"
       style="padding: 0; margin: 0;">
    <!-- START OF TOP BAR-->
    <tr>
        <td class="full_width" align="center" width="100%" bgcolor="#d0d0d0" style="">
            <div class="div_scale" style="width:600px;">
                <table class="table_scale" width="600" HEIGHT="42" border="0" align="center" cellpadding="0"
                       cellspacing="0" bgcolor="#494949" style="padding:0; margin: 0;">
                    <tr>
                        <td class="spacer" width="20" align="left" valign="top" bgcolor="#494949"
                            style="margin: 0 !important; padding: 0 !important; line-height: 0 !important;">&nbsp;
                        </td>
                        <!-- START OF SUBJECT LINE-->
                        <td class="subject_line" align="left" valign="middle" width="270" bgcolor="#494949"
                            style="padding-top: 10px; padding-bottom: 10px;">
                            <table width="100%">
                                <tr>
                                    <td class="center" align="" valign=""
                                        style="font-family:Arial, sans-serif; font-style: italic; color:#d8d8d8; font-size:11px; line-height:18px;">
                                        Relatório mensal de desempenho do website
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <!-- END OF SUBJECT LINE-->
                        <td class="spacer" width="20" align="left" valign="top" bgcolor="#494949"
                            style="margin: 0 !important; padding: 0 !important; line-height: 0 !important;">&nbsp;
                        </td>
                        <!-- START OF CONTACT-->
                        <td class="contact" align="right" valign="middle" width="270" bgcolor="#494949"
                            style="padding: 0px;">
                            <table width="100%">
                                <tr>
                                    <td class="center" align="" valign=""
                                        style="text-align: right; font-family:Arial, sans-serif; font-style: italic; color:#d8d8d8; font-size:11px; line-height:100%;">
                                        <img src="https://i.imgur.com/RxR11qU.png?1" alt="email" width="20" height="11"
                                             style="display: inline; vertical-align: middle;"/>atendimento@altimus.com.br
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <!-- END OF CONTACT-->
                        <td class="spacer" width="20" align="left" valign="top" bgcolor="#494949"
                            style="margin: 0 !important; padding: 0 !important; line-height: 0 !important;">&nbsp;
                        </td>
                    </tr>
                </table>
            </div>
        </td>
    </tr>
    <!-- END OF TOP BAR-->
    <!-- START OF VERTIXAL SPACER BLOCK-->
    <tr>
        <td class="full_width" align="center" width="100%" bgcolor="#d0d0d0" style="">
            <div class="div_scale" style="width:600px;">
                <table class="table_scale" width="600" border="0" align="center" cellpadding="0" cellspacing="0"
                       bgcolor="#d0d0d0" style="padding:0; margin: 0;">

                </table>
            </div>
        </td>
    </tr>
    <!-- END OF VERTIXAL SPACER BLOCK-->
    <!-- START OF FEATURED AREA BLOCK-->
    <tr>
        <td class="full_width" align="center" width="100%" bgcolor="#d0d0d0" style="">
            <div class="div_scale" style="width:600px;">
                <table class="table_scale" width="600" border="0" align="center" cellpadding="0" cellspacing="0"
                       bgcolor="#f0f0f0" style="padding:0; margin: 0;">
                    <tr>
                        <!-- START OF LEFT COLUMN-->
                        <td class="td_scale" width="600" bgcolor="#fff" align="center" valign="top"
                            style="padding: 0px; font-size:14px ; color:#959595; font-family: Arial,sans-serif; line-height: 24px; ">
                            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"
                                   bgcolor="#fff" style="margin: 0;">
                                <!-- START OF BANNER-->
                                <tr>
                                    <td class="center" align="center" valign="top" bgcolor="#fff"
                                        style="padding:0; font-size: 16px; line-height: 24px; font-family:Lucida Sans Unicode; color:#262626; margin: 0 !important;">
                                        <a href="#" style="font-style: normal;"> <img class="img_scale"
                                                                                      src="http://manutencaosites.windi.com.br/img/banner-relatorio-desempenho.png"
                                                                                      width="600" height="240"
                                                                                      alt="featured banner" border="0"
                                                                                      style="display: block;"/> </a>
                                    </td>
                                </tr>
                                <!-- END OF BANNER-->
                                <!-- START OF VERTICAL SPACER-->
                                <tr>
                                    <td height="20" bgcolor="#f0f0f0" style="padding:0; line-height: 0;">&nbsp;</td>
                                </tr>
                                <!-- END OF VERTICAL SPACER-->
                                <!-- START OF HEADING TITLE-->
                                <tr>
                                    <td class="center" align="center" valign="top" bgcolor="#f0f0f0"
                                        style="padding: 0px 20px;  text-shadow: 1px 1px 0px #ffffff;font-size:24px ; color:#444444; font-family: Lucida Sans Unicode; line-height: 34px; ">';

if (!empty($dados['pageview'])) {
    $html_template .= "PageView:  {$dados['pageview']}<br/>";
}
if (!empty($dados['email'])) {
    $html_template .= "Leads por formulário: {$dados['email']} <br/>";
}

if (!empty($dados['whatsapp'])) {
    $html_template .= "Leads por whatsapp: {$dados['whatsapp']} <br/>";
}
$html_template .= '</td>
</tr>
                                <!-- END OF HEADING TITLE-->
                                <!-- START OF VERTICAL SPACER-->
                                <tr>
                                    <td height="10" bgcolor="#f0f0f0" style="padding:0; line-height: 0;">&nbsp;</td>
                                </tr>
                                <!-- END OF VERTICAL SPACER-->

                                <!-- START OF VERTICAL SPACER-->
                                <tr>
                                    <td height="20" bgcolor="#f0f0f0" style="padding:0; line-height: 0;">&nbsp;</td>
                                </tr>
                            </table>
                        </td>
                        </td>
                    </tr>
                    <tr>
                        <td class="full_width" align="center" width="100%" bgcolor="#d0d0d0" style="">
                            <div class="div_scale" style="width:600px;">
                                <table class="table_scale" width="" border="0" align="center" cellpadding="0"
                                       cellspacing="0" bgcolor="#353535" style="padding:0; margin: 0;">
                                    <tr>
                                        <td class="" align="center" valign="top" width="600" bgcolor="#353535" style="">
                                            <table align="center" width="100%">



                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                    <!-- END OF FOOTER-->
                    <!-- START OF VERTIXAL SPACER BLOCK-->
                    <tr>
                        <td class="full_width" align="center" width="100%" bgcolor="#d0d0d0" style="">
                            <div class="div_scale" style="width:600px;">
                                <table class="table_scale" width="600" border="0" align="center" cellpadding="0"
                                       cellspacing="0" bgcolor="#d0d0d0" style="padding:0; margin: 0;">
                                    <tr>
                                        <td class="td_scale" width="600" height="40" bgcolor="#d0d0d0" align="center"
                                            valign="middle"
                                            style="height: 40px; padding: 0px; font-size:0 ; color:#686868; font-family: Arial,sans-serif; line-height: 0; ">
                                            &nbsp;
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                    <!-- END OF VERTIXAL SPACER BLOCK-->
                </table>';
