f2550e90ad37215b9d890155806986336bf0170c
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) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

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 Benutze überall title() sta...

bernd authored 13 years ago

25) headline("Bearbeiten von Benutzer »{$account['username']}«");
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

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) 
bernd Realname auch bei Nichtkund...

bernd authored 14 years ago

38) $customer = get_customer_info($_SESSION['userinfo']['customerno']);
39) if ($role & ROLE_CUSTOMER)
40)   $customer = $_SESSION['customerinfo'];
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

43) 
44) <h5>Name (E-Mail-Absender, ...)</h5>
45) <div style="margin-left: 2em;"> 
bernd Realname auch bei Nichtkund...

bernd authored 14 years ago

46)   <p><input type="radio" name="defaultname" id="defaultname" value="1" '.$defaultname.'/> <label for="defaultname">Kundenname: <strong>'.$customer['name'].'</strong></label></p>
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

47)   <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>
48) </div>
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

51) if ($role & ROLE_CUSTOMER)
52) {
53)   $form .= '
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

54) <h5>Speicherplatz</h5>
55) <div style="margin-left: 2em;">
56)   <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>
57)   <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>
58) </div>
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

59) ';
60) }
bernd Primärer Useraccount kann d...

bernd authored 16 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

63) <h5>Shell</h5>
64) <div style="margin-left: 2em;">
65)   <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>
66)   <p>'.html_select('shell', $shells, $account['shell']).'</p>
67) </div>
bernd Primärer Useraccount kann d...

bernd authored 16 years ago

68) 
bernd Viele XHTML-Fehler korrigie...

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 14 years ago

72) ';
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

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

bernd authored 14 years ago

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