#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print "<head>
<title>Request a New Game to be Sanctionned by the IAAPA</title>
</head>";
use CGI;
$q=new  CGI;
$opponent=$q->param('opponent');
$playernumber=$q->param('playernumber');
$playercode=$q->param('playercode');
$rank=$q->param('rank');
print "<BODY background=\"/images/iaapaback.gif\">
<center><H1><i>
	<A HREF=/index.html><img src=/images/iaapalogo2.gif alt =\"IAAPA logo\" ></A>
Request a New Game to be Sanctionned by the IAAPA</i></H1>
<P><BR><BR>
<H2>Issue a Challenge to another Member of the Association</H2>
</center>

<FORM METHOD=POST ACTION=/cgi-local/axis/Addgamestart.cgi>


<BR>
<CENTER>
<H3>Please fill in the details of the game you would like to play and an email will be sent to 
your opponent.  Once he accepts the challenge, a game number will be assigned (and a GM if 
necessary) and you will ready to play.
</H3>
<p>
<br><br>
<TABLE>
<TD><H4>Play type</H4>
<TD><SELECT name=Gametype><option value=\"#\">PBEM with GM
<option value=\"D\" SELECTED>PBEM without GM (GMless)
<option value=\"L\">Live AOL HQ
<option value=\"F\">Face to face</SELECT><TR>

<TD><H4>Game type</H4>
<TD><SELECT name=Gtype><option value=\"T\">Tournament
<option value=\"#\" SELECTED>Normal game
</SELECT><TR>
<TD><H4>Opponent (alias)</H4>
<TD> <input name=\"Player2\" value=\"$opponent\"><TR>
<TD><H4>Your player number</H4>
<TD> <input name=\"Playernr\" value=\"$playernumber\"><TR>
<TD><H4>Your password</H4>
<TD> <input name=\"Code\" value=\"$playercode\"><TR>
<TD><H4>Your Bid (IPC Total Value)</H4>
<TD> <input name=\"bid\" value=\"\">
<TD>
<TR>
</TABLE>
<Table><td>
Details of your bid (IPC certificates, extra ground, air or naval units, etc.) 
<tr><td><textarea name=bidinfo value=\"\" rows=10 cols=56 wrap=virtual></textarea>
<tr><td>
Personal message to be passed along with the challenge<br>
<textarea name=comments value=\"\" rows=10 cols=56 wrap=virtual></textarea>
<tr>
</table><center>
<INPUT TYPE=submit VALUE=\"Submit Challenge\">
</FORM>";
if ($playernr ne '') { 
print "<BR><BR>
	<A HREF=/cgi-local/axis/players.cgi?playernr=$playernumber&playercode=$playercode>
		<IMG src=/images/back.gif></A>"; }
else
{
print "<BR><BR>
	<A HREF=/cgi-local/axis/Playerpool.cgi?parent=$rank>
		<IMG src=/images/back.gif></A>"; }
