コード例 #1
0
ファイル: firmen3.php プロジェクト: vanloswang/kivitendo-crm
                } 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;";
        $btn2 = "<input id='banz' type='submit' class='anzeige' name='show' value='zur Anzeige' tabindex='91'>&nbsp;";
        vartpl($t, $_POST, $Q, $msg, $btn1, $btn2, 3);
    } else {
        if ($_POST["show"]) {
            header("location:firma1.php?Q={$Q}&id=" . $_POST["id"]);
        } else {
            if ($_GET["edit"]) {
                $daten = getFirmenStamm($_GET["id"], false, $Q);
                $msg = "Edit: <b>" . $_GET["id"] . "</b>";
                $btn1 = "<input id='bsav' type='submit' class='sichern' name='save' value='sichern' tabindex='90'>&nbsp;";
                $btn2 = "<input id='banz' type='submit' class='anzeige' name='show' value='zur Anzeige' tabindex='91'>&nbsp;";
                vartpl($t, $daten, $Q, $msg, $btn1, $btn2, 3);
            } else {
                leertpl($t, 3, $_GET, "Neueingabe");
            }
        }
    }
}
$t->Lpparse("out", array("fa1"), $_SESSION['countrycode'], "firma");
コード例 #2
0
                                for ($j = 0; $j < $cvar; $j++) {
                                    $data[] = false;
                                }
                            }
                        }
                        insertCSVData($data, $zeile["id"]);
                        if ($i <= $_SESSION['listLimit']) {
                            $t->set_var(array('Q' => $Q, 'ID' => $zeile["id"], 'LineCol' => $i % 2 + 1, 'KdNr' => $Q == "C" ? $zeile["customernumber"] : $zeile["vendornumber"], 'Name' => $zeile["name"], 'Plz' => $zeile["zipcode"], 'Ort' => $zeile["city"], 'Strasse' => $zeile["street"], 'Telefon' => $zeile["phone"], 'eMail' => $zeile["email"], 'obsolete' => $zeile['obsolete'] == 't' ? '.:yes:.' : ''));
                            $t->parse("Block", "Liste", true);
                            $i++;
                            if ($i >= $_SESSION['listLimit']) {
                                $t->set_var(array('report' => $_SESSION['listlimit'] . ' von ' . count($daten) . ' Treffer'));
                            }
                            /* $t->set_var(array( //ToDo: wofür???
                                   'Admin' => ($_SESSION['Admin'] == 1)?'visible':'hidden'
                               ));*/
                        }
                    }
                }
            } else {
                //Nichts gefunden
            }
        }
        if ($i > $_SESSION['listLimit']) {
            echo '<script>$( "#dialog_viele" ).dialog( "open" );</script>';
        }
    } else {
        leertpl($t, 1, $Q_Array, "", true, true);
    }
}
$t->Lpparse("out", array("fa1"), $_SESSION['countrycode'], "firma");