3 * Copyright 2005, Fabio Bertagnin
4 * Copyright 2011, Franck Villaume - Capgemini
5 * Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent
6 * Copyright 2019, Franck Villaume - TrivialDev
7 * http://fusionforge.org
9 * This file is part of FusionForge.
11 * FusionForge is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * FusionForge is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 require_once dirname(__FILE__)."/../../env.inc.php";
27 require_once $gfcommon.'include/pre.php';
31 $user = session_get_user(); // get the session user
33 if (!$user || !is_object($user)) {
34 exit_error(_('Invalid User'), 'home');
35 } elseif ( $user->isError() ) {
36 exit_error($user->getErrorMessage, 'home');
37 } elseif ( !$user->isActive()) {
38 exit_error(_('User not active'), 'home');
41 $type = getStringFromRequest('type');
44 exit_missing_param($_SERVER['HTTP_REFERER'], array('No TYPE specified'), 'quota_management');
47 $quota_management = plugin_get_object('quota_management');
51 if (!session_loggedin()) {
54 session_require_global_perm('forge_admin');
55 $action = getStringFromRequest('action');
56 $view = getStringFromRequest('view');
59 include($gfplugins.$quota_management->name.'/action/'.$action.'.php');
62 $quota_management->getHeader($type);
65 include $gfplugins.$quota_management->name.'/view/quota_admin.php';
68 include $gfplugins.$quota_management->name.'/view/quota.php';
73 case 'projectadmin': {
74 if (!session_loggedin()) {
77 $group_id = getIntFromRequest('group_id');
78 session_require_perm('project_admin', $group_id);
79 $action = getStringFromRequest('action');
80 $view = getStringFromRequest('view');
87 $quota_management->getHeader($type, $group_id);
88 include $gfplugins.$quota_management->name.'/view/quota_project.php';
96 // c-file-style: "bsd"