<?php

include("eff_setup2.php");

$smarty = new EFFSmarty;
$smarty->assign('title','Patent Busting\'s Most Wanted');
$smarty->caching = false;
$smarty->assign('patent','true');

if (! isset($_GET["p"])) {
   header("Location: /patent/");
exit;
}

$valid_patents = array( 'acacia', 'acceris', 'ideaflood', 'test', 'firepond', 'clearchannel', 'sheldon', 'neomedia', 'nintendo', 'seer');
$patent=strtolower($_GET["p"]);
if(!in_array($patent, $valid_patents)) {
    header("Location: https://w2.eff.org/patent/");
    exit();
}

include("array.php");

$shortname = $all[$patent]['shortname'];
$fullname = $all[$patent]['fullname'];

$content = <<<EOT

<div id="featuretext">

<div class="pbheader">
<a href="/patent/"><img src="../img/logo_smaller.gif" border="0" alt="Patent Busting Project"></a>
</div>

<div class="tabs">
<ul>
<li><a href="patent.php?p=$patent">$shortname Main</a></li>
<li><a class="on" href="prior.php?p=$patent">Prior Art Description</a></li>
<li><a href="contribute.php?p=$patent">Contribute</a></li>
</ul>
</div>
<div class="clr"></div>
<div class="patentcontentmain">
  <div class="mug">
  <a class="muglink" href="patent.php?p=$patent"><img src="/patent/img/face_$patent.png" alt="MUGSHOT" width="90"  height="120" border="0"></a>
  </div>
<h2>Wanted: $fullname </h2>
EOT;

$content .= file_get_contents($all[$patent]['header']);
$content .= <<<EOT
<div class="clr"></div>
EOT;

$content .= file_get_contents("$patent/$patent-prior.html");

$content .= '

</div>
';

global $REQUEST_URI;
$smarty->assign('content',$content);
$smarty->display('generic.tpl',$REQUEST_URI);

?>
