ceb748695c84315c65963b3bdf22a48bc854e66b
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 Updated copyright notice (2...

Bernd Wurst authored 11 years ago

5) Written 2008-2013 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) require_once('session/start.php');
18) 
19) 
20) 
21) 
22) //require_role(array(ROLE_CUSTOMER, ROLE_SYSTEMUSER));
23) 
24) /*if ($user['realname'] == '')
25)   input_error('Ihr Name ist nicht im System gespeichert (siehe Stammdaten)!');
26) if ($user['email'] == '')
27)   input_error('Im System ist keine alternative eMail-Adresse gespeichert (siehe Stammdaten)!');
28) */
29) 
30) switch ($_SESSION['role'])
31) {
32) case ROLE_ANONYMOUS:
33)   login_screen('');
34)   break;
bernd VMail-accounts können sich...

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 17 years ago

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

Bernd Wurst authored 10 years ago

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

bernd authored 12 years ago

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

bernd authored 13 years ago

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

bernd authored 17 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 17 years ago

62) }
63) 
64) 
bernd Umstellung auf Theme-Suppor...

bernd authored 13 years ago

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

bernd authored 17 years ago

68) 
bernd Neues Design, neue Startseite

bernd authored 15 years ago

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

bernd authored 12 years ago

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

Bernd Wurst authored 10 years ago

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

bernd authored 12 years ago

82)     }
bernd Hinweis auf unbezahlte Rech...

bernd authored 14 years ago

83)   }
bernd Neues Design, neue Startseite

bernd authored 15 years ago

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

bernd authored 12 years ago

85) krsort($my_shortcuts);
86) DEBUG($my_shortcuts);
bernd Neues Design, neue Startseite

bernd authored 15 years ago

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

bernd authored 12 years ago

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

bernd authored 15 years ago

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

bernd authored 12 years ago

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

bernd authored 15 years ago

103) 
bernd webinterface => /webinterface

bernd authored 17 years ago

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

bernd authored 12 years ago

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