From 74e5d80e899562b6505ce7c4865041448b22470d Mon Sep 17 00:00:00 2001 From: rvelices Date: Wed, 13 Dec 2006 01:05:38 +0000 Subject: - feature 599: option to forbid user registration - 1 language cleanup - added page_forbidden function (sends 403) git-svn-id: http://piwigo.org/svn/trunk@1652 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_html.inc.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include/functions_html.inc.php') diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index f3ad7f700..39f738f3f 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -613,6 +613,23 @@ function access_denied() } } +/** + * exits the current script with 403 code + * @param string msg a message to display + * @param string alternate_url redirect to this url + */ +function page_forbidden($msg, $alternate_url=null) +{ + set_status_header(403); + if ($alternate_url==null) + $alternate_url = make_index_url(); + redirect_html( $alternate_url, + '
+

Forbidden


' +.$msg.'
', + 5 ); +} + /** * exits the current script with 404 code when a page cannot be found * @param string msg a message to display -- cgit v1.2.3