Beispiel #1
0
<?php

require_once "inc/stdLib.php";
include "inc/wvLib.php";
$mid = $_GET["mid"] ? $_GET["mid"] : $_POST["mid"];
$aid = $_GET["aid"] ? $_GET["aid"] : $_POST["aid"];
if ($_POST["sichern"]) {
    safeMaschMat($mid, $aid, $_POST["material"]);
}
$masch = getAllMaschine($mid);
$material = getAllMat($aid, $mid);
$menu = $_SESSION['menu'];
$head = mkHeader();
?>
<html>
	<head><title>LX - CRM</title>
<?php 
echo $menu['stylesheets'];
echo $head['CRMCSS'];
?>
    
	<script language="JavaScript">
	<!--
		function selall() {
			len=document.mat.elements[2].length;
			document.mat.elements[2].multiple=true;
			for (i=0; i<len; i++) {
				document.mat.elements[2].options[i].selected=true;
			}
		}
		function subart() {
<?php

require_once "inc/stdLib.php";
include "inc/FirmenLib.php";
include "inc/wvLib.php";
include "inc/pdfpos.php";
define("FPDF_FONTPATH", "/usr/share/fpdf/font/");
define("FONTART", "2");
define("FONTSTYLE", "1");
$rep = getRAuftrag($_GET["aid"]);
$masch = getAllMaschine($rep["mid"]);
$firma = getFirmenStamm($masch["customer_id"]);
$hist = getHistory($rep["mid"]);
$material = getAllMat($_GET["aid"], $rep["mid"]);
if ($material) {
    foreach ($material as $zeile) {
        $mat .= $zeile["menge"] . " x " . substr($zeile["description"], 0, 70) . "\n";
    }
}
require "fpdf.php";
require "fpdi.php";
$pdf = new FPDI('P', 'mm', 'A4');
$seiten = $pdf->setSourceFile("vorlage/repauftrag.pdf");
$hdl = $pdf->ImportPage(1);
$pdf->addPage();
$pdf->useTemplate($hdl);
$pdf->SetFont($repfont, 'B', $repsizeL);
$pdf->Text($repname[x], $repname[y], utf8_decode($firma["name"]));
$pdf->Text($repstr[x], $repstr[y], utf8_decode($firma["street"]));
$pdf->Text($report[x], $report[y], $firma["zipcode"] . " " . utf8_decode($firma["city"]));
$pdf->Text($repphone[x], $repphone[y], $firma["phone"]);