3ef995c2108fe77d22c0b556fb9717cb848bc48f
bernd back-to-admin feature

bernd authored 17 years ago

1) <?php
Hanno Böck Add newlines before comment...

Hanno Böck authored 1 year ago

2) 
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 14 years ago

3) /*
4) This file belongs to the Webinterface of schokokeks.org Hosting
5) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 3 years ago

6) Written by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 14 years ago

7)   Bernd Wurst <bernd@schokokeks.org>
8)   Hanno Böck <hanno@schokokeks.org>
9) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 3 years ago

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

Bernd Wurst authored 14 years ago

11) 
12) 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.
13) */
bernd back-to-admin feature

bernd authored 17 years ago

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

Hanno Böck authored 2 years ago

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

Hanno authored 7 years ago

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

Hanno Böck authored 2 years ago

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

Hanno authored 7 years ago

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

Bernd Wurst authored 13 years ago

20) }
bernd back-to-admin feature

bernd authored 17 years ago

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

Bernd Wurst authored 13 years ago

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

Hanno authored 7 years ago

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

Bernd Wurst authored 13 years ago

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

Bernd Wurst authored 2 years ago

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

Hanno authored 7 years ago

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

Hanno Böck authored 2 years ago

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

Hanno authored 7 years ago

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

Bernd Wurst authored 10 years ago

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

Bernd Wurst authored 2 years ago

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

Hanno authored 7 years ago

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

Hanno Böck authored 2 years ago

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

Hanno authored 7 years ago

33)     die();