- // Check for cookies
- if ((empty($_COOKIE['visited'])) || ($CONFIG['index_delay'] == 0) || ($CONFIG['index_cookie'] == 0)) {
- // Is the index page configured for redirect pr not?
- if ($CONFIG['index_cookie'] > 0) {
- // Set cookie and remeber it for specified time
- @setcookie("visited", "true", (time() + $CONFIG['index_cookie']), COOKIE_PATH);
- } elseif (!empty($_COOKIE['visited'])) {
- // Remove cookie when admin set 0 in setup
- @setcookie("visited", "", (time() - 3600), COOKIE_PATH);
- }