3 * Copyright 2011, Sabri LABBENE - Institut Télécom
6 * This file is part of FusionForge.
8 * FusionForge is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * FusionForge is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 require_once '../../env.inc.php';
24 require_once $gfwww.'include/pre.php';
25 require_once $gfplugins.'globaldashboard/include/globalDashboard_utils.php';
27 $user = session_get_user(); // get the user session
29 if (!$user || !is_object($user) || $user->isError() || !$user->isActive()) {
30 exit_error("Invalid User", "Cannot Process your request for this user.");
33 $type = getStringFromRequest('type');
34 $id = getStringFromRequest('id');
35 $pluginname = getStringFromRequest('pluginname');
38 exit_error("Cannot Process your request","No TYPE specified"); // you can create items in Base.tab and customize this messages
40 exit_error("Cannot Process your request","No ID specified");
42 if ($type == 'user') {
43 $realuser = user_get_object($id);//
44 if (!($realuser) || !($realuser->usesPlugin($pluginname))) {
45 exit_error("Error", "First activate the User's $pluginname plugin through Account Manteinance Page");
47 if ( (!$user) || ($user->getID() != $id)) {
48 // if someone else tried to access the private GlobalDashboard part of this user
49 exit_error("Access Denied", "You cannot access other user's personal $pluginname");
52 globaldashboard_header(array('title'=> _('Global Dashboard Help')));
53 globaldashboard_toolbar();
55 echo '<p> This is Help section. @TODO: include few tips on how to use and config the plugin. </p>';
58 site_project_footer(array());