354c05a4ddd678c49bcbba458bffa7d13482139a
bernd Su-Login für Admins

bernd authored 17 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 2 years 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 2 years 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 17 years ago

13) 
bernd AJAXified

bernd authored 16 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 17 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 16 years ago

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

Hanno authored 6 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 17 years ago

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

Hanno authored 6 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 5 years ago

36)     $id = $_POST['query'];
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

37)     if (!su(null, $id)) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

38)         $search = $_POST['query'];
39)     }
bernd Su-Login für Admins

bernd authored 17 years ago

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

bernd authored 14 years ago

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

bernd authored 17 years ago

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

bernd authored 14 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 17 years ago

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

bernd authored 17 years ago

46) 
Bernd Wurst removed jquery and jqueryUI...

Bernd Wurst authored 1 year ago

47) require_once('inc/javascript.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 16 years ago

50) 
Bernd Wurst removed jquery and jqueryUI...

Bernd Wurst authored 1 year ago

51) output(html_form('su_su', '', '', '<label for="query"><strong>Suchtext:</strong></label> <input type="text" name="query" list="suggestions" id="query" autocomplete="off" /> 
52) <datalist id="suggestions">
53) </datalist>
54) <input type="submit" value="Suchen" />
Bernd Wurst Erlaube auch das Absenden d...

Bernd Wurst authored 11 years ago

55) '));
bernd AJAXified

bernd authored 16 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 6 years ago

58)     $allentries = build_results($search);
59)     foreach ($allentries as $entry) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year 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 6 years ago

61)     }