4017b56587381a1051acf8407215cc180461a973
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';
Bernd Wurst mailman: hide deeleted lists

Bernd Wurst authored 3 years ago

62)         } elseif ($list['status'] == 'deleted') {
63)             # liste ist schon gelöscht
64)             continue
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

65)         } elseif ($list['status'] == 'pending') {
66)             $class = 'new';
67)             $status = 'Wird angelegt';
68)         } elseif ($list['status'] == 'newpw') {
69)             $class = 'edited';
70)             $status = 'Neues Passwort angefordert';
71)         } elseif ($list['status'] == 'failure') {
72)             $class = 'error';
73)             $status = 'Fehler bei der Erstellung';
74)         }
Hanno remove whitespace in empty...

Hanno authored 5 years ago

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

Hanno authored 5 years ago

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

bernd authored 14 years ago

77) 
Bernd Wurst show lastactivity and numbe...

Bernd Wurst authored 4 years ago

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

Bernd Wurst authored 5 years ago

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

Hanno authored 5 years ago

83)         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

84)         <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

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

Bernd Wurst authored 3 years ago

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

Hanno authored 5 years ago

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

Bernd Wurst authored 3 years ago

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

Hanno authored 5 years ago

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

bernd authored 14 years ago

105) }
106) 
bernd addnew() eingeführt

bernd authored 14 years ago

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

bernd authored 12 years ago

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

Bernd Wurst authored 6 years ago

110) <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 />