Пример #1
0
    $rep["datum"] = date("d.m.Y");
}
$t->set_block("masch", "History", "Block1");
if ($hist) {
    if ($rep['aid']) {
        $t->set_var(array(date => '', art => '', open => ' ', beschreibung => "<a href='repauftrag.php?mid={$mid}'>Neuer Auftrag</a>"));
        $t->parse("Block1", "History", true);
    }
    while ($zeile = array_shift($hist)) {
        $open = ' ';
        if ($zeile["art"] == "RepAuftr") {
            $open = $zeile['status'] == 2 ? 'close' : 'open';
            $art = "<a href='repauftrag.php?hole=" . $zeile['bezug'] . "'>RepAuftr</a>";
        } else {
            if ($zeile["art"] == "contsub") {
                $vid = suchVertrag($beschr);
                $art = "<a href='vertrag3.php?vid=" . $vid[0]["cid"] . "'>contsub</a>";
            } else {
                continue;
            }
        }
        $t->set_var(array(date => db2date(substr($zeile["itime"], 0, 10)), art => $art, open => $open, beschreibung => $zeile["beschreibung"]));
        $t->parse("Block1", "History", true);
    }
}
if (!$rep["aid"]) {
    $disp2 = "style='display:none'";
    $disp3 = $disp2;
    $sel1 = "checked";
    $sel2 = "";
    $sel3 = "";
Пример #2
0
<?php

require_once "inc/stdLib.php";
include "inc/wvLib.php";
$menu = $_SESSION['menu'];
$head = mkHeader();
if ($_POST["ok"]) {
    $vid = suchVertrag($_POST["vid"]);
    if (!$vid) {
        $msg = "Kein Vertrag gefunden";
    } else {
        if (count($vid) == 1) {
            header("location:vertrag3.php?vid=" . $vid[0]["cid"]);
        }
    }
}
?>
<html>
    <head><title></title>
<?php 
echo $menu['stylesheets'];
echo $head['CRMCSS'];
echo $head['JQUERY'];
echo $head['JQUERYUI'];
echo $head['THEME'];
echo $head['JQTABLE'];
echo $menu['javascripts'];
?>
    <script>
    $(function() {
        $("#treffer")
Пример #3
0
<?php

require_once "inc/stdLib.php";
include "inc/FirmenLib.php";
include "inc/wvLib.php";
$rep = suchVertrag($_GET["aid"]);
$rep = $rep[0];
//$masch=getVertragMaschinen($rep["contractnumber"]);
$masch = getVertragMaschinen($rep["cid"]);
$firma = getFirmenStamm($masch["customer_id"]);
include 'inc/phpOpenOffice.php';
$doc = new phpOpenOffice();
$doc->loadDocument("vorlage/wv" . $rep["template"]);
$vars = array();
$vars["NAME"] = $firma["name"];
$vars["STRASSE"] = $firma["street"];
$vars["PLZ"] = $firma["zipcode"];
$vars["ORT"] = $firma["city"];
$vars["BEMERKUNGEN"] = $rep["bemerkung"];
$vars["NUMMER"] = $rep["aid"];
$vars["DATUM"] = $rep["datum"];
$vars["KNDR"] = $rep["customer_id"];
$vars["EURO"] = $rep["betrag"];
foreach ($masch as $row) {
    $vars["MASCHINEN"] .= $row["description"] . " #" . $row["serialnumber"] . "\n" . $row["standort"] . "\n";
}
$doc->parse($vars);
$pre = date("YmdHi");
$doc->prepsave($pre . substr($rep["template"], 0, -4));
$data["CID"] = $masch["customer_id"];
$data["CRMUSER"] = $_SESSION["loginCRM"];