ca4a7771597653e3f5dffd2015a4765c18279e87
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 Lizenzinfos in eigenes Modu...

Bernd Wurst authored 10 years ago

5) Written 2008-2014 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 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) 
Bernd Wurst Erlaube auch das Absenden d...

Bernd Wurst authored 11 years ago

28) if (isset($_GET['do']))
bernd Su-Login für Admins

bernd authored 16 years ago

29) {
Bernd Wurst Erlaube auch das Absenden d...

Bernd Wurst authored 11 years ago

30)   if ($_SESSION['su_ajax_timestamp'] < time() - 30) {
31)     system_failure("Die su-Auswahl ist schon abgelaufen!");
32)   }
33)   $type = $_GET['do'][0];
34)   $id = (int) substr($_GET['do'], 1);
35)   su($type, $id);
36) }
bernd Su-Login für Admins

bernd authored 16 years ago

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

Bernd Wurst authored 11 years ago

38) $search = NULL;
Bernd Wurst Erlaube auch das Absenden d...

Bernd Wurst authored 11 years ago

39) if (isset($_POST['query']))
40) {
41)   check_form_token('su_su');
42)   $id = filter_input_general($_POST['query']);
Bernd Wurst Suche auch bei unvollständi...

Bernd Wurst authored 11 years ago

43)   if (! su(NULL, $id)) {
44)     $search = $_POST['query'];
45)   }
bernd Su-Login für Admins

bernd authored 16 years ago

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

bernd authored 13 years ago

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

bernd authored 16 years ago

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

bernd authored 13 years ago

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

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

bernd authored 16 years ago

52) 
bernd AJAXified

bernd authored 15 years ago

53) $debug = '';
54) if ($debugmode)
55)   $debug = 'debug&amp;';
56) 
Bernd Wurst Nutze zentrales JQuery

Bernd Wurst authored 10 years ago

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

Bernd Wurst authored 10 years ago

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

bernd authored 15 years ago

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

Bernd Wurst authored 11 years ago

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

62) '));
bernd AJAXified

bernd authored 15 years ago

63)