#! /usr/bin/perl
# $Id: validate.pl,v 1.1 2000/10/05 21:31:06 koike Exp $

print "Content-Type: text/html\n\n";
print "
<!DOCTYPE HTML PUBLIC '-//IETF//DTD HTML//EN'>
<html>
<head>
<title>P3P Validator</title>
<style type='text/css'>
BODY {
	margin: 2em 1em 2em 30px;
	font-family: 'Arial', 'Helvetica', sans-serif;
	font-size: 11pt;
	color: black;
	background: white;
	background-position: top left;
	background-attachment: fixed;
	background-repeat: no-repeat;
}

A:hover {
	background: #FFFF90
} 

H1 {
	font-family: 'Arial', 'Helvetica', sans-serif;
	font-size: 24pt;
	font-weight: normal;
	color: #0050B2; 
}

H2 {
	font-family: 'Arial', 'Helvetica', sans-serif;
	font-size: 18pt;
	font-weight: normal;
	color: #0050B2; 
}

H3 {
	font-family: 'Arial', 'Helvetica', sans-serif;
	font-size: 14pt;
	font-weight: normal;
	color: #0050B2; 
}

H4{
	font-family: 'Arial', 'Helvetica', sans-serif;
	font-size: 12pt;
	font-weight: normal;
	color: #0050B2; 
}

DL DT {
	font-weight: bold;
}

DL DD {
	margin-bottom: 0.7em;
}

PRE {
	font-family: 'Courier New', 'Courier';
}

TT {
	font-family: 'Courier New', 'Courier';
	color: brown;
}

.big {
	font-size: 15pt;
	font-weight: bold;
}

.step {
	font-size: 15pt;
	color: #0050B2; 
}

.result {
	font-size: 13pt;
	font-weight: bold;
}

.result2 {
	font-size: 12pt;
	font-weight: normal;
}

.mes {
	font-size: 10pt;
	margin-left: 30px;
}
</style>
</head>

<body>
<a href='http://www.w3.org/'>
<img border='0' src='http://www.w3.org/Icons/WWW/w3c_home'></a>

<h1>P3P Validator</h1>
<h2>Integrated Validation</h2>
<form action='p3p.pl' method='GET'>
URI:
<input name='url' type='text' size='50' maxlength='300'>
<input type='submit' value='check'><br>
&nbsp;&nbsp;
<input name='warn' type='checkbox' checked>Show warning messages<br>
<p style='color: #606060; font-size: 9pt'>
*put the URI of a WWW page that you want to check (e.g. <tt>http://www.w3.org/</tt>).<br>
*please do not type the URI of P3P policy file.
</p>
</form>

<h2>Policy File Validation</h2>
<form action='policy.pl' method='GET'>
URI:
<input name='url' type='text' size='50' maxlength='300'>
<input type='submit' value='check'><br>
</form>
<form enctype='multipart/form-data' action='policy.pl' method='POST'>
File:
<input name='file' type='file' size='39' maxlength='300'>
<input type='submit' value='check'><br>
<p style='color: #606060; font-size: 9pt'>
*put URI or file name of P3P policy (e.g. <tt>http://example.com/policy.xml</tt>)
</p>
</form>

<h2>Real Web Sites</h2>
<form action='p3p.pl' method='GET'>
<input name='warn' type='hidden' value='on'>
<select name='url' size='15'>
<option value='http://www.w3.org/'>W3C (World Wide Web Consortium)</option>
<option value='http://www.att.com/'>
AT&amp;T</option>
<option value='http://www.att.net/'>
AT&amp;T Worldnet</option>
<option value='http://www.aol.com/'>America Online</option>
<option value='http://www.engage.com/'>Engage</option>
<option value='http://www.hp.com/'>Hewlett-Packard Company</option>
<option value='http://www.idcide.com/'>IDcide</option>
<option value='http://www.ipc.on.ca/'>Information and Privacy Commissioner / Ontario
</option>
<option value='http://www.ibm.com/'>IBM</option>
<option value='http://www.fecht-ag.f2s.com/'>JS Bach Gymnasium</option>
<option value='http://www.microsoft.com/'>Microsoft</option>
<option value='http://www.pg.com/'>Procter and Gamble</option>
<option value='http://www.cdt.org/'>
The Center for Democracy and Technology (CDT)</option>
<option value='http://vineyard.net/'>Vineyard.NET</option>
<option value='http://www.whitehouse.gov/index.html'>White House</option>
</select>
<input type='submit' value='check'>
<p style='color: #606060; font-size: 9pt'>
*See how real web sites are using P3P.
</p>
</form>

<!--
<p>
(Go to <a href='demo/demo.pl'>demo page</a>)
</p>
-->
<hr>
<h3 style='color: #606060; font-size: 14pt'>Notice:</h3>
<ul style='color: #606060; font-size: 9pt'>
<li>
This is alpha version, and may have bugs and errors. 
Please report errors and bugs to <a href='mailto:koike\@w3.org'>koike\@w3.org</a>.
</li>
<li>
Policy files are checked against <a href='/dtd2xsd/p3p.xml'>this XML schame file</a>.
</li>
<li>
Corrected example policies (originally included in the 
<a href='http://www.w3.org/TR/2000/WD-P3P-20000510/'>P3P spec</a>) 
are available. (<a href='/dtd2xsd/example1.xml'>example 3.1</a> and 
<a href='/dtd2xsd/example2.xml'>example 3.2</a>.)
</li>
<li>
Corrected base data schema is available 
<a href='/dtd2xsd/base.xml'>here</a>.
</li>
<li>
This validation service is temporally and may be stopped 
without any notification. In such case, all update information 
will be available at <a href='http://www.w3.org/P3P/'>W3C's P3P site</a>. 
</li>
</ul>
<hr>
Version 0.91, Created by: <a href='http://www.w3.org/People/Koike/'>Yuichi Koike</A>, 
June 1 2000
</body>
</html>
";
