e724ee5757f09673578c6bb0067ae6ba19c97fe6
Bernd Wurst Choose-Funktion

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 1 year ago

5) Written by schokokeks.org Hosting, namely
Bernd Wurst Choose-Funktion

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 1 year ago

9) This code is published under a 0BSD license.
Bernd Wurst Choose-Funktion

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('contactapi.php');
15) require_once('inc/base.php');
16) 
17) require_once('contacts.php');
18) 
19) if (! isset($_SESSION['contacts_choose_key'])) {
20)     system_failure("Ungültiger Aufruf dieser Funktion");
21) }
22) $sesskey = $_SESSION['contacts_choose_key'];
23) 
24) if (isset($_REQUEST['id'])) {
25)     $c = get_contact($_REQUEST['id']);
26)     $_SESSION[$sesskey] = $c['id'];
Bernd Wurst Domain-Update (Ownerchange)...

Bernd Wurst authored 6 years ago

27)     $redirect = $_SESSION['contacts_choose_redirect'];
28)     unset($_SESSION['contacts_choose_header']);
29)     unset($_SESSION['contacts_choose_key']);
30)     unset($_SESSION['contacts_choose_redirect']);
31)     redirect($redirect);
Bernd Wurst Choose-Funktion

Bernd Wurst authored 6 years ago

32) }
33) 
34) 
35) title('Kontakt auswählen');
36) $section = 'contacts_list';
37) 
38) if (isset($_SESSION['contacts_choose_header'])) {
39)     output($_SESSION['contacts_choose_header']);
40) } else {
41)     output('Wählen Sie einen Kontakt aus!');
42) }
43) 
44) 
45) output('<div class="contact-list">');
Bernd Wurst improved domain owner selec...

Bernd Wurst authored 1 year ago

46) $contacts = get_contacts();
47) $hvae_invalid = false;
Bernd Wurst Choose-Funktion

Bernd Wurst authored 6 years ago

48) foreach ($contacts as $c) {
Bernd Wurst improved domain owner selec...

Bernd Wurst authored 1 year ago

49)     if (possible_domainholder($c)) {
50)         output(internal_link('', display_contact($c), "id={$c['id']}", 'class="contacts-choose"'));
51)     } else {
52)         $have_invalid = true;
53)         output(display_contact($c, '<p><em>Datensatz unvollständig</em></p>'));
54)     }
Bernd Wurst Choose-Funktion

Bernd Wurst authored 6 years ago

55) }
56) 
57) output('</div>');
58) 
Bernd Wurst improved domain owner selec...

Bernd Wurst authored 1 year ago

59) if ($have_invalid) {
60)     warning('Sie haben Kontakte, die nicht als Domaininhaber gewählt werden können.
61)     Zur Verwendung als Domaininhaber müssen Name, vollständige Adresse, E-Mail-Adresse sowie Telefonnummer angegeben sein.');
62) }
63)