5) { $new_gc_probability = $gc_divisor * .2; ini_set('session.gc_probability',$new_gc_probability); } /* PHP5 Date problem solved.. ya'll GMT now! */ putenv("TZ=GMT"); /* Seed the random number */ srand((double) microtime() * 1000003); /**** END Set PHP Vars ****/ // If we don't want a session if (!isset($no_session) AND conf('use_auth')) { if (!vauth_check_session()) { logout(); exit(); } $user = new User($_SESSION['userdata']['username']); init_preferences(); set_theme(); $user->set_preferences(); $user->update_last_seen(); } elseif (!conf('use_auth')) { $auth['success'] = 1; $auth['username'] = '-1'; $auth['fullname'] = "Ampache User"; $auth['id'] = -1; $auth['access'] = "admin"; $auth['offset_limit'] = 50; if (!vauth_check_session()) { vauth_session_create($auth); } $user = new User(-1); $user->fullname = $auth['fullname']; $user->offset_limit = $auth['offset_limit']; $user->username = $auth['username']; $user->access = $auth['access']; $_SESSION['userdata']['username'] = $auth['username']; $user->set_preferences(); init_preferences(); set_theme(); } else { $user = new user(); } // Load gettext mojo load_gettext(); /* Set CHARSET */ header ("Content-Type: text/html; charset=" . conf('site_charset')); /* Clean up a bit */ unset($array); unset($results); /* Setup the flip class */ flip_class(array('odd','even')); /* Setup the Error Class */ $error = new Error(); /* Set the Theme */ $theme = get_theme(conf('theme_name')); if (! preg_match('/update\.php/', $_SERVER['PHP_SELF'])) { $update = new Update(); if ($update->need_update()) { header("Location: " . conf('web_path') . "/update.php"); exit(); } } unset($update); ?>