ÿØÿà JFIF ` ` ÿþ
Server : Apache System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : tkt_travelbus ( 1137) PHP Version : 7.0.0p1 Disable Function : mysql_pconnect Directory : /tkt_travelbus/www/admin/TCPDF/erp/ |
Upload File : |
<?php ob_start(); include "../../include/top_pdf.html"; $upload = "/FileData/good/"; $upload_thum = "/FileData/good_thum/"; // 기존 예약정보 if($a_idx){ $sql = "select * from TB_ERP_ALL where a_idx='{$a_idx}'"; $rs = db_query($sql); $row = db_fetch_array($rs) ; //1인투어비 $price_per_one = round($row['total_price'] / ($row['num_adult']+$row['num_child'])); } //INVOICE 정보 if($i_idx){ $sql3 = "select * from TB_ERP_INVOICE where i_idx='{$i_idx}'"; $rs3 = db_query($sql3); $row3 = db_fetch_array($rs3) ; $n = 0; if($row3['detail1']) { $detail1 = explode("::",$row3['detail1']); $n++; } if($row3['detail2']) { $detail2 = explode("::",$row3['detail2']); $n++; } if($row3['detail3']) { $detail3 = explode("::",$row3['detail3']); $n++; } if($row3['detail4']) { $detail4 = explode("::",$row3['detail4']); $n++; } if($row3['detail5']) { $detail5 = explode("::",$row3['detail5']); $n++; } if($row3['detail6']) { $detail6 = explode("::",$row3['detail6']); $n++; } if($row3['detail7']) { $detail7 = explode("::",$row3['detail7']); $n++; } if($row3['detail8']) { $detail8 = explode("::",$row3['detail8']); $n++; } if($row3['detail9']) { $detail9 = explode("::",$row3['detail9']); $n++; } } //VOUCHER 정보 if($v_idx){ $sql4 = "select * from TB_ERP_VOUCHER where v_idx='{$v_idx}'"; $rs4 = db_query($sql4); $row4 = db_fetch_array($rs4) ; $row4['img_src'] = $upload . $row4['meeting_place']; if($row4['code1']) { //array('voucher code','person name','persons','person nationality') $code1 = explode("::",$row4['code1']); } if($row4['code2']) { $code2 = explode("::",$row4['code2']); } if($row4['code3']) { $code3 = explode("::",$row4['code3']); } if($row4['code4']) { $code4 = explode("::",$row4['code4']); } if($row4['code5']) { $code5 = explode("::",$row4['code5']); } if($row4['code6']) { $code6 = explode("::",$row4['code6']); } if($row4['code7']) { $code7 = explode("::",$row4['code7']); } if($row4['code8']) { $code8 = explode("::",$row4['code8']); } if($row4['code9']) { $code9 = explode("::",$row4['code9']); } if($row4['code10']) { $code10 = explode("::",$row4['code10']); } if($row4['code11']) { $code11 = explode("::",$row4['code11']); } if($row4['code12']) { $code12 = explode("::",$row4['code12']); } if($row4['code13']) { $code13 = explode("::",$row4['code13']); } if($row4['code14']) { $code14 = explode("::",$row4['code14']); } if($row4['code15']) { $code15 = explode("::",$row4['code15']); } if($row4['code16']) { $code16 = explode("::",$row4['code16']); } if($row4['code17']) { $code17 = explode("::",$row4['code17']); } if($row4['code18']) { $code18 = explode("::",$row4['code18']); } if($row4['code19']) { $code19 = explode("::",$row4['code19']); } if($row4['code20']) { $code20 = explode("::",$row4['code20']); } if($row4['code21']) { $code21 = explode("::",$row4['code21']); } if($row4['code22']) { $code22 = explode("::",$row4['code22']); } if($row4['code23']) { $code23 = explode("::",$row4['code23']); } if($row4['code24']) { $code24 = explode("::",$row4['code24']); } if($row4['code25']) { $code25 = explode("::",$row4['code25']); } if($row4['code26']) { $code26 = explode("::",$row4['code26']); } if($row4['code27']) { $code27 = explode("::",$row4['code27']); } if($row4['code28']) { $code28 = explode("::",$row4['code28']); } if($row4['code29']) { $code29 = explode("::",$row4['code29']); } if($row4['code30']) { $code30 = explode("::",$row4['code30']); } if($row4['code31']) { $code31 = explode("::",$row4['code31']); } if($row4['code32']) { $code32 = explode("::",$row4['code32']); } if($row4['code33']) { $code33 = explode("::",$row4['code33']); } if($row4['code34']) { $code34 = explode("::",$row4['code34']); } if($row4['code35']) { $code35 = explode("::",$row4['code35']); } if($row4['code36']) { $code36 = explode("::",$row4['code36']); } if($row4['code37']) { $code37 = explode("::",$row4['code37']); } if($row4['code38']) { $code38 = explode("::",$row4['code38']); } if($row4['code39']) { $code39 = explode("::",$row4['code39']); } if($row4['code40']) { $code40 = explode("::",$row4['code40']); } if($row4['code41']) { $code41 = explode("::",$row4['code41']); } if($row4['code42']) { $code42 = explode("::",$row4['code42']); } if($row4['code43']) { $code43 = explode("::",$row4['code43']); } if($row4['code44']) { $code44 = explode("::",$row4['code44']); } if($row4['code45']) { $code45 = explode("::",$row4['code45']); } if($row4['code46']) { $code46 = explode("::",$row4['code46']); } if($row4['code47']) { $code47 = explode("::",$row4['code47']); } if($row4['code48']) { $code48 = explode("::",$row4['code48']); } if($row4['code49']) { $code49 = explode("::",$row4['code49']); } if($row4['code50']) { $code50 = explode("::",$row4['code50']); } //사용방법 $use_method = explode("::",$row4['use_method']); } if($row4['code_type']=='voucher' && $code1[0]) { $voucher_no = "Voucher No. <u><b>" . $code1[0] . "</b></u>"; } // Include the main TCPDF library (search for installation path). require_once('tcpdf_include.php'); // Page footer class MYPDF extends TCPDF { //Page header public function Header() { // Logo //$image_file = K_PATH_IMAGES.'logo_example.jpg'; //$this->Image($image_file, 10, 10, 15, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false); // Set font //$this->SetFont('helvetica', 'B', 20); // Title $this->Cell(0, 0, '', 0, false, 'C', 0, '', 0, false, 'M', 'M'); } // Page footer public function Footer() { // Position at 15 mm from bottom $this->SetY(-15); // Set font $this->SetFont('helvetica', 'I', 8); // Page number $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M'); } } // create new PDF document //$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); // set document information $pdf->SetCreator(PDF_CREATOR); $pdf->SetAuthor('Nicola Asuni'); $pdf->SetTitle('TOURBOSS VOUCHER'); $pdf->SetSubject('TOURBOSS'); $pdf->SetKeywords('TCPDF, PDF, estimate, invoice, voucher'); // set default header data //$pdf->SetHeaderData(HEADER_VOUCHER_TOURBOSS, PDF_HEADER_TOURBOSS_WIDTH, '', ''); // set header and footer fonts $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); // set default monospaced font $pdf -> SetDefaultMonospacedFont("nanumgothic"); //$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); //$pdf->SetFont('CID0KR', '', 10); // set margins $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); $pdf->SetFooterMargin(PDF_MARGIN_FOOTER); // set auto page breaks $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); // set image scale factor $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); // set some language-dependent strings (optional) if (@file_exists(dirname(__FILE__).'/lang/eng.php')) { require_once(dirname(__FILE__).'/lang/eng.php'); $pdf->setLanguageArray($l); } // --------------------------------------------------------- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Print a table // set font //$pdf->SetFont('CID0KR', '', 10); $pdf->SetFont('arialunicid0', '', 10); ## 폰트 종류,스타일,크기 지정 //$pdf->SetFont('nanumgothic', '', 8); ## 폰트 종류,스타일,크기 지정 // add a page $pdf->AddPage(); // create some HTML content // Set some content to print // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $html = ' <style> table {margin:0;} table.qtable{width:100%;border-top:1px solid #000;border-left:1px solid #000;border-collapse:collapse;border-spacing:1;} table.qtable th{background:#d9d9d9; border-right:1px solid #000;border-bottom:1px solid #000;font-weight:normal;padding:5px 0;text-align:center;} table.qtable td{ border-right:1px solid #000;border-bottom:1px solid #000; padding:5px 0; line-height:140%;text-align:center;} table.qtable td.txt_left{text-align:left;padding-left:5px;padding-right:5px;} table.qtable td.bg_grey{background:#d9d9d9;} table.qtable td.bt_none{border-bottom:none !important;} table.qtable td.red{color:#c00066;text-align:left;} table.qtable td.pos{position:relative;top:40%;} </style> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="images/header_voucher_tourboss.jpg" alt="LOGO" border="0" /></td> </tr> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td width="50%">Date:'.date("Y-m-d").'</td> <td width="50%" align="right">'.$voucher_no.'</td> </tr> </table> </td> </tr> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="1" cellpadding="5" class="qtable"> <tbody> <tr> <th width="10%" bgcolor="#d9d9d9">ATTN</th> <td width="42%" bgcolor="#fff" colspan="6" class="txt_left">'.$row['attn'].'</td> <th width="9%" bgcolor="#d9d9d9">FROM</th> <td width="13%" bgcolor="#fff" class="txt_left">'.$row['admin_nm'].'</td> <th width="9%" bgcolor="#d9d9d9">Manger</th> <td width="17%" bgcolor="#fff" class="txt_left">'.$row['charger'].'</td> </tr> <tr> <th bgcolor="#d9d9d9">Name</th> <td bgcolor="#fff" colspan="6" class="txt_left">'.$row['good_name'].'</td> <th bgcolor="#d9d9d9">Date use.</th> <td bgcolor="#fff" colspan="2" class="txt_left">'.$row['start_date'].' ~ '. $row['end_date'] . '</td> <td bgcolor="#fff" class="txt_left">'.$row['periods'].'</td> </tr> <tr> <th bgcolor="#d9d9d9">Hotel</th> <td bgcolor="#fff" colspan="6" class="txt_left">'.$row['hotel_name'].'</td> <th bgcolor="#d9d9d9">Bus Info.</th> <td bgcolor="#fff" colspan="3" class="txt_left">'.$row['car_info'].'</td> </tr> <tr> <th bgcolor="#d9d9d9">Name</th> <td width="14%" bgcolor="#fff" colspan="2" class="txt_left">'.$row['res_name'].'</td> <th width="9%" bgcolor="#d9d9d9">Country</th> <td width="19%" bgcolor="#fff" colspan="3" class="txt_left">'.$row['res_nationality'].'</td> <th bgcolor="#d9d9d9">Deposit</th> <td bgcolor="#fff" colspan="3" class="txt_left">'.$row['currency']. " " . number_format($row['deposit']) . ' </td> </tr> <tr> <th bgcolor="#d9d9d9">Mobile</th> <td width="14%" bgcolor="#fff" colspan="2" class="txt_left">'.$row['res_phone'].'</td> <th width="9%" bgcolor="#d9d9d9">E-mail</th> <td width="19%" bgcolor="#fff" colspan="3" class="txt_left">'.$row['res_email'].'</td> <th bgcolor="#d9d9d9">Balance</th> <td bgcolor="#fff" colspan="3" class="txt_left">'.$row['currency'] . " " . number_format($row['balance']) . '</td> </tr> <tr> <th bgcolor="#d9d9d9">Participant</th> <th width="9%" bgcolor="#d9d9d9">Adult</th> <td width="5%" bgcolor="#fff">'.$row['num_adult'].'</td> <th width="9%" bgcolor="#d9d9d9">Child</th> <td width="5%" bgcolor="#fff">'.$row['num_child'].'</td> <th width="9%" bgcolor="#d9d9d9">FOC</th> <td width="5%" bgcolor="#fff">'.$row['num_foc'].'</td> <th bgcolor="#d9d9d9" style="color:red">Paid</th> <td bgcolor="#fff" style="color:red" class="txt_left"> '.$row['currency'] . " " . number_format($row['total_price']) . '</td> <th bgcolor="#d9d9d9">1 ppl cost</th> <td bgcolor="#fff" style="color:red" class="txt_left"> ' . $row['currency'] . " " . number_format($price_per_one) . '</td> </tr> </tbody> </table> </td> </tr> <tr> <td height="20"> </td> </tr> </table> '; $html .= ' <!-- ITEM DETAILS --> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="1" cellpadding="5" class="qtable"> <tbody> <tr> <th width="19%" bgcolor="#d9d9d9" rowspan="'.$n.'" style="font-size:10pt;display:inline-block;vertical-align:middle;" valign="middle">Item Details</th>'; if($row3['detail1']) { $html .= ' <td width="5%" align="center">(1)</td> <td width="56%" class="txt_left">'.$detail1[0].'</td> <td width="20%">' . $row['currency'] . " " .number_format($detail1[1]).'</td> </tr> '; } if($row3['detail2']) { $html .= ' <tr> <td align="center">(2)</td> <td class="txt_left">'.$detail2[0].'</td> <td>' . $row['currency'] . " " .number_format($detail2[1]).'</td> </tr>'; } if($row3['detail3']) { $html .= ' <tr> <td align="center">(3)</td> <td class="txt_left">'.$detail3[0].'</td> <td>' . $row['currency'] . " " .number_format($detail3[1]).'</td> </tr>'; } if($row3['detail4']) { $html .= ' <tr> <td align="center">(4)</td> <td class="txt_left">'.$detail4[0].'</td> <td>' . $row['currency'] . " " .number_format($detail4[1]).'</td> </tr>'; } if($row3['detail5']) { $html .= ' <tr> <td align="center">(5)</td> <td class="txt_left">'.$detail5[0].'</td> <td>' . $row['currency'] . " " .number_format($detail5[1]).'</td> </tr>'; } $html .= ' <tr> <th bgcolor="#d9d9d9" colspan="3" align="center">Total Deposit</th> <td bgcolor="#d9d9d9">' . $row['currency'] . " " .number_format($row3[total_detail_amount]).'</td> </tr> </tbody> </table> </td> </tr> <tr> <td height="20"> </td> </tr> </table> <!-- //ITEM DETAILD --> '; $html .= ' <table width="100%" border="0" cellspacing="0" cellpadding="0"> '; if($row4['code_type']=='voucher') { $html .= ' <!-- VOUCHER NUMBER --> <tr> <td valign="top" height="20">■ Voucher Number (預約編號) : </td> </tr> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="1" cellpadding="5" class="qtable"> <tbody>'; if($row4['code1'] || $row4['code2'] || $row4['code3']) { $html .= ' <tr> <th width="10%" bgcolor="#d9d9d9">No.1</th><td width="23%" class="red">'.$code1[0].'</td> <th width="10%" bgcolor="#d9d9d9">No.2</th><td width="23%" class="red">'.$code2[0].'</td> <th width="10%" bgcolor="#d9d9d9">No.3</th><td width="24%" class="red">'.$code3[0].'</td> </tr>'; } if($row4['code4'] || $row4['code5'] || $row4['code6']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.4</th><td class="red">'.$code4[0].'</td> <th bgcolor="#d9d9d9">No.5</th><td class="red">'.$code5[0].'</td> <th bgcolor="#d9d9d9">No.6</th><td class="red">'.$code6[0].'</td> </tr>'; } if($row4['code7'] || $row4['code8'] || $row4['code9']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.7</th><td class="red">'.$code7[0].'</td> <th bgcolor="#d9d9d9">No.8</th><td class="red">'.$code8[0].'</td> <th bgcolor="#d9d9d9">No.9</th><td class="red">'.$code9[0].'</td> </tr>'; } if($row4['code10'] || $row4['code11'] || $row4['code12']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.10</th><td class="red">'.$code11[0].'</td> <th>No.11</th><td class="red">'.$code12[0].'</td> <th>No.12</th><td class="red">'.$code13[0].'</td> </tr>'; } if($row4['code13'] || $row4['code14'] || $row4['code15']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.13</th><td class="red">'.$code13[0].'</td> <th bgcolor="#d9d9d9">No.14</th><td class="red">'.$code14[0].'</td> <th bgcolor="#d9d9d9">No.15</th><td class="red">'.$code15[0].'</td> </tr>'; } if($row4['code16'] || $row4['code17'] || $row4['code18']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.16</th><td class="red">'.$code16[0].'</td> <th bgcolor="#d9d9d9">No.17</th><td class="red">'.$code17[0].'</td> <th bgcolor="#d9d9d9">No.18</th><td class="red">'.$code18[0].'</td> </tr>'; } if($row4['code19'] || $row4['code20'] || $row4['code21']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.19</th><td class="red">'.$code19[0].'</td> <th bgcolor="#d9d9d9">No.20</th><td class="red">'.$code20[0].'</td> <th bgcolor="#d9d9d9">No.21</th><td class="red">'.$code21[0].'</td> </tr>'; } if($row4['code22'] || $row4['code23'] || $row4['code24']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.22</th><td class="red">'.$code22[0].'</td> <th bgcolor="#d9d9d9">No.23</th><td class="red">'.$code23[0].'</td> <th bgcolor="#d9d9d9">No.24</th><td class="red">'.$code24[0].'</td> </tr>'; } if($row4['code25'] || $row4['code26'] || $row4['code27']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.25</th><td class="red">'.$code25[0].'</td> <th bgcolor="#d9d9d9">No.26</th><td class="red">'.$code26[0].'</td> <th bgcolor="#d9d9d9">No.27</th><td class="red">'.$code27[0].'</td> </tr>'; } if($row4['code28'] || $row4['code29'] || $row4['code30']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.28</th><td class="red">'.$code28[0].'</td> <th bgcolor="#d9d9d9">No.29</th><td class="red">'.$code29[0].'</td> <th bgcolor="#d9d9d9">No.30</th><td class="red">'.$code30[0].'</td> </tr>'; } if($row4['code31'] || $row4['code32'] || $row4['code33']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.31</th><td class="red">'.$code31[0].'</td> <th bgcolor="#d9d9d9">No.32</th><td class="red">'.$code32[0].'</td> <th bgcolor="#d9d9d9">No.33</th><td class="red">'.$code33[0].'</td> </tr>'; } if($row4['code34'] || $row4['code35'] || $row4['code36']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.34</th><td class="red">'.$code34[0].'</td> <th bgcolor="#d9d9d9">No.35</th><td class="red">'.$code35[0].'</td> <th bgcolor="#d9d9d9">No.36</th><td class="red">'.$code36[0].'</td> </tr>'; } if($row4['code37'] || $row4['code37'] || $row4['code37']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.37</th><td class="red">'.$code37[0].'</td> <th bgcolor="#d9d9d9">No.38</th><td class="red">'.$code38[0].'</td> <th bgcolor="#d9d9d9">No.39</th><td class="red">'.$code39[0].'</td> </tr>'; } if($row4['code40'] || $row4['code41'] || $row4['code42']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.40</th><td class="red">'.$code40[0].'</td> <th bgcolor="#d9d9d9">No.41</th><td class="red">'.$code41[0].'</td> <th bgcolor="#d9d9d9">No.42</th><td class="red">'.$code42[0].'</td> </tr>'; } if($row4['code43'] || $row4['code44'] || $row4['code45']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.43</th><td class="red">'.$code43[0].'</td> <th bgcolor="#d9d9d9">No.44</th><td class="red">'.$code44[0].'</td> <th bgcolor="#d9d9d9">No.45</th><td class="red">'.$code45[0].'</td> </tr>'; } if($row4['code46'] || $row4['code47'] || $row4['code48']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.46</th><td class="red">'.$code46[0].'</td> <th bgcolor="#d9d9d9">No.47</th><td class="red">'.$code47[0].'</td> <th bgcolor="#d9d9d9">No.48</th><td class="red">'.$code48[0].'</td> </tr>'; } if($row4['code49'] || $row4['code50']) { $html .= ' <tr> <th bgcolor="#d9d9d9">No.49</th><td class="red">'.$code49[0].'</td> <th bgcolor="#d9d9d9">No.50</th><td class="red">'.$code50[0].'</td> <th bgcolor="#d9d9d9"> </th><td> </td> </tr>'; } $html .= ' </tbody> </table> </td> </tr> <tr> <td valign="top" height="20"> </td> </tr> <!--// VOUCHER NUMBER --> '; } //VOUCHER NUMBER elseif($row4['code_type']=='qrcode') { $html .= ' <!-- QRCODE --> <tr> <td valign="top">■ QR Code Number : <span style="color:#c00066">Please show this QR code to ticket office.</span></td> </tr> <tr> <td> <table width="100%" border="0" cellspacing="1" cellpadding="5" class="qtable"> <tbody>'; if($row4['code1'] || $row4['code2'] || $row4['code3']) { $html .= ' <tr>'; if($code1[0]) { $html .= ' <th width="10%" bgcolor="#d9d9d9">No.1</th><td width="23%"> <img src="'.$upload . $code1[0].'" class="qrcode" /> </td>'; } if($code2[0]) { $html .= ' <th width="10%" bgcolor="#d9d9d9">No.2</th><td width="23%"> <img src="'.$upload . $code2[0].'" class="qrcode" /> </td>'; } if($code3[0]) { $html .= ' <th width="10%" bgcolor="#d9d9d9">No.3</th><td width="24%"> <img src="'.$upload . $code3[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code4'] || $row4['code5'] || $row4['code6']) { $html .= ' <tr>'; if($code4[0]) { $html .= ' <th bgcolor="#d9d9d9">No.4</th><td> <img src="'.$upload . $code4[0].'" class="qrcode" /> </td>'; } if($code5[0]) { $html .= ' <th bgcolor="#d9d9d9">No.5</th><td> <img src="'.$upload . $code5[0].'" class="qrcode" /> </td>'; } if($code6[0]) { $html .= ' <th bgcolor="#d9d9d9">No.6</th><td> <img src="'.$upload . $code6[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code7'] || $row4['code8'] || $row4['code9']) { $html .= ' <tr>'; if($code7[0]) { $html .= ' <th bgcolor="#d9d9d9">No.7</th><td> <img src="'.$upload . $code7[0].'" class="qrcode" /> </td>'; } if($code8[0]) { $html .= ' <th bgcolor="#d9d9d9">No.8</th><td> <img src="'.$upload . $code8[0].'" class="qrcode" /> </td>'; } if($code9[0]) { $html .= ' <th bgcolor="#d9d9d9">No.9</th><td> <img src="'.$upload . $code9[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code10'] || $row4['code11'] || $row4['code12']) { $html .= ' <tr>'; if($code10[0]) { $html .= ' <th bgcolor="#d9d9d9">No.10</th><td> <img src="'.$upload . $code10[0].'" class="qrcode" /> </td>'; } if($code11[0]) { $html .= ' <th bgcolor="#d9d9d9">No.11</th><td> <img src="'.$upload . $code11[0].'" class="qrcode" /> </td>'; } if($code12[0]) { $html .= ' <th bgcolor="#d9d9d9">No.12</th><td> <img src="'.$upload . $code12[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code13'] || $row4['code14'] || $row4['code15']) { $html .= ' <tr>'; if($code13[0]) { $html .= ' <th bgcolor="#d9d9d9">No.13</th><td> <img src="'.$upload . $code13[0].'" class="qrcode" /> </td>'; } if($code14[0]) { $html .= ' <th bgcolor="#d9d9d9">No.14</th><td> <img src="'.$upload . $code14[0].'" class="qrcode" /> </td>'; } if($code15[0]) { $html .= ' <th bgcolor="#d9d9d9">No.15</th><td> <img src="'.$upload . $code15[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code16'] || $row4['code17'] || $row4['code18']) { $html .= ' <tr>'; if($code16[0]) { $html .= ' <th bgcolor="#d9d9d9">No.16</th><td> <img src="'.$upload . $code16[0].'" class="qrcode" /> </td>'; } if($code17[0]) { $html .= ' <th bgcolor="#d9d9d9">No.17</th><td> <img src="'.$upload . $code17[0].'" class="qrcode" /> </td>'; } if($code18[0]) { $html .= ' <th bgcolor="#d9d9d9">No.18</th><td> <img src="'.$upload . $code18[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code19'] || $row4['code20'] || $row4['code21']) { $html .= ' <tr>'; if($code19[0]) { $html .= ' <th bgcolor="#d9d9d9">No.19</th><td> <img src="'.$upload . $code19[0].'" class="qrcode" /> </td>'; } if($code20[0]) { $html .= ' <th bgcolor="#d9d9d9">No.20</th><td> <img src="'.$upload . $code20[0].'" class="qrcode" /> </td>'; } if($code21[0]) { $html .= ' <th bgcolor="#d9d9d9">No.21</th><td> <img src="'.$upload . $code21[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code22'] || $row4['code23'] || $row4['code24']) { $html .= ' <tr>'; if($code22[0]) { $html .= ' <th bgcolor="#d9d9d9">No.22</th><td> <img src="'.$upload . $code22[0].'" class="qrcode" /> </td>'; } if($code23[0]) { $html .= ' <th bgcolor="#d9d9d9">No.23</th><td> <img src="'.$upload . $code23[0].'" class="qrcode" /> </td>'; } if($code24[0]) { $html .= ' <th bgcolor="#d9d9d9">No.24</th><td> <img src="'.$upload . $code24[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code25'] || $row4['code26'] || $row4['code27']) { $html .= ' <tr>'; if($code25[0]) { $html .= ' <th bgcolor="#d9d9d9">No.25</th><td> <img src="'.$upload . $code25[0].'" class="qrcode" /> </td>'; } if($code26[0]) { $html .= ' <th bgcolor="#d9d9d9">No.26</th><td> <img src="'.$upload . $code26[0].'" class="qrcode" /> </td>'; } if($code27[0]) { $html .= ' <th bgcolor="#d9d9d9">No.27</th><td> <img src="'.$upload . $code27[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code28'] || $row4['code29'] || $row4['code30']) { $html .= ' <tr>'; if($code28[0]) { $html .= ' <th bgcolor="#d9d9d9">No.28</th><td> <img src="'.$upload . $code28[0].'" class="qrcode" /> </td>'; } if($code29[0]) { $html .= ' <th bgcolor="#d9d9d9">No.29</th><td> <img src="'.$upload . $code29[0].'" class="qrcode" /> </td>'; } if($code30[0]) { $html .= ' <th bgcolor="#d9d9d9">No.30</th><td> <img src="'.$upload . $code30[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code31'] || $row4['code32'] || $row4['code33']) { $html .= ' <tr>'; if($code31[0]) { $html .= ' <th bgcolor="#d9d9d9">No.31</th><td> <img src="'.$upload . $code31[0].'" class="qrcode" /> </td>'; } if($code32[0]) { $html .= ' <th bgcolor="#d9d9d9">No.32</th><td> <img src="'.$upload . $code32[0].'" class="qrcode" /> </td>'; } if($code33[0]) { $html .= ' <th bgcolor="#d9d9d9">No.33</th><td> <img src="'.$upload . $code33[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code34'] || $row4['code35'] || $row4['code36']) { $html .= ' <tr>'; if($code34[0]) { $html .= ' <th bgcolor="#d9d9d9">No.34</th><td> <img src="'.$upload . $code34[0].'" class="qrcode" /> </td>'; } if($code35[0]) { $html .= ' <th bgcolor="#d9d9d9">No.35</th><td> <img src="'.$upload . $code35[0].'" class="qrcode" /> </td>'; } if($code36[0]) { $html .= ' <th bgcolor="#d9d9d9">No.36</th><td> <img src="'.$upload . $code36[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code37'] || $row4['code38'] || $row4['code39']) { $html .= ' <tr>'; if($code37[0]) { $html .= ' <th bgcolor="#d9d9d9">No.37</th><td> <img src="'.$upload . $code37[0].'" class="qrcode" /> </td>'; } if($code38[0]) { $html .= ' <th bgcolor="#d9d9d9">No.38</th><td> <img src="'.$upload . $code38[0].'" class="qrcode" /> </td>'; } if($code39[0]) { $html .= ' <th bgcolor="#d9d9d9">No.39</th><td> <img src="'.$upload . $code39[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code40'] || $row4['code41'] || $row4['code42']) { $html .= ' <tr>'; if($code40[0]) { $html .= ' <th bgcolor="#d9d9d9">No.40</th><td> <img src="'.$upload . $code40[0].'" class="qrcode" /> </td>'; } if($code41[0]) { $html .= ' <th bgcolor="#d9d9d9">No.41</th><td> <img src="'.$upload . $code41[0].'" class="qrcode" /> </td>'; } if($code42[0]) { $html .= ' <th bgcolor="#d9d9d9">No.42</th><td> <img src="'.$upload . $code42[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code43'] || $row4['code44'] || $row4['code45']) { $html .= ' <tr>'; if($code43[0]) { $html .= ' <th bgcolor="#d9d9d9">No.43</th><td> <img src="'.$upload . $code43[0].'" class="qrcode" /> </td>'; } if($code44[0]) { $html .= ' <th bgcolor="#d9d9d9">No.44</th><td> <img src="'.$upload . $code44[0].'" class="qrcode" /> </td>'; } if($code45[0]) { $html .= ' <th bgcolor="#d9d9d9">No.45</th><td> <img src="'.$upload . $code45[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code46'] || $row4['code47'] || $row4['code48']) { $html .= ' <tr>'; if($code46[0]) { $html .= ' <th bgcolor="#d9d9d9">No.46</th><td> <img src="'.$upload . $code46[0].'" class="qrcode" /> </td>'; } if($code47[0]) { $html .= ' <th bgcolor="#d9d9d9">No.47</th><td> <img src="'.$upload . $code47[0].'" class="qrcode" /> </td>'; } if($code48[0]) { $html .= ' <th bgcolor="#d9d9d9">No.48</th><td> <img src="'.$upload . $code48[0].'" class="qrcode" /> </td>'; } $html .= ' </tr>'; } if($row4['code49'] || $row4['code50']) { $html .= ' <tr>'; if($code49[0]) { $html .= ' <th bgcolor="#d9d9d9">No.49</th><td> <img src="'.$upload . $code49[0].'" class="qrcode" /> </td>'; } if($code50[0]) { $html .= ' <th bgcolor="#d9d9d9">No.50</th><td> <img src="'.$upload . $code50[0].'" class="qrcode" /> </td>'; } $html .= ' <th bgcolor="#d9d9d9"> </th><td> </td>'; $html .= ' </tr>'; } $html .= ' </tbody> </table> </td> </tr> <tr> <td height="20"> </td> </tr> </table> <!--// QRCODE --> '; } //QRCODE $html .= ' <!-- How to use --> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="20">■ How To Use</td> </tr> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="1" cellpadding="5" class="qtable"> <tbody> '; for($i=0,$j=1 ; $i<count($use_method)-1 ; $i++,$j++){ $html .= ' <tr> <td width="10%" bgcolor="#d9d9d9">'.$j.'</td> <td width="90%" class="txt_left">'.$use_method[$i].'</td> </tr>'; } $html .= ' </tbody> </table> </td> </tr> <tr> <td valign="top" height="20"> </td> </tr> </table> '; if($row4['meeting_place']){ $html .= ' <!-- MEETING PLACE --> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" height="20">■ Meeting Point & Redemption Place</td> </tr> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="1" cellpadding="5" class="qtable"> <tbody> <tr> <td bgcolor="#fff"> <img src="'.$row4['img_src'].'" width="700" height="345" /> </td> </tr> </tbody> </table> </td> </tr> <tr> <td valign="top" height="20"> </td> </tr> </table> <!--// MEETING PLACE --> '; } $html .= ' <!-- Contact Us --> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" height="20">■ Contact Us</td> </tr> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="1" cellpadding="5" class="qtable" > <tbody> <tr> <td bgcolor="#fff" class="txt_left">'.nl2br(stripslashes($row4['contact_us'])).'</td> </tr> </tbody> </table> </td> </tr> </table> <!--// Contact Us --> '; $html .= ' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td align="right"><img src="images/pdf_sign_tourboss.jpg" alt="sign" border="0" style="width:240px;height:auto" /></td> </tr> <tr> <td> </td> </tr> <tr> <td><img src="images/pdf_footer_tourboss.jpg" alt="FOOTER LOGO" border="0" /></td> </tr> </table> '; // output the HTML content $pdf->writeHTML($html, true, false, true, false, ''); // Print some HTML Cells // reset pointer to the last page $pdf->lastPage(); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ob_end_clean(); //Close and output PDF document $filename = "voucher_tourboss_" . date("Ymd") . ".pdf"; $pdf->Output($filename, 'D'); //$pdf->Output($filename, 'I'); ob_end_flush(); //============================================================+ // END OF FILE //============================================================+