$VARS["count"] = $count; //DIA server connection object $dia = new Dia($site, $col, $count, $output, $lang); $page = new Page(); $initial_restricion = html_entity_decode($colectionData->restriction); // filtro de pesquisa = restricao inicial E filtro where E filtro externo E filtro(s) selecionados $filterSearch = array_merge((array) $initial_restricion, (array) $whereFilter, (array) $filter, (array) $filter_chain); // set additiona parameters $dia->setParam('fb', $fb); $dia->setParam('fl', $fl); $dia->setParam('sort', $sort); $diaResponse = $dia->search($q, $index, $filterSearch, $from); $result = json_decode($diaResponse); include "./templates/email-head.php"; include "./templates/email-top.php"; $page_body = $page->email(); include "./templates/email-bottom.php"; $html_code = $page_head . $page_top . $page_body . $page_bottom; } else { include "./templates/email-head.php"; include "./templates/email-top.php"; include "./templates/email-bottom.php"; $html_code = $page_head . $page_top . $page_bottom; } // Envio do e-mail $senderAccount = FROM_MAIL; $mail = new PHPMailer(); $mail->SetLanguage("br"); $mail->IsHTML(true); $mail->CharSet = "utf-8"; $mail->IsSMTP();