If neither of the parameters are specified, the method includes the Authorization form component (main/auth/authorize.php).
Note The method stops the execution of the current page after the inclusion of the required
component.
Parameters
Parameter
Description
message
String containing the error message, or array in the format
Array("MESSAGE" => message, "TYPE" => "ERROR"|"OK") (processed in the ShowMessage function)
show_header
If true, the method emits the prologue code (top part of a page). If set to false, the prolog is not emitted.
show_footer
If true, the method emits the epilogue code (bottom part of a page). If set to false, the prolog is not emitted.
not_show_links
This parameter is passed to the component Authorization form (main/auth/authorize.php). If set to Y, the links to register, retrieve or change the forgotten password are not displayed. If set to N, the links
are displayed (the default behaviour).
<?
// get read access permission for the file
// "/download/document.doc" for the current user
$FILE_PERM = $APPLICATION->GetFileAccessPermission("/download/document.doc");
$FILE_PERM = (strlen($FILE_PERM)>0 ? $FILE_PERM : "D");
// display the auth. form is read access is denied
if($FILE_PERM<"R") $APPLICATION->AuthForm("Cannot access this file.");
?>