1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
| <?php
$content="<html><body><br/>";
$content.="<table ><tr><td WIDTH=40></td><td style=' color:#0B3861;' ><h1>RVenligne K-O</h1></td>";
$content.="<td WIDTH=40></td><td WIDTH=40></td><td WIDTH=40></td><td WIDTH=40></td><td WIDTH=40><td WIDTH=40></td><td WIDTH=40></td></td>";
$content.="<td><img src='images/partenaire_veolia.png' style=' width:auto; height:90px;' ></td></tr></table>";
$content.="<hr/ style='color:#0B3861;'>";
$content.="<br/><br/>";
$jourPDF = substr($hui,8,2);
$moisPDF = substr($hui,5,2);
$anPDF = substr($hui,0,4);
$datePDF=$jourPDF."/".$moisPDF."/".$anPDF;
$heurePDF=substr($hui,11,18);
$content.="<p style = 'font-weight: bold;'>DATE : ".$datePDF."</p>";
$content.="<p style = 'font-weight: bold;'>HEURE : ".$heurePDF."</p>";
$sql="SELECT * FROM client WHERE numero_contrat='".$num_contrat."'";
$res=mysql_query($sql, $cnx_veolia) or die(mysql_error()) ;
$fiche=mysql_fetch_array($res);
$content.="<p style = 'font-weight: bold;'>FICHE CLIENT<p>";
$content.="<br/>";
$content.="<table>
<tr>
<td>nom</td>
<th>".$fiche['nom']."</th>
</tr>
<tr>
<td>adresse</td>
<th>".$fiche['adresse']."</th>
</tr>
<tr>
<td>ville</td>
<th>".$fiche['ville']."</th>
</tr>
<tr>
<td>numéro de compteur</td>
<th>".$fiche['numero_compteur']."</th>
</tr>
<tr>
<td>numéro de contrat</td>
<th>".$fiche['numero_contrat']."</th>
</tr>
</table>";
$content.="</body></html>\n\n";
$content=$content;
echo($content);
include('html2pdf/html2pdf.class.php');
$html2pdf = new HTML2PDF('P','A4','fr');
$html2pdf->WriteHTML($content);
$ok=$html2pdf->Output("Teleo/RVenligneKO/RVenligneKO_".$moisPDF."_".$anPDF.".pdf","F");
?> |
Partager