} } else { $user = null; } } $linkUSAllGooglePlaytimes = new Link(); $linkUSAllGooglePlaytimes->LoadLinkID('US_ALL_GOOGLE_PLAYTIMES'); if ($post) { switch ($postType) { case 'CHANGE_PLAYTIMES': $location = $_POST['txtLocation']; if (isset($user)) { $user->PlayTimesLocation($location); UpdateObject($user, false); } else { $session->PlayTimesLocation($location); UpdateObject($session, false); } $session->ChangedPlayTimesLocation('Session', $session->ID(), $location); UpdateObject($session, false); $linkUSAllGooglePlaytimes = new Link(); $linkUSAllGooglePlaytimes->LoadLinkID('US_ALL_GOOGLE_PLAYTIMES'); $playTimesURL = $linkUSAllGooglePlaytimes->URLPlugged($location); header("Location: {$playTimesURL}"); exit; break; } } } catch (Exception $ex) { ProcessException($ex); }