... | ... |
@@ -8,7 +8,7 @@ Written 2008-2018 by schokokeks.org Hosting, namely |
8 | 8 |
|
9 | 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 | 10 |
|
11 |
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see |
|
11 |
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see |
|
12 | 12 |
http://creativecommons.org/publicdomain/zero/1.0/ |
13 | 13 |
|
14 | 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. |
... | ... |
@@ -20,21 +20,21 @@ include('subuser.php'); |
20 | 20 |
$section = 'subusers_subusers'; |
21 | 21 |
|
22 | 22 |
if (isset($_GET['subuser'])) { |
23 |
- $list = list_subusers(); |
|
24 |
- foreach ($list as $x) { |
|
25 |
- if ($x['id'] == $_GET['subuser']) { |
|
26 |
- $subuser = $x; |
|
23 |
+ $list = list_subusers(); |
|
24 |
+ foreach ($list as $x) { |
|
25 |
+ if ($x['id'] == $_GET['subuser']) { |
|
26 |
+ $subuser = $x; |
|
27 |
+ } |
|
27 | 28 |
} |
28 |
- } |
|
29 |
- if (!isset($subuser)) { |
|
30 |
- system_failure('Der Account den Sie bearbeiten möchten wurde nicht gefunden!'); |
|
31 |
- } |
|
32 |
- title("Zusätzlichen Admin-Zugang bearbeiten"); |
|
33 |
- $pwnotice = ' <em>(Wenn Sie hier nichts eingeben, wird das alte Passwort beibehalten)</em>'; |
|
29 |
+ if (!isset($subuser)) { |
|
30 |
+ system_failure('Der Account den Sie bearbeiten möchten wurde nicht gefunden!'); |
|
31 |
+ } |
|
32 |
+ title("Zusätzlichen Admin-Zugang bearbeiten"); |
|
33 |
+ $pwnotice = ' <em>(Wenn Sie hier nichts eingeben, wird das alte Passwort beibehalten)</em>'; |
|
34 | 34 |
} else { |
35 |
- $subuser = empty_subuser(); |
|
36 |
- title("Zusätzlichen Admin-Zugang erstellen"); |
|
37 |
- $pwnotice = ''; |
|
35 |
+ $subuser = empty_subuser(); |
|
36 |
+ title("Zusätzlichen Admin-Zugang erstellen"); |
|
37 |
+ $pwnotice = ''; |
|
38 | 38 |
} |
39 | 39 |
|
40 | 40 |
// Username davor entfernen |
... | ... |
@@ -49,8 +49,8 @@ $form = '<table> |
49 | 49 |
<tr><td style="vertical-align: top;">Berechtigungen:</td><td>'; |
50 | 50 |
$modinfo = available_modules(); |
51 | 51 |
foreach ($modinfo as $key => $desc) { |
52 |
- $checked = in_array($key, $subuser['modules']) ? 'checked="checked "' : ''; |
|
53 |
- $form .= '<input type="checkbox" name="modules[]" id="'.$key.'" value="'.$key.'" '.$checked.'/> <label for="'.$key.'">'.$desc.'</label><br />'; |
|
52 |
+ $checked = in_array($key, $subuser['modules']) ? 'checked="checked "' : ''; |
|
53 |
+ $form .= '<input type="checkbox" name="modules[]" id="'.$key.'" value="'.$key.'" '.$checked.'/> <label for="'.$key.'">'.$desc.'</label><br />'; |
|
54 | 54 |
} |
55 | 55 |
$form .= '<br /><em>(Nicht alle Berechtigungen haben alleinstehend eine Wirkung. Eventuell müssen Sie mehrere Berechtigungen erlauben um einen Effekt zu erhalten.)</em></td></tr> |
56 | 56 |
<tr><td colspan="2"><input type="submit" value="Speichern" /></td></tr> |
... | ... |
@@ -58,5 +58,3 @@ $form .= '<br /><em>(Nicht alle Berechtigungen haben alleinstehend eine Wirkung. |
58 | 58 |
</table>'; |
59 | 59 |
|
60 | 60 |
output(html_form('subusers_edit', 'save', 'id='.$subuser['id'], $form)); |
61 |
- |
|
62 |
- |
... | ... |
@@ -1,4 +1,19 @@ |
1 | 1 |
<?php |
2 |
+/* |
|
3 |
+This file belongs to the Webinterface of schokokeks.org Hosting |
|
4 |
+ |
|
5 |
+Written 2008-2012 by schokokeks.org Hosting, namely |
|
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 |
+*/ |
|
16 |
+ |
|
2 | 17 |
require_role(ROLE_SYSTEMUSER); |
3 | 18 |
include('subuser.php'); |
4 | 19 |
|
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2225 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -32,6 +32,7 @@ $form = '<table> |
32 | 32 |
<tr><td><strong><label for="username">Benutzername:</label></td><td>'.$_SESSION['userinfo']['username'].'_<input type="text" name="username" id="username" value="'.$subuser['username'].'" /></td></tr> |
33 | 33 |
<tr><td><strong><label for="password">Passwort:</label></td><td><input type="password" name="password" id="password" value="" />'.$pwnotice.'</td></tr> |
34 | 34 |
<tr><td style="vertical-align: top;">Berechtigungen:</td><td>'; |
35 |
+$modinfo = available_modules(); |
|
35 | 36 |
foreach ($modinfo as $key => $desc) { |
36 | 37 |
$checked = in_array($key, $subuser['modules']) ? 'checked="checked "' : ''; |
37 | 38 |
$form .= '<input type="checkbox" name="modules[]" id="'.$key.'" value="'.$key.'" '.$checked.'/> <label for="'.$key.'">'.$desc.'</label><br />'; |
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2072 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -25,7 +25,7 @@ if (isset($_GET['subuser'])) { |
25 | 25 |
// Username davor entfernen |
26 | 26 |
$subuser['username'] = str_replace($_SESSION['userinfo']['username'].'_', '', $subuser['username']); |
27 | 27 |
|
28 |
-output('Ein zusätzlicher Admin-Zugang darf die hier bestimmten Module dieses Webinterfaces mit den selben Möglichkeiten wie Sie selbst benutzen. Erlauben sie den Zugriff nur vertrauenswürdigen Dritten!'); |
|
28 |
+output('<p>Ein zusätzlicher Admin-Zugang darf die hier bestimmten Module dieses Webinterfaces mit den selben Möglichkeiten wie Sie selbst benutzen. Erlauben sie den Zugriff nur vertrauenswürdigen Dritten!</p>'); |
|
29 | 29 |
|
30 | 30 |
|
31 | 31 |
$form = '<table> |
... | ... |
@@ -36,7 +36,7 @@ foreach ($modinfo as $key => $desc) { |
36 | 36 |
$checked = in_array($key, $subuser['modules']) ? 'checked="checked "' : ''; |
37 | 37 |
$form .= '<input type="checkbox" name="modules[]" id="'.$key.'" value="'.$key.'" '.$checked.'/> <label for="'.$key.'">'.$desc.'</label><br />'; |
38 | 38 |
} |
39 |
-$form .= '</td></tr> |
|
39 |
+$form .= '<br /><em>(Nicht alle Berechtigungen haben alleinstehend eine Wirkung. Eventuell müssen Sie mehrere Berechtigungen erlauben um einen Effekt zu erhalten.)</em></td></tr> |
|
40 | 40 |
<tr><td colspan="2"><input type="submit" value="Speichern" /></td></tr> |
41 | 41 |
|
42 | 42 |
</table>'; |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,46 @@ |
1 |
+<?php |
|
2 |
+require_role(ROLE_SYSTEMUSER); |
|
3 |
+include('subuser.php'); |
|
4 |
+ |
|
5 |
+$section = 'subusers_subusers'; |
|
6 |
+ |
|
7 |
+if (isset($_GET['subuser'])) { |
|
8 |
+ $list = list_subusers(); |
|
9 |
+ foreach ($list as $x) { |
|
10 |
+ if ($x['id'] == $_GET['subuser']) { |
|
11 |
+ $subuser = $x; |
|
12 |
+ } |
|
13 |
+ } |
|
14 |
+ if (!isset($subuser)) { |
|
15 |
+ system_failure('Der Account den Sie bearbeiten möchten wurde nicht gefunden!'); |
|
16 |
+ } |
|
17 |
+ title("Zusätzlichen Admin-Zugang bearbeiten"); |
|
18 |
+ $pwnotice = ' <em>(Wenn Sie hier nichts eingeben, wird das alte Passwort beibehalten)</em>'; |
|
19 |
+} else { |
|
20 |
+ $subuser = empty_subuser(); |
|
21 |
+ title("Zusätzlichen Admin-Zugang erstellen"); |
|
22 |
+ $pwnotice = ''; |
|
23 |
+} |
|
24 |
+ |
|
25 |
+// Username davor entfernen |
|
26 |
+$subuser['username'] = str_replace($_SESSION['userinfo']['username'].'_', '', $subuser['username']); |
|
27 |
+ |
|
28 |
+output('Ein zusätzlicher Admin-Zugang darf die hier bestimmten Module dieses Webinterfaces mit den selben Möglichkeiten wie Sie selbst benutzen. Erlauben sie den Zugriff nur vertrauenswürdigen Dritten!'); |
|
29 |
+ |
|
30 |
+ |
|
31 |
+$form = '<table> |
|
32 |
+<tr><td><strong><label for="username">Benutzername:</label></td><td>'.$_SESSION['userinfo']['username'].'_<input type="text" name="username" id="username" value="'.$subuser['username'].'" /></td></tr> |
|
33 |
+<tr><td><strong><label for="password">Passwort:</label></td><td><input type="password" name="password" id="password" value="" />'.$pwnotice.'</td></tr> |
|
34 |
+<tr><td style="vertical-align: top;">Berechtigungen:</td><td>'; |
|
35 |
+foreach ($modinfo as $key => $desc) { |
|
36 |
+ $checked = in_array($key, $subuser['modules']) ? 'checked="checked "' : ''; |
|
37 |
+ $form .= '<input type="checkbox" name="modules[]" id="'.$key.'" value="'.$key.'" '.$checked.'/> <label for="'.$key.'">'.$desc.'</label><br />'; |
|
38 |
+} |
|
39 |
+$form .= '</td></tr> |
|
40 |
+<tr><td colspan="2"><input type="submit" value="Speichern" /></td></tr> |
|
41 |
+ |
|
42 |
+</table>'; |
|
43 |
+ |
|
44 |
+output(html_form('subusers_edit', 'save', 'id='.$subuser['id'], $form)); |
|
45 |
+ |
|
46 |
+ |