root/trunk/gui/reseller/change_user_interface.php

Revision 1327, 1.7 kB (checked in by rats, 4 months ago)

* Fixed: --scan-knownbad-files and --check-deleted are no longer supported by rkhunter
* Fixed #1471: chkrootkit should be in lenny / hardy
* Updated Chinese (simplified)
* Updated German
* Fixed #1475: typo on installation (ispcp-setup)
* Fixed: default user for rkhunter.log

Line 
1 <?php
2 /**
3  * ispCP ω (OMEGA) a Virtual Hosting Control System
4  *
5  * @copyright     2001-2006 by moleSoftware GmbH
6  * @copyright     2006-2008 by ispCP | http://isp-control.net
7  * @version     SVN: $Id$
8  * @link         http://isp-control.net
9  * @author         ispCP Team
10  *
11  * @license
12  *   This program is free software; you can redistribute it and/or modify it under
13  *   the terms of the MPL General Public License as published by the Free Software
14  *   Foundation; either version 1.1 of the License, or (at your option) any later
15  *   version.
16  *   You should have received a copy of the MPL Mozilla Public License along with
17  *   this program; if not, write to the Open Source Initiative (OSI)
18  *   http://opensource.org | osi@opensource.org
19  */
20
21 require '../include/ispcp-lib.php';
22
23 check_login(__FILE__);
24
25 // lets back to admin interface - am i admin or what ? :-)
26
27 if (isset($_SESSION['logged_from']) && isset($_SESSION['logged_from_id']) && isset($_GET['action']) && $_GET['action'] == "go_back") {
28     change_user_interface($_SESSION['user_id'], $_SESSION['logged_from_id']);
29 } else if (isset($_SESSION['user_id']) && isset($_GET['to_id'])) {
30
31     $to_id = $_GET['to_id'];
32
33     // admin logged as reseller:
34     if (isset($_SESSION['logged_from']) && isset($_SESSION['logged_from_id'])) {
35         $from_id = $_SESSION['logged_from_id'];
36     } else {// reseller:
37
38         $from_id = $_SESSION['user_id'];
39
40         if (who_owns_this($to_id, 'client') != $from_id) {
41
42             set_page_message(tr('User does not exist or you do not have permission to access this interface!'));
43
44             header('Location: users.php');
45             die();
46         }
47
48     }
49
50     change_user_interface($from_id, $to_id);
51
52 } else {
53
54     header('Location: index.php');
55     die();
56 }
57
58 ?>
Note: See TracBrowser for help on using the browser.