bf290f81cefa9db968caeb0368abae06c9781158
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) 
11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
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) 
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

27) $account = NULL;
28) $role = $_SESSION['role'];
29) if ($role & ROLE_CUSTOMER)
30) {
31)   $account = get_account_details($_GET['uid']);
32) }
33) else
34) {
35)   $account = get_account_details($_SESSION['userinfo']['uid'], $_SESSION['userinfo']['customerno']);
36) }
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

37) 
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

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

bernd authored 13 years ago

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

bernd authored 16 years ago

40) 
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

65) if ($role & ROLE_CUSTOMER)
66) {
67)   $form .= '
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

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

bernd authored 14 years ago

73) ';
74) }
bernd Primärer Useraccount kann d...

bernd authored 16 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 16 years ago

82) 
bernd Viele XHTML-Fehler korrigie...

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 14 years ago

86) ';
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

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

bernd authored 14 years ago

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