Documentation

OnBeforeProlog

handler function();
The OnBeforeProlog event fires in the executable section of a site prologue (after OnPageStart).

Handler function parameters

No parameters.

See Also

Example:

<?
// file /bitrix/php_interface/init.php
AddEventHandler("main", "OnBeforeProlog", "MyOnBeforePrologHandler", 50);
public static function MyOnBeforePrologHandler() { global $USER; if(SITE_TEMPLATE_ID=='mynewtemplate' && $_SERVER['REMOTE_ADDR']!='127.0.0.1' && !$USER->IsAdmin()) die('This template temporary unavailable.'); } ?>


© «Bitrix24», 2001-2024