git.schokokeks.org
Repositories
Help
Report an Issue
webinterface.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
354c05a
Branches
Tags
master
ticket
webinterface.git
modules
su
back_to_admin.php
Spaces between string concat (.) operator, new PER codingstyle
Hanno Böck
commited
354c05a
at 2023-10-31 17:49:30
back_to_admin.php
Blame
History
Raw
<?php /* This file belongs to the Webinterface of schokokeks.org Hosting Written by schokokeks.org Hosting, namely Bernd Wurst <bernd@schokokeks.org> Hanno Böck <hanno@schokokeks.org> This code is published under a 0BSD license. 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. */ require_once('inc/debug.php'); if (!isset($_SESSION['admin_user'])) { session_destroy(); redirect($prefix . 'go/su/su'); die(); } $admin_user = $_SESSION['admin_user']; $role = find_role($admin_user, '', true); if ($role & ROLE_SYSADMIN) { setup_session($role, $admin_user); unset($_SESSION['admin_user']); header('Location: ' . $prefix . 'go/su/su'); die(); } elseif ($role & ROLE_CUSTOMER) { setup_session($role, $admin_user); unset($_SESSION['admin_user']); header('Location: ' . $prefix . 'go/su/su_customer'); die(); }