d0416d23b70a701e7c12b884bd947d4c670cc50e
bernd Su-Login für Admins

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 Su-Login für Admins

bernd authored 16 years ago

16) 
bernd AJAXified

bernd authored 15 years ago

17) require_once('inc/base.php');
Bernd Wurst Suche auch bei unvollständi...

Bernd Wurst authored 11 years ago

18) require_once('inc/security.php');
bernd Su-Login für Admins

bernd authored 16 years ago

19) require_once('inc/debug.php');
20) 
21) require_once('session/start.php');
22) require_once('su.php');
23) 
24) require_role(ROLE_SYSADMIN);
25) 
Bernd Wurst Erlaube auch das Absenden d...

Bernd Wurst authored 11 years ago

26) 
bernd AJAXified

bernd authored 15 years ago

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

Hanno authored 5 years ago

28) if (isset($_GET['do'])) {
29)     if ($_SESSION['su_ajax_timestamp'] < time() - 30) {
30)         system_failure("Die su-Auswahl ist schon abgelaufen!");
31)     }
32)     $type = $_GET['do'][0];
33)     $id = (int) substr($_GET['do'], 1);
34)     su($type, $id);
Bernd Wurst Erlaube auch das Absenden d...

Bernd Wurst authored 11 years ago

35) }
bernd Su-Login für Admins

bernd authored 16 years ago

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

Hanno authored 5 years ago

37) $search = null;
38) if (isset($_POST['query'])) {
39)     check_form_token('su_su');
40)     $id = filter_input_general($_POST['query']);
41)     if (! su(null, $id)) {
42)         $search = $_POST['query'];
43)     }
bernd Su-Login für Admins

bernd authored 16 years ago

44) }
45) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

46) title("Benutzer wechseln");
bernd Su-Login für Admins

bernd authored 16 years ago

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

bernd authored 13 years ago

48) output('<p>Hiermit können Sie (als Admin) das Webinterface mit den Rechten eines beliebigen anderen Benutzers benutzen.</p>
bernd Viele XHTML-Fehler korrigie...

bernd authored 16 years ago

49) ');
bernd Su-Login für Admins

bernd authored 16 years ago

50) 
bernd AJAXified

bernd authored 15 years ago

51) $debug = '';
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

52) if ($debugmode) {
53)     $debug = 'debug&amp;';
54) }
bernd AJAXified

bernd authored 15 years ago

55) 
Bernd Wurst Nutze zentrales JQuery

Bernd Wurst authored 10 years ago

56) require_once('inc/jquery.php');
Bernd Wurst JQuery/-UI integriert und V...

Bernd Wurst authored 10 years ago

57) // lädt die JS-Datei mit gleichem basename
58) javascript();
bernd AJAXified

bernd authored 15 years ago

59) 
Bernd Wurst Cookie-based autologin when...

Bernd Wurst authored 11 years ago

60) output(html_form('su_su', '', '', '<p><label for="query"><strong>Suchtext:</strong></label> <input type="text" name="query" id="query" /> <input type="submit" value="Suchen" /></p>
Bernd Wurst Erlaube auch das Absenden d...

Bernd Wurst authored 11 years ago

61) '));
bernd AJAXified

bernd authored 15 years ago

62) 
Bernd Wurst Suche auch bei unvollständi...

Bernd Wurst authored 11 years ago

63) if ($search) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

64)     $allentries = build_results($search);
65)     foreach ($allentries as $entry) {
66)         output("  <p><a href=\"?do=".filter_input_general($entry['id'])."\">".filter_input_general($entry['value'])."</a></p>");
67)     }