Changeset 17305 for branches/comu-ver2/data/class/SC_Fpdf.php
- Timestamp:
- 2008/05/13 12:15:47 (18 years ago)
- File:
-
- 1 edited
-
branches/comu-ver2/data/class/SC_Fpdf.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/SC_Fpdf.php
r17182 r17305 33 33 class SC_Fpdf { 34 34 35 function SC_Fpdf($arrData, $tpl_pdf = "template_nouhin01.pdf") { 36 $this->arrData = $arrData; 35 function SC_Fpdf($download, $title, $tpl_pdf = "template_nouhin01.pdf") { 37 36 // デフォルトの設定 38 37 $this->tpl_pdf = PDF_TEMPLATE_DIR . $tpl_pdf; // テンプレートファイル 39 $this->pdf_download = $ arrData[download]; // PDFのダウンロード形式(0:表示、1:ダウンロード)40 $this->tpl_title = $ arrData['title'];38 $this->pdf_download = $download; // PDFのダウンロード形式(0:表示、1:ダウンロード) 39 $this->tpl_title = $title; 41 40 $this->tpl_dispmode = "real"; // 表示モード 42 41 $masterData = new SC_DB_MasterData_Ex(); … … 68 67 // PDFを読み込んでページ数を取得 69 68 $pageno = $this->pdf->setSourceFile($this->tpl_pdf); 69 #$this->createPdf(); 70 } 71 72 function setData($arrData) { 73 $this->arrData = $arrData; 70 74 71 75 // ページ番号よりIDを取得 … … 92 96 93 97 //ロゴ画像 94 $ this->pdf->Image(PDF_TEMPLATE_DIR . 'logo.png', 124, 46, 60);95 96 $this->createPdf(); 98 $logo_file = PDF_TEMPLATE_DIR . 'logo.png'; 99 $this->pdf->Image($logo_file, 124, 46, 40); 100 97 101 } 98 102 … … 111 115 $this->lfText(125, 74, $text, 8); //都道府県+住所1 112 116 $this->lfText(125, 77, $arrInfo['addr02'], 8); //住所2 113 $text = "TEL: ".$arrInfo['tel01']."-".$arrInfo['tel02']."-".$arrInfo['tel03']." "."FAX: ".$arrInfo['fax01']."-".$arrInfo['fax02']."-".$arrInfo['fax03']; 117 118 $text = "TEL: ".$arrInfo['tel01']."-".$arrInfo['tel02']."-".$arrInfo['tel03']; 119 if (!empty($arrInfo['fax01']) && $arrInfo['fax02'] && $arrInfo['fax03']) { 120 $text .= " FAX: ".$arrInfo['fax01']."-".$arrInfo['fax02']."-".$arrInfo['fax03']; 121 } 114 122 $this->lfText(125, 80, $text, 8); //TEL・FAX 115 $text = "Email: ".$arrInfo['law_email']; 116 $this->lfText(125, 83, $text, 8); //Email 123 124 if (!empty($arrInfo['law_email'])) { 125 $text = "Email: ".$arrInfo['law_email']; 126 $this->lfText(125, 83, $text, 8); //Email 127 } 117 128 } 118 129 … … 159 170 $this->pdf->Cell(0, 45, '', 0, 2, '', 0, ''); 160 171 161 $this->pdf->SetFont('SJIS', '', 9);172 $this->pdf->SetFont('SJIS', '', 8); 162 173 163 174 $monetary_unit = $this->sjis_conv("円"); … … 270 281 ob_clean(); 271 282 if($this->pdf_download == 1) { 272 $filename = "nouhinsyo-No".$this->arrData['order_id'].".pdf"; 283 if ($this->pdf->PageNo() == 1) { 284 $filename = "nouhinsyo-No".$this->arrData['order_id'].".pdf"; 285 } else { 286 $filename = "nouhinsyo.pdf"; 287 } 273 288 $this->pdf->Output($this->sjis_conv($filename), D); 274 289 } else {
Note: See TracChangeset
for help on using the changeset viewer.
