function noreg() { global $ID; if (is_null($ID)) { message('danger', 'Вы не авторизованы!'); header('location: /'); exit(); } }
function noreg() { if (is_null($GLOBALS['ID'])) { message('danger', 'Вы не авторизованы!'); header('location: /'); exit(); } }