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="") {
19 global $HTML,$group_id, $Language;
20 $HTML->header(array('title'=>_('Exiting with error'),'group'=>$group_id));
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='') {
33 if(!session_loggedin()) {
37 $reason_descr=_('This project\'s administrator will have to grant you permission to view this page.');
39 exit_error(_('Permission Denied.'),$reason_descr);
44 * exit_not_logged_in() - Exit with not logged in error
46 function exit_not_logged_in() {
47 //instead of a simple error page, now take them to the login page
48 header ("Location: ".$GLOBALS['sys_urlprefix']."/account/login.php?return_to=".urlencode(getStringFromServer('REQUEST_URI')));
53 * exit_no_group() - Exit with no group chosen error
55 function exit_no_group() {
57 exit_error(_('ERROR - No group was chosen or you can\'t access it'),_('ERROR - No group was chosen or you can\'t access it'));
61 * exit_missing_param() - Exit with missing required parameters error
63 function exit_missing_param() {
65 exit_error(_('Error - missing parameters'),_('Error - missing parameters'));
69 * exit_disabled() - Exit with disabled feature error.
71 function exit_disabled() {
73 exit_error(_('Error - disabled feature.'),_('Error - disabled feature.'));
77 * exit_form_double_submit() - Exit with double submit error.
79 function exit_form_double_submit() {
81 exit_error(_('Error - double submit'),_('Error - double submit'));