704b9bbda2ae955259befd6c94ec0b282a0e2832
bernd Systemuser-Modul hinzugefügt

bernd authored 16 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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

5) Written 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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

10) 
11) 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.
12) */
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

13) 
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

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

bernd authored 16 years ago

15) 
16) require_once('useraccounts.php');
17) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 2 years ago

18) require_role([ROLE_CUSTOMER, ROLE_SYSTEMUSER]);
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

19) 
20) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

21) title("System-Benutzeraccounts");
bernd Systemuser-Modul sollte übe...

bernd authored 13 years ago

22) $section = "systemuser_account";
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

23) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

24) $account = null;
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

25) $role = $_SESSION['role'];
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

26) if ($role & ROLE_CUSTOMER) {
27)     $account = get_account_details($_GET['uid']);
28) } else {
29)     $account = get_account_details($_SESSION['userinfo']['uid'], $_SESSION['userinfo']['customerno']);
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

30) }
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

31) 
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

32) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

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

bernd authored 16 years ago

34) 
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

35) #if (customer_useraccount($account['uid']))
36) #  system_failure('Aus Sicherheitsgründen können Sie diesen Account nicht ändern!');
37) 
38) $shells = available_shells();
39) $defaultname = ($account['name'] ? '' : 'checked="checked" ');
40) $nondefaultname = ($account['name'] ? 'checked="checked" ' : '');
41) 
42) $customerquota = get_customer_quota();
43) 
44) $maxquota = $customerquota['max'] - $customerquota['assigned'] + $account['quota'];
45) 
bernd Realname auch bei Nichtkund...

bernd authored 14 years ago

46) $customer = get_customer_info($_SESSION['userinfo']['customerno']);
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

47) if ($role & ROLE_CUSTOMER) {
48)     $customer = $_SESSION['customerinfo'];
49) }
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

50) 
Bernd Wurst add feature to disable SSH...

Bernd Wurst authored 3 years ago

51) $form = '';
52) $form .= '
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

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

bernd authored 14 years ago

55)   <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

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

bernd authored 14 years ago

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

bernd authored 14 years ago

59) 
Bernd Wurst add feature to disable SSH...

Bernd Wurst authored 3 years ago

60) $defaultpwlogin = 'checked';
61) $defaultnopwlogin = '';
62) 
63) if ($account['passwordlogin'] == 0) {
64)     $defaultpwlogin = '';
65)     $defaultnopwlogin = 'checked';
66) }
67) 
68) $form .= '
69) <h5>Passwort-Login</h5>
70) <div style="margin-left: 2em;"> 
71)   <p><input type="radio" name="passwordlogin" id="passwordlogin_ja" value="1" '.$defaultpwlogin.'/> <label for="passwordlogin_ja">SSH-Login mit Passwort erlauben</label></p>
Bernd Wurst typo

Bernd Wurst authored 11 months ago

72)   <p><input type="radio" name="passwordlogin" id="passwordlogin_nein" value="0" '.$defaultnopwlogin.'/> <label for="passwordlogin_nein">SSH-Login nur mit SSH-Key ermöglichen</label></p>
Bernd Wurst add feature to disable SSH...

Bernd Wurst authored 3 years ago

73) </div>
74) ';
75) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

76) if ($role & ROLE_CUSTOMER) {
77)     $form .= '
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

78) <h5>Speicherplatz</h5>
79) <div style="margin-left: 2em;">
80)   <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>
81)   <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>
82) </div>
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

83) ';
84) }
bernd Primärer Useraccount kann d...

bernd authored 16 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 16 years ago

92) 
bernd Viele XHTML-Fehler korrigie...

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 14 years ago

96) ';
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

97)