Esempio n. 1
0
        foreach ($data as $row) {
            $this->Cell($w[0], 6, $row[0], 'LR', 0, 'C', $fill);
            $this->Cell($w[1], 6, iconv('UTF-8', 'ISO-8859-1', $row[1]), 'LR', 0, 'C', $fill);
            $this->Cell($w[2], 6, iconv('UTF-8', 'ISO-8859-1', $row[2]), 'LR', 0, 'C', $fill);
            $this->Cell($w[3], 6, $row[3], 'LR', 0, 'C', $fill);
            $this->Cell($w[4], 6, iconv('UTF-8', 'ISO-8859-1', $row[4]), 'LR', 0, 'C', $fill);
            $this->Ln();
            $fill = !$fill;
        }
        //Closure line
        $this->Cell(array_sum($w), 0, '', 'T');
    }
}
$header = array('id', 'Nome', 'Email', 'Contacto', iconv('UTF-8', 'ISO-8859-1', 'Comentário'));
$gl = new Guestlist();
$guests = $gl->ListGuests(' 1 ORDER BY NAME ASC');
$data = array();
$i = 0;
foreach ($guests as $guest) {
    $data[$i][0] = $guest['id'];
    $data[$i][1] = $guest['name'];
    $data[$i][2] = $guest['email'];
    $data[$i][3] = $guest['phone'];
    $data[$i][4] = $guest['comment'];
    $i++;
}
$pdf = new PDF();
$pdf->SetFont('Arial', '', 8);
$pdf->AddPage();
$pdf->ImprovedTable($header, $data);
$pdf->Output();
Esempio n. 2
0
			}else{
				$vlImp = $drPoliza[Abono];
			}
			
			$vlCadena .= $vlImp."     "."0"."             0.0";
			$vlConceptoM = $drPoliza[ConceptoM];
			
			if(strlen($vlConceptoM) > 30){
				$vlCadena .= substr($vlConceptoM,0, 30);
			}else{
				$vlCadena .= $vlConceptoM;
			}
		}
		
		//$detallado;
	
	$pdf = new PDF('P','mm','letter');
	$pdf->AliasNbPages();
	//Ttulos de las columnas
	$header1 = array('FECHA','TIPO','NUMERO','CONCEPTO','CLASE DIARIO');
	$header2 = array('NO REF','CUENTA','','NOMBRE','DIARIO','CARGO','ABONOS');
	
	//Carga de datos
	$pdf->SetFont('Courier','B',10);	
	
	$pdf->addPage();
	
	$pdf->ImprovedTable($header1,$header2,$detallado);
	
	$pdf->Output();
?>
Esempio n. 3
0
            }
            $tmp_name_array = $_FILES['file']['tmp_name'];
            $typ_pliku = $_FILES['file']['name'];
            $typ_pliku = explode(".", $typ_pliku);
            $fragmenty = sizeof($typ_pliku);
            $typ_pliku = $typ_pliku[$fragmenty - 1];
            $file_name .= "." . $typ_pliku;
            if ($_FILES['file']['size'] > 0) {
                if (is_uploaded_file($tmp_name_array)) {
                    move_uploaded_file($tmp_name_array, "../specyfikacja/listy_przewozowe/" . $file_name . "");
                }
                $adres_skanu = "specyfikacja/listy_przewozowe/" . $file_name;
            } else {
                $adres_skanu = '';
            }
        }
        $to = array(" ", "ę", "ł");
        $na_to = array("", "e", "l");
        $name_pos = str_replace($to, $na_to, $_SESSION['salon']);
        $_POST['InputList'] = str_replace(" ", "", $_POST['InputList']);
        mysql_query("INSERT INTO historia_dokumentow (salon, data_wydruku, godzina_generacji, numer_listu, adres_pliku, adres_skanu)\n                        VALUES ('" . $_SESSION['salon'] . "', '" . date('Y-m-d') . "', '" . date('Y-m-d H:i') . "', '" . addslashes($_POST['InputList']) . "', 'specyfikacja/" . $name_pos . "/" . date('Y-m-d') . "_" . $_POST['InputList'] . ".pdf', '" . $adres_skanu . "');");
        if (!file_exists("../specyfikacja/" . $name_pos)) {
            mkdir("../specyfikacja/" . $name_pos);
        }
        $pdf->ImprovedTable($data);
        $pdf->Output("../specyfikacja/" . $name_pos . "/" . date('Y-m-d') . "_" . $_POST['InputList'] . ".pdf", "F");
    }
}
$pdf->ImprovedTable($data);
$pdf->Output();
mysql_query("INSERT INTO history(data, godzina, login, salon, what_do, gdzie)\n            VALUES ('" . date('Y-m-d') . "',\n                    '" . date('H:i:s') . "',\n                    '" . $_SESSION['login_name'] . "',\n                    '" . $_SESSION['salon'] . "',\n                    'Wygenerowano specyfikację pracownika',\n                    ' '\n            );");
		}
		
		function addFirma($mode,$p1,$p2,$titulo,$linea){
			$r1  = $p1;
			$r2  = $r1 + $linea;
			$y1  = $p2;
			$y2  = $y1+10;
			$mid = $y1 + (($y2-$y1) / 2);
			//$this->RoundedRect($r1, $y1, ($r2 - $r1), ($y2-$y1), 2.5, 'D');
			$this->Line($r1, $mid, $r2, $mid);
			$this->SetXY($r1 + ($r2-$r1)/2 -3 , ($y1 + 1) -5 );
			$this->SetFont('Courier', "B", 6);
			$this->Cell(10,5, utf8_decode($titulo), 0, 0, "C");
			$this->SetXY($r1 + ($r2-$r1)/2 -5 , $y1 + 5 );
			$this->SetFont( 'Courier', "", 6);
			$this->Cell(10,5, utf8_decode($mode), 0, 0, "C");
		}
	}
	
	$pdf = new PDF('P','mm','letter');
	$pdf->AliasNbPages();
	//Ttulos de las columnas
	$header = array('GUIA','DESTINATARIO','DESC./CONT.','PESO','PAGADO','COBRAR','EMB','INC');
	
	//Carga de datos
	$pdf->SetFont('Courier','B',12);	
	//$pdf->AddPage();	
	$pdf->ImprovedTable($header,$_GET[destino],$fechaseleccionada);
	
	$pdf->Output();
?>
Esempio n. 5
0
    foreach ($tmp_attendees as $tmp_attendee) {
        $sub_total = $tmp_attendee["final_price"] * $tmp_attendee["quantity"];
        $orig_total = $tmp_attendee["orig_price"] * $tmp_attendee["quantity"];
        $attendees[] = $pdf->LoadData(array(pdftext($tmp_attendee["event_name"] . "[" . date('m-d-Y', strtotime($tmp_attendee['start_date'])) . "]") . ' >> ' . pdftext(html_entity_decode($tmp_attendee["fname"], ENT_QUOTES, "UTF-8") . " " . html_entity_decode($tmp_attendee["lname"], ENT_QUOTES, "UTF-8")) . ';' . pdftext($tmp_attendee["quantity"]) . ';' . doubleval($tmp_attendee["final_price"]) . ';' . doubleval($sub_total)));
        $total_cost += $sub_total;
        $total_orig_cost += $orig_total;
        $total_amount_pd += $tmp_attendee["amount_pd"];
        $event_identifier = $tmp_attendee["event_identifier"];
    }
}
$header = array(__('Event & Attendee', 'event_espresso'), __('Quantity', 'event_espresso'), __('Per Unit', 'event_espresso'), __('Sub total', 'event_espresso'));
$w = array(100, 25, 30, 30);
$alling = array('L', 'L', 'C', 'C', 'C');
$left = 100 + 25 + 30;
$right = 30;
$pdf->ImprovedTable($header, $attendees, $w, $alling);
$pdf->Ln();
//if ( $total_amount_pd != $total_cost ) {
$pdf->InvoiceTotals(__('Total:', 'event_espresso'), $total_cost, $left, $right);
$text = __('Amount Paid:', 'event_espresso');
$pdf->InvoiceTotals($text, $total_amount_pd, $left, $right);
//	$discount = $total_orig_cost - $total_cost;
//	if ($discount > 0) {
//		$text = __('Discount:', 'event_espresso');
//	} else {
//		$text = __('Discount:', 'event_espresso');
//		$pdf->InvoiceTotals($text, $discount, $left, $right);
//	}
//}
$total_owing = $total_cost - $total_amount_pd;
$text = __("Total due:", 'event_espresso');
Esempio n. 6
0
                $total += $itemx->q * $item->price;
                $this->setY(95 + $starty);
                $this->setX(65);
                $starty += 5;
            }
        }
        $starty += 5;
        ///////////////////////////////////////////////////////////// Total
        $this->SetFont('Arial', '', 12);
        $this->setY(125 + $starty);
        $this->setX(20);
        $this->Cell(0, 10, "SubTotal:          " . utf8_decode($coin) . " " . number_format($total * (1 - $iva / 100), 2, ".", ","));
        $starty += 5;
        $this->setY(125 + $starty);
        $this->setX(20);
        $this->Cell(0, 10, "{$iva_txt}:                   " . utf8_decode($coin) . " " . number_format($total * ($iva / 100), 2, ".", ","));
        $starty += 5;
        $this->setY(125 + $starty);
        $this->setX(20);
        $this->Cell(0, 10, "Total:                 " . utf8_decode($coin) . " " . number_format($total, 2, ".", ","));
        /////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////
    }
}
$pdf = new PDF();
$pdf->AddPage();
// $pdf->Header();
$pdf->ImprovedTable("hola");
//echo $name;
$pdf->Output();
//print "<script>window.location=\"".$name."\";</script>";
		}
		
		function addFirma($mode,$p1,$p2,$titulo,$linea){
			$r1  = $p1;
			$r2  = $r1 + $linea;
			$y1  = $p2;
			$y2  = $y1+10;
			$mid = $y1 + (($y2-$y1) / 2);
			//$this->RoundedRect($r1, $y1, ($r2 - $r1), ($y2-$y1), 2.5, 'D');
			$this->Line($r1, $mid, $r2, $mid);
			$this->SetXY($r1 + ($r2-$r1)/2 -3 , ($y1 + 1) -5 );
			$this->SetFont('Courier', "B", 6);
			$this->Cell(10,5, utf8_decode($titulo), 0, 0, "C");
			$this->SetXY($r1 + ($r2-$r1)/2 -5 , $y1 + 5 );
			$this->SetFont( 'Courier', "", 6);
			$this->Cell(10,5, utf8_decode($mode), 0, 0, "C");
		}
	}
	
	$pdf = new PDF('P','mm','letter');
	$pdf->AliasNbPages();
	//Ttulos de las columnas
	$header = array('GUIA','DESTINATARIO','DESC./CONT.','PESO','PAGADO','COBRAR','EMB','INC');
	
	//Carga de datos
	$pdf->SetFont('Courier','B',10);	
	//$pdf->AddPage();	
	$pdf->ImprovedTable($header,$_GET[destino]);
	
	$pdf->Output();
?>
Esempio n. 8
0
}
function printcell1($tempreg)
{
    global $pdf, $height, $width;
    $pdf->myCell($width[3], $height[1], $tempreg, 'LR');
    $pdf->Ln();
}
if ($session == 'FNAN') {
    $cursession = 'FN';
}
$pdf = new PDF();
//$pdf->SetAutoPageBreak('off');
$pdf->AliasNbPages();
$pdf->SetFont('Arial', '', 14);
$pdf->AddPage();
$pdf->ImprovedTable($header, $width, $height);
for ($i = 0; $i < count($header); $i++) {
    $pdf->myCell($width[$i], $height[2], '', 'TLR');
}
$pdf->Ln();
if (isset($SESSION['edited']) && $SESSION['edited'] != 'FN' && $SESSION['edited'] != 'AN') {
    if ($session == 'FNAN') {
        $cursession = 'AN';
        mainarranger('FN');
        $ttli = counting('i');
        $ttlt = counting('t');
        arrange();
        //$session = $session2;
        //$cursession = $cursession2;
        $allhalls = $allhalls2;
        mainarranger('AN');
         }
         $pdf->SetFont('Arial', 'B', 10);
         $pdf->Write(5, $value);
         $pdf->Ln();
     }
 }
 $temp = array();
 foreach ($pdfdata['address'] as $key => $value) {
     $temp['key'][] = array(utf8_decode($key), utf8_decode($value));
 }
 $pdf->Ln(10);
 // top left area eof
 // top right area
 $pdf->SetY(45);
 $pdf->SetLeftMargin(120);
 $pdf->ImprovedTable('', $temp['key']);
 $pdf->SetLeftMargin(15);
 // top right area eof
 // invoice number
 $pdf->Ln(10);
 $pdf->SetFont('Arial', 'B', 10);
 $pdf->Cell(0, 0, utf8_decode($this->pi_getLL('admin_invoice_number') . ': ' . $invoice['invoice_id']), 0, 1, 'L');
 $pdf->Ln(5);
 // invoice number eof
 // data table
 $temp = array();
 switch ($this->LLkey) {
     case "de":
         $pdf->SetWidths(array(10, 37, 68, 17, 26, 22));
         break;
     case "nl":
Esempio n. 10
0
/**
    Datum errechnen
*/
function sendBill($db, $userData, $billNumber, $billMonth = false, $billYear = false)
{
    $bill = new PDF();
    $bill->AliasNbPages();
    $bill->AddPage();
    $data = [[utf8_decode($userData['contact_name']), 'E-Mail:'], [utf8_decode($userData['contact_street']), '*****@*****.**'], [$userData['contact_zip'] . ' ' . utf8_decode($userData['contact_city']), 'Steuernummer:'], [$userData['contact_phone'], '15/231/24307'], ['', ''], ['', '']];
    $bill->SimpleTable($data);
    // font-size for title / title
    $bill->SetFont('Arial', 'B', 16);
    $bill->Cell(0, 15, 'Rechnung', 0, 1);
    // bill number
    // change font-size
    $bill->SetFont('Arial', '', 12);
    $bill->Cell(130, 8, 'Rechnungsnummer: ' . $billNumber, 0, 0);
    $bill->Cell(0, 8, '(Bei Zahlung bitte angeben)', 0, 1, 'R');
    // bill date
    $bill->Cell(0, 8, 'Rechnungsdatum: ' . date('d.m.Y'), 0, 1);
    // bill date range
    if (isset($billMonth) && $billMonth != false && isset($billYear) && $billYear != false) {
        $bill->Cell(0, 8, 'Abrechnungzeitraum: ' . $billMonth . '.' . $billYear, 0, 1);
    } else {
        $bill->Cell(0, 8, 'Abrechnungzeitraum: ' . date('m.Y'), 0, 1);
    }
    // Line break
    $bill->Ln(16);
    $header = ['Pos.', 'Anzahl', 'Bezeichnung', 'EUR/Gesamt'];
    $price = $userData['package_price'];
    $tax = $price * 0.19;
    $data = [['1', '1', 'Paket ' . $userData['package_name'] . utf8_decode(' (Größe: ' . $userData['package_size'] . ' Anzeigen)'), number_format($price, 2, ',', '.')], ['', '', utf8_decode('zzgl. 19% Mehrwertsteuer'), number_format($tax, 2, ',', '.')]];
    $bill->ImprovedTable($header, $data);
    // Line break
    $bill->Ln(16);
    $bill->SetFont('Arial', 'B', 12);
    $total = $price + $tax;
    $bill->Cell(0, 8, 'Gesamtpreis inklusive Mehrwertsteuer in EUR: ' . number_format($total, 2, ',', '.'), 1, 1, 'R');
    // Line break
    $bill->Ln(16);
    $bill->SetFont('Arial', '', 12);
    $bill->Cell(0, 8, utf8_decode('Bitte überweisen Sie den Rechnungsbetrag unter Angabe der Rechnungsnummer innerhalb von 7 Tagen'), 0, 1, 'L');
    $bill->Cell(0, 8, 'auf folgendes Konto:', 0, 1, 'L');
    $bill->SetFont('Arial', 'B', 12);
    $bill->Cell(0, 8, 'Kontoinhaber: Rehm Jochens GbR | IBAN: DE71 2004 0000 0744 2213 00 | BIC: COBADEFFXXX', 0, 1, 'C');
    $path = APP_PATH . 'bills/' . $billNumber . '.pdf';
    $bill->Output('F', $path, true);
    // message
    $message = '';
    $message = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
    $message .= '<html lang="de">' . "\r\n";
    $message .= '<head>' . "\r\n";
    $message .= '<title>M&ouml;bel Mafia - Ihre Rechnung f&uuml;r Ihr gebuchtes Paket bei M&ouml;bel Mafia.</title>' . "\r\n";
    $message .= '<style type="text/css">' . "\r\n";
    $message .= 'a {color: #fff;}' . "\r\n";
    $message .= 'a.content-link {color: #000;}' . "\r\n";
    $message .= 'a:hover {color: #AC1A23;}' . "\r\n";
    $message .= '</style></head>' . "\r\n";
    $message .= '<body style="font-family:Arial,Helvetica,sans-serif; font-size:12px; background:#FFFFFF; padding:0px; margin:0px; padding-bottom:40px; color:#000000;">' . "\r\n";
    $message .= '<div style="width:700px; font-family:arial,helvetica,sans-serif; padding:10px 0 0 15px;">' . "\r\n";
    $message .= '<table width="700" border="0" cellspacing="0" cellpadding="0">' . "\r\n";
    $message .= '<tr><td align="left"><a href="http://www.moebel-mafia.com"><img src="http://www.moebel-mafia.com/img/moebel-mafia-mail-logo.png" width="150" height="70" border="0" alt="M&ouml;bel Mafia logo" /></a></td></tr>' . "\r\n";
    $message .= '<tr><td colspan="2" align="right" height="30"  style="font-weight:800;color:#fff;padding:15px;background:#000;border-bottom:5px solid #AC1A23;">' . "\r\n";
    // TOP TEXT
    $message .= 'Ihre Rechnung f&uuml;r Ihr gebuchtes Paket bei M&ouml;bel Mafia.' . "\r\n";
    $message .= '</td></tr></table></div>' . "\r\n";
    $message .= '<div style="margin-top:15px; width:725px;">' . "\r\n";
    $message .= '<div style="margin-left: 15px;">' . "\r\n";
    $message .= 'Vielen Dank f&uuml;r Ihre Paketbuchung bei M&ouml;bel Mafia.<br /><br />';
    $message .= 'Im Anhang finden Sie Ihre pers&ouml;nliche Rechnung.<br /><br />';
    $message .= 'Wir w&uuml;nschen Ihnen viel Freude mit M&ouml;bel Mafia!<br />';
    $message .= 'Ihr M&ouml;bel Mafia-Team<br /><br />';
    $message .= '<p style="text-align:center;color:#fff;padding:25px;background:#000;border-top:5px solid #AC1A23;">&copy; M&ouml;bel Mafia <a href="http://www.moebel-mafia.com/impressum" target="_blank">Impressum</a></p><br /><br /><br />';
    $message .= '</div></div></body></html>';
    $mail = new PHPMailer();
    $mail->From = '*****@*****.**';
    $mail->FromName = utf8_decode('Möbel Mafia');
    $mail->Subject = utf8_decode('Ihre Rechnung für die Paketbuchung bei Möbel Mafia.');
    $mail->Body = $message;
    $mail->IsHTML(true);
    $mail->AddAddress($userData['user_mail']);
    $mail->AddAttachment($path, 'Ihre_Rechnung.pdf');
    return $mail->Send();
}