authenticate(); // -------------- // Grab the input $doExpire = get_input("doExpire","post"); $Cat = get_input("Cat","both"); // --------------------- // Grab the cookie array $CookieArray = $HTTP_COOKIE_VARS; if(!is_array($HTTP_COOKIE_VARS)) { $CookieArray = $_COOKIE; } // ---------------------------- // Show the current cookies if (!$doExpire) { $html = new html; $html -> send_header($config['title'],$Cat,0,$user); list($tbopen,$tbclose) = $html -> table_wrapper(); $cookiearray = array(); if (is_array($CookieArray) && !empty($CookieArray)) { $cookierow = 0; while(list($cName,$cValue) = each($CookieArray)) { $cValue = @urldecode($cValue); $cookiearray[$cookierow]['cName'] = $cName; $cookiearray[$cookierow]['cValue'] = $cValue; $cookierow++; } } if (!$debug) { include("$thispath/templates/$tempstyle/mycookies.tmpl"); } $html -> send_footer(); exit; } else { if (is_array($CookieArray) && !empty($CookieArray)) { while(list($cName,$cValue) = each($CookieArray)) { $cName = str_replace(" ","",$cName); // Multiple cookie paths used to expire cookies no longer in use as well. setcookie("$cName","", time() - 604800,"{$config['cookiepath']}"); // Configured path setcookie("$cName","", time() - 604800,"/"); // Site wide path setcookie("$cName","", time() - 604800); // Directory only path } } header("Refresh: 0; URL={$config['phpurl']}/mycookies.php?Cat=$Cat&mgrade=okay"); } ?>