mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 19:59:56 +03:00
- 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
This commit is contained in:
parent
5046b3c210
commit
74e5d80e89
13 changed files with 58 additions and 12 deletions
|
@ -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,
|
||||
'<div style="text-align:left; margin-left:5em;margin-bottom:5em;">
|
||||
<h1 style="text-align:left; font-size:36px;">Forbidden</h1><br/>'
|
||||
.$msg.'</div>',
|
||||
5 );
|
||||
}
|
||||
|
||||
/**
|
||||
* exits the current script with 404 code when a page cannot be found
|
||||
* @param string msg a message to display
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue