<table width="100%" cellpadding="0" cellspacing="0" border="0">
	<tr><td class="nav"><a href="index.php?section=home">Home</a>&nbsp;&gt;&nbsp;<a href="index.php?section=mailbox&action=saved">Mailbox - Saved</a></td></tr>
	<tr><td>&nbsp;</td></tr>
	<tr><td><table cellpadding="2" cellspacing="2" border="0" width="600" align="center">
		<form action="index.php" method="post">
		<input type="hidden" name="section" value="mailbox">
		<input type="hidden" name="ret_link" value="<?php echo $data["link"]; ?>">
		<input type="hidden" name="action" value="">
		<input type="hidden" name="pro" value="">
		<tr>
			<td class="list_header" align="center">
			<input type="checkbox" onclick="HS_TickAll('mes_id[]',this.form)" name="tick_tracker">
			</td>
			<td class="list_header" align="center">New</td>
			<td class="list_header" align="center">From</td>
			<td class="list_header" align="center">Subject</td>						
			<td class="list_header" align="center">Date</td>
			<td class="list_header" align="center">Action</td>
		</tr>
		<?php
		
			foreach($data["messages"] as $message){
				?><tr>
				<td class="list_cell" align="center"><?php
				admin_form_element(array ("type" => "checkbox", "name" => "mes_id[]", "ovalue" => $message["mes_id"]));
				?></td>
				<td class="list_cell" align="center"><?php
				if(!$message["viewed"])
					admin_output_image("icons/new_message.gif",0,0,"new message");
				else
					echo "&nbsp;";
				?></td>
				<td class="list_cell"><a href="<?php echo $message["sender"]["link"]; ?>" target="_blank"><?php echo $message["sender"][name]; ?></a><br>(ID: <?php echo $message["per_id"]; ?>)</td>
				<td class="list_cell"><?php echo $message["subject"]; ?></td>
				<td class="list_cell"><?php echo $message["date"]; ?></td>
				<td class="list_cell" align="center"><?php
				admin_output_image("buttons/but_view_small.gif",$message["view"],0,"view");
				admin_output_image("buttons/but_resend.gif",$message["reply"],0,"reply");
				admin_output_image("buttons/but_delete_small.gif",$message["delete"],0,"delete");
				?></td>
				</tr><?php
			}//foreach
			
		?>
		<tr><td colspan="6" align="center"><?php
		admin_form_element( array ("type" => "button", "value" => "Delete", "bsubmit" => "this.form.action.value='delete';") );
		echo "&nbsp;";
		admin_form_element( array ("type" => "button", "value" => "Delete All", "bsubmit" => "this.form.action.value='delete_all';this.form.pro.value='saved';") );
		?></td></tr>
		</form>
	</table></td></tr>
	<tr><td>&nbsp;</td></tr>
	<?php if(is_array($data["pages"][numbers])): ?>
	<tr>
		<td class="pages_line">
			<table cellpadding="0" cellspacing="0" border="0" align="center" height="20">
				<tr>					
					<td align="center" class="pages_body">
					<?php
						if($data["pages"][prev]){
							?><a href="<?php echo $data["pages"][prev]; ?>">&lt;&lt;</a>&nbsp;<?php
						}//if
						while(list($page,$link) = each($data["pages"][numbers])){
							?><a href="<?php echo $link; ?>"><?php echo ($page == $data["pages"][current]) ? "<b>".$page."</b>" : $page ; ?></a>&nbsp;<?php
						}//while
						if($data["pages"][next]){
							?><a href="<?php echo $data["pages"][next]; ?>">&gt;&gt;</a>&nbsp;<?php
						}//if
					?>
					</td>
			</table>			
		</td>
	</tr>
	<?php endif; ?>
</table>