switch ($_POST['action']) { case 'prefset': // Set a 30-day, then redirect to index $I18N->setCookie('userlang', $_POST['fpLang']); $I18N->redirectTo($Tool->remoteBasePath, 302); break; } } /** * Get actions * ------------------------------------------------- */ if (isset($_GET['action'])) { switch ($_GET['action']) { case 'clearcookies': $I18N->wipeCookies(); $I18N->redirectTo($Tool->generatePermalink(array('msg' => 2)), 302); break; case 'renewcookies': $I18N->renewCookies(); $I18N->redirectTo($Tool->generatePermalink(array('msg' => 3)), 302); break; } } /** * Custom return to * ------------------------------------------------- */ // Tools can pass returnto and returntoquery parameters // to redirect visitors back to them after setting, changing // or doing something (eg. clearcookies, renewcookies or prefset)