<?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 href="prior.php?p=$patent">Prior Art Description</a></li>
<li><a class="on" 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>
<h2>Submit Prior Art</h2>
<form action="submit.php?p=$patent" method="post">
<input type="hidden" name="p" value="$patent">

<p>Thank you for your interest in helping us bust this patent.  Please fill out the appropriate section(s) of the following form, and we'll contact you if we can use your assistance.</p>

<p><strong>Prior Art for this patent must have been made public before
the above &quot;Critical Date&quot; in order to qualify.</strong></p>

<h3>Your Contact Info (optional)</h3>
<table border="0" cellspacing="0" cellpadding="3">
<tr>
  <td>Name</td>
  <td><input type="text" size="50" name="submitter_name"></td>
</tr>
<tr bgcolor="#EEEEEE">
  <td>Phone number</td><td><input type="text" size="50" name="submitter_phone"></td>
</tr>
<tr>
  <td>Email address</td>
  <td><input type="text" size="50" name="submitter_email"></td>
</tr>
</table>

<h3>If prior art is a previously-issued patent, give us:</h3>
<table border="0" cellspacing="0" cellpadding="3">
<tr>
  <td>Patent name</td><td><input type="text" size="50" name="field1"></td>
</tr><tr bgcolor="#EEEEEE">
  <td>Patent number</td><td><input type="text" size="50" name="field2"></td>
</tr><tr>
  <td>Country that issued patent</td><td><input type="text" size="50" name="field3"></td>
</tr><tr bgcolor="#EEEEEE">
  <td>General description</td><td><input type="text" size="50" name="field4"></td>
</tr><tr>
  <td>Location on web (if available)</td><td><input type="text" size="50" name="field5"></td>
</tr><tr>
  <td valign="top">Why it is/describes prior art</td><td><textarea name="field7" rows="5" cols="40"></textarea></td>
</tr>
</table>

<h3 class="or">If prior art is a paper or other physical media publication, give us:</h3>
<table border="0" cellspacing="0" cellpadding="3">
<tr>
  <td>Title</td>
  <td><input type="text" size="50" name="field8"></td>
</tr><tr bgcolor="#EEEEEE">
  <td>Author</td><td><input type="text" size="50" name="field9"></td>
</tr><tr>
  <td>Publisher</td><td><input type="text" size="50" name="field10"></td>
</tr><tr bgcolor="#EEEEEE">
  <td>Date</td><td><input type="text" size="50" name="field11"></td>
</tr><tr>
  <td>Where can we find it?</td><td><input type="text" size="50" name="field12"></td>
</tr><tr bgcolor="#EEEEEE">
  <td>General description</td><td><input type="text" size="50" name="field13"></td>
</tr>
<tr>
  <td valign="top">Why it is/describes prior art</td><td><textarea name="field14" rows="5" cols="40"></textarea></td>
</tr>
</table>

<h3 class="or">If prior art is software, give us:</h3>
<table border="0" cellspacing="0" cellpadding="3">
<tr>
  <td>Name</td>
  <td><input type="text" size="50" name="field15"></td>
</tr><tr bgcolor="#EEEEEE">
  <td>Author(s)/Creator(s)</td><td><input type="text" size="50" name="field16"></td>
</tr><tr>
  <td>Publisher</td><td><input type="text" size="50" name="field17"></td>
</tr><tr bgcolor="#EEEEEE">
  <td>Date</td><td><input type="text" size="50" name="field18"></td>
</tr><tr>
  <td>Where can we find it?</td><td><input type="text" size="50" name="field19"></td>
</tr><tr bgcolor="#EEEEEE">
  <td>General description</td><td><input type="text" size="50" name="field20"></td>
</tr><tr>
  <td valign="top">Why it is/describes prior art</td><td><textarea name="field21" rows="5" cols="40"></textarea></td>
</tr>
</table>

<h3 class="or">If prior art is on the web, give us:</h3>
<table border="0" cellspacing="0" cellpadding="3">
<tr>
  <td>URL</td>
  <td><input type="text" size="50" name="field22"></td>
</tr><tr bgcolor="#EEEEEE">
  <td>Author(s)/Creator(s)</td>
  <td><input type="text" size="50" name="field23"></td>
</tr><tr>
  <td>Date</td><td><input type="text" size="50" name="field24"></td>
</tr><tr>
  <td valign="top">Why it is/describes prior art</td><td><textarea name="field25" rows="5" cols="40"></textarea></td>
</tr><tr>
  <td></td>
  <td><input class="submit" type="submit" value="Submit!"></td></tr>
</table>
</form>

</div>


EOT;


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

?>
