function get_teams_as_workroom($Workroom_Id)
{
    $item_id = get_item_id_by_workroom_id($Workroom_Id);
    $main = get_main_item_id_by_workroom_id($Workroom_Id);
    $all_parents = get_list_of_parent_items($item_id, array($item_id));
    $all_childs = get_list_of_childs($item_id, $all_parents);
    foreach ($all_childs as $records) {
        $author_id = get_post_field('post_author', $records);
        $status = get_post_meta($Workroom_Id, 'Invitation_Status_' . $author_id, true);
        $collects_items[$author_id] = (object) array('Collaborator_Id' => $author_id, 'Invitation_Status' => $status, 'Item_Id' => $records, 'Main_Item_Id' => $main);
    }
    return $collects_items;
}
    function Filter_Workroom()
    {
        $arg = array('author' => get_current_user_id(), 'collaboration_status' => $_POST['Type']);
        $workrooms = get_workroom($arg);
        $workrooms_list = array();
        foreach ($workrooms as $workroom) {
            $params = $workroom->ID;
            $workroom_leader = get_post_field('post_author', get_main_item_id_by_workroom_id($params));
            if (in_array($params, $workrooms_list)) {
                continue 1;
            }
            $workrooms_list[] = $params;
            ?>
						   <tr class="odd first inprogress" data-workroom-id="<?php 
            echo $params;
            ?>
">
									<td class="workrooominformation">
                                            <div class="workroomitemtitle">
                                                <a href="<?php 
            echo get_permalink(get_page_by_path('collaboration/workroom/message')) . $params;
            ?>
">
            
													<?php 
            echo get_the_title($params);
            ?>
                                               
                                                </a>
                                            </div>
                                            <div class="workroominfoadditional">
                                           	 <?php 
            echo get_collaboration_status_by_main_item_id($params);
            ?>
 <?php 
            echo get_the_date('Y-m-d', $params);
            ?>
 | Workroom Lead: 
                                            	<a href="javascript:void(0);"><?php 
            echo $workroom_leader == get_current_user_id() ? 'You' : get_the_author_meta('display_name', $workroom_leader);
            ?>
</a>
                                        </div>
									</td>
									<td class="wrlistitemactions">
										<div class="wrlistitemactionsholder">
											<div class="wrlistitemactionstxt">
												Actions
											</div>
											<ul class="writemactionslist">
												<li class="first"><a href="<?php 
            echo get_permalink(get_page_by_path('collaboration/workroom/message')) . $params;
            ?>
">Messages</a></li>
												<li><a href="<?php 
            echo get_permalink(get_page_by_path('collaboration/workroom/files')) . $params;
            ?>
">Files</a></li>
												<li><a href="<?php 
            echo get_permalink(get_page_by_path('collaboration/workroom/team-members')) . $params;
            ?>
">Team Members</a></li>
												<li><a href="<?php 
            echo get_permalink(get_page_by_path('collaboration/workroom/team-commission')) . $params;
            ?>
">Commission</a></li>
												<li><a href="<?php 
            echo get_permalink(get_page_by_path('collaboration/workroom/workroom-alerts')) . $params;
            ?>
">Alerts</a></li>
												<!--<li><a href="<?php 
            echo get_permalink(get_page_by_path('collaboration/workroom/report-problem')) . $params;
            ?>
">Report a Problem</a></li>-->
                                                 <?php 
            if (get_post_field('post_author', $params) == get_current_user_id()) {
                ?>
                                                <li class="last"><a href="<?php 
                echo get_permalink(get_page_by_path('collaboration/workroom/add-workroom')) . $params;
                ?>
">Edit Workroom</a></li>
                                                <?php 
            }
            if (get_post_field('post_author', $params) == get_current_user_id()) {
                ?>
                                                <li><a href="JavaScript:void(0)" onClick="Edd.collaboration.Workroom.Delete('<?php 
                echo $params;
                ?>
')">Delete Workroom</a></li>
												<?php 
            }
            ?>
											</ul>
										</div>
									</td>
								</tr>
                                
							<?php 
        }
    }
<?php

$params = get_query_var("workroom_id");
$item_id = get_main_item_id_by_workroom_id($params);
?>
<div class="wrapper_collab">
	<div class="wrapper_collabinside">
		
		<?php 
/* Collaboration Room Info: Start */
?>
		<?php 
include collaboration_plugin_dir . 'templates/frontend/frontend-workroom-info.php';
?>
		<?php 
/* Collaboration Room Info: End */
?>
		
		<?php 
/* Collaboration Navigation & Messaging: Start */
?>
		<div class="collabcolcontainer">
			
			<?php 
include collaboration_plugin_dir . 'templates/frontend/frontend-left-navs.php';
?>
			
			<?php 
/* Center Col Content: Start */
?>
			<div class="collabcol centercol collabcontent">