Usability: User sieht immer wer er ist
bernd

bernd commited on 2007-08-13 13:16:47
Zeige 3 geänderte Dateien mit 36 Einfügungen und 0 Löschungen.


git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@628 87cf0b9e-d624-0410-a070-f6ee81989793
... ...
@@ -42,6 +42,22 @@ a img {
42 42
   border: 0px;
43 43
 }
44 44
 
45
+
46
+p.userinfo {
47
+  margin: 3px;
48
+  margin-bottom: 1.5em;
49
+  padding: 0.5em;
50
+  border: 1px solid black;
51
+  padding-left: 40px;
52
+  background-color: #b2c2cb;
53
+  background-image: url('../images/user.png');
54
+  background-position: left;
55
+  background-repeat: no-repeat;
56
+  background-position: 0.5em 0.5em;
57
+  min-height: 36px;
58
+}
59
+
60
+
45 61
 div.confirmation {
46 62
 }
47 63
 
... ...
@@ -88,7 +88,27 @@ echo '
88 88
 <div class="menu">
89 89
 <img src="<?php echo $prefix; ?>images/schokokeks.png" width="190" height="140" alt="schokokeks.org" />
90 90
 
91
+
91 92
 <?php
93
+$role = $_SESSION['role'];
94
+if ($role != ROLE_ANONYMOUS) {
95
+  echo '<p class="userinfo">';
96
+  if ($role & ROLE_SYSTEMUSER) {
97
+    echo '<strong>'.$_SESSION['userinfo']['username'].'</strong>';
98
+    echo '<br />'.$_SESSION['userinfo']['name'];
99
+    echo '<br />(Benutzer'.(($role & ROLE_SYSTEMUSER) ? ', Kunde' : '').')';
100
+  }
101
+  elseif ($role & ROLE_CUSTOMER) {
102
+    echo '<strong>'.$_SESSION['customerinfo']['customerno'].'</strong>';
103
+    echo '<br />'.$_SESSION['customerinfo']['name'];
104
+    echo '<br />(Kunde)';
105
+  }
106
+  elseif ($role & ROLE_MAILACCOUNT) {
107
+    echo '<strong>'.$_SESSION['mailaccount'].'</strong><br />(E-Mail-Account)';
108
+  }
109
+  echo '</p>';
110
+}
111
+
92 112
 
93 113
   foreach ($weighted_menuitem as $key => $menuitem)
94 114
         foreach ($menuitem as $key => $item)
95 115