dcc202fb249a446ac15c7cf413b9f1b4a3f31b58
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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

5) Written 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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

10) 
11) 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.
12) */
bernd Su-Login für Admins

bernd authored 16 years ago

13) 
bernd AJAXified

bernd authored 15 years ago

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

Bernd Wurst authored 11 years ago

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

bernd authored 16 years ago

16) 
17) require_once('session/start.php');
18) require_once('su.php');
19) 
20) require_role(ROLE_SYSADMIN);
21) 
Bernd Wurst Erlaube auch das Absenden d...

Bernd Wurst authored 11 years ago

22) 
bernd AJAXified

bernd authored 15 years ago

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

Hanno authored 5 years ago

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

Bernd Wurst authored 11 years ago

31) }
bernd Su-Login für Admins

bernd authored 16 years ago

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

Hanno authored 5 years ago

33) $search = null;
34) if (isset($_POST['query'])) {
35)     check_form_token('su_su');
Bernd Wurst Umstellung von filter_input...

Bernd Wurst authored 4 years ago

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

Hanno authored 5 years ago

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

bernd authored 16 years ago

40) }
41) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

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

bernd authored 16 years ago

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

bernd authored 13 years ago

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

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

bernd authored 16 years ago

46) 
Bernd Wurst Nutze zentrales JQuery

Bernd Wurst authored 10 years ago

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

Bernd Wurst authored 10 years ago

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

bernd authored 15 years ago

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

Bernd Wurst authored 11 years ago

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

52) '));
bernd AJAXified

bernd authored 15 years ago

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

Bernd Wurst authored 11 years ago

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

Hanno authored 5 years ago

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

Bernd Wurst authored 4 years ago

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

58)     }