5 * SourceForge: Breaking Down the Barriers to Open Source Development
6 * Copyright 1999-2001 (c) VA Linux Systems
7 * http://sourceforge.net
13 * exit_error() - Exit PHP with error
15 * @param string Error title
16 * @param string Error text
18 function exit_error($title,$text="", $toptab='') {
19 global $HTML,$group_id;
20 $HTML->header(array('title'=>_('Exiting with error'), 'group'=>$group_id, 'toptab'=>$toptab));
21 print '<span class="error">'.$title.'</span><p>'.htmlspecialchars($text) .'</p>';
22 $HTML->footer(array());
27 * exit_permission_denied() - Exit with permission denied error
29 * @param string $reason_descr
31 function exit_permission_denied($reason_descr='') {
32 if(!session_loggedin()) {
36 $reason_descr=_('This project\'s administrator will have to grant you permission to view this page.');
38 exit_error(_('Permission denied.'),$reason_descr);
43 * exit_not_logged_in() - Exit with not logged in error
45 function exit_not_logged_in() {
46 //instead of a simple error page, now take them to the login page
47 header ("Location: ".util_make_url ("/account/login.php?return_to=".urlencode(getStringFromServer('REQUEST_URI'))));
52 * exit_no_group() - Exit with no group chosen error
54 function exit_no_group() {
55 exit_error(_('ERROR - No group was chosen or you can\'t access it'),_('No group was chosen or you can\'t access it'));
59 * exit_missing_param() - Exit with missing required parameters error
61 function exit_missing_param() {
62 exit_error(_('Error - missing parameters'),_('Error - missing required parameters'));
66 * exit_disabled() - Exit with disabled feature error.
68 function exit_disabled() {
69 exit_error(_('Error - disabled feature.'),_('The Site Administrator has turned off this feature.'));
73 * exit_form_double_submit() - Exit with double submit error.
75 function exit_form_double_submit() {
76 exit_error(_('Error - double submit'),_('You Attempted To Double-submit this item. Please avoid double-clicking.'));
81 // c-file-style: "bsd"