dcc202fb249a446ac15c7cf413b9f1b4a3f31b58
Bernd Wurst Ermögliche das Setzen des P...

Bernd Wurst authored 6 years ago

1) <?php
2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

5) Written by schokokeks.org Hosting, namely
Bernd Wurst Ermögliche das Setzen des P...

Bernd Wurst authored 6 years ago

6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

9) This code is published under a 0BSD license.
Bernd Wurst Ermögliche das Setzen des P...

Bernd Wurst authored 6 years ago

10) 
11) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
12) */
13) 
14) require_once('contacts.php');
15) 
Bernd Wurst Lade PGP-Keys vom Keyserver...

Bernd Wurst authored 5 years ago

16) if (isset($_GET['q']) || isset($_GET['id'])) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

17)     $result = ["status" => "notfound",
18)                     "id" => null, ];
Bernd Wurst Lade PGP-Keys vom Keyserver...

Bernd Wurst authored 5 years ago

19)     $id = null;
20)     if (isset($_GET['q'])) {
21)         $id = search_pgp_key($_GET['q']);
22)         fetch_pgp_key($id);
23)     } elseif (isset($_GET['id'])) {
24)         $id = fetch_pgp_key($_GET['id']);
Bernd Wurst Ermögliche das Setzen des P...

Bernd Wurst authored 6 years ago

25)     }
26)     if ($id) {
27)         $result['status'] = 'found';
28)         $result['id'] = $id;
Bernd Wurst Lade PGP-Keys vom Keyserver...

Bernd Wurst authored 5 years ago

29)         if (!test_pgp_key($id)) {
30)             $result['status'] = 'unusable';
31)         }
Bernd Wurst Prüfe die Verwendbarkeit vo...

Bernd Wurst authored 5 years ago

32)     }