event_handler();
The OnBeforeProlog event fires in the executable section of a site prologue (after OnPageStart).
No parameters.
<?
// file /bitrix/php_interface/init.php
AddEventHandler("main",
"OnBeforeProlog",
"MyOnBeforePrologHandler",
50);
function MyOnBeforePrologHandler()
{
global $USER;
if (SITE_TEMPLATE_ID=='mynewtemplate' &&
$_SERVER['REMOTE_ADDR']!='127.0.0.1' &&
!$USER->IsAdmin())
{
die('This template is temporary unavailable.');
}
}
?>
| © 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |