removed usage of constants, correct direct call check - was using deprecated eregi()