-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
- require($INC);
-}
-
-// Check if view.php nor click.php was called
-// If not set variables to default
-if (empty($CLICK)) $CLICK = 0;
-if (empty($VIEW)) $VIEW = 0;
-
-// Skip updating of cookies when viewing a banner
-if (($VIEW == 1) && ($_SERVER['PHP_SELF'])) return;
-
-// Session management initalization
-if (empty($PHPSESSID))
-{
- // This fixes some strange session cookie problems
- if (empty($_COOKIE['PHPSESSID'])) unset($_COOKIE['PHPSESSID']);
- @session_start();
- $PHPSESSID = @session_id();
-}
- else
-{
- @session_id($PHPSESSID);
- @session_start();
-}
-
-// Store PHPSESSID
-@setcookie("PHPSESSID", $PHPSESSID, (time() + $CONFIG['online_timeout']), COOKIE_PATH);