904b651c7dc557f880c8c8056ddb2f441b0b6eee
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 Neues Design, neue Startseite

bernd authored 15 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) <p>Nachfolgend sehen Sie eine Auswahl typischer Aufgaben.</p>\n");
66) 
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

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

Hanno authored 5 years ago

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

bernd authored 12 years ago

78)     }
bernd Neues Design, neue Startseite

bernd authored 15 years ago

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

bernd authored 12 years ago

80) krsort($my_shortcuts);
81) DEBUG($my_shortcuts);
bernd Neues Design, neue Startseite

bernd authored 15 years ago

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

bernd authored 12 years ago

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

Hanno authored 5 years ago

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

bernd authored 12 years ago

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

Hanno authored 5 years ago

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

bernd authored 12 years ago

93)     }
94)     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

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

bernd authored 12 years ago

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

bernd authored 15 years ago

97) 
Bernd Wurst Zeige Benutzeraccount-Stamm...

Bernd Wurst authored 10 years ago

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

Hanno authored 5 years ago

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

Bernd Wurst authored 10 years ago

101) }
102) 
bernd webinterface => /webinterface

bernd authored 17 years ago

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

bernd authored 12 years ago

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

Hanno authored 5 years ago

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