<?PHP

// Ganesha
  $p_subject = str_replace("\"","&quot;",$p_subject);
  $author = $ClsMembre->GetPrenom($guserid)." ".$ClsMembre->GetNom($guserid) ;
  $email  = $ClsMembre->GetEmail($guserid) ;



  if($read!=false){
    $caption = $lReplyMessage;
    if(!eregi("^re:", $qsubject)){
      $p_subject="Re: ".$qsubject;
    }
    else{
      $p_subject= $qsubject;
    }

    $parent=$id;
    if(!$$phflat){
      $quote = undo_htmlspecialchars($qauthor) . " $lWrote:\n";
      $quote .= textwrap("\n$qbody", 63, "\n", "> ") . "\n";
      $quote = htmlspecialchars($quote);
      $quote_button='&nbsp;&nbsp;<input type="Hidden" name="hide" value="'.$quote.'"><input tabindex="100" type="Button" class="bouton" name="quote" value="'.$lQuote.'" onClick="this.form.body.value=this.form.body.value + this.form.hide.value; this.form.hide.value=\'\';">';
    }
  }
  else{
    $caption = $lStartTopic;
    $p_subject=$subject;
    $p_body=$body;
  }
  $p_author=$author;
  $p_email=$email;

?>
<?PHP
  if($IsError && $action){
    echo '<p><b><font class="error">'.$IsError.'</font></b>';
  }
?>
<?PHP
  if ($ForumAllowUploads == 'Y' && !empty($uploadDir)) {
    $enctype = "multipart/form-data";
  } else {
    $enctype = "application/x-www-form-urlencoded";
  }
?>
<BR>
<table <?PHP echo bgcolor($color2); ?>><tr><td>
	<form action="<?PHP echo $post_page.$ext ?>?connexion=<?PHP echo $gconnexionid; ?>" method="post" enctype="<?PHP echo $enctype ?>">
	<input type="Hidden" name="t" value="<?PHP  echo $thread; ?>">
	<input type="Hidden" name="a" value="post">
	<input type="Hidden" name="f" value="<?PHP echo $num; ?>">
	<input type="Hidden" name="p" value="<?PHP echo $parent; ?>">
	<input type="Hidden" name="author" value="<?PHP echo $p_author; ?>">
	<input type="hidden" name="email" value="<?PHP echo $p_email; ?>">
	<?php echo $PostVars; ?>
		<table cellspacing="0" cellpadding="0" border="0" colspan="2" <?PHP echo bgcolor($color2); ?>>
			<tr>
			  <td><?PHP echo $nav; ?></td>
			</tr>
		</table>
		<table cellspacing="0" cellpadding="1" border="0" <?PHP echo bgcolor($color3); ?>>
		<tr>
			<td height="21" colspan="2" <?PHP echo bgcolor($color1); ?>><FONT class="HEADER2" size="+1">&nbsp;<?PHP echo $caption; ?></font></td>
		</tr>
		<tr>
			<td nowrap><font color="<?PHP echo $ForumTableBodyFontColor1; ?>">&nbsp;<?PHP echo $lFormSubject;?>:</font></td>
			<td ><input type="Text" name="subject" size="30" maxlength="255" value="<?PHP echo $p_subject; ?>"></td>
		</tr>
		<?PHP
			if ($ForumAllowUploads == 'Y' AND $uploadDir != '') {
				print "<tr>\n";
				print '    <td ' . bgcolor("#FFFFFF") . ' nowrap><font color="' . $TableBodyFontColor1 . '">&nbsp;' . $lFormAttachment . ':</font></td>';
				print '    <td ' . bgcolor("#FFFFFF") . '><input type="File" name="attachment" size="30" maxlength="64"></td>';
				print "</tr>\n";
			}
		?>
		<tr>
			<td colspan=2 width="100%" nowrap align="left"><table cellpadding="5" cellspacing="0" border="0"><tr><td align="CENTER" valign="TOP"><font face="courier"><textarea name="body" cols="65" rows="10" wrap="VIRTUAL"><?PHP echo $p_body; ?></textarea></font></td></tr></table></td>
		</tr>
		<?PHP if($ForumModeration!="a"){ ?>
		<tr>
			<td  colspan=2 width="100%" nowrap align="left">&nbsp;</td>
		</tr>
		<?PHP } ?>
		<tr>
			<td width="100%" colspan="2" align="center" ><?PHP echo $quote_button; ?>&nbsp;<input type="button" name="post" class="bouton" value=" <?PHP echo $lFormPost;?> " onClick="VerifPost(this.form);">&nbsp;<br><img src="images/trans.gif" width=3 height=3 border=0></td>
		</tr>
		</table>
	</form>
</td></tr></table>