e7712704680eb6639705105d78b20c16085aafb8
bernd Neues Modul für Mailman-Ver...

bernd authored 14 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 5 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 14 years ago

16) 
Bernd Wurst Mailman-Interface

Bernd Wurst authored 5 years ago

17) require_once('inc/jquery.php');
Bernd Wurst Zeige Link zur Mailman-List...

Bernd Wurst authored 10 years ago

18) require_once('inc/icons.php');
bernd Neues Modul für Mailman-Ver...

bernd authored 14 years ago

19) require_once('mailman.php');
20) 
21) require_role(ROLE_SYSTEMUSER);
22) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

23) title('Mailinglisten');
bernd Neues Modul für Mailman-Ver...

bernd authored 14 years ago

24) 
Hanno Böck mailman url https

Hanno Böck authored 7 years ago

25) output('<p>Mit <a href="https://www.gnu.org/software/mailman/index.html">Mailman</a> bieten wir Ihnen eine umfangreiche Lösung für E-Mail-Verteilerlisten an.</p>
bernd Neues Modul für Mailman-Ver...

bernd authored 14 years ago

26) <p>Auf dieser Seite können Sie Ihre Mailinglisten verwalten.</p>
bernd hinweis zu Mailman-Domains...

bernd authored 14 years ago

27) ');
bernd Neues Modul für Mailman-Ver...

bernd authored 14 years ago

28) 
Bernd Wurst Mailman-Interface

Bernd Wurst authored 5 years ago

29) $filter = "";
30) if (isset($_REQUEST['filter']) && $_REQUEST['filter'] != '') {
Bernd Wurst Umstellung von filter_input...

Bernd Wurst authored 4 years ago

31)     $filter = $_REQUEST['filter'];
Bernd Wurst Mailman-Interface

Bernd Wurst authored 5 years ago

32) }
33) $lists = get_lists($filter);
34) 
35) 
36) // Filter-Funktion
37) if (count($lists) > 10 || $filter) {
38)     javascript();
Bernd Wurst Umstellung von filter_input...

Bernd Wurst authored 4 years ago

39)     $form = '<p><label for="filter">Filter für die Anzeige:</label> <input type="text" name="filter" id="filter" value="'.filter_output_html($filter).'"><button type="button" id="clear" title="Filter leeren">&times;</button><input type="submit" value="Filtern!"></p>';
Bernd Wurst Mailman-Interface

Bernd Wurst authored 5 years ago

40)     output(html_form('mailman_filter', 'lists', '', $form));
41) }
42) 
bernd Neues Modul für Mailman-Ver...

bernd authored 14 years ago

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

Hanno authored 5 years ago

44) if (! empty($lists)) {
45)     addnew('newlist', 'Neue Mailingliste anlegen');
46)     output('<div id="mailman_lists_container">');
47)     foreach ($lists as $list) {
48)         $size = $list['archivesize'];
49)         $sizestr = $size.' Bytes';
50)         if (! $size) {
51)             $sizestr = '<em>Kein Archiv</em>';
52)         } else {
53)             $sizestr = sprintf('%.2f', $size/(1024*1024)).' MB';
54)         }
55) 
56) 
57)         $class = 'regular';
58)         $status = 'In Betrieb (erstellt am '.strftime('%d.%m.%Y', strtotime($list['created'])).')';
59)         if ($list['status'] == 'delete') {
60)             $class = 'deleted';
61)             $status = 'Wird gelöscht';
62)         } elseif ($list['status'] == 'pending') {
63)             $class = 'new';
64)             $status = 'Wird angelegt';
65)         } elseif ($list['status'] == 'newpw') {
66)             $class = 'edited';
67)             $status = 'Neues Passwort angefordert';
68)         } elseif ($list['status'] == 'failure') {
69)             $class = 'error';
70)             $status = 'Fehler bei der Erstellung';
71)         }
Hanno remove whitespace in empty...

Hanno authored 5 years ago

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

Hanno authored 5 years ago

73)         $admin = str_replace(',', ', ', $list['admin']);
bernd Neues Modul für Mailman-Ver...

bernd authored 14 years ago

74) 
Bernd Wurst show lastactivity and numbe...

Bernd Wurst authored 4 years ago

75)         $lastactivity = $list['lastactivity'];
76)         if (! $lastactivity || $lastactivity < '2000') {
77)             $lastactivity = '<em>nie</em>';
78)         }
Bernd Wurst Füge Leerzeichen in die Auf...

Bernd Wurst authored 5 years ago

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

Hanno authored 5 years ago

80)         output("<div class=\"mailman_list $class\"><p class=\"listname\"><span class=\"listname\">{$list['listname']}</span>@{$list['fqdn']}</p>
Bernd Wurst show lastactivity and numbe...

Bernd Wurst authored 4 years ago

81)         <p class=\"listadmin\">Verwalter: {$admin}</p><p class=\"status\">Status: {$status}<br/>Anzahl Mitglieder: {$list['subscribers']}<br/>Letzte Nutzung: {$lastactivity}</p><p class=\"archivesize\">Archivgröße: {$sizestr}</p>");
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

82)         if ($list['status'] == 'running') {
Bernd Wurst basic mailman3 support (no...

Bernd Wurst authored 3 years ago

83)             if ($list['backend'] == 'mailman' || $list['backend'] === null) {
84)                 output("<p class=\"operations\">".
85)                     internal_link('save', other_icon("lock.png", "Neues Passwort anfordern").' Neues Passwort anfordern', "action=newpw&id={$list['id']}")."<br>".
86)                     internal_link('save', icon_delete("Mailingliste löschen").' Liste löschen', "action=delete&id={$list['id']}")."<br>".
87)                     "<a href=\"https://".config('mailman_host')."/mailman/admin.cgi/{$list['listname']}\">".other_icon("database_go.png", "Listen-Verwaltung aufrufen")." Verwaltung aufrufen</a>".
88)                     "</p>\n");
89)             } elseif ($list['backend'] == 'mailman3') {
90)                 output("<p class=\"operations\">".
91)                     internal_link('save', icon_delete("Mailingliste löschen").' Liste löschen', "action=delete&id={$list['id']}")."<br>".
92)                     "<a href=\"https://".$list['urlhost']."/postorius/lists/{$list['listname']}.{$list['fqdn']}\">".other_icon("database_go.png", "Listen-Verwaltung aufrufen")." Verwaltung aufrufen</a>".
93)                     "</p>\n");
94)             }
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

95)         }
Bernd Wurst basic mailman3 support (no...

Bernd Wurst authored 3 years ago

96)         output("</div>\n");
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

97)     }
98)     output("</div>");
99) } else {
100)     // keine Listen
101)     output('<p><em>Sie betreiben bisher keine Mailinglisten.</em></p>');
bernd Neues Modul für Mailman-Ver...

bernd authored 14 years ago

102) }
103) 
bernd addnew() eingeführt

bernd authored 14 years ago

104) addnew('newlist', 'Neue Mailingliste anlegen');
105) output("
bernd Hinweis zum periodischen Up...

bernd authored 12 years ago

106) <p><strong>Hinweise:</strong><br />
Bernd Wurst Formulierung geändert

Bernd Wurst authored 6 years ago

107) <sup>1</sup>) Sie können später im Webinterface von Mailman einen abweichenden oder auch mehrere Verwalter eintragen. Die Information auf dieser Seite wird zyklisch synchronisiert.<br />