537717a23227c6b73fdea57cf61c7c32482a13ee
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 Lizenzinfos in eigenes Modu...

Bernd Wurst authored 10 years ago

5) Written 2008-2014 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) 
11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
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) 
26) switch ($_SESSION['role'])
27) {
28) case ROLE_ANONYMOUS:
29)   login_screen('');
30)   break;
bernd VMail-accounts können sich...

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 17 years ago

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

Bernd Wurst authored 10 years ago

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

bernd authored 12 years ago

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

bernd authored 13 years ago

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

bernd authored 17 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 17 years ago

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

bernd authored 13 years ago

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

bernd authored 17 years ago

64) 
bernd Neues Design, neue Startseite

bernd authored 15 years ago

65) output("<p>Auf der linken Seite sehen Sie ein Auswahlmenü mit den Funktionen, die Ihnen in diesem Webinterface zur Verfügung stehen.</p>
66) <p>Nachfolgend sehen Sie eine Auswahl typischer Aufgaben.</p>\n");
67) 
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

68) $modules = get_modules_info();
69) 
70) $my_shortcuts = array();
71) foreach ($modules as $modname => $info) {
72)   if (file_exists('modules/'.$modname.'/shortcuts.php')) {
73)     $shortcuts = array();
74)     include('modules/'.$modname.'/shortcuts.php');
75)     foreach ($shortcuts as $shortcut) {
76)       $shortcut['module'] = $modname;
Bernd Wurst ermögliche mehrere Shortcut...

Bernd Wurst authored 10 years ago

77)       $my_shortcuts[$shortcut['weight'].$modname] = $shortcut;
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

78)     }
bernd Hinweis auf unbezahlte Rech...

bernd authored 14 years ago

79)   }
bernd Neues Design, neue Startseite

bernd authored 15 years ago

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

bernd authored 12 years ago

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

bernd authored 15 years ago

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

bernd authored 12 years ago

84) 
85) output("<div class=\"overview\">");
86) foreach ($my_shortcuts as $shortcut) {
87)     $icon = "images/default.png";
88)     if (file_exists("images/".$shortcut['icon'])) {
89)       $icon = "images/".$shortcut['icon'];
90)     }
91)     $alert = '';
92)     if (isset($shortcut['alert']) && $shortcut['alert']) {
93)       $alert = '<br /><span style="color: red;">('.$shortcut['alert'].')</span>';
94)     }
95)     output("<div class=\"block\">".internal_link($prefix.'go/'.$shortcut['module'].'/'.$shortcut['file'], "<img src=\"{$prefix}{$icon}\" alt=\"\" /> {$shortcut['title']} {$alert}")."</div>");
96)   
bernd Neues Design, neue Startseite

bernd authored 15 years ago

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

bernd authored 12 years ago

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

bernd authored 15 years ago

99) 
Bernd Wurst Zeige Benutzeraccount-Stamm...

Bernd Wurst authored 10 years ago

100) if (have_module('systemuser') && $_SESSION['role'] & ROLE_SYSTEMUSER) {
101)   ini_set('include_path', ini_get('include_path').':modules/systemuser/include');
102)   include('modules/systemuser/overview.php');
103) }
104) 
bernd webinterface => /webinterface

bernd authored 17 years ago

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

bernd authored 12 years ago

106) if (have_module('email') && $_SESSION['role'] & ROLE_VMAIL_ACCOUNT) {
107)   include('modules/email/vmailoverview.php');
108)   output("<div class=\"vmailoverview\">".$content."</div>");
109) }
110) 
111)