96649f21ba18d07757afa9d98998f7a22c0d86a3
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) 
20) require_once('session/start.php');
21) require_once('su.php');
22) 
23) require_role(ROLE_SYSADMIN);
24) 
Bernd Wurst Erlaube auch das Absenden d...

Bernd Wurst authored 11 years ago

25) 
bernd AJAXified

bernd authored 15 years ago

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

Hanno authored 5 years ago

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

Bernd Wurst authored 11 years ago

34) }
bernd Su-Login für Admins

bernd authored 16 years ago

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

Hanno authored 5 years ago

36) $search = null;
37) if (isset($_POST['query'])) {
38)     check_form_token('su_su');
Bernd Wurst Umstellung von filter_input...

Bernd Wurst authored 4 years ago

39)     $id = $_POST['query'];
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

40)     if (! su(null, $id)) {
41)         $search = $_POST['query'];
42)     }
bernd Su-Login für Admins

bernd authored 16 years ago

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

bernd authored 13 years ago

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

bernd authored 16 years ago

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

bernd authored 13 years ago

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

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

bernd authored 16 years ago

49) 
Bernd Wurst Nutze zentrales JQuery

Bernd Wurst authored 10 years ago

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

Bernd Wurst authored 10 years ago

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

bernd authored 15 years ago

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

Bernd Wurst authored 11 years ago

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

55) '));
bernd AJAXified

bernd authored 15 years ago

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

Bernd Wurst authored 11 years ago

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

Hanno authored 5 years ago

58)     $allentries = build_results($search);
59)     foreach ($allentries as $entry) {
Bernd Wurst Umstellung von filter_input...

Bernd Wurst authored 4 years ago

60)         output("  <p><a href=\"?do=".filter_output_html($entry['id'])."\">".filter_output_html($entry['value'])."</a></p>");
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

61)     }