<?php if(!defined("C_URL")) die('Can`t access file directly!'); ?>
<script language="JavaScript">
function sel() {
	with(document.form) {
		for(i=0;i<elements.length;i++) {
			thiselm = elements[i];
			if(thiselm.name.substring(0,3) == 'del')
				thiselm.checked = !thiselm.checked
		}
	}
}
</script>


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

<form action="index.php" method="post" name=form>
<input class=input type=hidden name="l" value="<?=LANGUAGE?>">
<input class=input type=hidden name="a" value="d">
<span class=head><?=TOTAL_MESSAGES?><?=TOTAL_MESSAGES_VALUE?></span>
<br><br>
<Table CellSpacing="<?=C_BORDER?>" CellPadding="0" width="<?=C_BWIDTH?>" bgcolor="<?=C_TBCOLOR?>">
<Tr>
  <Td>
  <Table Border=0 CellSpacing="<?=C_IBORDER?>" CellPadding="<?=C_CELLP?>" width="<?=C_BWIDTH?>" class=mes>
  <Tr align="center" bgcolor="<?=COLORH?>">
    <Td>
    <?=NUM?>
    </Td>
    <td>
    <?=FROM?>
    </td>
    <td>
    <?=SUBJECT?>
    </td>
    <td>
    <?=DATE?>
    </td>
    <td>
    <?=DEL?> <input type="checkbox" onClick="sel()">
    </td>
  </Tr>
<?while(isset($vmids[$p])) { /* Show messages - Begin */ ?>
  <Tr align="center" bgcolor="<?=$vmcolors[$p]?>">
    <Td>
    <?=$vmnums[$p]?>
    </Td>
    <td>
    <?if(!$vmfromids[$p]) { /* If message from administrator */?>
    <B><?=ADMINISTRATOR?></B>
		<?} else { /* Message from user*/ ?>
    <a class=link2 href="<?=GenLink('UserProfile',array(LANGUAGE,$vmfromids[$p]))?>" target="_blank"><?=$vmnames[$p]?> [ID#<?=$vmfromids[$p]?>]</a>
		<?}?>
    </td>
    <td>
    <a class=link2 href="?l=<?=LANGUAGE?>&a=m&mid=<?=$vmids[$p]?>"><?=$vmsubjects[$p]?></a> <?=$vmreaded[$p]?>
    </td>
    <td>
    <?=$vmsendtimes[$p]?>
    </td>
    <td>
    <input type="checkbox" name="del[]" value="<?=$vmids[$p]?>">
    </td>
  </Tr>      
<?$p++;}$p=0; /* Show messages - End */ ?>
  <?=VMPAGES?>  
  <Tr align="center" bgcolor="<?=COLORH?>">
    <Td colspan=5>
    <input type="submit" value="<?=DELETE_SELECTED_MESSAGES?>" class=input1>
    </td>
  </Tr>
  </Table>
  </td>
</Tr>
</Table>
</form><br><br><br><br></TD></TR></TABLE>
