-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdokument3.php
51 lines (50 loc) · 1.55 KB
/
dokument3.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?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) {
$t->set_var(array(
feldname_ => $zeile["feldname"],
platzhalter_ => $zeile["platzhalter"],
laenge_ => $zeile["laenge"],
zeichen_ => $zeile["zeichen"],
position_ => $zeile["position"],
beschreibung_ => $zeile["beschreibung"],
docid => $zeile["docid"],
fid => $zeile["fid"],
));
$t->parse("Block","Liste",true);
}
} else {
$t->set_var(array(
Block => "",
docid => $docid
));
}
$t->pparse("out",array("doc"));
?>