df4393ed3a05f97cf243500eb36be872679284e6
bernd webinterface => /webinterface

bernd authored 19 years ago

1) <?php
Hanno Böck Add newlines before comment...

Hanno Böck authored 1 year ago

2) 
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 14 years ago

3) /*
4) This file belongs to the Webinterface of schokokeks.org Hosting
5) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 4 years ago

6) Written by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 14 years ago

7)   Bernd Wurst <bernd@schokokeks.org>
8)   Hanno Böck <hanno@schokokeks.org>
9) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 4 years ago

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

Bernd Wurst authored 14 years ago

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

bernd authored 19 years ago

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

Hanno authored 8 years ago

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

Hanno Böck authored 4 years ago

25)     case ROLE_ANONYMOUS:
26)         login_screen('');
27)         break;
28)     case ROLE_VMAIL_ACCOUNT:
Bernd Wurst Set translate=no to several...

Bernd Wurst authored 1 year ago

29)         $role = "<span translate=\"no\">{$_SESSION['mailaccount']}</span>, angemeldet als E-Mail-Account";
Hanno Böck more strict codingstyle wit...

Hanno Böck authored 4 years ago

30)         break;
31)     case ROLE_MAILACCOUNT:
Bernd Wurst Set translate=no to several...

Bernd Wurst authored 1 year ago

32)         $role = "<span translate=\"no\">{$_SESSION['mailaccount']}</span>, angemeldet als IMAP/POP3-Account";
Hanno Böck more strict codingstyle wit...

Hanno Böck authored 4 years ago

33)         break;
34)     case ROLE_SYSTEMUSER:
Bernd Wurst Set translate=no to several...

Bernd Wurst authored 1 year ago

35)         $role = "<span translate=\"no\">{$_SESSION['userinfo']['name']}</span>, angemeldet als Benutzer";
Hanno Böck more strict codingstyle wit...

Hanno Böck authored 4 years ago

36)         break;
37)     case ROLE_SYSTEMUSER | ROLE_SUBUSER:
38)     case ROLE_SYSTEMUSER | ROLE_CUSTOMER | ROLE_SUBUSER:
Bernd Wurst Set translate=no to several...

Bernd Wurst authored 1 year ago

39)         $role = "<span translate=\"no\">{$_SESSION['subuser']}</span>, Unternutzer von <span translate=\"no\">{$_SESSION['userinfo']['username']}</span>";
Hanno Böck more strict codingstyle wit...

Hanno Böck authored 4 years ago

40)         break;
41)     case ROLE_CUSTOMER:
Bernd Wurst Set translate=no to several...

Bernd Wurst authored 1 year ago

42)         $role = "<span translate=\"no\">{$_SESSION['customerinfo']['name']}</span>, angemeldet als Kunde";
Hanno Böck more strict codingstyle wit...

Hanno Böck authored 4 years ago

43)         break;
44)     case ROLE_CUSTOMER | ROLE_SYSTEMUSER:
Bernd Wurst Set translate=no to several...

Bernd Wurst authored 1 year ago

45)         $role = "<span translate=\"no\">{$_SESSION['customerinfo']['name']}</span>, angemeldet als Kunde und Benutzer";
Hanno Böck more strict codingstyle wit...

Hanno Böck authored 4 years ago

46)         break;
47)     case ROLE_SYSTEMUSER | ROLE_SYSADMIN:
Bernd Wurst Set translate=no to several...

Bernd Wurst authored 1 year ago

48)         $role = "<span translate=\"no\">{$_SESSION['userinfo']['name']}</span>, angemeldet als Benutzer und Administrator";
Hanno Böck more strict codingstyle wit...

Hanno Böck authored 4 years ago

49)         break;
50)     case ROLE_CUSTOMER | ROLE_SYSTEMUSER | ROLE_SYSADMIN:
Bernd Wurst Set translate=no to several...

Bernd Wurst authored 1 year ago

51)         $role = "<span translate=\"no\">{$_SESSION['customerinfo']['name']}</span>, angemeldet als Kunde, Benutzer und Administrator";
Hanno Böck more strict codingstyle wit...

Hanno Böck authored 4 years ago

52)         break;
53)     default:
Hanno Böck Spaces between string conca...

Hanno Böck authored 3 years ago

54)         system_failure('Interner Fehler (»Unbekannte Rolle: ' . $_SESSION['role'] . '«)');
bernd webinterface => /webinterface

bernd authored 19 years ago

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

bernd authored 16 years ago

58) title('Übersicht');
59) headline('Administration');
Bernd Wurst Set translate=no to several...

Bernd Wurst authored 1 year ago

60) output('<p>Herzlich willkommen ' . $role . ".</p>\n");
bernd webinterface => /webinterface

bernd authored 19 years ago

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

Bernd Wurst authored 6 years ago

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

bernd authored 17 years ago

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

bernd authored 14 years ago

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

Hanno Böck authored 5 years ago

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

bernd authored 14 years ago

71) foreach ($modules as $modname => $info) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 3 years ago

72)     if (file_exists('modules/' . $modname . '/shortcuts.php')) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 5 years ago

73)         $shortcuts = [];
Hanno Böck Spaces between string conca...

Hanno Böck authored 3 years ago

74)         include('modules/' . $modname . '/shortcuts.php');
Hanno Fix coding style with php-c...

Hanno authored 8 years ago

75)         foreach ($shortcuts as $shortcut) {
76)             $shortcut['module'] = $modname;
Hanno Böck Spaces between string conca...

Hanno Böck authored 3 years ago

77)             $my_shortcuts[$shortcut['weight'] . $modname] = $shortcut;
Hanno Fix coding style with php-c...

Hanno authored 8 years ago

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

bernd authored 14 years ago

79)     }
bernd Neues Design, neue Startseite

bernd authored 17 years ago

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

bernd authored 14 years ago

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

bernd authored 17 years ago

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

bernd authored 14 years ago

84) 
85) output("<div class=\"overview\">");
86) foreach ($my_shortcuts as $shortcut) {
87)     $icon = "images/default.png";
Hanno Böck Spaces between string conca...

Hanno Böck authored 3 years ago

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

bernd authored 14 years ago

90)     }
91)     $alert = '';
92)     if (isset($shortcut['alert']) && $shortcut['alert']) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 3 years ago

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

bernd authored 14 years ago

94)     }
Hanno Böck Spaces between string conca...

Hanno Böck authored 3 years ago

95)     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 17 years ago

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

bernd authored 14 years ago

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

bernd authored 17 years ago

98) 
Bernd Wurst Zeige Benutzeraccount-Stamm...

Bernd Wurst authored 12 years ago

99) if (have_module('systemuser') && $_SESSION['role'] & ROLE_SYSTEMUSER) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 3 years ago

100)     ini_set('include_path', ini_get('include_path') . ':modules/systemuser/include');
Hanno Fix coding style with php-c...

Hanno authored 8 years ago

101)     include('modules/systemuser/overview.php');
Bernd Wurst Zeige Benutzeraccount-Stamm...

Bernd Wurst authored 12 years ago

102) }
103) 
bernd webinterface => /webinterface

bernd authored 19 years ago

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

bernd authored 14 years ago

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

Hanno authored 8 years ago

106)     include('modules/email/vmailoverview.php');
Hanno Böck Spaces between string conca...

Hanno Böck authored 3 years ago

107)     output("<div class=\"vmailoverview\">" . $content . "</div>");