3a072b88368ae6495a3fa9a8a4ff8e8ae87d6101
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) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

5) Written 2008-2018 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) 
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) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

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

bernd authored 16 years ago

16) 
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

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

bernd authored 16 years ago

18) 
19) require_once('useraccounts.php');
20) 
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

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

bernd authored 16 years ago

22) 
23) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

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

bernd authored 13 years ago

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

bernd authored 16 years ago

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

Hanno authored 5 years ago

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

bernd authored 14 years ago

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

Hanno authored 5 years ago

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

bernd authored 14 years ago

33) }
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

34) 
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

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

bernd authored 13 years ago

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

bernd authored 16 years ago

37) 
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

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

bernd authored 14 years ago

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

Hanno authored 5 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

Hanno authored 5 years ago

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

bernd authored 14 years ago

65) <h5>Speicherplatz</h5>
66) <div style="margin-left: 2em;">
67)   <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>
68)   <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>
69) </div>
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

70) ';
71) }
bernd Primärer Useraccount kann d...

bernd authored 16 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 16 years ago

79) 
bernd Viele XHTML-Fehler korrigie...

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 14 years ago

83) ';
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

84)