$curr = strpos(PHP_SELF, ADMIN_PATH . '/') !== false ? preg_replace('/(.*)(' . ADMIN_PATH . ')(/?)(.)*/i', '1', dirname(PHP_SELF)) : dirname(PHP_SELF);