fecf1c0bd221a4268a6d36d11e2caed4c0435e66
bernd webinterface => /webinterface

bernd authored 17 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 webinterface => /webinterface

bernd authored 17 years ago

16) 
17) 
18) //require_role(array(ROLE_CUSTOMER, ROLE_SYSTEMUSER));
19) 
20) /*if ($user['realname'] == '')
21)   input_error('Ihr Name ist nicht im System gespeichert (siehe Stammdaten)!');
22) if ($user['email'] == '')
23)   input_error('Im System ist keine alternative eMail-Adresse gespeichert (siehe Stammdaten)!');
24) */
25) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

26) switch ($_SESSION['role']) {
bernd webinterface => /webinterface

bernd authored 17 years ago

27) case ROLE_ANONYMOUS:
28)   login_screen('');
29)   break;
bernd VMail-accounts können sich...

bernd authored 16 years ago

30) case ROLE_VMAIL_ACCOUNT:
31)   $role = "{$_SESSION['mailaccount']}, angemeldet als E-Mail-Account";
32)   break;
bernd Auch mailaccounts können si...

bernd authored 16 years ago

33) case ROLE_MAILACCOUNT:
34)   $role = "{$_SESSION['mailaccount']}, angemeldet als IMAP/POP3-Account";
35)   break;
bernd webinterface => /webinterface

bernd authored 17 years ago

36) case ROLE_SYSTEMUSER:
37)   $role = "{$_SESSION['userinfo']['name']}, angemeldet als Benutzer";
38)   break;
Bernd Wurst Subuser sollen nicht automa...

Bernd Wurst authored 10 years ago

39) case ROLE_SYSTEMUSER | ROLE_SUBUSER:
bernd Berechtigungen für Subuser...

bernd authored 12 years ago

40) case ROLE_SYSTEMUSER | ROLE_CUSTOMER | ROLE_SUBUSER:
bernd Erlaube subusers, die nur Z...

bernd authored 13 years ago

41)   $role = "{$_SESSION['subuser']}, Unternutzer von {$_SESSION['userinfo']['username']}";
42)   break;
bernd webinterface => /webinterface

bernd authored 17 years ago

43) case ROLE_CUSTOMER:
44)   $role = "{$_SESSION['customerinfo']['name']}, angemeldet als Kunde";
45)   break;
bernd * Initialisierung der Sessi...

bernd authored 16 years ago

46) case ROLE_CUSTOMER | ROLE_SYSTEMUSER:
47)   $role = "{$_SESSION['customerinfo']['name']}, angemeldet als Kunde und Benutzer";
48)   break;
bernd Es kann auch ein Admin kein...

bernd authored 15 years ago

49) case ROLE_SYSTEMUSER | ROLE_SYSADMIN:
50)   $role = "{$_SESSION['userinfo']['name']}, angemeldet als Benutzer und Administrator";
51)   break;
bernd * Initialisierung der Sessi...

bernd authored 16 years ago

52) case ROLE_CUSTOMER | ROLE_SYSTEMUSER | ROLE_SYSADMIN:
53)   $role = "{$_SESSION['customerinfo']['name']}, angemeldet als Kunde, Benutzer und Administrator";
54)   break;
55) default:
56)   system_failure('Interner Fehler (»Unbekannte Rolle: '.$_SESSION['role'].'«)');
bernd webinterface => /webinterface

bernd authored 17 years ago

57) }
58) 
59) 
bernd Umstellung auf Theme-Suppor...

bernd authored 13 years ago

60) title('Übersicht');
61) headline('Administration');
62) output('<p>Herzlich willkommen, '.$role.".</p>\n");
bernd webinterface => /webinterface

bernd authored 17 years ago

63) 
Bernd Wurst show a warning on the start...

Bernd Wurst authored 3 years ago

64) output("<p>Auf der linken Seite sehen Sie ein Auswahlmenü mit den Funktionen, die Ihnen in diesem Webinterface zur Verfügung stehen.</p>");
65) if (is_locked()) {
66)     output('<div class="error"><p><strong>Achtung: Ihr Kundenkonto ist gesperrt!</strong></p><p>Ihr Kundenkonto ist im Moment gesperrt. Das bedeutet, dass Ihre Websites nicht mehr abrufbar sind und Ihre E-Mail-Adresen keine Nachrichten mehr empfangen können.</p><p>Um die Sperrung aufzuheben, nehmen Sie bitte Kontakt mit uns auf!</p></div>');
67) }
68) output("<p>Nachfolgend sehen Sie eine Auswahl typischer Aufgaben.</p>\n");
bernd Neues Design, neue Startseite

bernd authored 15 years ago

69) 
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

70) $modules = get_modules_info();
71) 
72) $my_shortcuts = array();
73) foreach ($modules as $modname => $info) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

74)     if (file_exists('modules/'.$modname.'/shortcuts.php')) {
75)         $shortcuts = array();
76)         include('modules/'.$modname.'/shortcuts.php');
77)         foreach ($shortcuts as $shortcut) {
78)             $shortcut['module'] = $modname;
79)             $my_shortcuts[$shortcut['weight'].$modname] = $shortcut;
80)         }
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

81)     }
bernd Neues Design, neue Startseite

bernd authored 15 years ago

82) }
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

83) krsort($my_shortcuts);
84) DEBUG($my_shortcuts);
bernd Neues Design, neue Startseite

bernd authored 15 years ago

85) 
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

86) 
87) output("<div class=\"overview\">");
88) foreach ($my_shortcuts as $shortcut) {
89)     $icon = "images/default.png";
90)     if (file_exists("images/".$shortcut['icon'])) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

91)         $icon = "images/".$shortcut['icon'];
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

92)     }
93)     $alert = '';
94)     if (isset($shortcut['alert']) && $shortcut['alert']) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

95)         $alert = '<br /><span style="color: red;">('.$shortcut['alert'].')</span>';
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

96)     }
97)     output("<div class=\"block\">".internal_link($prefix.'go/'.$shortcut['module'].'/'.$shortcut['file'], "<img src=\"{$prefix}{$icon}\" alt=\"\" /> {$shortcut['title']} {$alert}")."</div>");
bernd Neues Design, neue Startseite

bernd authored 15 years ago

98) }
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

99) output('</div>');
bernd Neues Design, neue Startseite

bernd authored 15 years ago

100) 
Bernd Wurst Zeige Benutzeraccount-Stamm...

Bernd Wurst authored 10 years ago

101) if (have_module('systemuser') && $_SESSION['role'] & ROLE_SYSTEMUSER) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

102)     ini_set('include_path', ini_get('include_path').':modules/systemuser/include');
103)     include('modules/systemuser/overview.php');
Bernd Wurst Zeige Benutzeraccount-Stamm...

Bernd Wurst authored 10 years ago

104) }
105) 
bernd webinterface => /webinterface

bernd authored 17 years ago

106) 
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

107) if (have_module('email') && $_SESSION['role'] & ROLE_VMAIL_ACCOUNT) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

108)     include('modules/email/vmailoverview.php');
109)     output("<div class=\"vmailoverview\">".$content."</div>");