<?php if(!defined("C_URL")) die('Can`t access file directly!'); ?>


   <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="6">
    <TR> 
     <TD ALIGN="CENTER" VALIGN="TOP">
<br><br><br>



<script language="JavaScript">
<!--
function ins(prop,type)
{
	var input = document.form.message;
	var mysel;var text;
	if (window.getSelection) mysel = window.getSelection();
	else if (document.selection) mysel = document.selection.createRange().text;
	else if (document.getSelection)	mysel = document.getSelection();
	b = (type == 0) ? '['+prop+']' : prop;
	e = (type == 0) ? '[/'+prop+']' : '';
  if (input.createTextRange)
  {
	  var text;
    input.focus(input.caretPos);
    input.caretPos = document.selection.createRange().duplicate();
    input.caretPos.text = (input.caretPos.text.length>0) ? b + input.caretPos.text + e : b + mysel + e;
   }
   else input.value += b + mysel + e;
}
function formCheck(form) {
  if (form.subject.value == "") {
    alert("<?=ENTER_SUBJECT?>");
    return false;
  }
  if (form.message.value == "") {
    alert("<?=ENTER_MESSAGE?>");
    return false;
  }
  if (document.form.submit.action != "") {
    document.form.submit.disabled=1;
  }
}
// -->
</script>
<form action="index.php" method="post" name=form OnSubmit="return formCheck(this)">
<input class=input type=hidden name="l" value="<?=LANGUAGE?>">
<input class=input type=hidden name="id" value="<?=FROMID?>">
<input class=input type=hidden name="a" value="s">
<span class=head><?=MESSAGE_FROM?>
   <?if(!FROMID) { /* If message from administrator */?>
    <B><?=ADMINISTRATOR?></B>
		<?} else { /* Message from user*/ ?>
<a href="<?=GenLink('UserProfile',array(LANGUAGE,FROMID))?>" target="_blank"><?=NAME?> [ID#<?=FROMID?>]</a></span>
		<?}?>
<br><br>
<Table CellSpacing="<?=C_BORDER?>" CellPadding="0" width="<?=C_WIDTH?>" bgcolor="<?=C_TBCOLOR?>">
<Tr>
  <Td>
  <Table Border=0 CellSpacing="<?=C_IBORDER?>" CellPadding="<?=C_CELLP?>" width="<?=C_WIDTH?>" class=mes>
  <Tr bgcolor="<?=COLOR1?>">
    <Td>
    <?=DATE?>
    </Td>
    <td>
    <?=SENDTIME?>
    </td>
  </Tr>
  <Tr bgcolor="<?=COLOR1?>">
    <Td>
    <?=SUBJECT?>
    </Td>
    <td>
    <?=SUBJECT_VALUE?>
    </td>
  </Tr>
  <Tr bgcolor="<?=COLOR1?>">
    <Td>
    <?=MESSAGE?>
    </Td>
    <td>
    <?=MESSAGE_VALUE?>
    </td>
  </Tr>
  <Tr bgcolor="<?=COLOR1?>" align="left">
    <Td colspan=2>
    <input class=input1 type=button value="<?=DELETE_MESSAGE?>" OnClick="location.href='<?=C_URL?>/members/index.php?l=<?=LANGUAGE?>&a=d&del[]=<?=MESSAGE_ID?>'"> <input class=input1 type=button value="<?=READ_NEXT_UNREAD?>" OnClick="location.href='<?=C_URL?>/members/index.php?l=<?=LANGUAGE?>&a=mnext'">
    </Td>
  </Tr>
  <Tr bgcolor="<?=COLORH?>" align="center">
    <Td colspan=2>
    <?=REPLY?>
    </Td>
  </Tr>
  <Tr bgcolor="<?=COLOR1?>">
    <Td>
    <?=SUBJECTR?>
    </td>
    <td>
    <input class=input type=text name=subject maxlength="40" value="<?=SUBJECT_ANSWER?>">
    </td>
  </tr>
  <Tr bgcolor="<?=COLOR1?>">
    <Td>
    <?=MESSAGER?>
        </td>
    <td>
<?if(USE_SMILES || USE_BB){?>
    <Table Border=0 width="350" CellSpacing="2" CellPadding="6"><Tr align="left" bgcolor="<?=COLORH?>"><Td>
<?if(USE_SMILES){?><?$p=0;foreach ($smiles as $k=>$v){$p++;?><a href="javascript:ins(' <?=$k?> ',1)"><img src="<?=C_URL?>/templates/<?=C_TEMP?>/forum/smiles/<?=$v?>" border=0 /></a>
<?if(C_SMILES_NUMBER <= $p){?><br><a href="javascript:open_win('<?=C_URL?>/forum/smiles_show.php','_blank')"><?=$w[720]?></a><br><?break;}?><?}?><?}?> 
<?if(USE_BB && USE_SMILES){?><br><br><?}?>
<?if(USE_BOLD){?><a href="javascript:ins('B',0)"><img src="<?=C_URL?>/templates/<?=C_TEMP?>/images/Bold.gif" border=0 /></a><?}?>
<?if(USE_ITALIC){?><a href="javascript:ins('I',0);"><img src="<?=C_URL?>/templates/<?=C_TEMP?>/images/Italic.gif" border=0 /></a><?}?>
<?if(USE_UNDERLINE){?><a href="javascript:ins('U',0);"><img src="<?=C_URL?>/templates/<?=C_TEMP?>/images/Underline.gif" border=0 /></a><?}?>
<?if(USE_STRIKE){?><a href="javascript:ins('S',0);"><img src="<?=C_URL?>/templates/<?=C_TEMP?>/images/Strike.gif" border=0 /></a><?}?>
<?if(USE_QUOTE){?><a href="javascript:ins('QUOTE',0);"><img src="<?=C_URL?>/templates/<?=C_TEMP?>/images/Quote.gif" border=0 /></a><?}?>  
<?if(USE_URL){?><a href="javascript:ins('URL',0);"><img src="<?=C_URL?>/templates/<?=C_TEMP?>/images/URL.gif" border=0 /></a><?}?>  
<?if(USE_IMG){?><a href="javascript:ins('IMG',0);"><img src="<?=C_URL?>/templates/<?=C_TEMP?>/images/Image.gif" border=0 /></a><?}?>  
<?if(USE_VIDEO){?><a href="javascript:ins('VIDEO',0);"><img src="<?=C_URL?>/templates/<?=C_TEMP?>/images/Video.gif" border=0 /></a><?}?>  
</td></tr></table><?}?>

    <textarea class=forum_input name=message id=message cols=40 rows=9 style="width:490"><?=MESSAGE_ANSWER?></textarea>
    </td>
  </tr>
  <Tr bgcolor="<?=COLOR1?>">
    <Td colspan=2>
    <input type="checkbox" name="confirm" checked> <?=NOTIFY_ME?>
    </td>
  </tr>
  <Tr bgcolor="<?=COLOR1?>">
    <Td colspan="2">
    <input class=input1 type=submit value="<?=SEND_MESSAGE?>" name="submit">
    </td>
  </tr>
  </Table>
  </td>
</Tr>
</Table>
</form>


<br><br><br><br>

     </TD>
    </TR>
   </TABLE>
