Exemplo n.º 1
0
<?php

require_once "inc/stdLib.php";
include "inc/template.inc";
include "inc/persLib.php";
if ($_POST["ok"]) {
    $fid = updDocFld($_POST);
    $docid = $_POST["docid"];
} else {
    if ($_POST["neu"]) {
        $fid = insDocFld($_POST);
        $docid = $_POST["docid"];
    } else {
        if ($_POST["del"]) {
            $fid = delDocFld($_POST);
            $docid = $_POST["docid"];
        } else {
            $docid = $_GET["docid"] ? $_GET["docid"] : $_POST["docid"];
        }
    }
}
$link2 = "dokument2.php?did={$docid}";
$link3 = "dokument3.php?docid={$docid}";
$doc = getDocVorlage($docid);
$t = new Template($base);
doHeader($t);
$t->set_file(array("doc" => "dokument3.tpl"));
$t->set_var(array(Link2 => $link2, Link3 => $link3, vorlage => $doc["document"]["vorlage"]));
$t->set_block("doc", "Liste", "Block");
if ($doc["felder"]) {
    foreach ($doc["felder"] as $zeile) {
Exemplo n.º 2
0
function insDocFld($data)
{
    $fid = mknewDocFeld();
    if (!$fid) {
        return false;
    }
    $data["fid"] = $fid;
    $fid = updDocFld($data);
    return $fid;
}