Browse code

show a warning on the start page when customer account is locked

Bernd Wurst authored on20/05/2020 11:19:51
Showing1 changed files
... ...
@@ -61,8 +61,11 @@ title('Übersicht');
61 61
 headline('Administration');
62 62
 output('<p>Herzlich willkommen, '.$role.".</p>\n");
63 63
 
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");
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
+if (is_locked()) {
66
+    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>');
67
+}
68
+output("<p>Nachfolgend sehen Sie eine Auswahl typischer Aufgaben.</p>\n");
66 69
 
67 70
 $modules = get_modules_info();
68 71
 
Browse code

Fix coding style with php-cs-checker, see https://cs.sensiolabs.org/

Hanno authored on26/06/2018 13:58:19
Showing1 changed files
... ...
@@ -8,7 +8,7 @@ Written 2008-2018 by schokokeks.org Hosting, namely
8 8
 
9 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 10
 
11
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
11
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
12 12
 http://creativecommons.org/publicdomain/zero/1.0/
13 13
 
14 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.
... ...
@@ -23,8 +23,7 @@ if ($user['email'] == '')
23 23
   input_error('Im System ist keine alternative eMail-Adresse gespeichert (siehe Stammdaten)!');
24 24
 */
25 25
 
26
-switch ($_SESSION['role'])
27
-{
26
+switch ($_SESSION['role']) {
28 27
 case ROLE_ANONYMOUS:
29 28
   login_screen('');
30 29
   break;
... ...
@@ -69,14 +68,14 @@ $modules = get_modules_info();
69 68
 
70 69
 $my_shortcuts = array();
71 70
 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;
77
-      $my_shortcuts[$shortcut['weight'].$modname] = $shortcut;
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
+        }
78 78
     }
79
-  }
80 79
 }
81 80
 krsort($my_shortcuts);
82 81
 DEBUG($my_shortcuts);
... ...
@@ -86,27 +85,23 @@ output("<div class=\"overview\">");
86 85
 foreach ($my_shortcuts as $shortcut) {
87 86
     $icon = "images/default.png";
88 87
     if (file_exists("images/".$shortcut['icon'])) {
89
-      $icon = "images/".$shortcut['icon'];
88
+        $icon = "images/".$shortcut['icon'];
90 89
     }
91 90
     $alert = '';
92 91
     if (isset($shortcut['alert']) && $shortcut['alert']) {
93
-      $alert = '<br /><span style="color: red;">('.$shortcut['alert'].')</span>';
92
+        $alert = '<br /><span style="color: red;">('.$shortcut['alert'].')</span>';
94 93
     }
95 94
     output("<div class=\"block\">".internal_link($prefix.'go/'.$shortcut['module'].'/'.$shortcut['file'], "<img src=\"{$prefix}{$icon}\" alt=\"\" /> {$shortcut['title']} {$alert}")."</div>");
96
-  
97 95
 }
98 96
 output('</div>');
99 97
 
100 98
 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');
99
+    ini_set('include_path', ini_get('include_path').':modules/systemuser/include');
100
+    include('modules/systemuser/overview.php');
103 101
 }
104 102
 
105 103
 
106 104
 if (have_module('email') && $_SESSION['role'] & ROLE_VMAIL_ACCOUNT) {
107
-  include('modules/email/vmailoverview.php');
108
-  output("<div class=\"vmailoverview\">".$content."</div>");
105
+    include('modules/email/vmailoverview.php');
106
+    output("<div class=\"vmailoverview\">".$content."</div>");
109 107
 }
110
-
111
-
112
-?>
Browse code

Copyright year update

Bernd Wurst authored on13/01/2018 06:07:05
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2014 by schokokeks.org Hosting, namely
5
+Written 2008-2018 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Zeige Benutzeraccount-Stammdaten auf der Startseite

Bernd Wurst authored on08/02/2014 14:24:06
Showing1 changed files
... ...
@@ -97,6 +97,11 @@ foreach ($my_shortcuts as $shortcut) {
97 97
 }
98 98
 output('</div>');
99 99
 
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
+
100 105
 
101 106
 if (have_module('email') && $_SESSION['role'] & ROLE_VMAIL_ACCOUNT) {
102 107
   include('modules/email/vmailoverview.php');
Browse code

Lizenzinfos in eigenes Modul ausgelagert und Copyright auf 2014 angepasst

Bernd Wurst authored on08/02/2014 05:45:07
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2013 by schokokeks.org Hosting, namely
5
+Written 2008-2014 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
... ...
@@ -14,10 +14,6 @@ http://creativecommons.org/publicdomain/zero/1.0/
14 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 15
 */
16 16
 
17
-require_once('session/start.php');
18
-
19
-
20
-
21 17
 
22 18
 //require_role(array(ROLE_CUSTOMER, ROLE_SYSTEMUSER));
23 19
 
Browse code

ermögliche mehrere Shortcuts mit gleicher Gewichtung

Bernd Wurst authored on06/02/2014 08:47:26
Showing1 changed files
... ...
@@ -78,7 +78,7 @@ foreach ($modules as $modname => $info) {
78 78
     include('modules/'.$modname.'/shortcuts.php');
79 79
     foreach ($shortcuts as $shortcut) {
80 80
       $shortcut['module'] = $modname;
81
-      $my_shortcuts[$shortcut['weight']] = $shortcut;
81
+      $my_shortcuts[$shortcut['weight'].$modname] = $shortcut;
82 82
     }
83 83
   }
84 84
 }
Browse code

Subuser sollen nicht automatisch Kundenrechte erhalten!

Bernd Wurst authored on12/11/2013 17:57:18
Showing1 changed files
... ...
@@ -41,6 +41,7 @@ case ROLE_MAILACCOUNT:
41 41
 case ROLE_SYSTEMUSER:
42 42
   $role = "{$_SESSION['userinfo']['name']}, angemeldet als Benutzer";
43 43
   break;
44
+case ROLE_SYSTEMUSER | ROLE_SUBUSER:
44 45
 case ROLE_SYSTEMUSER | ROLE_CUSTOMER | ROLE_SUBUSER:
45 46
   $role = "{$_SESSION['subuser']}, Unternutzer von {$_SESSION['userinfo']['username']}";
46 47
   break;
Browse code

Updated copyright notice (2012 => 2013)

Bernd Wurst authored on19/01/2013 10:49:50
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2012 by schokokeks.org Hosting, namely
5
+Written 2008-2013 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Added license tags for CC0, README and COPYING

Bernd Wurst authored on11/03/2012 15:40:04
Showing1 changed files
... ...
@@ -1,4 +1,18 @@
1 1
 <?php
2
+/*
3
+This file belongs to the Webinterface of schokokeks.org Hosting
4
+
5
+Written 2008-2012 by schokokeks.org Hosting, namely
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
+*/
2 16
 
3 17
 require_once('session/start.php');
4 18
 
Browse code

Index-Blöcke werden jetzt vond en Modulen selbst bereitgestellt

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2223 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on08/03/2012 14:33:17
Showing1 changed files
... ...
@@ -54,48 +54,38 @@ output('<p>Herzlich willkommen, '.$role.".</p>\n");
54 54
 output("<p>Auf der linken Seite sehen Sie ein Auswahlmenü mit den Funktionen, die Ihnen in diesem Webinterface zur Verfügung stehen.</p>
55 55
 <p>Nachfolgend sehen Sie eine Auswahl typischer Aufgaben.</p>\n");
56 56
 
57
-output("<div class=\"overview\">");
58
-
59
-if (have_module('email') && ($_SESSION['role'] & ROLE_MAILACCOUNT || $_SESSION['role'] & ROLE_VMAIL_ACCOUNT)) {
60
-  output("<div class=\"block\">".internal_link("../email/chpass", "<img src=\"{$prefix}images/pwchange.png\" alt=\"\" /> Passwort ändern ")."</div>");
61
-}
62
-
63
-if (have_module('email') && ($_SESSION['role'] & ROLE_VMAIL_ACCOUNT)) {
64
-  output("<div class=\"block\">".internal_link("../email/edit", "<img src=\"{$prefix}images/cog.png\" alt=\"\" /> E-Mail-Einstellungen ")."</div>");
65
-}
66
-
67
-if ($_SESSION['role'] & ROLE_CUSTOMER || $_SESSION['role'] & ROLE_SYSTEMUSER) {
68
-  output("<div class=\"block\">".internal_link("chpass", "<img src=\"{$prefix}images/pwchange.png\" alt=\"\" /> Passwort ändern ")."</div>");
69
-}
70
-
71
-if (have_module('invoice') && $_SESSION['role'] & ROLE_CUSTOMER) {
72
-  require_once('modules/invoice/include/invoice.php');
73
-  $unpayed_invoices = 0;
74
-  $my_invoices = my_invoices();
75
-  foreach($my_invoices AS $inv) {
76
-    if ($inv['bezahlt'] == 0)
77
-      $unpayed_invoices++;
57
+$modules = get_modules_info();
58
+
59
+$my_shortcuts = array();
60
+foreach ($modules as $modname => $info) {
61
+  if (file_exists('modules/'.$modname.'/shortcuts.php')) {
62
+    $shortcuts = array();
63
+    include('modules/'.$modname.'/shortcuts.php');
64
+    foreach ($shortcuts as $shortcut) {
65
+      $shortcut['module'] = $modname;
66
+      $my_shortcuts[$shortcut['weight']] = $shortcut;
67
+    }
78 68
   }
79
-  $extra = '';
80
-  if ($unpayed_invoices > 0)
81
-    $extra = '<span style="color: red;">('.$unpayed_invoices.' unbezahlt)</span>';
82
-  output("<div class=\"block\">".internal_link("../invoice/current", "<img src=\"{$prefix}images/invoice.png\" alt=\"\" /> Ihre Rechnungen {$extra}")."</div>");
83 69
 }
70
+krsort($my_shortcuts);
71
+DEBUG($my_shortcuts);
84 72
 
85
-if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
86
-  if (have_module('email'))
87
-    output("<div class=\"block\">".internal_link("../email/vmail", "<img src=\"{$prefix}images/email.png\" alt=\"\" /> E-Mail-Adressen verwalten ")."</div>");
88
-  if (have_module('vhosts'))
89
-    output("<div class=\"block\">".internal_link("../vhosts/vhosts", "<img src=\"{$prefix}images/webserver.png\" alt=\"\" /> Webserver-Einstellungen ")."</div>");
90
-  if (have_module('mysql'))
91
-    output("<div class=\"block\">".internal_link("../mysql/databases", "<img src=\"{$prefix}images/mysql.png\" alt=\"\" /> MySQL-Datenbanken ")."</div>");
92
-}
93
- 
94
-if (have_module('jabber') && $_SESSION['role'] & ROLE_CUSTOMER) {
95
-  output("<div class=\"block\">".internal_link("../jabber/accounts", "<img src=\"{$prefix}images/jabber.png\" alt=\"\" /> Jabber-Accounts ")."</div>");
73
+
74
+output("<div class=\"overview\">");
75
+foreach ($my_shortcuts as $shortcut) {
76
+    $icon = "images/default.png";
77
+    if (file_exists("images/".$shortcut['icon'])) {
78
+      $icon = "images/".$shortcut['icon'];
79
+    }
80
+    $alert = '';
81
+    if (isset($shortcut['alert']) && $shortcut['alert']) {
82
+      $alert = '<br /><span style="color: red;">('.$shortcut['alert'].')</span>';
83
+    }
84
+    output("<div class=\"block\">".internal_link($prefix.'go/'.$shortcut['module'].'/'.$shortcut['file'], "<img src=\"{$prefix}{$icon}\" alt=\"\" /> {$shortcut['title']} {$alert}")."</div>");
85
+  
96 86
 }
87
+output('</div>');
97 88
 
98
-output("</div>");
99 89
 
100 90
 if (have_module('email') && $_SESSION['role'] & ROLE_VMAIL_ACCOUNT) {
101 91
   include('modules/email/vmailoverview.php');
Browse code

VMail-User können ihre Einstellungen selbst vornehmen und bekommen eine individuelle Startseite mit den Einstellungen.

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2214 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on29/02/2012 13:26:13
Showing1 changed files
... ...
@@ -60,6 +60,10 @@ if (have_module('email') && ($_SESSION['role'] & ROLE_MAILACCOUNT || $_SESSION['
60 60
   output("<div class=\"block\">".internal_link("../email/chpass", "<img src=\"{$prefix}images/pwchange.png\" alt=\"\" /> Passwort ändern ")."</div>");
61 61
 }
62 62
 
63
+if (have_module('email') && ($_SESSION['role'] & ROLE_VMAIL_ACCOUNT)) {
64
+  output("<div class=\"block\">".internal_link("../email/edit", "<img src=\"{$prefix}images/cog.png\" alt=\"\" /> E-Mail-Einstellungen ")."</div>");
65
+}
66
+
63 67
 if ($_SESSION['role'] & ROLE_CUSTOMER || $_SESSION['role'] & ROLE_SYSTEMUSER) {
64 68
   output("<div class=\"block\">".internal_link("chpass", "<img src=\"{$prefix}images/pwchange.png\" alt=\"\" /> Passwort ändern ")."</div>");
65 69
 }
... ...
@@ -93,4 +97,10 @@ if (have_module('jabber') && $_SESSION['role'] & ROLE_CUSTOMER) {
93 97
 
94 98
 output("</div>");
95 99
 
100
+if (have_module('email') && $_SESSION['role'] & ROLE_VMAIL_ACCOUNT) {
101
+  include('modules/email/vmailoverview.php');
102
+  output("<div class=\"vmailoverview\">".$content."</div>");
103
+}
104
+
105
+
96 106
 ?>
Browse code

Berechtigungen für Subuser neu gestaltet. Sind jetzt automatisch Kunde und Systemuser.

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2072 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on23/11/2011 11:33:20
Showing1 changed files
... ...
@@ -27,7 +27,7 @@ case ROLE_MAILACCOUNT:
27 27
 case ROLE_SYSTEMUSER:
28 28
   $role = "{$_SESSION['userinfo']['name']}, angemeldet als Benutzer";
29 29
   break;
30
-case ROLE_SYSTEMUSER | ROLE_SUBUSER:
30
+case ROLE_SYSTEMUSER | ROLE_CUSTOMER | ROLE_SUBUSER:
31 31
   $role = "{$_SESSION['subuser']}, Unternutzer von {$_SESSION['userinfo']['username']}";
32 32
   break;
33 33
 case ROLE_CUSTOMER:
Browse code

Erlaube subusers, die nur Zugriff auf bestimmte Module haben

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1822 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on01/10/2010 10:45:34
Showing1 changed files
... ...
@@ -27,6 +27,9 @@ case ROLE_MAILACCOUNT:
27 27
 case ROLE_SYSTEMUSER:
28 28
   $role = "{$_SESSION['userinfo']['name']}, angemeldet als Benutzer";
29 29
   break;
30
+case ROLE_SYSTEMUSER | ROLE_SUBUSER:
31
+  $role = "{$_SESSION['subuser']}, Unternutzer von {$_SESSION['userinfo']['username']}";
32
+  break;
30 33
 case ROLE_CUSTOMER:
31 34
   $role = "{$_SESSION['customerinfo']['name']}, angemeldet als Kunde";
32 35
   break;
Browse code

Umstellung auf Theme-Support (Frei nach phptemplate)

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1811 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on18/09/2010 13:35:10
Showing1 changed files
... ...
@@ -44,8 +44,9 @@ default:
44 44
 }
45 45
 
46 46
 
47
-output('<h3>Administration</h3>
48
-<p>Herzlich willkommen, '.$role.".</p>\n");
47
+title('Übersicht');
48
+headline('Administration');
49
+output('<p>Herzlich willkommen, '.$role.".</p>\n");
49 50
 
50 51
 output("<p>Auf der linken Seite sehen Sie ein Auswahlmenü mit den Funktionen, die Ihnen in diesem Webinterface zur Verfügung stehen.</p>
51 52
 <p>Nachfolgend sehen Sie eine Auswahl typischer Aufgaben.</p>\n");
Browse code

Hinweis auf unbezahlte Rechnungen

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1364 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on05/05/2009 07:48:59
Showing1 changed files
... ...
@@ -52,19 +52,26 @@ output("<p>Auf der linken Seite sehen Sie ein Auswahlmenü mit den Funktionen, d
52 52
 
53 53
 output("<div class=\"overview\">");
54 54
 
55
-# Modul "email"
56 55
 if (have_module('email') && ($_SESSION['role'] & ROLE_MAILACCOUNT || $_SESSION['role'] & ROLE_VMAIL_ACCOUNT)) {
57 56
   output("<div class=\"block\">".internal_link("../email/chpass", "<img src=\"{$prefix}images/pwchange.png\" alt=\"\" /> Passwort ändern ")."</div>");
58 57
 }
59 58
 
60
-# Modul "index", kann man nicht ausschalten
61 59
 if ($_SESSION['role'] & ROLE_CUSTOMER || $_SESSION['role'] & ROLE_SYSTEMUSER) {
62 60
   output("<div class=\"block\">".internal_link("chpass", "<img src=\"{$prefix}images/pwchange.png\" alt=\"\" /> Passwort ändern ")."</div>");
63 61
 }
64 62
 
65
-# Modul "invoice"
66 63
 if (have_module('invoice') && $_SESSION['role'] & ROLE_CUSTOMER) {
67
-  output("<div class=\"block\">".internal_link("../invoice/current", "<img src=\"{$prefix}images/invoice.png\" alt=\"\" /> Ihre Rechnungen ")."</div>");
64
+  require_once('modules/invoice/include/invoice.php');
65
+  $unpayed_invoices = 0;
66
+  $my_invoices = my_invoices();
67
+  foreach($my_invoices AS $inv) {
68
+    if ($inv['bezahlt'] == 0)
69
+      $unpayed_invoices++;
70
+  }
71
+  $extra = '';
72
+  if ($unpayed_invoices > 0)
73
+    $extra = '<span style="color: red;">('.$unpayed_invoices.' unbezahlt)</span>';
74
+  output("<div class=\"block\">".internal_link("../invoice/current", "<img src=\"{$prefix}images/invoice.png\" alt=\"\" /> Ihre Rechnungen {$extra}")."</div>");
68 75
 }
69 76
 
70 77
 if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
Browse code

Zeige Links auf dem Startseite nur an, wenn das betreffende Modul aktiviert ist

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1363 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on05/05/2009 07:33:29
Showing1 changed files
... ...
@@ -52,25 +52,31 @@ output("<p>Auf der linken Seite sehen Sie ein Auswahlmenü mit den Funktionen, d
52 52
 
53 53
 output("<div class=\"overview\">");
54 54
 
55
-if ($_SESSION['role'] & ROLE_MAILACCOUNT || $_SESSION['role'] & ROLE_VMAIL_ACCOUNT) {
55
+# Modul "email"
56
+if (have_module('email') && ($_SESSION['role'] & ROLE_MAILACCOUNT || $_SESSION['role'] & ROLE_VMAIL_ACCOUNT)) {
56 57
   output("<div class=\"block\">".internal_link("../email/chpass", "<img src=\"{$prefix}images/pwchange.png\" alt=\"\" /> Passwort ändern ")."</div>");
57 58
 }
58 59
 
60
+# Modul "index", kann man nicht ausschalten
59 61
 if ($_SESSION['role'] & ROLE_CUSTOMER || $_SESSION['role'] & ROLE_SYSTEMUSER) {
60 62
   output("<div class=\"block\">".internal_link("chpass", "<img src=\"{$prefix}images/pwchange.png\" alt=\"\" /> Passwort ändern ")."</div>");
61 63
 }
62 64
 
63
-if ($_SESSION['role'] & ROLE_CUSTOMER) {
65
+# Modul "invoice"
66
+if (have_module('invoice') && $_SESSION['role'] & ROLE_CUSTOMER) {
64 67
   output("<div class=\"block\">".internal_link("../invoice/current", "<img src=\"{$prefix}images/invoice.png\" alt=\"\" /> Ihre Rechnungen ")."</div>");
65 68
 }
66 69
 
67 70
 if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
68
-  output("<div class=\"block\">".internal_link("../email/vmail", "<img src=\"{$prefix}images/email.png\" alt=\"\" /> E-Mail-Adressen verwalten ")."</div>");
69
-  output("<div class=\"block\">".internal_link("../vhosts/vhosts", "<img src=\"{$prefix}images/webserver.png\" alt=\"\" /> Webserver-Einstellungen ")."</div>");
70
-  output("<div class=\"block\">".internal_link("../mysql/databases", "<img src=\"{$prefix}images/mysql.png\" alt=\"\" /> MySQL-Datenbanken ")."</div>");
71
+  if (have_module('email'))
72
+    output("<div class=\"block\">".internal_link("../email/vmail", "<img src=\"{$prefix}images/email.png\" alt=\"\" /> E-Mail-Adressen verwalten ")."</div>");
73
+  if (have_module('vhosts'))
74
+    output("<div class=\"block\">".internal_link("../vhosts/vhosts", "<img src=\"{$prefix}images/webserver.png\" alt=\"\" /> Webserver-Einstellungen ")."</div>");
75
+  if (have_module('mysql'))
76
+    output("<div class=\"block\">".internal_link("../mysql/databases", "<img src=\"{$prefix}images/mysql.png\" alt=\"\" /> MySQL-Datenbanken ")."</div>");
71 77
 }
72 78
  
73
-if ($_SESSION['role'] & ROLE_CUSTOMER) {
79
+if (have_module('jabber') && $_SESSION['role'] & ROLE_CUSTOMER) {
74 80
   output("<div class=\"block\">".internal_link("../jabber/accounts", "<img src=\"{$prefix}images/jabber.png\" alt=\"\" /> Jabber-Accounts ")."</div>");
75 81
 }
76 82
 
Browse code

Es kann auch ein Admin kein Kunde sein

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1252 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on23/02/2009 15:53:54
Showing1 changed files
... ...
@@ -33,6 +33,9 @@ case ROLE_CUSTOMER:
33 33
 case ROLE_CUSTOMER | ROLE_SYSTEMUSER:
34 34
   $role = "{$_SESSION['customerinfo']['name']}, angemeldet als Kunde und Benutzer";
35 35
   break;
36
+case ROLE_SYSTEMUSER | ROLE_SYSADMIN:
37
+  $role = "{$_SESSION['userinfo']['name']}, angemeldet als Benutzer und Administrator";
38
+  break;
36 39
 case ROLE_CUSTOMER | ROLE_SYSTEMUSER | ROLE_SYSADMIN:
37 40
   $role = "{$_SESSION['customerinfo']['name']}, angemeldet als Kunde, Benutzer und Administrator";
38 41
   break;
Browse code

Neues Design, neue Startseite

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1244 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on11/02/2009 18:34:39
Showing1 changed files
... ...
@@ -42,7 +42,35 @@ default:
42 42
 
43 43
 
44 44
 output('<h3>Administration</h3>
45
-<p>Herzlich willkommen, '.$role.'.</p>');
45
+<p>Herzlich willkommen, '.$role.".</p>\n");
46 46
 
47
+output("<p>Auf der linken Seite sehen Sie ein Auswahlmenü mit den Funktionen, die Ihnen in diesem Webinterface zur Verfügung stehen.</p>
48
+<p>Nachfolgend sehen Sie eine Auswahl typischer Aufgaben.</p>\n");
49
+
50
+output("<div class=\"overview\">");
51
+
52
+if ($_SESSION['role'] & ROLE_MAILACCOUNT || $_SESSION['role'] & ROLE_VMAIL_ACCOUNT) {
53
+  output("<div class=\"block\">".internal_link("../email/chpass", "<img src=\"{$prefix}images/pwchange.png\" alt=\"\" /> Passwort ändern ")."</div>");
54
+}
55
+
56
+if ($_SESSION['role'] & ROLE_CUSTOMER || $_SESSION['role'] & ROLE_SYSTEMUSER) {
57
+  output("<div class=\"block\">".internal_link("chpass", "<img src=\"{$prefix}images/pwchange.png\" alt=\"\" /> Passwort ändern ")."</div>");
58
+}
59
+
60
+if ($_SESSION['role'] & ROLE_CUSTOMER) {
61
+  output("<div class=\"block\">".internal_link("../invoice/current", "<img src=\"{$prefix}images/invoice.png\" alt=\"\" /> Ihre Rechnungen ")."</div>");
62
+}
63
+
64
+if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
65
+  output("<div class=\"block\">".internal_link("../email/vmail", "<img src=\"{$prefix}images/email.png\" alt=\"\" /> E-Mail-Adressen verwalten ")."</div>");
66
+  output("<div class=\"block\">".internal_link("../vhosts/vhosts", "<img src=\"{$prefix}images/webserver.png\" alt=\"\" /> Webserver-Einstellungen ")."</div>");
67
+  output("<div class=\"block\">".internal_link("../mysql/databases", "<img src=\"{$prefix}images/mysql.png\" alt=\"\" /> MySQL-Datenbanken ")."</div>");
68
+}
69
+ 
70
+if ($_SESSION['role'] & ROLE_CUSTOMER) {
71
+  output("<div class=\"block\">".internal_link("../jabber/accounts", "<img src=\"{$prefix}images/jabber.png\" alt=\"\" /> Jabber-Accounts ")."</div>");
72
+}
73
+
74
+output("</div>");
47 75
 
48 76
 ?>
Browse code

VMail-accounts können sich jetzt auch am webinterface einloggen

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@928 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on02/02/2008 14:03:07
Showing1 changed files
... ...
@@ -18,6 +18,9 @@ switch ($_SESSION['role'])
18 18
 case ROLE_ANONYMOUS:
19 19
   login_screen('');
20 20
   break;
21
+case ROLE_VMAIL_ACCOUNT:
22
+  $role = "{$_SESSION['mailaccount']}, angemeldet als E-Mail-Account";
23
+  break;
21 24
 case ROLE_MAILACCOUNT:
22 25
   $role = "{$_SESSION['mailaccount']}, angemeldet als IMAP/POP3-Account";
23 26
   break;
Browse code

Auch mailaccounts können sich einloggen

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@625 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on13/08/2007 13:15:55
Showing1 changed files
... ...
@@ -18,6 +18,9 @@ switch ($_SESSION['role'])
18 18
 case ROLE_ANONYMOUS:
19 19
   login_screen('');
20 20
   break;
21
+case ROLE_MAILACCOUNT:
22
+  $role = "{$_SESSION['mailaccount']}, angemeldet als IMAP/POP3-Account";
23
+  break;
21 24
 case ROLE_SYSTEMUSER:
22 25
   $role = "{$_SESSION['userinfo']['name']}, angemeldet als Benutzer";
23 26
   break;
Browse code

* Initialisierung der Session-Variablen ausgelagert * Rollen als Bitmaske * Ein user kann mehrere Rollen parallel annehmen * Primärer User erhält auch die Rechte des entsprechenden Kundenaccounts

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@564 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on30/07/2007 13:00:58
Showing1 changed files
... ...
@@ -24,6 +24,14 @@ case ROLE_SYSTEMUSER:
24 24
 case ROLE_CUSTOMER:
25 25
   $role = "{$_SESSION['customerinfo']['name']}, angemeldet als Kunde";
26 26
   break;
27
+case ROLE_CUSTOMER | ROLE_SYSTEMUSER:
28
+  $role = "{$_SESSION['customerinfo']['name']}, angemeldet als Kunde und Benutzer";
29
+  break;
30
+case ROLE_CUSTOMER | ROLE_SYSTEMUSER | ROLE_SYSADMIN:
31
+  $role = "{$_SESSION['customerinfo']['name']}, angemeldet als Kunde, Benutzer und Administrator";
32
+  break;
33
+default:
34
+  system_failure('Interner Fehler (»Unbekannte Rolle: '.$_SESSION['role'].'«)');
27 35
 }
28 36
 
29 37
 
Browse code

webinterface => /webinterface

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@362 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on27/03/2007 07:40:51
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,34 @@
1
+<?php
2
+
3
+require_once('session/start.php');
4
+
5
+
6
+
7
+
8
+//require_role(array(ROLE_CUSTOMER, ROLE_SYSTEMUSER));
9
+
10
+/*if ($user['realname'] == '')
11
+  input_error('Ihr Name ist nicht im System gespeichert (siehe Stammdaten)!');
12
+if ($user['email'] == '')
13
+  input_error('Im System ist keine alternative eMail-Adresse gespeichert (siehe Stammdaten)!');
14
+*/
15
+
16
+switch ($_SESSION['role'])
17
+{
18
+case ROLE_ANONYMOUS:
19
+  login_screen('');
20
+  break;
21
+case ROLE_SYSTEMUSER:
22
+  $role = "{$_SESSION['userinfo']['name']}, angemeldet als Benutzer";
23
+  break;
24
+case ROLE_CUSTOMER:
25
+  $role = "{$_SESSION['customerinfo']['name']}, angemeldet als Kunde";
26
+  break;
27
+}
28
+
29
+
30
+output('<h3>Administration</h3>
31
+<p>Herzlich willkommen, '.$role.'.</p>');
32
+
33
+
34
+?>