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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
<?php
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
?>
<?
/* vim: set ts=4 sw=4 et : */
require_once __DIR__ . "/check_auth.php";
require_once __DIR__ . "/../includes/common.php";
require_once __DIR__ . "/lookup.php";
require_once __DIR__ . "/lookup_more.php";
(function () use ($mysqli) {
global $orgaID, $superorgaID;
$sql = "
SELECT
Organisationen.ID AS ID,
Organisationen.Name,
Organisationen.strasse,
Organisationen.plz,
Organisationen.ort,
Organisationen.adresszusatz,
Superorga.Name AS Superorganisation,
Superorga.ID AS SuperID
FROM Organisationen
LEFT JOIN Organisationen AS Superorga ON Organisationen.Superorganisation = Superorga.ID
WHERE Organisationen.ID=?
";
$stmt = $mysqli->prepare($sql);
$stmt->bind_param('i', $_GET['id']);
$stmt->execute();
$r = $stmt->get_result();
$l = $r->fetch_object();
$orgaID = $l->ID;
$superorgaID = $l->SuperorgaID;
$_title = 'Organisation: <span class="pii">' . $l->Name . '</span> (ID '. $_GET['id'] . ')';
include_once __DIR__ . "/header.php";
?>
<h1 style="display: inline-block;"><?=$_title?></h1>
<button class="small" onclick="showNewNoteDialog({'orgaid': <?=$orgaID?>});"><i class="fas fa-sticky-note"></i> Notiz anlegen</button>
<button class="small" style="background-color: red;" onclick="location.href='/db/main/delorga.php?id=<?=$orgaID?>';"><i class="fas fa-trash-alt"></i></sup> Datensatz löschen</button>
<?
$id = "orga";
$def = [
"Organisation",
['Name'],
[10, '=3strasse', '=3adresszusatz', 'plz', '=3ort'],
[10, '_SuperID', '_=9Superorganisation']
];
$links = [
'SuperID' => '/db/orga/'
];
$entrytable = "Organisationen";
include __DIR__ . '/autoform.php';
$stmt->reset();
})();
(function () use ($orgaID) {
$globstring = "{" . $orgaID . "orga}*_";
require_once __DIR__ . '/doc.php';
})();
include_once __DIR__ . '/notesXorga.php';
include_once __DIR__ . '/persXorga.php';
include_once __DIR__ . '/donationsXorga.php';
include_once __DIR__ . '/eventsXorga.php';
require_once __DIR__ . "/jumper.php";
include_once __DIR__ . '/footer.php';
|