Ejemplo n.º 1
0
/**
* Display message after a login error
*
* @param    int     $msg            message number for custom handler
* @param    string  $message_title  title for the message box
* @param    string  $message_text   text of the message box
* @return   void                    function does not return!
*
*/
function displayLoginErrorAndAbort($msg, $message_title, $message_text)
{
    global $_CONF;
    if ($_CONF['custom_registration'] && function_exists('CUSTOM_loginErrorHandler')) {
        // Typically this will be used if you have a custom main site page
        // and need to control the login process
        CUSTOM_loginErrorHandler($msg);
    } else {
        @header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
        @header('Status: 403 Forbidden');
        $retval = COM_siteHeader('menu', $message_title) . COM_showMessageText($message_text, $message_title, false, 'error') . COM_siteFooter();
        echo $retval;
    }
    // don't return
    exit;
}
Ejemplo n.º 2
0
/**
* Display message after a login error
*
* @param    int     $msg            message number for custom handler
* @param    string  $message_title  title for the message box
* @param    string  $message_text   text of the message box
* @return   void                    function does not return!
*
*/
function displayLoginErrorAndAbort($msg, $message_title, $message_text)
{
    global $_CONF;
    if ($_CONF['custom_registration'] && function_exists('CUSTOM_loginErrorHandler')) {
        // Typically this will be used if you have a custom main site page
        // and need to control the login process
        CUSTOM_loginErrorHandler($msg);
    } else {
        $retval = COM_siteHeader('menu', $message_title) . COM_startBlock($message_title, '', COM_getBlockTemplate('_msg_block', 'header')) . $message_text . COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer')) . COM_siteFooter();
        header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
        header('Status: 403 Forbidden');
        echo $retval;
    }
    // don't return
    exit;
}