09edb607572671b43791a4efac3979e978691d49
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

1) <?php
2) 
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

3) require_once('inc/base.php');
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

4) 
5) require_once('useraccounts.php');
6) 
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

7) require_role(array(ROLE_CUSTOMER, ROLE_SYSTEMUSER));
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

8) 
9) 
10) $title = "System-Benutzeraccounts";
bernd Viele XHTML-Fehler korrigie...

bernd authored 16 years ago

11) $section = "systemuser_accounts";
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

12) 
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

13) $account = NULL;
14) $role = $_SESSION['role'];
15) if ($role & ROLE_CUSTOMER)
16) {
17)   $account = get_account_details($_GET['uid']);
18) }
19) else
20) {
21)   $account = get_account_details($_SESSION['userinfo']['uid'], $_SESSION['userinfo']['customerno']);
22) }
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

23) 
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

24) 
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

25) output("<h3>Bearbeiten von Benutzer »{$account['username']}«</h3>");
26) 
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

27) #if (customer_useraccount($account['uid']))
28) #  system_failure('Aus Sicherheitsgründen können Sie diesen Account nicht ändern!');
29) 
30) $shells = available_shells();
31) $defaultname = ($account['name'] ? '' : 'checked="checked" ');
32) $nondefaultname = ($account['name'] ? 'checked="checked" ' : '');
33) 
34) $customerquota = get_customer_quota();
35) 
36) $maxquota = $customerquota['max'] - $customerquota['assigned'] + $account['quota'];
37) 
38) 
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

39) $form = '
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

40) 
41) <h5>Name (E-Mail-Absender, ...)</h5>
42) <div style="margin-left: 2em;"> 
43)   <p><input type="radio" name="defaultname" id="defaultname" value="1" '.$defaultname.'/> <label for="defaultname">Kundenname: <strong>'.$_SESSION['customerinfo']['name'].'</strong></label></p>
44)   <p><input type="radio" name="defaultname" id="nondefaultname" value="0" '.$nondefaultname.'/> <label for="nondefaultname">Abweichend:</label> <input type="text" name="fullname" id="fullname" value="'.$account['name'].'" /></p>
45) </div>
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

46) ';
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

47) 
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

48) if ($role & ROLE_CUSTOMER)
49) {
50)   $form .= '
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

51) <h5>Speicherplatz</h5>
52) <div style="margin-left: 2em;">
53)   <p>Wenn Sie mehrere Benutzeraccounts haben, können Sie den verfügbaren Speicherplatz selbst auf diese Accounts verteilen, bis diese zusammen das Limit erreichen, das für Ihr Kundenkonto vereinbart wurde (aktuell insgesamt '.$customerquota['max'].' MB).</p>
54)   <p><label for="quota">Speicherplatz für »<strong>'.$account['username'].'</strong>«:</label> <input style="text-align: right; width: 5em;" type="text" name="quota" id="quota" value="'.$account['quota'].'" /> MB (Maximal '.$maxquota.' MB möglich.)</p>
55) </div>
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

56) ';
57) }
bernd Primärer Useraccount kann d...

bernd authored 16 years ago

58) 
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

59) $form .= '
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

60) <h5>Shell</h5>
61) <div style="margin-left: 2em;">
62)   <p>Hier können Sie eine andere Kommandozeile einstellen. Tun Sie das bitte nur, wenn Sie wissen was Sie tun. Möchten Sie gerne eine Shell benutzen, die hier nicht aufgeführt ist, wenden Sie sich bitte an den Support.</p>
63)   <p>'.html_select('shell', $shells, $account['shell']).'</p>
64) </div>
bernd Primärer Useraccount kann d...

bernd authored 16 years ago

65) 
bernd Viele XHTML-Fehler korrigie...

bernd authored 16 years ago

66) <p>
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

67) <input type="submit" name="submit" value="Speichern" />
bernd Viele XHTML-Fehler korrigie...

bernd authored 16 years ago

68) </p>
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

69) ';
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

70) 
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

71) output(html_form('systemuser_edit', 'save', 'action=edit&uid='.$account['uid'], $form));