Example #1
0
            } else {
                $reparador = 'Não foi enviado mail ao reparador ainda';
            }
            if ($data['gr_number'] == "") {
                $numguia = $data['id'];
            } else {
                $numguia = $data['gr_number'];
            }
            $textmail .= 'GR nº' . $numguia . ' - ' . $data['date_in'] . ' - ' . $data['cl_name'] . ' - ' . $data['art_marca'] . ': ' . $data['art_type'] . '<br/>';
        }
    } else {
        $textmail .= 'Não existe nenhum. <br/>';
    }
    /*$numerowhile = $numerowhile + 1;
    	if($numerowhile == 1)
    	{
    		$titulo = "Bazar Pesado";
    	}else{
    		$titulo = "Bazar Ligeiro";
    	}*/
}
$textmail .= '<br/>';
unset($where);
unset($table);
unset($data);
$textmail .= '!!!! Muito importante, caso deixam de receber esse mail diario, avisar-me !!!!';
$textmail .= '</body></html>';
//echo 'd';
enviamaildiary($textmail);
//echo 'd';
closeDataBase();
Example #2
0
    if ($row['pp_enc_pessoas'] != '') {
        $textmail .= '<b>Pessoas:</b> ' . $row['pp_enc_pessoas'] . '<br/>';
    }
    if ($row['pp_enc_dizeres'] != '') {
        $textmail .= '<b>Dizeres:</b> ' . $row['pp_enc_dizeres'] . '<br/>';
    }
    if ($row['pp_enc_obs'] != '') {
        $textmail .= '<b>Observações:</b> ' . $row['pp_enc_obs'] . '<br/>';
    }
}
if ($textmail == "") {
    $textmail .= 'Não há encomendas?? Verificar se não há mesmo encomendas.';
}
$textmail .= '<br/>';
$textmail .= '<br/>';
$textmail .= '<br/>';
$textmail .= '!!!! Muito importante, caso deixam de receber esse mail diario, avisar-me !!!!';
$textmail_pdf .= $textmail;
$textmail_final .= $textmail;
$textmail_final .= '</body></html>';
require_once 'C:/xampp/htdocs/pp-encomendas/FPDF/html2pdf/html2pdf.class.php';
ob_start();
echo $textmail_pdf;
$content = ob_get_clean();
$html2pdf = new HTML2PDF('P', 'A4', 'pt');
$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
$html2pdf->Output('C:/xampp/htdocs/pp-encomendas/scripts/script_diario.pdf', 'F');
//aqui permite me envia-lo em anexo
$content_PDF = $html2pdf->Output('', true);
enviamaildiary($textmail_final, $content_PDF);
closeDataBase();