$html ='<h2 align="center">Site Measurement Information</h2>'; $html .='<h4>Project :'.$id_project.' </h4>'; $html .='<h4>Quotation Number :'.$idquo.' </h4>'; $html .='<table style="border: 1px solid black;border-collapse: collapse;" align="center">'; $html .='<thead>'; $html .='<tr>'; $html .='<th style="width: 20%; border: 1px solid black;border-collapse: collapse;" >รหัส Code</th>'; $html .='<th style="width: 20%; border: 1px solid black;border-collapse: collapse;">รายละเอียดสินค้า Description</th>'; $html .='<th style="width: 35%; border: 1px solid black;border-collapse: collapse;">ความกว้าง Width(mm.)</th>'; $html .='<th style="width: 35%; border: 1px solid black;border-collapse: collapse;">ความสูง Height(mm.)</th>'; $html .='<th style="width: 35%; border: 1px solid black;border-collapse: collapse;">จำนวน Quantity</th>'; $html .='</tr>'; $html .=' </thead>'; $item = $this->m_site_measurement->get_info_measurement(); foreach ($item as $sitem_r){ $iditem = $sitem_r->f_id_quotation_item; $idsite_measurement = $sitem_r->id_site_measurement; $html .='<tbody>'; $html .='<tr>'; $html .='<td align="center" style="width: 35%; border: 1px solid black;border-collapse: collapse;"> '.$sitem_r->item_name_sm.'</td>'; $w = explode("/", $sitem_r->exact_width_mm); $count_w = count($w); $html .='<td align="center" style="width: 35%; border: 1px solid black;border-collapse: collapse;"> '.$sitem_r->item_description.'</td>'; $html .='<td align="center" style="width: 35%; border: 1px solid black;border-collapse: collapse;"> '.$w[($count_w-1)].'</td>'; $h = explode("/", $sitem_r->exact_height_mm); $count_h = count($h); $html .='<td align="center" style="width: 35%; border: 1px solid black;border-collapse: collapse;"> '.$h[($count_h-1)].'</td>'; $html .='<td align="center" style="width: 35%; border: 1px solid black;border-collapse: collapse;"> '.$sitem_r->item_quantity.'</td>'; $html .='</tr>'; $html .='</tbody>'; $html .='</table>'; } $filename = 'site_infomation_'.$idquo.'.pdf'; $files = glob('uploads/site_infomation/*'); // get all file names (ARRAY) $count = count($files); for($i=0;$i<$count;$i++) { if($files[$i] == 'uploads/site_infomation/'.$filename) { unlink($files[$i]);// delete file } } $this->mpdf = new mPDF('th','A4');// //$this->mpdf = new mPDF('th','A3'); $this->mpdf->debug = true; //$this->mpdf->SetDisplayMode('fullpage'); $this->mpdf->WriteHTML($html); $this->mpdf->Output('uploads/site_infomation/'.$filename);
foreach ($item as $sitem_r){ $iditem = $sitem_r->f_id_quotation_item; $idsite_measurement = $sitem_r->id_site_measurement; $html .='<tbody>'; $html .='<tr>'; $html .='<td align="center" style="width: 35%; border: 1px solid black;border-collapse: collapse;"> '.$sitem_r->item_name_sm.'</td>'; $w = explode("/", $sitem_r->exact_width_mm); $count_w = count($w); $html .='<td align="center" style="width: 35%; border: 1px solid black;border-collapse: collapse;"> '.$sitem_r->item_description.'</td>'; $html .='<td align="center" style="width: 35%; border: 1px solid black;border-collapse: collapse;"> '.$w[($count_w-1)].'</td>'; $h = explode("/", $sitem_r->exact_height_mm); $count_h = count($h); $html .='<td align="center" style="width: 35%; border: 1px solid black;border-collapse: collapse;"> '.$h[($count_h-1)].'</td>'; $html .='<td align="center" style="width: 35%; border: 1px solid black;border-collapse: collapse;"> '.$sitem_r->item_quantity.'</td>'; $html .='</tr>'; $html .='</tbody>'; $html .='</table>'; }
$html .='<tbody>'; foreach ($item as $sitem_r){ $iditem = $sitem_r->f_id_quotation_item; $idsite_measurement = $sitem_r->id_site_measurement; $html .='<tr>'; $html .='<td align="center" style="width: 35%; border: 1px solid black;border-collapse: collapse;"> '.$sitem_r->item_name_sm.'</td>'; $w = explode("/", $sitem_r->exact_width_mm); $count_w = count($w); $html .='<td align="center" style="width: 35%; border: 1px solid black;border-collapse: collapse;"> '.$sitem_r->item_description.'</td>'; $html .='<td align="center" style="width: 35%; border: 1px solid black;border-collapse: collapse;"> '.$w[($count_w-1)].'</td>'; $h = explode("/", $sitem_r->exact_height_mm); $count_h = count($h); $html .='<td align="center" style="width: 35%; border: 1px solid black;border-collapse: collapse;"> '.$h[($count_h-1)].'</td>'; $html .='<td align="center" style="width: 35%; border: 1px solid black;border-collapse: collapse;"> '.$sitem_r->item_quantity.'</td>'; $html .='</tr>'; } $html .='</tbody>'; $html .='</table>';
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง