// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         //
// GNU General Public License for more details:                          //
//                                                                       //
//          http://www.gnu.org/copyleft/gpl.html                         //
//                                                                       //
///////////////////////////////////////////////////////////////////////////
require '../../../functions/globales.php';
require '../include/rutas.php';
require '../functions/main.php';
require '../struct/login2.php';
require '../functions/doc_functions.php';
if ($_POST['pdf']) {
    require FPDF_PDF_RUTA . 'lib/pdftable.inc.php';
    $p = new PDFTable('P');
    $p->SetMargins(3, 43, 0);
    $p->SetTitle(date("d-m-Y") . "_revision_direccion");
    $p->SetFillColor(255, 255, 255);
    $p->SetTextColor(0, 0, 0);
    $p->SetDrawColor(0, 0, 0);
    $doc_real = select_normal("Select * from kz_tec_doc_documentos_reales where id = " . $_POST['documento_real'] . "");
    $doc_real = $doc_real[0];
    $p->AddPage('P');
    $p->SetMargins(10, 10, 0);
    $p->setfont('Arial', 'B', 12);
    $color1 = 'A6A6A6';
    $color2 = 'FFFFFF';
    $tit = "bgcolor=#{$color1} color=#{$color2} align=center valign=middle style=bold height=8";
    $nor = "align=center height=5 valign=middle";
    $p->cell(0, 0, $doc_real['titulo'], 0, 0, 'C');
    $p->ln(15);
    $p->setfont('Arial', '', 10);
    }
    ?>
	</table>
<?php 
} else {
    $acpm = select_normal("SELECT * FROM kz_tec_mej_acpm where 1 = 1 {$filtros} order by {$orden} fecha_apertura desc");
    if ($_POST['pdf']) {
        require FPDF_PDF_RUTA . 'lib/pdftable.inc.php';
        $p = new PDFTable('P');
        $p->SetMargins(3, 43, 0);
        if ($_POST['modo_resumen']) {
            $p->AddPage('L');
            $p->SetMargins(3, 10, 0);
            $p->titulo(5, $titulo);
            $p->setfont('Arial', '', 8);
            $p->SetTitle(date("d-m-Y") . "_informe");
            $p->SetFillColor(255, 255, 255);
            $p->SetTextColor(0, 0, 0);
            $p->SetDrawColor(0, 0, 0);
            $filtrostab = "<table>";
            $filtrostab .= $l_filtros;
            $filtrostab .= "</table>";
            $p->HTMLtable($filtrostab);
            $p->ln(5);
            $tabla_cantidad = "<table>\n\t\t\t\t<tr><td>Cantidad total de Acciones Correctivas: " . count($acpm) . "</td></tr>\t\n\t\t\t</table>";
            $p->HTMLtable($tabla_cantidad);
            $p->ln(5);
            $color1 = 'A6A6A6';
            $color2 = 'FFFFFF';
            $tit = "bgcolor=#{$color1} color=#{$color2} align=center valign=middle style=bold height=8";
            $nor = "align=center height=5 valign=middle";
示例#3
0
	//...China(GBK)
	/*
	$pdf->AddFont($defFont,'','MINGLIU.TTF',true);
	$pdf->AddFont($defFont.'B','','MINGLIUB.TTF',true);
	*/
	//...English
	
	$pdf->AddFont($defFont,'','ARIALUNI.TTF',true);
	//...$pdf->AddFont($defFont.'B','','ARIALUNI.TTF',true);
	$pdf->AddFont($defFont.'B','','ARIALUNI.TTF',true);
	
	
	
	$pdf->SetCreator("Hotel");
	$pdf->SetAuthor("Hotel");
	$pdf->SetTitle("Hotel");
	$pdf->SetSubject("Hotel", true);
	
	$pdf->SetMargins(10,2);
	$pdf->SetDrawColor(0,0,0);
	$pdf->SetTextColor(0,0,0);
	$pdf->SetPadding(0);
	$pdf->SetSpacing(0,0);

	$pdf->AddPage();
	$pdf->SetFont($defFont,'',20);
		
	$pdf->Image("../../themes/default/img/logo.png",135,10,60);	
	$pdf->htmltable("<table width=190>
			<tr><td size=30 width=30>Hotel </td><td color=#FF6600 size=30> Voucher</td></tr>
			<tr><td size=9 colspan=2>Please present either an electronic or paper copy of your hotel voucher upon check-in</td></tr>
    $filtros .= " and anno = " . $_POST['anno'] . "";
}
if ($_POST['estado'] != '') {
    $filtros .= " and cumplido = " . $_POST['estado'] . " ";
}
$objetivos = select_normal("Select * from kz_tec_dir_objetivos {$filtros} order by anno desc");
if ($objetivos) {
    if ($_POST['pdf']) {
        require FPDF_PDF_RUTA . 'lib/pdftable.inc.php';
        $p = new PDFTable('L');
        $p->SetMargins(3, 43, 0);
        foreach ($objetivos as $key => $valor) {
            $p->AddPage('L');
            $p->titulo(5, $titulo);
            $p->setfont('Arial', '', 8);
            $p->SetTitle(date("d-m-Y") . "_informe_objetivos");
            $p->SetFillColor(255, 255, 255);
            $p->SetTextColor(0, 0, 0);
            $p->SetDrawColor(0, 0, 0);
            $tit = "bgcolor = #b5d6ff";
            $color1 = '5F5F5F';
            $color2 = 'FFFFFF';
            $tit = "bgcolor=#{$color1} color=#{$color2} align=center valign=middle style=bold height=4";
            $tabla = "<table border=1>";
            $tabla .= "<tr>\n\t\t\t\t\t<td {$tit} width=25>OBJETIVO</td>\n\t\t\t\t</tr>\n\t\t\t</table>";
            $color1 = 'A6A6A6';
            $color2 = 'FFFFFF';
            $tit = "bgcolor=#{$color1} color=#{$color2} align=center valign=middle style=bold height=8";
            $contenido = "align=center height=5 valign=middle";
            $tabla .= "<table border=1>\n\t\t\t\t<tr>\n\t\t\t\t\t<td {$tit} width=35>Objetivo</td>\n\t\t\t\t\t<td {$tit} width=27>" . html_entity_decode("Fecha de creaci&oacute;n") . "</td>\n\t\t\t\t\t<td {$tit} width=9>" . html_entity_decode("A&ntilde;o") . "</td>\n\t\t\t\t\t<td {$tit} width=186>" . html_entity_decode("Descripci&oacute;n") . "</td>\n\t\t\t\t\t<td {$tit} width=17>Plazo</td>\n\t\t\t\t\t<td {$tit} width=16>Cumplido</td>\n\t\t\t\t</tr>";
            $tabla .= "<tr>\n\t\t\t\t\t<td {$contenido}>" . $valor['objetivo'] . "</td>\n\t\t\t\t\t<td {$contenido}>" . $valor['fechacreacion'] . "</td>\n\t\t\t\t\t<td {$contenido}>" . $valor['anno'] . "</td>\t\n\t\t\t\t\t<td {$contenido}>" . $valor['descripcion'] . "</td>\n\t\t\t\t\t<td {$contenido}>" . $valor['plazoconsecucion'] . "</td>\n\t\t\t\t\t<td {$contenido}>" . siono($valor['cumplido']) . "</td>\t\n\t\t\t\t</tr>";
示例#5
0
 *------------------------------------------------------------------------*/
$pdf_template = "./templates/est_template.php";
include_once $pdf_template;
/*--------------------------------------------------------------------------
 * PDF 파일 생성
 *------------------------------------------------------------------------*/
//... 기정 폰트
$defFont = 'Tahoma';
$pdf = new PDFTable();
/*
$pdf->AddFont($defFont,'','malgun.ttf',true);
$pdf->AddFont('malgunbd','','malgunbd.ttf',true);
*/
$pdf->SetCreator("DigitalEMC");
$pdf->SetAuthor($company['CR_COMP_ECEO']);
$pdf->SetTitle("Quotation/Invoice Form");
$pdf->SetSubject($estinfo["CR_ESTM_SEQ"]);
$pdf->SetMargins(10, 10);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetTextColor(0, 0, 0);
$pdf->AddPage();
$pdf->Image($homedir . 'data' . $company['CR_COMP_E_LOGO'], 10, 6, 30);
$pdf->SetFont($defFont, '', 15);
$pdf->Cell(180, 10, $company['CR_COMP_E_TAGLINE'], 0, 0, 'R');
$pdf->Ln(20);
$pdf->SetFont('malgunbd', '', 24);
$title_width = 180;
$pdf->SetX((210 - $title_width) / 2);
$pdf->SetLineWidth(0.4);
$pdf->Cell($title_width, 18, $title, 'TRBL', 1, 'C');
$pdf->Ln(6);
 public function printPDF($booking_info)
 {
     require_once _TAS_TOOL_DIR_ . "/tfpdf/pdftable.inc.php";
     $title = "Voucher";
     $defFont = 'MyFont';
     $pdf = new PDFTable();
     /*switch (self::$cookie->LanguageID) {
     		case 1: 
     			//...English
     		*/
     $pdf->AddFont($defFont, '', 'ARIALUNI.TTF', true);
     //...$pdf->AddFont($defFont.'B','','ARIALUNI.TTF',true);
     $pdf->AddFont($defFont . 'B', '', 'ARIALUNI.TTF', true);
     /*break;
     		case 2: 
     			//...China(GB2312)
     			$pdf->AddFont($defFont,'','SIMSUN.TTF',true);
     			$pdf->AddFont($defFont.'B','','SIMSUNB.TTF',true);
     			break;
     		case 3:
     			//...China(GBK)
     			$pdf->AddFont($defFont,'','MINGLIU.TTF',true);
     			$pdf->AddFont($defFont.'B','','MINGLIUB.TTF',true);
     			break;
     		case 4:
     			//...Japan
     			$pdf->AddFont($defFont,'','MSGOTHIC.TTF',true);
     			$pdf->AddFont($defFont.'B','','MSGOTHICB.TTF',true);
     			break;
     		};*/
     $pdf->SetCreator("Hotel");
     $pdf->SetAuthor("Hotel");
     $pdf->SetTitle("Hotel");
     $pdf->SetSubject("Hotel", true);
     $pdf->SetMargins(10, 2, 0, 20);
     $pdf->SetDrawColor(0, 0, 0);
     $pdf->SetTextColor(0, 0, 0);
     $pdf->SetPadding(0);
     $pdf->SetSpacing(0, 0);
     $pdf->AddPage();
     $pdf->SetFont($defFont, '', 20);
     $pdf->SetHeaderFooter("header", "footer");
     $pdf->Ln(3);
     $pdf->SetFont($defFont, '', 10, true);
     $pdf->htmltable("\r\n\t    \t<table width=190>\r\n\t\t\t\t<tr><td size=12>Hotel: {$booking_info['hotel_info']['HotelName']}</td></tr>\r\n\t\t\t</table>");
     $pdf->Ln(-2);
     $pdf->htmltable("\r\n\t    \t<table width=190>\r\n\t\t\t\t<tr><td size=12>Address: {$booking_info['hotel_info']['HotelAddress']}</td></tr>\r\n\t\t\t</table>");
     $pdf->Ln(-2);
     $pdf->htmltable("\r\n\t    \t<table width=190>\r\n\t\t\t\t<tr><td size=12>Hotel Contact No: {$booking_info['hotel_info']['HotelContactNo']}</td></tr>\r\n\t\t\t</table>");
     $pdf->Ln(5);
     $pdf->SetFont($defFont, '', 8, true);
     $pdf->htmltable("\r\n\t    \t<table  width=190>\r\n\t    \t\t<tr><td size=10 family={$defFont}B>1.</td><td colspan=2 size=10 font-weight:bold>Customer Information(お客様情報)</td></tr>    \t\t    \t\t\r\n\t\t\t\t<tr><td size=3></td>\r\n\t\t\t\t<tr><td width=5></td><td width=80>Booking ID(予約番号): {$booking_info['BookingNo']}</td>\t\t\t\t<td>Guest Name(お客様 氏名): {$booking_info['contact_name']}</td></tr>\r\n\t\t\t\t<tr><td width=5></td><td width=80>E-mail: {$booking_info['contact_email']}</td>\t\t\t\t<td>Tel: {$booking_info['contact_tel']}</td></tr>\r\n\t\t\t</table>");
     $pdf->Ln(3);
     $pdf->htmltable("\r\n\t    \t<table  width=190>\r\n\t    \t\t<tr><td size=10 family={$defFont}B>2. </td><td colspan=2 size=10 family={$defFont}B>Booking Information(予約情報)</td></tr>\r\n\t\t\t\t<tr><td size=3></td>\r\n\t\t\t\t<tr><td width=5></td><td width=80>Check In : {$booking_info['checkin']}</td>\t\t\t\t<td>Check Out : {$booking_info['checkout']}</td></tr>\r\n\t\t\t\t<tr><td width=5></td><td colspan=2>Total No or rooms:  {$booking_info['roomString']}</td></tr>\r\n\t\t\t</table>");
     $pdf->Ln(3);
     $pdf->htmltable("\r\n\t\t<table  width=190>\r\n\t\t        <tr><td width=5></td><td size=10 family={$defFont}B>Rooming Details(宿泊情報)</td></tr>\r\n\t\t    </table>");
     $i = 0;
     foreach ($booking_info['booked_roomplan_list'] as $roomplan) {
         $i++;
         $customer_count = count($roomplan['customer_info_list']);
         $customer_names = "";
         foreach ($roomplan['customer_info_list'] as $customer) {
             if ($customer_names != "") {
                 $customer_names .= " ,  ";
             }
             $customer_names .= ($customer['customer_sex'] == 1 ? "Mr " : "Mrs ") . $customer['customer_fnames'] . " " . $customer['customer_gnames'] . " (" . $customer['customer_country_name'] . ")";
         }
         $breakfast = $roomplan['Breakfast'] == 1 ? "Included" : "None";
         $Dinner = $roomplan['Dinner'] == 1 ? "Included" : "None";
         $special = "";
         if ($roomplan['req_nonsmoking'] == 1) {
             $special .= "Non Smoking, ";
         }
         if ($roomplan['req_smoking'] == 1) {
             $special .= "Smoking, ";
         }
         if ($roomplan['req_adjoin'] == 1) {
             $special .= "Adjoin room, ";
         }
         $special .= $roomplan['req_remark'];
         $pdf->htmltable("\r\n\t    \t<table  width=190>\r\n\t    \t\t<tr><td width=5></td><td size=8 family={$defFont}B>- Room {$i}</td></tr>\r\n\t    \t\t<tr><td width=5></td><td>Room Plan(宿泊プラン): {$roomplan['RoomPlanName']}</td></tr>\r\n\t\t\t\t<tr><td width=5></td><td width=80>Room Type(ルームタイプ): {$roomplan['RoomTypeName']}</td>\t\t\t\t<td>no of pax stay at room: {$customer_count}</td></tr> \r\n\t\t\t</table>");
         $pdf->htmltable("\r\n\t\t\t<table width=190>\r\n\t\t\t\t<tr><td width=5></td><td>Guest Name(宿泊者名): {$customer_names}</td></tr>\r\n\t\t\t</table>\r\n\t\t");
         $pdf->htmltable("\r\n\t\t\t<table width=190>\r\n\t\t\t\t<tr><td width=5></td><td width=80>Breakfast(朝食): {$breakfast}</td>\t\t\t<td>Dinner(夕食): {$Dinner}</td></tr>\r\n\t\t\t\t<tr><td width=5></td><td colspan=2>Special Request(特別リクエスト): {$special}</td></tr>\r\n\t\t\t\t<tr><td width=5></td><td size=8>* All Special request are subjects to availability</td></tr>\r\n\t\t\t</table>");
         $pdf->Ln(2);
         if ($i % 4 == 0) {
             $pdf->AddPage();
         }
     }
     $pdf->htmltable("\r\n\t    \t<table width=190>\r\n\t    \t\t<tr><td size=10 family={$defFont}B>3.</td><td colspan=2 size=10 family={$defFont}B>Agent Information(旅行会社情報)</td></tr>\r\n\t    \t\t<tr><td size=3></td>\r\n\t\t\t\t<tr><td width=5></td><td>Name: {$booking_info['agent_info']->Name}</td></tr>\r\n\t\t\t\t<tr><td width=5></td><td width=80>Phone no:  {$booking_info['agent_info']->Tel}</td>\t\t\t\t<td>Email: {$booking_info['agent_info']->Email}</td></tr>\r\n\t\t\t</table>");
     $pdf->Ln(2);
     $pdf->htmltable("<table width=190><tr><td> Note: <br>\r\n\t\t\t-This voucher must be presented during check in. Failure to do so may result in the reservation not being honored.<br> \r\n\t\t\t-Hotel has right a right to request credit card or deposit upon arrival to cover and guaranteed any incidental cost that maybe incurred during the stay.<br>\r\n\t\t\t-If you expect to arrive after 21:00, please inform the hotel your arrival time to avoid being released. In the event of No show or Early check-out, the hotel reserves right to charge a full cancellation fee.<br> \r\n\t\t\t-In case where Breakfast is included with the room rate, please note that certain hotels may charge extra for children travelling with their parents. If applicable, the hotel will bill you directly. Upon arrival, if you have any question, please verify with hotel.<br>\r\n\t\t</td></tr></table>");
     $pdf->Output("voucher.pdf", "D");
 }