3 * FusionForge : Exit functions for cronjob
5 * Copyright 1999-2001 (c) VA Linux Systems
6 * Copyright 2010, Franck Villaume
7 * http://fusionforge.org
9 * This file is part of FusionForge. FusionForge is free software;
10 * you can redistribute it and/or modify it under the terms of the
11 * GNU General Public License as published by the Free Software
12 * Foundation; either version 2 of the Licence, or (at your option)
15 * FusionForge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 * exit_error() - Exit with error
28 * @param string Error text
29 * @param string Error toptab
31 function exit_error($title,$toptab='') {
32 print 'ERROR - '.$title;
37 * exit_permission_denied() - Return a 'Permission Denied' error
38 * @param string $reason_descr
39 * @param string toptab needed for navigation
41 function exit_permission_denied($reason_descr='',$toptab='') {
42 exit_error('PERMISSION DENIED');
46 * exit_not_logged_in() - Return a 'Not Logged in' error
48 function exit_not_logged_in() {
49 exit_error('NOT LOGGED IN');
53 * exit_no_group() - Return a 'Choose A Project/Group' error
55 function exit_no_group() {
56 exit_error('CHOOSE A PROJECT/GROUP');
60 * exit_missing_param() - Return a 'Missing Required Parameters' error
61 * @param string URL : usually $_SERVER['HTTP_REFERER']
62 * @param array array of missing parameters
63 * @param string toptab needed for navigation
65 function exit_missing_param($url='',$missing_params=array(),$toptab='') {
66 exit_error('MISSING REQUIRED PARAMETERS');
70 * exit_disabled() - Return a 'Disabled Feature' error
71 * @param string toptab needed for navigation
73 function exit_disabled($toptab='') {
74 exit_error('DISABLED FEATURE');