#!/usr/local/bin/perl
#Displays all cookies for this website and this file
#file: cookie.pl

require '/home/bear-008/users/downeyt/scripts/parse-lib.pl';

%query=&get_query;
%cookie=&get_cookie;

print <<HEADER;
Content-type: text/html

HEADER
    ;



print <<BODY;
<html>
<head>
<title>Test Cookie</title>
</head>
<body>
These are the cookies, including one for just this file.
<ol>
BODY
    ;
if (scalar %cookie)
{
    foreach $name (keys %cookie)
    {
	print "<li>$name = ",unescape($cookie{$name});
    }
}

print <<TAIL;
</ol>
<ul>
<li><a href="cookie.set.pl">Set the cookies</a>
<li><a href="cookie.get.pl">View the cookies</a>
<li><a href="cookie.get.restricted.pl">View the restricted cookie, too</a>
</ul>
</body>
</html>
TAIL
    ;
