summaryrefslogtreecommitdiff
path: root/orga.php
diff options
context:
space:
mode:
authorNiklas Olmes <niklas@olmes.de>2026-04-24 19:30:00 +0200
committerNiklas Olmes <niklas@olmes.de>2026-04-24 19:30:00 +0200
commitcdea8caa5617f0cb77bcbc9803759abd2df50644 (patch)
tree2f7f1bd3af3b2396baf5403ad1a7ad00bcb7fae9 /orga.php
stipcrmHEADmain
Diffstat (limited to 'orga.php')
-rw-r--r--orga.php83
1 files changed, 83 insertions, 0 deletions
diff --git a/orga.php b/orga.php
new file mode 100644
index 0000000..ef61680
--- /dev/null
+++ b/orga.php
@@ -0,0 +1,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>
+&nbsp;<button class="small" onclick="showNewNoteDialog({'orgaid': <?=$orgaID?>});"><i class="fas fa-sticky-note"></i> Notiz anlegen</button>
+&nbsp;<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';