<?php
$newby=0;
require("includes/.htconfig.php");

if (array_key_exists("command",$_REQUEST) && ($_REQUEST["command"] == "Please look this over"))
{
	$newnda=$_REQUEST["newnda"];
	$filename=NDASTORAGE."/$enrollee_id.nda";
	file_put_contents($filename,$newnda);
    $headers="From: ".EMAILFROM;
    $body=makeName($enrollee)
      ." has just submitted his own NDA and it needs to be reviewed.  The proposed text is available at ".NDAURL."?id=$enrollee_id.";
    mail(REJECTTO,REJECTSUBJECT,$body,$headers);
}
else
	$newnda="";

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="./style/design.css" rel="stylesheet" type="text/css" />

<style type="text/css">
<!--
.style1 {font-size: 0.8em}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Roll your own</title>

</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td align="center" valign="top">
<?php
include_once("includes/header.php");
?>
	<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">	 
	 <tr>
	   <td width="30%" valign="top">
		<div class="bodySubHeader">
		<span class="bsht03">Your own NDA</span>
		</div>
		</td>
	 </tr> 
	</table>	

	<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="DarkLightBox">	
	 <tr>
	   <td height="30" align="left" valign="top" class="browseEventContents">
	   <?PHP
	   if (strlen($newnda) > 0)
	   {
	   ?>
We have stored your proposed NDA and have notified our officer of its existence.
At this point you will have to wait for our review.
Thank-you for giving our process your thoughtful consideration.
	<?PHP
	}
	else
	{
	?>
You have indicated that you would like to change the terms of the NonDisclosure Agreement (NDA).
As we said, you may do this but the final product will be subject to our review and we'll ask you to pay for that review.
We are reproducing the agreement here as a suggested starting place.
Of course, you are free to scrap the whole thing and to write your own suggestion afresh.
When you have your proposed contract ready, you may submit it to us here.
   <?PHP
   include("includes/.htnda.inc.php");
   ?>
<br />
<br />
	 </tr>
     <tr>
      <td>
Here is my suggestion:
<br/><form action="<?=$script?>">
<TEXTAREA name=newnda cols=60 rows=40></TEXTAREA>
<BR><input value="Please look this over" type="submit" name="command"/>
</form>
	<?PHP
	}
	?>
      </td>
     </tr>
    </table>
<br />
	   </td>	   
	 </tr>	
	</table>
<?php
include_once("includes/footer.php");
?>
		</td>
	</tr>
</table>
</body>
</html>