コード例 #1
2
ファイル: custom_report_query.php プロジェクト: ibnoe/appymz
    public function getReport($id_report)
    {
        $report = end($this->uri->segments);
        $this->setColNames($id_report);
        $this->params['id_report'] = $id_report;
        $this->params['sidx'] = $this->sortColNames;
        $this->params['colNames'] = $this->colNames;
        $this->params['colModels'] = $this->colModels;
        if ($report == 'prev') {
            $this->template->write_view('content', 'custom_report_query/custom_report_query_preview', $this->params, TRUE);
            $this->template->render();
            // render template
        } else {
            if ($report == 'excel') {
                $nColumn = $this->uri->segment(4);
                $segment = 5;
                $listfield = array();
                for ($i = 1; $i < $nColumn; $i++) {
                    $listfield[] = str_replace("%20", " ", $this->uri->segment($segment));
                    $segment++;
                }
                $sName = $this->uri->segment($segment);
                $segment++;
                $sOrder = $this->uri->segment($segment);
                $rows = $this->custom_report_query_model->get_datas($id_report);
                $result = $this->custom_report_query_model->get_report($id_report, $sName, $sOrder)->result_array();
                $oldIncludePath = get_include_path();
                set_include_path(APPPATH . 'libraries/PHPExcel');
                include_once 'PHPExcel.php';
                include_once 'PHPExcel/Writer/Excel2007.php';
                include_once 'PHPExcel/IOFactory.php';
                if ($report == 'excel') {
                    $ext = 'xls';
                    $header = 'vnd.ms-excel';
                    $obj = 'Excel5';
                    $render = false;
                } else {
                    $rendererName = PHPExcel_Settings::PDF_RENDERER_TCPDF;
                    $rendererLibrary = 'tcPDF5.9';
                    $rendererLibraryPath = APPPATH . 'libraries/tcpdf';
                    $ext = 'pdf';
                    $header = 'pdf';
                    $obj = 'PDF';
                    $render = true;
                }
                $objPHPExcel = new PHPExcel();
                $objPHPExcel->getProperties()->setTitle("title")->setDescription("description");
                // Assign cell values
                $objPHPExcel->setActiveSheetIndex(0);
                $sheet = $objPHPExcel->getActiveSheet();
                $sheet->getDefaultStyle()->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);
                $styleArray = array('borders' => array('allborders' => array('style' => PHPExcel_Style_Border::BORDER_THIN)));
                $sheet->setShowGridlines(true);
                foreach ($rows as $row) {
                    $row1 = $row['report_name'];
                    $row2 = $row['req_by'];
                    $row3 = date('d-m-Y');
                }
                $sheet->getRowDimension('1')->setRowHeight(10);
                $sheet->setCellValue('A1', $row1);
                $sheet->setCellValue('A2', $row2);
                $sheet->setCellValue('A3', $row3);
                $char = 65;
                $i = 0;
                foreach ($listfield as $fields) {
                    $sheet->setCellValue(chr($char) . '5', $fields);
                    ${'length' . $i} = strlen($fields);
                    $char++;
                    $i++;
                }
                $char = 65;
                if ($report == 'excel') {
                    for ($j = 0; $j < $i; $j++) {
                        $sheet->getColumnDimension(chr($char))->setAutoSize(true);
                        $char++;
                    }
                }
                $counter = 6;
                foreach ($result as $row) {
                    $char = 65;
                    if ($counter == 6 && $report == 'pdf') {
                        $charX = $char;
                        for ($j = 0; $j < $i; $j++) {
                            if (${'length' . $j} > strlen($row[$listfield[$j]])) {
                                $sheet->getColumnDimension(chr($charX))->setWidth(${'length' . $j} + 4);
                            } else {
                                $sheet->getColumnDimension(chr($charX))->setWidth(30);
                            }
                            $charX++;
                        }
                    }
                    for ($j = 0; $j < $i; $j++) {
                        $sheet->setCellValue(chr($char) . $counter, $row[$listfield[$j]]);
                        $char++;
                    }
                    $counter++;
                }
                if ($render) {
                    if (!PHPExcel_Settings::setPdfRenderer($rendererName, $rendererLibraryPath)) {
                        die('NOTICE: Please set the $rendererName and $rendererLibraryPath values' . '<br />' . 'at the top of this script as appropriate for your directory structure');
                    }
                }
                $filename = $row1 . "-" . date('d/m/Y H:i:s') . '.' . $ext . "";
                // Redirect output to a client’s web browser
                header('Content-Type: application/' . $header);
                header('Content-Disposition: attachment;filename="' . $filename . '"');
                header('Cache-Control: max-age=0');
                // Save it as a file
                $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $obj);
                $objWriter->save('php://output');
                set_include_path($oldIncludePath);
            } else {
                if ($report == 'pdf') {
                    $this->load->library('fpdf');
                    $nColumn = $this->uri->segment(4);
                    $segment = 5;
                    $listfield = array();
                    for ($i = 1; $i < $nColumn; $i++) {
                        $listfield[] = str_replace("%20", " ", $this->uri->segment($segment));
                        $segment++;
                    }
                    $sName = $this->uri->segment($segment);
                    $segment++;
                    $sOrder = $this->uri->segment($segment);
                    $rows = $this->custom_report_query_model->get_datas($id_report);
                    $result = $this->custom_report_query_model->get_report($id_report, $sName, $sOrder)->result_array();
                    foreach ($rows as $row) {
                        $row1 = $row['report_name'];
                        $row2 = $row['req_by'];
                        $row3 = date('d-m-Y');
                    }
                    $html = '';
                    $html .= '<table>
						<tr>
							<td>Nama Laporan</td>
							<td>:</td>
							<td>' . $row1 . '</td>
						</tr>
						<tr>
							<td>Request By</td>
							<td>:</td>
							<td>' . $row2 . '</td>
						</tr>
						<tr>
							<td>Tanggal</td>
							<td>:</td>
							<td>' . $row3 . '</td>
						</tr>
						
					</table>';
                    $row1 . $row2 . $row3;
                    $html .= '<table border="1">
			<tr>';
                    $char = 65;
                    $i = 0;
                    foreach ($listfield as $fields) {
                        $html .= '<td><strong>' . $fields . '</strong></td>';
                        $char++;
                        $i++;
                    }
                    $html .= '</tr>';
                    foreach ($result as $row) {
                        $char = 65;
                        $html .= '<tr>';
                        for ($j = 0; $j < $i; $j++) {
                            $html .= '<td>' . $row[$listfield[$j]] . '</td>';
                            $char++;
                        }
                        $html .= '</tr>';
                    }
                    $html .= '
			</table>';
                    $filename = $row1 . "-" . date('d/m/Y H:i:s') . '.pdf';
                    ini_set('memory_limit', '-1');
                    require_once APPPATH . '/libraries/pdftable/pdftable.inc.php';
                    $p = new PDFTable();
                    $p->AddPage();
                    $p->setfont('times', '', 10);
                    $p->htmltable($html);
                    $p->output($filename, 'I');
                }
            }
        }
    }
コード例 #2
0
ファイル: pdf.inc.php プロジェクト: WisnuDiStefano/v4
 function PDF($orientation = 'L', $unit = 'mm', $format = array(215, 330))
 {
     PDFTable::PDFTable($orientation, $unit, $format);
     $this->SetFont('helvetica');
     $this->SetFontSize(5);
     /*$this->AddFont('vni_times', 'B');
     	$this->AddFont('vni_times', 'I');
     	$this->AddFont('vni_times', 'BI');
     	$this->AddFont('vni_helve', 'B');*/
     $this->SetAuthor('Alex');
     $this->AliasNbPages();
 }
コード例 #3
0
ファイル: pdf.inc.php プロジェクト: muguli22/house_plan
 function Header()
 {
     parent::Header();
     $this->setStyle('small');
     $this->x = $this->left;
     $this->y = $this->top - $this->getLineHeight() - 0.5;
     $user = getvar('UserName');
     $time = date('d/m/Y');
     $edit = getstr('EditBy');
     $date = getstr('Updated');
     $input = "Nhaäp bôûi [{$edit}] ngaøy {$date}";
     $print = "In bôûi [{$user}] ngaøy {$time}";
     $print = $edit ? "{$input}. {$print}" : $print;
     $html = "\n\t<table width={$this->width}><tr>\n\t\t<td nowrap>Coâng ty TNHH Quoác Daân - Chi nhaùnh TPHCM</td>\n\t\t<td align=right nowrap>{$print}</td>\n\t</tr></table>\n\t";
     $this->htmltable($html, 0);
     $this->hr();
     $this->y = $this->top;
 }
コード例 #4
0
ファイル: pdftable.inc.php プロジェクト: ali-ghanas/sitampan
 function Header()
 {
     global $rootpath;
     parent::Header();
     $this->setStyle('small');
     $this->x = $this->rifht;
     $this->y = $this->top - $this->getLineHeight() - 0.5;
     $this->Image($rootpath . 'images/logo.jpg', 16.9, 6, 29);
     $time = date('d F Y h:m:s');
     $html = "\r\n\t<table width={$this->width}><tr>\r\n\t\t<td align=left>http://chandrawira.wordpress.com </td>\r\n\t\t<td align=right> Date Print : " . $time . "</td>\t\t\r\n\t</tr></table>\r\n\t";
     $this->htmltable($html, 0);
     $this->hr();
     $this->y = $this->top;
 }
コード例 #5
0
ファイル: estform_pdf.php プロジェクト: khuyennd/dev-tasagent
if (isset($_GET['cust']) && $_GET['cust'] == 1) {
    $sql = "update " . $af_config['table']['estpublish'] . " set CR_ESTM_RCV = '" . $COMMON_CODE['C090']['02']['CODE_VAL'] . "', CR_ESTM_RCVDT=Now() where CR_CONT_SEQ='" . $cseq . "' and CR_ESTM_SEQ=" . $id;
    db_query($sql);
}
$title = "견        적         서";
/*--------------------------------------------------------------------------
 * PDF Template Include
 *------------------------------------------------------------------------*/
$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');
コード例 #6
0
// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
// 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/rrhh_functions.php';
$titulo = "Informe de perfiles";
$perfiles = select_normal("Select * from kz_tec_rrhh_perfilespuestos");
require FPDF_PDF_RUTA . 'lib/pdftable.inc.php';
$p = new PDFTable('P');
$p->SetMargins(3, 43, 0);
if ($perfiles) {
    $table = "<table border=1>\n\t\t<tr>\n\t\t\t<th>Nombre</th>\n\t\t\t<th>Funciones</th>\n\t\t\t<th>Formacion</th>\n\t\t\t<th></th>\n\t\t\t<th>Experiencia</th>\n\t\t\t<th>" . html_entity_decode("Caracter&iacute;sticas") . "</th> \n\t\t\t<th></th>\n\t\t</tr>";
    foreach ($perfiles as $key => $valor) {
        $p->AddPage('P');
        $p->SetMargins(3, 10, 0);
        $p->titulo(5, $titulo);
        $p->setfont('Arial', '', 8);
        $p->SetTitle(date("d-m-Y") . "_informe");
        $p->SetFillColor(166, 166, 166);
        $p->SetTextColor(255, 255, 255);
        $p->SetDrawColor(0, 0, 0);
        $p->Cell(204, 10, "PERFILES DE PUESTO", 1, 1, "C", true);
        $p->Ln(5);
        $p->SetFillColor(255, 255, 255);
コード例 #7
0
//                                                                       //
//          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';
$titulo = "Informe de manual";
if ($_POST['manual'] != '') {
    $filtros .= " and id = " . $_POST['manual'] . "";
}
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);
    $manual = select_normal("Select * from kz_tec_doc_manual WHERE 1=1 {$filtros}");
    if ($manual) {
        foreach ($manual as $key => $valor) {
            $p->AddPage('P');
            $p->SetMargins(3, 10, 0);
            $p->titulo(5, $titulo);
            $p->setfont('Arial', '', 8);
            $color1 = '5F5F5F';
            $color2 = 'FFFFFF';
            $tit = "bgcolor=#{$color1} color=#{$color2} align=center valign=middle style=bold height=4";
コード例 #8
0
 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");
 }
コード例 #9
0
// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
// 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/dir_functions.php';
$titulo = "" . html_entity_decode("Informe de reuni&oacute;n") . "";
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);
    $reunion = select_normal("Select * from kz_tec_dir_reuniones where id = " . $_POST['reunion'] . "");
    $reunion = $reunion[0];
    $p->AddPage('P');
    $p->SetMargins(3, 10, 0);
    $p->titulo(5, $titulo);
    $p->setfont('Arial', '', 8);
    $color1 = 'A6A6A6';
    $color2 = 'FFFFFF';
    $tit = "bgcolor=#{$color1} color=#{$color2} align=center valign=middle style=bold height=8";
    $nor = "align=center height=5 valign=middle";
コード例 #10
0
ファイル: example.php プロジェクト: bailey-ann/stringtools
<?php

$table1 = "\r\n<table border=1 align=center>\r\n  <tr> \r\n    <td rowspan=2 valign=middle border=0>rowspan=2, valign=middle</td>\r\n    <td>Normal</td>\r\n    <td>Normal</td>\r\n    <td>Normal</td>\r\n    <td colspan=2 rowspan=2 valign=bottom bgcolor=#FF00FF>colspan=2<br>rowspan=2<br>valign=bottom</td>\r\n  </tr>\r\n  <tr> \r\n    <td height=15>Normal</td>\r\n    <td rowspan=2 align=right bgcolor=#aaaaaa border=0>rowspan=2</td>\r\n    <td border=0>border=0</td>\r\n  </tr>\r\n  <tr> \r\n    <td>Normal</td>\r\n    <td>Normal</td>\r\n    <td>Normal</td>\r\n    <td rowspan=3 valign=top bgcolor=#CC3366>rowspan=3</td>\r\n    <td>Normal</td>\r\n  </tr>\r\n  <tr bgcolor=#cccccc> \r\n    <td>Normal</td>\r\n    <td colspan=3 align=center>align center, colspan=3</td>\r\n    <td>Normal</td>\r\n  </tr>\r\n  <tr> \r\n    <td align=right valign=bottom>align=right<br>valign=bottom</td>\r\n    <td>Normal</td>\r\n    <td>&nbsp;</td>\r\n    <td>Normal</td>\r\n    <td height=20>height=20</td>\r\n  </tr>\r\n</table>\r\n";
define('FPDF_FONTPATH', 'font/');
require 'lib/pdftable.inc.php';
$p = new PDFTable();
$p->AddPage();
$p->setfont('times', '', 12);
$p->htmltable($table1);
$p->output('example.pdf', 'F');
//                                                                       //
//          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';
$titulo = "Informe de procedimientos";
if ($_POST['procedimiento'] != '') {
    $filtros .= " and id = " . $_POST['procedimiento'] . "";
}
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);
    $manual = select_normal("Select * from kz_tec_doc_procedimientos WHERE 1=1 {$filtros}");
    if ($manual) {
        foreach ($manual as $key => $valor) {
            $p->AddPage('P');
            $p->SetMargins(3, 10, 0);
            $p->titulo(5, $titulo);
            $p->setfont('Arial', '', 8);
            $color1 = '5F5F5F';
            $color2 = 'FFFFFF';
            $tit = "bgcolor=#{$color1} color=#{$color2} align=center valign=middle style=bold height=4";
require '../struct/login2.php';
require '../functions/dir_functions.php';
$titulo = "Informe de reuniones entre fechas";
if ($_POST['fecha1'] != '') {
    $filtros .= " and fecha >= '" . $_POST['fecha1'] . "'";
    $l_filtros .= "<tr><td>Fecha inicio: " . $_POST['fecha1'] . "</td></tr>";
}
if ($_POST['fecha2'] != '') {
    $filtros .= " and fecha <= '" . $_POST['fecha2'] . "'";
    $l_filtros .= "<tr><td>Fecha fin: " . $_POST['fecha2'] . "</td></tr>";
}
$reuniones = select_normal("SELECT * FROM kz_tec_dir_reuniones where 1 = 1 {$filtros} order by fecha desc");
if ($reuniones) {
    if ($_POST['pdf']) {
        require FPDF_PDF_RUTA . 'lib/pdftable.inc.php';
        $p = new PDFTable('P');
        $p->SetMargins(3, 43, 0);
        $p->AddPage('P');
        $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);
        $p->Cell(0, 3, "Fecha inicio: " . $_POST['fecha1'], 0, 1);
        $p->Cell(0, 3, "Fecha fin: " . $_POST['fecha2'], 0, 1);
        foreach ($reuniones as $key => $valor) {
            //CASO DE AGRUPAR POR
            if ($valor['fecha'] != $tipo_accion_ul) {
                $tabla .= "</table>";
コード例 #13
0
    } else {
        return "";
    }
}
if ($_POST['pdf']) {
    if ($_POST['cliente'] != '') {
        $filtros .= " and organizacion = '" . $_POST['cliente'] . "'";
    }
    if ($_POST['fecha1'] != '') {
        $filtros .= " and fechaencuesta >= '" . $_POST['fecha1'] . "'";
    }
    if ($_POST['fecha2'] != '') {
        $filtros .= " and fechaencuesta <= '" . $_POST['fecha2'] . "'";
    }
    require FPDF_PDF_RUTA . 'lib/pdftable.inc.php';
    $p = new PDFTable('L');
    $p->SetMargins(3, 43, 0);
    $p->AddPage('L');
    $p->SetMargins(3, 10, 0);
    $p->titulo(5, $titulo);
    $p->setfont('Arial', '', 8);
    $p->SetTitle(date("d-m-Y") . "_revision_direccion");
    $p->SetFillColor(255, 255, 255);
    $p->SetTextColor(0, 0, 0);
    $p->SetDrawColor(0, 0, 0);
    if ($_POST['cliente'] != '') {
        $p->Cell(0, 3, "Cliente: " . $_POST['cliente'], 0, 1);
    } else {
        $p->Cell(0, 3, "Cliente: TODOS", 0, 1);
    }
    $p->Cell(0, 3, "Fecha inicio: " . $_POST['fecha1'], 0, 1);
if ($_POST['equipo'] != '') {
    $filtroequipo .= " and id = " . $_POST['equipo'] . " ";
}
if ($_POST['fecha1'] != '') {
    $filtrosmant .= " and fecha_mant >= '" . $_POST['fecha1'] . "'";
    $l_filtros .= "<tr><td>Fecha inicio: " . $_POST['fecha1'] . "</td></tr>";
}
if ($_POST['fecha2'] != '') {
    $filtrosmant .= " and fecha_mant <= '" . $_POST['fecha2'] . "'";
    $l_filtros .= "<tr><td>Fecha fin: " . $_POST['fecha2'] . "</td></tr>";
}
$equipos = select_normal("Select * from kz_tec_mant_equipos where 1 = 1 {$filtroequipo} order by numero");
if ($equipos) {
    if ($_POST['pdf']) {
        require FPDF_PDF_RUTA . 'lib/pdftable.inc.php';
        $p = new PDFTable('P');
        $p->SetMargins(3, 43, 0);
        $p->AddPage('P');
        $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);
        $p->Cell(0, 3, "Fecha inicio: " . $_POST['fecha1'], 0, 1);
        $p->Cell(0, 3, "Fecha fin: " . $_POST['fecha2'], 0, 1);
        $p->ln(5);
        if ($equipos) {
            foreach ($equipos as $key => $valor) {
                $mant = select_normal("Select * from kz_tec_mant_correctivo where equipo = " . $valor['id'] . " {$filtrosmant} order by fecha_mant desc");
コード例 #15
0
//                                                                       //
///////////////////////////////////////////////////////////////////////////
require '../../../functions/globales.php';
require '../include/rutas.php';
require '../functions/main.php';
require '../struct/login2.php';
require '../functions/rrhh_functions.php';
$titulo = "Informe de fichas de personal";
if ($_POST['persona'] != '') {
    $filtropersona = " where id = " . $_POST['persona'] . "";
}
$personas = select_normal("SELECT * FROM kz_tec_rrhh_personal {$filtropersona} order by apellidos asc");
if ($personas) {
    if ($_POST['pdf']) {
        require FPDF_PDF_RUTA . 'lib/pdftable.inc.php';
        $p = new PDFTable('P');
        $p->SetMargins(3, 43, 0);
        foreach ($personas as $key => $valor) {
            $p->AddPage('P');
            $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);
            $color1 = 'A6A6A6';
            $color2 = 'FFFFFF';
            $color3 = 'CECECE';
            $tit = "bgcolor=#{$color3} color=#{$color2} align=center valign=middle style=bold height=8";
            $tit2 = "bgcolor=#{$color1} color=#{$color2} align=center valign=middle style=bold height=8";
コード例 #16
0
//                                                                       //
///////////////////////////////////////////////////////////////////////////
require '../../../functions/globales.php';
require '../include/rutas.php';
require '../functions/main.php';
require '../struct/login2.php';
require '../functions/dir_functions.php';
$titulo = "" . html_entity_decode("Pol&iacute;tica de Calidad") . "";
if ($_POST['politica'] != '') {
    $filtropolitica = " where id = " . $_POST['politica'] . "";
}
$politicas = select_normal("SELECT * FROM kz_tec_dir_politicas {$filtropolitica} order by nombre asc");
if ($politicas) {
    if ($_POST['pdf']) {
        require FPDF_PDF_RUTA . 'lib/pdftable.inc.php';
        $p = new PDFTable('P');
        $p->SetMargins(15, 43, 300);
        foreach ($politicas as $key => $valor) {
            $p->AddPage('P');
            $p->SetMargins(15, 10, 170);
            $p->titulo(5, $titulo);
            $p->setfont('Arial', '', 12);
            $p->SetTitle(date("d-m-Y") . "_informe");
            $p->SetFillColor(255, 255, 255);
            $p->SetTextColor(0, 0, 0);
            $p->SetDrawColor(0, 0, 0);
            $p->SetTextColor(0, 0, 0);
            $p->SetFont('Arial', '', 12);
            $p->MultiCell(180, 5, $valor['politica'], 0, "J", false);
            $p->ln(15);
            $p->MultiCell(180, 6, $valor['fecha'], 0, "R", false);
//          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/dir_functions.php';
$titulo = "" . html_entity_decode("Revisi&oacute;n por la direcci&oacute;n de Caliad") . "";
$filtros = " where 1 = 1 ";
if ($_POST['anno'] != '') {
    $filtros .= " and anno = " . $_POST['anno'] . "";
}
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);
    $rev = select_normal("Select * from kz_tec_dir_revisiondireccion {$filtros} order by anno DESC, fecha desc");
    if ($rev) {
        foreach ($rev as $key => $valor) {
            $p->AddPage('P');
            $p->SetMargins(3, 10, 0);
            $p->titulo(5, $titulo);
            $p->setfont('Arial', '', 8);
            $color1 = '5F5F5F';
            $color2 = 'FFFFFF';
            $tit = "bgcolor=#{$color1} color=#{$color2} align=center valign=middle style=bold height=4";
require '../../../functions/globales.php';
require '../include/rutas.php';
require '../functions/main.php';
require '../struct/login2.php';
require '../functions/mant_functions.php';
$titulo = "Informe de plan de mantenimiento";
if ($_POST['equipo'] != '') {
    $filtroequipo = " where id = " . $_POST['equipo'] . "";
} else {
    echo "<script>alert('No se puede mostrar el informe. No hay equipos.');</script>";
    echo "<script>window.close();</script>";
}
$equipos = select_normal("Select * from kz_tec_mant_equipos {$filtroequipo} order by numero");
if ($_POST['pdf']) {
    require FPDF_PDF_RUTA . 'lib/pdftable.inc.php';
    $p = new PDFTable('L');
    $p->SetMargins(3, 43, 0);
    $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);
    $equipo = select_normal("Select * from kz_tec_mant_equipos where id = " . $_POST['equipo'] . "");
    $equipo = $equipo[0];
    $p->Cell(0, 3, "" . html_entity_decode("A&ntilde;o mant.") . ": " . $_POST['anno'], 0, 1);
    $p->Cell(0, 3, "Equipo: " . $equipo['numero'] . " || " . $equipo['ref'] . " || " . $equipo['fab'] . " || " . $equipo['modelo'], 0, 1);
    $p->Ln(5);
    $p->HTMLtable($tabla);
コード例 #19
0
    if ($row['tanggal'] != "0000-00-00 00:00:00") {
        $acara .= ", tanggal " . $tgl_text;
    }
    if ($jam != "00:00") {
        $acara .= " pukul " . $jam;
    }
    if ($row[8] != "") {
        $acara .= " di " . $row[8];
    }
    //$acara.=" di ".$row[7];
    //$tgl_diterima=date("d-M-Y", strtotime($row['tgl_terima']));
    $hr1 = date("d", strtotime($row['tgl_terima']));
    $bln1 = date("n", strtotime($row['tgl_terima']));
    $thn1 = date("Y", strtotime($row['tgl_terima']));
    $nama_bln1 = $bulan[$bln1];
    $tgl_diterima = $hr1 . "-" . $nama_bln1 . "-" . $thn1;
}
$rhs = "Rahasia";
$spasi = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
//echo $no_agenda;
$data = "coba";
//echo $data;
$table1 = "\n<table border=1 align=center >\n<tr  > \n    <td colspan=4 align=center border=0><b>LEMBAR DISPOSISI</b></td>\n  </tr>\n  <tr> \n    <td height=15 colspan=4 align=center border=0><b>BIRO HUKUM DAN ORGANISASI</b></td>\n  </tr>\n\n <tr> \n    <td colspan=4 align=right border=0><b>No. Agenda TU  : </b>" . $agenda_tu . "</td>\n   </tr>\n  <tr> \n    <td colspan=4 valign=middle><b>Nomor Agenda   : </b>" . $no_agenda . "</td>\n   </tr>\n  <tr> \n    <td colspan=4 valign=middle><i>Tanggal Diterima : </i>" . $tgl_diterima . "</td>\n  </tr>\n \n  <tr> \n    <td colspan=2 valign=middle>Tanggal Surat : " . $tgl_undangan . "</td>\n    <td colspan=2>Nomor Surat : " . $no_surat . "</td>\n  </tr>\n  <tr> \n    <td colspan=4 valign=middle>Asal Surat : " . $pengirim . "</td>\n  </tr>\n    <tr> \n    <td colspan=4 heihgt=25 valign=middle>Hal :<br> " . $acara . "</td>\n  </tr>\n  <tr> \n    <td colspan=4>Diteruskan Kepada :</td>\n  </tr>\n  <tr> \n    <td height=15 width=7 valign=middle>1.</td>\n    <td  width=85 valign=middle>Kepala Bagian Peraturan Perundang-undangan</td>\n    <td> </td>\n\t<td rowspan=5 width=75>Untuk:<br>[  ] Diikuti disposisi Menteri/Wamen/Sesjen<br>[  ] Diketahui<br>[  ] Diperhatikan<br>[  ] Diberi penjelasan<br>[  ] Diwakili\n\t<br>[  ] Dibicarakan dengan saya<br>[  ] Diproses sesuai prosedur<br>[  ] Ditindaklanjuti<br>[  ] Dilaksanakan/sempurnakan<br>[  ] Dijawab dengan surat<br>[  ] Disiapkan bahan<br>[  ] Disiapkan sambutan tertulis<br>[  ] Ditanggapi/saran-saran<br>[  ] Arsip</td>\n  </tr>\n  <tr> \n    <td height=15 valign=middle>2.</td>\n    <td valign=middle>Kepala Bagian Bantuan Hukum</td>\n    <td> </td>\n  </tr>\n  <tr> \n    <td height=15 valign=middle>3.</td>\n    <td valign=middle>Kepala Bagian Kelembagaan</td>\n    <td width=8>" . $spasi . " </td>\n  </tr>\n  <tr> \n    <td height=15 valign=middle>4.</td>\n    <td valign=middle>Kepala Bagian Ketatalaksanaan</td>\n    <td> </td>\n  </tr>\n  <tr> \n    <td height=15 valign=middle>5.</td>\n    <td valign=middle>Sekretariat</td>\n    <td> </td>\n  </tr>\n  <tr> \n    <td height=25 colspan=4>Keterangan:</td>\n  </tr>\n    <tr> \n    <td colspan=3 align=right border=0>" . $spasi . " </td><td align=left border=0><b>Jakarta ,....................................... 2014</b></td>\n  </tr>\n    </tr>\n    <tr> \n    <td colspan=3 align=right border=0>" . $spasi . " </td><td height=25 align=left border=0><b>Kepala Biro Hukum dan Organisasi,</b></td>\n  </tr>\n  </tr>\n    <tr> \n    <td colspan=3 align=right border=0>" . $spasi . " </td><td border=0><b>Ani Nurdiani Azizah</b></td>\n  </tr>\n  </tr>\n    <tr> \n    <td colspan=3 align=rght border=0>" . $spasi . " </td><td border=0><b>NIP 195812011985032001 </b></td>\n  </tr>\n</table>\n";
define('FPDF_FONTPATH', 'font/');
require 'lib/pdftable.inc.php';
$p = new PDFTable();
$p->AddPage();
$p->SetMargins(1, 1, 1, 1);
$p->setfont('arial', '', 11);
$p->htmltable($table1);
$p->output();
require '../functions/main.php';
require '../struct/login2.php';
require '../functions/dir_functions.php';
$titulo = "Informe de objetivos";
$filtros = " where 1 = 1 ";
if ($_POST['anno'] != '') {
    $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>";
コード例 #21
0
					<td><?php 
            echo $valor['coste'];
            ?>
</td>
				</tr>
			<?php 
        }
    }
    ?>
	</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);
コード例 #22
0
ファイル: tablepdf.php プロジェクト: TRWirahmana/sekretariat
      <td rowspan="2" align="right" bgcolor="#aaaaaa" border="0">rowspan=2</td>
      <td border="0">border=0</td>
    </tr>
    <tr>
      <td>Normal</td>
      <td>Normal</td>
      <td>Normal</td>
      <td rowspan="3" valign="top" bgcolor="#CC3366">rowspan=3</td>
      <td>Normal</td>
    </tr>
    <tr bgcolor="#cccccc">
      <td>Normal</td>
      <td colspan="3" align="center">align center, colspan=3</td>
      <td>Normal</td>
    </tr>
    <tr>
      <td align="right" valign="bottom">align=right<br>valign=bottom</td>
      <td>Normal</td>
      <td>&nbsp;</td>
      <td>Normal</td>
      <td height="20">height=20</td>
    </tr>
  </table>
MYTABLE;
define('FPDF_FONTPATH', 'font/');
require 'lib/pdftable.inc.php';
$p = new PDFTable();
$p->AddPage();
$p->setfont('times', '', 12);
$p->htmltable($html);
$p->output('', 'I');
コード例 #23
0
ファイル: _pdf.php プロジェクト: khuyennd/dev-tasagent
$pdf_template = "./Q_kr_pdf.php";
include_once $pdf_template;
function _utf8($val)
{
    $str = '';
    if (function_exists('mb_convert_encoding')) {
        $str = mb_convert_encoding($val, 'utf-8', 'euc-kr');
    } else {
        $str = iconv('euc-kr', 'utf-8', $val);
    }
    return (string) $str;
}
/*--------------------------------------------------------------------------
 * PDF ÆÄÀÏ »ý¼º
 *------------------------------------------------------------------------*/
$pdf = new PDFTable();
$pdf->SetCreator("DigitalEMC");
$pdf->SetAuthor($_SESSION["MemID"]);
$pdf->SetTitle("Quotation/Invoice Form");
$pdf->SetSubject($entry["doc_num"]);
$pdf->SetMargins(15, 15);
$pdf->AddFont('nanum', '', 'FONT00.TTF', true);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('nanum', '', 24);
$pdf->AddPage();
$title_width = 80;
$pdf->SetX((210 - $title_width) / 2);
$pdf->SetLineWidth(0.5);
$pdf->Cell($title_width, 13, _utf8($title), 'B', 1, 'C');
$pdf->Ln(6);
コード例 #24
0
ファイル: voucher_pdf.php プロジェクト: khuyennd/dev-tasagent
<?php

		
	require_once("./pdftable.inc.php");

	
	$title = "Voucher";
		
		
	$defFont = 'MyFont';	
	$pdf = new PDFTable();
	//...Japan
	/*
	$pdf->AddFont($defFont,'','MSGOTHIC.TTF',true);
	$pdf->AddFont($defFont.'B','','MSGOTHICB.TTF',true);
	*/
	//...China(GB2312)
	/*
	$pdf->AddFont($defFont,'','SIMSUN.TTF',true);
	$pdf->AddFont($defFont.'B','','SIMSUNB.TTF',true);
	*/
	//...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);
コード例 #25
0
 $tablam .= "<table border=1>\n\t\t<tr>\n\t\t\t<td {$clasetd} width=26>Tipo documento</td>\n\t\t\t<td {$clasetd} width=18>" . html_entity_decode("C&oacute;digo") . "</td>\n\t\t\t<td {$clasetd} width=33>Nombre</td>\n\t\t\t<td {$clasetd} width=49>" . html_entity_decode("Descripci&oacute;n") . "</td>\n\t\t\t<td {$clasetd} width=23>Tipo</td>\n\t\t\t<td {$clasetd} width=23>Soporte</td>\n\t\t\t<td {$clasetd} width=21>Generado</td>\n\t\t\t<td {$clasetd} width=21>Aprobado</td>\n\t\t\t<td {$clasetd} width=17>Fecha</td>\n\t\t\t<td {$clasetd} width=26>Periodo</td>\n\t\t\t<td {$clasetd} width=16>Lugar</td>\n\t\t\t<td {$clasetd} width=10>Vigor</td>\n\t\t\t<td {$clasetd} width=7>Int.</td>\n\t\t</tr>";
 $tablam .= "";
 foreach ($documentos as $key => $valor) {
     if ($_POST['vigor'] != '' && $_POST['vigor'] == $valor['vigor'] || $_POST['vigor'] == '') {
         $periodo = explode(',', $valor['periodo']);
         $periodo = $periodo[0] . " " . html_entity_decode("a&ntilde;os") . ", " . $periodo[1] . " meses";
         $tablam .= "<tr>\n\t\t\t\t\t<td {$clasetd2}>" . $valor['tipo'] . "</td>\n\t\t\t\t\t<td {$clasetd2}>" . $valor['cod'] . "</td>\n\t\t\t\t\t<td {$clasetd2}>" . $valor['nombre'] . "</td>\n\t\t\t\t\t<td {$clasetd2}>" . $valor['descripcion'] . "</td>\n\t\t\t\t\t<td {$clasetd2}>" . $valor['tipo_doc'] . "</td>\n\t\t\t\t\t<td {$clasetd2}>" . $valor['soporte'] . "</td>\n\t\t\t\t\t<td {$clasetd2}>" . $valor['generado'] . "</td>\n\t\t\t\t\t<td {$clasetd2}>" . $valor['aprobado'] . "</td>\n\t\t\t\t\t<td {$clasetd2}>" . $valor['fecha'] . "</td>\n\t\t\t\t\t<td {$clasetd2}>" . $periodo . "</td>\n\t\t\t\t\t<td {$clasetd2}>" . $valor['lugar'] . "</td>\n\t\t\t\t\t<td {$clasetd2}>" . siono($valor['vigor']) . "</td>\n\t\t\t\t\t<td {$clasetd2}>" . siono($valor['interno']) . "</td>\n\t\t\t\t</tr>";
     }
 }
 $tablam .= "</table>";
 if ($_POST['xls']) {
     echo $tabladocs . $tablam;
 }
 if ($_POST['pdf']) {
     require FPDF_PDF_RUTA . 'lib/pdftable.inc.php';
     $p = new PDFTable('P');
     $p->SetMargins(3, 43, 0);
     $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);
     if ($_POST['tipodoc']) {
         $p->Cell(0, 3, "Tipo de documento: " . $_POST['tipodoc'], 0, 1);
     } else {
         $p->Cell(0, 3, "Tipo de documento: TODOS", 0, 1);
     }
     $p->Ln(5);
//          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/mant_functions.php';
$titulo = "Informe de fichas de equipos";
if ($_POST['equipo'] != '') {
    $filtroequipo = " where id = " . $_POST['equipo'] . "";
}
$equipos = select_normal("Select * from kz_tec_mant_equipos  {$filtroequipo} order by numero");
if ($_POST['pdf']) {
    require FPDF_PDF_RUTA . 'lib/pdftable.inc.php';
    $p = new PDFTable('P');
    $p->SetMargins(3, 43, 0);
    if ($equipos) {
        foreach ($equipos as $key => $valor) {
            $p->AddPage('P');
            $p->SetMargins(3, 10, 0);
            $p->titulo(5, $titulo);
            $p->setfont('Arial', '', 8);
            $color1 = 'A6A6A6';
            $color2 = 'FFFFFF';
            $tit = "bgcolor=#{$color1} color=#{$color2} border=1 width=30%";
            $nor = "width=50%";
            $tabla = "<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td {$tit}>" . html_entity_decode("N&deg; equipo") . "</td>\n\t\t\t\t\t<td {$nor}>" . $valor['numero'] . "</td>\n\t\t\t\t\t<td {$tit}>" . html_entity_decode("Categor&iacute;a") . "</td>\n\t\t\t\t\t<td {$nor}>" . $valor['categoria'] . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td {$tit}>" . html_entity_decode("A&ntilde;o fab") . ".</td>\n\t\t\t\t\t<td {$nor}>" . $valor['anofab'] . "</td>\n\t\t\t\t\t<td {$tit}>Estado del equipo</td>\n\t\t\t\t\t<td {$nor}>" . $valor['estado'] . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td {$tit}>Ref.</td>\n\t\t\t\t\t<td {$nor}>" . $valor['ref'] . "</td>\n\t\t\t\t\t<td {$tit}>" . html_entity_decode("Ubicaci&oacute;n") . "</td>\n\t\t\t\t\t<td {$nor}>" . $valor['ubicacion'] . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td {$tit}>Fabricante</td>\n\t\t\t\t\t<td {$nor}>" . $valor['fab'] . "</td>\n\t\t\t\t\t<td {$tit}>Fecha adq.</td>\n\t\t\t\t\t<td {$nor}>" . $valor['fechaadq'] . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td {$tit}>Modelo</td>\n\t\t\t\t\t<td {$nor}>" . $valor['modelo'] . "</td>\n\t\t\t\t\t<td {$tit}>Precio adq.</td>\n\t\t\t\t\t<td {$nor}>" . $valor['precio'] . " euros</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td {$tit}>Tipo</td>\n\t\t\t\t\t<td {$nor}>" . $valor['tipo'] . "</td>\n\t\t\t\t\t<td {$tit}>S/N</td>\n\t\t\t\t\t<td {$nor}>" . $valor['sn'] . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td {$tit}>Referencia</td>\n\t\t\t\t\t<td {$nor}>" . $valor['referencia'] . "</td>\n\t\t\t\t\t<td {$tit}>Fecha retirada</td>\n\t\t\t\t\t<td {$nor}>" . $valor['fecharetirada'] . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td {$tit}>Elemento</td>\n\t\t\t\t\t<td {$nor}>" . $valor['elemento'] . "</td>\n\t\t\t\t\t<td {$tit}>" . html_entity_decode("Funci&oacute;n") . "</td>\n\t\t\t\t\t<td {$nor}>" . $valor['funcion'] . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td {$tit}>" . html_entity_decode("Descripci&oacute;n") . "</td>\n\t\t\t\t\t<td {$nor}>" . $valor['descripcion'] . "</td>\n\t\t\t\t\t<td {$tit}>CEE</td>\n\t\t\t\t\t<td {$nor}>" . $valor['cee'] . "</td>\n\t\t\t\t</tr>\n\t\t\t</table>";
            $p->htmltable($tabla);
            $p->ln(10);
            $pautas = select_normal("Select * from kz_tec_mant_correctivo where equipo = " . $valor['id'] . "");
コード例 #27
0
<?php

$content = "\n<!-- 1.table -->\n<table border=1 align=right>\n  <tr> \n    <td rowspan=2 valign=middle border=2.5>rowspan=2, valign=middle, border=2.5</td>\n    <td valign=middle size=10 style=italic,bold>variable</td>\n    <td>Normal</td>\n    <td>Normal</td>\n    <td colspan=2 rowspan=2 valign=bottom bgcolor=#FF00FF color=#00FF00>\n        colspan=2<br>rowspan=2<br>valign=bottom\n        <br>dfpidpfidpisd\n    </td>\n  </tr>  \n  <tr> \n    <td align=right valign=bottom height=15>\n            height=15<br>vali=bottom??\n            </td>\n    <td rowspan=2 align=right bgcolor=#aaaaaa>rowspan=2</td>\n    <td border=0>border=0</td>\n  </tr>  \n  <tr> \n    <td>20</td>\n    <td>Normal</td>\n    <td>Normal</td>\n    <td rowspan=3 valign=top bgcolor=#CC3366>rowspan=3</td>\n    <td>Normal</td>\n  </tr>  \n  <tr bgcolor=#cccccc> \n    <td>Normal</td>\n    <td colspan=3 align=center border=5>align center, colspan=3,border=3</td>\n    <td>Normal</td>\n  </tr>  \n  <tr> \n    <td align=right valign=bottom size=10 style=italic>\n         align=right<br>valign=bottom\n         \n     </td>\n    <td size=15 style=italic,bold>Normal && font</td>\n    <td>&nbsp;</td>\n    <td>Normal</td>\n    <td height=20 border=3 valign=bottom align=center style=bold>height=20<br>border=3</td>\n   </tr> \n</table>\n<!-- 2.table ... blank line -->\n<table border=0 align=center><tr><td>&nbsp;</td></tr></table>\n<!-- End blank line -->\n<!-- 3.table -->\n<table border=1 align=center width=150>\n <tr><td border=3  width=150 colspan=2 valign=bottom color=#FF0000 family=vni_times size=15 style=italic>\nVoán ñaàu tö tröïc tieáp nöôùc ngoaøi (FDI) tính ñeán cuoái thaùng ñaït 2,86 tyû USD, taêng 900 trieäu USD so vôùi thaùng tröôùc vaø vöôït cuøng kyø naêm ngoaùi gaàn 1 tyû USD. Ñoù laø chöa keå 38 döï aùn khaùc ñang trong giai ñoaïn xuùc tieán vôùi toång voán döï kieán gaàn 35 tyû USD.\n </tr>\n <tr>\n   <td border=1 valign=middle width=75 family=vni_times size=10 style=bold,italic>\n    Caùc nhaø thieân vaên vöøa phaùt hieän haønh tinh gioáng traùi ñaát nhaát cho tôùi nay, naèm ngoaøi heä maët trôøi cuûa chuùng ta, nôi nöôùc coù theå chaûy treân beà maët.\n    </td>\n   <td border=0 align=right valign=bottom width=75 height=100 family=vni_times size=15 style=underline>\n   Ñôït khôùp leänh ñaàu tieân saøn TP HCM vaãn ñi xuoáng song tín hieäu hoài phuïc raát maïnh meõ, ñeán ñôït thöù hai thò tröôøng hoaøn toaøn ñaûo chieàu vôùi haøng loaït blue-chip taêng giaù. Baûng ñieän töû saøn Haø Noäi ngay ñaàu giôø môû cöûa ñaõ xanh rì.\n    </td>\n </tr>\n</table>\n";
define('FPDF_FONTPATH', 'font/');
require 'lib/pdftable.inc.php';
$p = new PDFTable();
// I set margins out of class
$p->AddFont('vni_times');
$p->AddFont('vni_times', 'B');
$p->AddFont('vni_times', 'I');
$p->AddFont('vni_times', 'BI');
$p->SetMargins(20, 20, 20);
$p->AddPage();
$p->defaultFontFamily = 'times';
$p->defaultFontStyle = '';
$p->defaultFontSize = 12;
$p->SetFont($p->defaultFontFamily, $p->defaultFontStyle, $p->defaultFontSize);
$p->htmltable($content);
$p->output('example3.pdf', 'F');
// This program is distributed in the hope that it will be useful,       //
// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
// 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');
コード例 #29
0
ファイル: Tools.php プロジェクト: khuyennd/dev-tasagent
 public static function emailHotel($orderid, $orderstatus)
 {
     //1.获取订单信息
     $bookingInfo = Booking::getBookingOrder($orderid);
     $BookingNo = $bookingInfo['BookingNo'];
     //订单编号
     $ContactName = $bookingInfo['contact_name'];
     //1.Customer Information
     $ContactEmail = $bookingInfo['contact_email'];
     $ContactTel = $bookingInfo['contact_tel'];
     $CheckIn = $bookingInfo['checkin'];
     $CheckOut = $bookingInfo['checkout'];
     //2.获取下订单的用户信息
     $userid = $bookingInfo['OrderUserId'];
     $userinfo = Member::getUserInfoById($userid);
     $AgentName = $userinfo['Name'];
     $AgentPhoneNo = $userinfo['Tel'];
     $AgentEmail = $userinfo['Email'];
     //3.获取酒店用户信息
     $hotelid = $bookingInfo['hotel_id'];
     $hoteluserinfo = Member::getUserInfoByHotelId($hotelid);
     $UserName = $hoteluserinfo['Name'];
     $prefFax = $hoteluserinfo['PrefFax'];
     $prefEmail = $hoteluserinfo['PrefEmail'];
     $Fax = $hoteluserinfo['Fax'];
     $to = $hoteluserinfo['Email'];
     $languageid = $hoteluserinfo['LanguageID'];
     $iso = $hoteluserinfo['LanguageShortName'];
     if (!isset($hoteluserinfo['LanguageID'])) {
         $languageid = 4;
     }
     //4.获取酒店信息
     $hotelinfo = HotelDetail::getHotelDescription($hotelid, $iso);
     $HotelName = $hotelinfo['HotelName'];
     $HotelAddress = $hotelinfo['HotelAddress'];
     $HotelContactNo = $hotelinfo['HotelContactNo'];
     $orderroominfo = RoomPlan::getOrderRoomInfo($orderid, $iso);
     $RoomList = '';
     $RoomListFax = '';
     $id = 1;
     foreach ($orderroominfo as $orderroom) {
         $RoomList .= "<table  width='100%' cellspacing='10' style='font-size:12px;'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2><span style='color:#000000;font-weight:bold;font-zie:14px;'>- Room " . $id . "</span></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2><span>Room Plan(宿泊プラン):</span> " . $orderroom['RoomPlanName'] . " </td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2><span>Room Type(ルームタイプ):</span> " . $orderroom['RoomTypeName'] . " </td>\t\t\t\t\n\t\t\t\t</tr> \n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2><span>Guest Name(宿泊者名):</span> " . $orderroom['CustomerName'] . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width='30%'><span>Breakfast(朝食):</span> " . $orderroom['Breakfast'] . "</td>\t\t\t\n\t\t\t\t\t<td><span>Dinner(夕食):</span> " . $orderroom['Dinner'] . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2><span>Special Request(特別リクエスト):</span> " . $orderroom['Special'] . " </td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2><span>* All Special request are subjects to availability </span></td>\n\t\t\t\t</tr>\n\t\t\t</table>";
         $RoomListFax .= "<table  width=190 >\n         \t\t\t\t<tr>\n         \t\t\t\t\t<td width=5></td><td colspan=2 size=11>- Room " . $id . "</td>\n         \t\t\t\t</tr>\n         \t\t\t\t<tr>\n         \t\t\t\t\t<td width=5></td><td colspan=2>Room Plan(宿泊プラン): " . $orderroom['RoomPlanName'] . " </td>\n         \t\t\t\t</tr>\n         \t\t\t\t<tr>\n         \t\t\t\t\t<td width=5></td><td colspan=2>Room Type(ルームタイプ): " . $orderroom['RoomTypeName'] . " </td>\n         \t\t\t\t</tr>\n         \t\t\t\t<tr>\n         \t\t\t\t\t<td width=5></td><td colspan=2>Guest Name(宿泊者名): " . $orderroom['CustomerName'] . "</td>\n         \t\t\t\t</tr>\n         \t\t\t\t<tr>\n         \t\t\t\t\t<td width=5></td><td>Breakfast(朝食): " . $orderroom['Breakfast'] . "</td>\n         \t\t\t\t\t<td>Dinner(夕食): " . $orderroom['Dinner'] . "</td>\n         \t\t\t\t</tr>\n         \t\t\t\t<tr>\n         \t\t\t\t\t<td width=5></td><td colspan=2>Special Request(特別リクエスト): " . $orderroom['Special'] . " </td>\n         \t\t\t\t</tr>\n         \t\t\t\t<tr>\n         \t\t\t\t\t<td width=5></td><td colspan=2>* All Special request are subjects to availability </td>\n         \t\t\t\t</tr>\n         \t\t\t</table>";
         $id++;
     }
     $RoomString = RoomPlan::getRoomString($orderid, $iso);
     include_once substr(dirname(__FILE__), 0, -8) . '/config/mail.config.php';
     global $from, $message, $subject;
     $search = array('{#BookingNo}', '{#HotelName}', '{#UserName}', '{#HotelAddress}', '{#HotelContactNo}', '{#ContactName}', '{#ContactEmail}', '{#ContactTel}', '{#CheckIn}', '{#CheckOut}', '{#RoomString}', '{#RoomList}', '{#AgentName}', '{#AgentPhoneNo}', '{#AgentEmail}');
     $replace = array($BookingNo, $HotelName, $UserName, $HotelAddress, $HotelContactNo, $ContactName, $ContactEmail, $ContactTel, $CheckIn, $CheckOut, $RoomString, $RoomList, $AgentName, $AgentPhoneNo, $AgentEmail);
     $replaceFax = array($BookingNo, $HotelName, $UserName, $HotelAddress, $HotelContactNo, $ContactName, $ContactEmail, $ContactTel, $CheckIn, $CheckOut, $RoomString, $RoomListFax, $AgentName, $AgentPhoneNo, $AgentEmail);
     $msg = str_replace($search, $replace, $message[10][5][$languageid]);
     // $faxmsg = str_replace($search, $replaceFax, $message[21][5][$languageid]);
     $faxmsg = str_replace($search, $replaceFax, $message[21][5][4]);
     $sub = str_replace('{#BookingNo}', $BookingNo, $subject[$orderstatus][5][$languageid]);
     if ($orderstatus == 7) {
         $msg = str_replace('下記の予約をお願いいたします', '下記の予約のキャンセルをお願いいたします', $msg);
         $faxmsg = str_replace('下記の予約をお願いいたします', '下記の予約のキャンセルをお願いいたします', $faxmsg);
     }
     if ($prefEmail) {
         $headers = "From: {$from}" . "\r\n";
         $headers .= 'MIME-Version: 1.0' . "\r\n";
         $headers .= 'Content-Type: text/html; charset=utf-8' . "\r\n";
         $headers .= 'Bcc: booking@tas-agent.com';
         //echo $sub."<br/><br/><br/>".$msg;
         if ($sub != '' && $msg != '') {
             global $emailTail;
             $msgBody = $msg . $emailTail;
             self::sendEmail($to, $sub, $msg);
             //@mail($to, $sub, $msgBody, $headers);
             $Insertmsg = htmlentities($msg);
             $sql = 'insert into `HT_Mail`(MailTo, MailFrom, SubjectName, Body) value("' . $to . '", "' . $from . '", "' . $sub . '", "' . $Insertmsg . '")';
             Db::getInstance()->ExecuteS($sql);
         }
     }
     if ($prefFax) {
         global $toemail, $faxTail, $faxHead;
         $emailBody = "<p>需要给酒店发送传真.</p>\n\t\t\t\t\t\t<p>传真号为: {$Fax}</p>\n\t\t\t\t\t\t<p>订单状态为: {$orderstatus}</p>";
         $emailBody = "fax";
         $faxsub = $faxHead[$orderstatus];
         $faxsub2 = "<TAS-Agent.com> Booking ID:" . $BookingNo;
         $prefix = time();
         require_once _TAS_TOOL_DIR_ . "/tfpdf/pdffax.inc.php";
         $defFont = 'MyFont';
         $pdf = new PDFTable();
         $pdf->AddFont($defFont, '', 'ARIALUNI.TTF', true);
         $pdf->AddFont($defFont . 'B', '', 'ARIALUNI.TTF', true);
         $pdf->SetMargins(10, 2);
         $pdf->SetDrawColor(0, 0, 0);
         $pdf->SetTextColor(0, 0, 0);
         $pdf->SetPadding(0);
         $pdf->SetSpacing(0, 0);
         $pdf->AddPage();
         //header
         $pdf->SetFont($defFont, '', 10);
         $pdf->Image(_TAS_THEME_DIR_ . "/img/logo_pdf.png", 140, 15, 60);
         $pdf->htmltable("<table width=190><tr><td size=20 > </td></tr></table>", 1);
         $pdf->Ln(2);
         $pdf->htmltable("<table width=190><tr><td size=14 colspan=2>" . $faxsub . " </td></tr>\n           \t    </table>", 1);
         $pdf->Image(_TAS_THEME_DIR_ . "/img/linep.png", 10, $pdf->y, 190);
         //内容
         $pdf->htmltable($faxmsg);
         //footer
         $pdf->SetY(-30);
         $pdf->Image(_TAS_THEME_DIR_ . "/img/linep.png", 10, $pdf->y, 190);
         $pdf->Ln(1);
         $pdf->Image(_TAS_THEME_DIR_ . "/img/bottom_logo_pdf.png", 12, $pdf->y + 2, 20);
         $pdf->x = 35;
         $pdf->htmltable("<table width=90>\n    \t    <tr><td size=9>TAS Agent / TAS Co.Ltd<br>TEL 03-5565-5850<br>FAX 03-5565-5850<br>booking@tas-agent.com</td></tr>\n    \t    </table>", 0);
         $pdf->htmltable("<table width=190>\n                \t    <tr><td size=9>※TAS Agent はTAS Co.,Ltdが運営しております。 上記予約の内容については直接TASまでご連絡ください。\n                \t    </td></tr></table>", 1);
         $attachment_file = _TAS_ROOT_DIR_ . "/classes/temp/attachment_" . $prefix . ".pdf";
         //$attachment_file=_TAS_ROOT_DIR_."/config/attachment_".$prefix.".pdf";
         $pdf->Output($attachment_file);
         require_once _TAS_TOOL_DIR_ . "/PHPMailer/class.phpmailer.php";
         $mail = new PHPMailer();
         $mail->IsSMTP();
         // telling the class to use SMTP
         $mail->SMTPAuth = true;
         // enable SMTP authentication
         $mail->SMTPSecure = "ssl";
         // sets the prefix to the servier
         $mail->Host = "smtp.gmail.com";
         // sets GMAIL as the SMTP server
         $mail->Port = 465;
         // set the SMTP port for the GMAIL server
         $mail->Username = "******";
         // GMAIL username
         $mail->Password = "******";
         // GMAIL password
         $mail->SetFrom('*****@*****.**', 'fax');
         $mail->AddReplyTo("*****@*****.**", "fax");
         $mail->Subject = $faxsub2;
         $mail->MsgHTML($emailBody);
         $toemail = $Fax . "@efaxsend.com";
         $mail->AddAddress($toemail, $Fax);
         $mail->AddAttachment($attachment_file);
         // attachment
         $mail->Send();
         //发邮件
         if (file_exists($attachment_file)) {
             unlink($attachment_file);
             //删除文件
         }
     }
 }