<?php
include_once("includes/site_info.php");
include_once("session_handler.inc");

$WUserID = $_SESSION['Sess_UserId'];
$result=mysql_query("SELECT * FROM message_folder where user_id='$WUserID'") or die(mysql_error());
$Tot_fol = mysql_num_rows($result);

?>

<ul id="tabmenu2">
	<li><a href="javascript:void(null)" onclick="inboxactive('Compose',<?=$Tot_fol?>)" id="tab_Compose">New</a></li>
	<li><a href="javascript:void(null)" onclick="inboxactive('Incoming',<?=$Tot_fol?>)" id="tab_Incoming" class="current">Inbox</a></li>
	<li><a href="javascript:void(null)" onclick="inboxactive('Sent',<?=$Tot_fol?>)" id="tab_Sent">Sent</a></li>
	<li><a href="javascript:void(null)" onclick="inboxactive('Trash',<?=$Tot_fol?>)" id="tab_Trash">Trash Bin</a></li>
	<li><a href="javascript:void(null)" onclick="inboxactive('Block',<?=$Tot_fol?>)" id="tab_Block">Block List</a></li>
	<li><a href="javascript:void(null)" onclick="inboxactive('folder',<?=$Tot_fol?>)" id="tab_folder">Folders - [Add/Edit]</a></li>
	<?php 
		while($folder=mysql_fetch_array($result)){ ?>
	<li><a href="javascript:void(null)" onclick="folderactive(<?=$folder[folder_id]?>,<?=$Tot_fol?>)" id='folder_In<?=$folder[folder_id]?>' name="folder_In[]">
		<?=$folder[name]?>
		</a></li>
	<? } ?>
</ul>
