Ignore:
Timestamp:
Dec 13, 2006, 2:05:38 AM (18 years ago)
Author:
rvelices
Message:
  • feature 599: option to forbid user registration
  • 1 language cleanup
  • added page_forbidden function (sends 403)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_html.inc.php

    r1649 r1652  
    615615
    616616/**
     617 * exits the current script with 403 code
     618 * @param string msg a message to display
     619 * @param string alternate_url redirect to this url
     620 */
     621function page_forbidden($msg, $alternate_url=null)
     622{
     623  set_status_header(403);
     624  if ($alternate_url==null)
     625    $alternate_url = make_index_url();
     626  redirect_html( $alternate_url,
     627    '<div style="text-align:left; margin-left:5em;margin-bottom:5em;">
     628<h1 style="text-align:left; font-size:36px;">Forbidden</h1><br/>'
     629.$msg.'</div>',
     630    5 );
     631}
     632
     633/**
    617634 * exits the current script with 404 code when a page cannot be found
    618635 * @param string msg a message to display
Note: See TracChangeset for help on using the changeset viewer.