7ae33deebfbf80fde9235c3cea37c80930fe1f77
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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

5) Written 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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

10) 
11) 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.
12) */
bernd webinterface => /webinterface

bernd authored 17 years ago

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

Hanno authored 5 years ago

23) switch ($_SESSION['role']) {
Hanno Böck more strict codingstyle wit...

Hanno Böck authored 1 year ago

24)     case ROLE_ANONYMOUS:
25)         login_screen('');
26)         break;
27)     case ROLE_VMAIL_ACCOUNT:
28)         $role = "{$_SESSION['mailaccount']}, angemeldet als E-Mail-Account";
29)         break;
30)     case ROLE_MAILACCOUNT:
31)         $role = "{$_SESSION['mailaccount']}, angemeldet als IMAP/POP3-Account";
32)         break;
33)     case ROLE_SYSTEMUSER:
34)         $role = "{$_SESSION['userinfo']['name']}, angemeldet als Benutzer";
35)         break;
36)     case ROLE_SYSTEMUSER | ROLE_SUBUSER:
37)     case ROLE_SYSTEMUSER | ROLE_CUSTOMER | ROLE_SUBUSER:
38)         $role = "{$_SESSION['subuser']}, Unternutzer von {$_SESSION['userinfo']['username']}";
39)         break;
40)     case ROLE_CUSTOMER:
41)         $role = "{$_SESSION['customerinfo']['name']}, angemeldet als Kunde";
42)         break;
43)     case ROLE_CUSTOMER | ROLE_SYSTEMUSER:
44)         $role = "{$_SESSION['customerinfo']['name']}, angemeldet als Kunde und Benutzer";
45)         break;
46)     case ROLE_SYSTEMUSER | ROLE_SYSADMIN:
47)         $role = "{$_SESSION['userinfo']['name']}, angemeldet als Benutzer und Administrator";
48)         break;
49)     case ROLE_CUSTOMER | ROLE_SYSTEMUSER | ROLE_SYSADMIN:
50)         $role = "{$_SESSION['customerinfo']['name']}, angemeldet als Kunde, Benutzer und Administrator";
51)         break;
52)     default:
53)         system_failure('Interner Fehler (»Unbekannte Rolle: '.$_SESSION['role'].'«)');
bernd webinterface => /webinterface

bernd authored 17 years ago

54) }
55) 
56) 
bernd Umstellung auf Theme-Suppor...

bernd authored 13 years ago

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

bernd authored 17 years ago

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

Bernd Wurst authored 3 years ago

61) output("<p>Auf der linken Seite sehen Sie ein Auswahlmenü mit den Funktionen, die Ihnen in diesem Webinterface zur Verfügung stehen.</p>");
62) if (is_locked()) {
63)     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>');
64) }
65) output("<p>Nachfolgend sehen Sie eine Auswahl typischer Aufgaben.</p>\n");
bernd Neues Design, neue Startseite

bernd authored 15 years ago

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

bernd authored 12 years ago

67) $modules = get_modules_info();
68) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 2 years ago

69) $my_shortcuts = [];
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

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')) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 2 years ago

72)         $shortcuts = [];
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

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>");