2626dd47daad110c63a82c0560b134e2364eeac3
bernd Neues Modul für Mailman-Ver...

bernd authored 15 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

5) Written 2008-2018 by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
9) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

12) http://creativecommons.org/publicdomain/zero/1.0/
13) 
14) 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.
15) */
bernd Neues Modul für Mailman-Ver...

bernd authored 15 years ago

16) 
17) require_once('mailman.php');
18) require_role(ROLE_SYSTEMUSER);
19) 
20) $title = "Neue Mailingliste erstellen";
21) $domains = get_mailman_domains();
22) 
bernd Mehr config-optionen und co...

bernd authored 15 years ago

23) $maildomains = array('0' => config('mailman_host'));
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

24) foreach ($domains as $domain) {
25)     $maildomains[$domain['id']] = $domain['fqdn'];
bernd Neues Modul für Mailman-Ver...

bernd authored 15 years ago

26) }
27) 
28) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

29) if ($_GET['action'] == 'new') {
30)     $maildomain = $_POST['maildomain'];
31)     if ($maildomain == 0) {
32)         $maildomain = null;
33)     } elseif (! isset($maildomains[$maildomain])) {
34)         system_failure('Ihre Domain-Auswahl scheint ungültig zu sein');
35)     }
bernd Neues Modul für Mailman-Ver...

bernd authored 15 years ago

36) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

37)     create_list($_POST['listname'], $maildomain, $_POST['admin']);
38)     if (! $debugmode) {
39)         header('Location: lists');
40)     }
41) } elseif ($_GET['action'] == 'newpw') {
42)     $list = get_list($_GET['id']);
43)     $sure = user_is_sure();
44)     if ($sure === null) {
45)         are_you_sure('action=newpw&id='.$list['id'], 'Möchten Sie für die Mailingliste »<strong>'.$list['listname'].'</strong>@'.$list['fqdn'].'« ein neues Passwort anfordern? (Das neue Passwort wird dem Listenverwalter zugeschickt.)');
46)     } elseif ($sure === true) {
47)         request_new_password($list['id']);
48)         if (! $debugmode) {
49)             header('Location: lists');
50)         }
51)     } elseif ($sure === false) {
52)         if (! $debugmode) {
53)             header('Location: lists');
54)         }
55)     }
56) } elseif ($_GET['action'] == 'delete') {
57)     $list = get_list($_GET['id']);
58)     $sure = user_is_sure();
59)     if ($sure === null) {
60)         are_you_sure('action=delete&id='.$list['id'], 'Möchten Sie die Mailingliste »<strong>'.$list['listname'].'</strong>@'.$list['fqdn'].'« wirklich löschen?');
61)     } elseif ($sure === true) {
62)         delete_list($list['id']);
63)         if (! $debugmode) {
64)             header('Location: lists');
65)         }
66)     } elseif ($sure === false) {
67)         if (! $debugmode) {
68)             header('Location: lists');
69)         }
70)     }
71) } else {
72)     system_failure('Function not implemented');