Пример #1
0
    $rc = saveNeuFirmaStamm($_POST, $_FILES, $Q);
    if ($rc[0] > 0) {
        header("location:firmen3.php?Q={$Q}&id=" . $rc[0] . "&edit=1");
    } else {
        $msg = "Fehler beim Sichern (" . $rc[1] . ")";
    }
    $btn1 = "";
    $btn2 = "";
    $_POST["id"] = "";
    vartpl($t, $_POST, $Q, $msg, $btn1, $btn2, 3);
} else {
    if ($_POST["save"]) {
        if ($_POST["id"]) {
            $tabelle = $Q == "C" ? "customer" : "vendor";
            if (chkTimeStamp($tabelle, $_POST["id"], $_POST["mtime"])) {
                $rc = saveFirmaStamm($_POST, $_FILES, $Q);
                if ($rc[0] > 0) {
                    $msg = "Daten gesichert.";
                    $_POST = getFirmenStamm($rc[0], false, $Q);
                } else {
                    $msg = "Fehler beim Sichern ( " . $rc[1] . " )";
                }
            } else {
                $msg = "Daten wurden inzwischen modifiert";
                $rc[0] = -1;
            }
        } else {
            $rc[0] = -1;
            $rc[1] = "Kein Bestandskunde";
        }
        $btn1 = "<input id='bsav' type='submit' class='sichern' name='save' value='sichern' tabindex='90'>&nbsp;";
Пример #2
0
function saveNeuFirmaStamm($daten, $files, $typ = "C")
{
    $daten["id"] = mknewFirma($_SESSION["loginCRM"], $typ);
    $rs = saveFirmaStamm($daten, $files, $typ, true);
    return $rs;
}