b65024dba6ac9b5adc7d30824b9ae8419209008a
bernd back-to-admin feature

bernd authored 15 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 back-to-admin feature

bernd authored 15 years ago

13) 
14) require_once('inc/debug.php');
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 6 months ago

15) if (!isset($_SESSION['admin_user'])) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

16)     session_destroy();
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

17)     redirect($prefix . 'go/su/su');
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

18)     die();
Bernd Wurst "back_to_admin" soll es ein...

Bernd Wurst authored 11 years ago

19) }
bernd back-to-admin feature

bernd authored 15 years ago

20) 
Bernd Wurst "back_to_admin" soll es ein...

Bernd Wurst authored 11 years ago

21) $admin_user = $_SESSION['admin_user'];
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

22) $role = find_role($admin_user, '', true);
Bernd Wurst "back_to_admin" soll es ein...

Bernd Wurst authored 11 years ago

23) if ($role & ROLE_SYSADMIN) {
Bernd Wurst Speichere Login-Methode in...

Bernd Wurst authored 5 months ago

24)     setup_session($role, $admin_user, 'su_return');
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

25)     unset($_SESSION['admin_user']);
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

26)     header('Location: ' . $prefix . 'go/su/su');
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

27)     die();
Bernd Wurst Generelle Su-Möglichkeit fü...

Bernd Wurst authored 8 years ago

28) } elseif ($role & ROLE_CUSTOMER) {
Bernd Wurst Speichere Login-Methode in...

Bernd Wurst authored 5 months ago

29)     setup_session($role, $admin_user, 'su_return');
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

30)     unset($_SESSION['admin_user']);
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

31)     header('Location: ' . $prefix . 'go/su/su_customer');
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

32)     die();