<div id="supportfilterlinks" style="padding-top:10px;padding-bottom:10px;">
    <ul>      

		<?php if ($this->showPendingItems) { ?>

        <li class="filters">
            <a id="pendingitemstoggle" href="javascript:toggleTicketParent('pendingitemstoggle','Ticket_Sidebar_PendingItemsToggle');ce.updateTicketsCache();" class="<?php echo $this->togglependingitemsswitch;?>">*</a>
            <a style="text-decoration:none;" href="javascript:toggleTicketParent('pendingitemstoggle','Ticket_Sidebar_PendingItemsToggle');ce.updateTicketsCache();"><img alt="*" style="position:relative;top:4px;padding-right:1px;" height="16" width="16" src="../templates/admin/images/folder-small.png" /><?php echo $this->lang("Pending Items");?></a>
            <ul id="pendingitemstoggle_options" style="display:<?php echo $this->togglependingitems;?>;">
                <?php foreach ($this->pendingitems as $deptfilter){ ?>
                <li class="">
                    <span onmouseover="highlightCount('<?php echo $deptfilter['pendingitems_id'];?>',true);" onmouseout="highlightCount('<?php echo $deptfilter['pendingitems_id'];?>',false);"  class="count"  id="<?php echo $deptfilter['pendingitems_id'];?>_count"><a onclick="window.location.href='<?php echo $deptfilter['pendingitem_url'];?>';" style='cursor:pointer;'><?php echo $deptfilter['pendingitems_count']?></a></span>
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/<?php echo $deptfilter['pendingitems_elbow'];?>.gif" /><a onmouseover="highlightCount(<?php echo $deptfilter['pendingitems_id'];?>,true);" onmouseout="highlightCount(<?php echo $deptfilter['pendingitems_id'];?>,false);" onclick="window.location.href='<?php echo $deptfilter['pendingitem_url'];?>';" style='cursor:pointer;'><?php echo $deptfilter['pendingitems_name'];?></a>
                </li>
                <?php }?>
            </ul>
        </li>
        
       <?php } ?>
          
        <li class="filters">
            <a id="filtertoggle" href="javascript:toggleTicketParent('filtertoggle','Ticket_Sidebar_FilterToggle');ce.updateTicketsCache();"class="<?php echo $this->togglefilterswitch;?>">*</a>
            <a style="text-decoration:none;" href="javascript:toggleTicketParent('filtertoggle','Ticket_Sidebar_FilterToggle');ce.updateTicketsCache();"><img alt="*"  style="position:relative;top:4px;padding-right:1px;" width="16" height="16" src="../templates/admin/images/funnel-small.png" /><?php echo $this->lang("Ticket Filters");?></a>
            <ul id="filtertoggle_options" style="display:<?php echo $this->togglefilter;?>;">
                <li class="">
                    <span onmouseover="highlightCount('open',true);" onmouseout="highlightCount('open',false);" class="count" id="open_count"><a onclick="processFilterClick('open','<?php echo $this->lang("All Open Tickets");?>');" style='cursor:pointer;'><?php echo $this->allopencount;?></a></span>
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow.gif" /><a onmouseover="highlightCount('open',true);" onmouseout="highlightCount('open',false);" onclick="processFilterClick('open','<?php echo $this->lang("All Open Tickets");?>');" style='cursor:pointer;'><?php echo $this->lang("All Open");?></a>
                </li>
                <li class="">
                    <span onmouseover="highlightCount('awaitingreply',true);" onmouseout="highlightCount('awaitingreply',false);" class="count" id="awaitingreply_count"><a onclick="processFilterClick('awaitingreply','<?php echo $this->lang("Awaiting Reply");?>');" style='cursor:pointer;'><?php echo $this->ticketsawaitingreplycount;?></a></span>
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow.gif" /><a onmouseover="highlightCount('awaitingreply',true);" onmouseout="highlightCount('awaitingreply',false);" onclick="processFilterClick('awaitingreply','<?php echo $this->lang("Awaiting Reply");?>');" style='cursor:pointer;'><?php echo $this->lang("Awaiting Reply");?></a>
                </li>
                <li class="">
                    <span onmouseover="highlightCount('subscribedto',true);" onmouseout="highlightCount('subscribedto',false);" class="count" id="subscribedto_count"><a onclick="processFilterClick('subscribedto','<?php echo $this->lang("Subscribed To Tickets");?>');" style='cursor:pointer;'><?php echo $this->ticketssubscribedtocount;?></a></span>
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow.gif" /><a onmouseover="highlightCount('subscribedto',true);" onmouseout="highlightCount('subscribedto',false);" onclick="processFilterClick('subscribedto','<?php echo $this->lang("Subscribed To Tickets");?>');" style='cursor:pointer;'><?php echo $this->lang("Subscribed");?></a>
                </li>
                <li class="">
                    <span onmouseover="highlightCount('mytickets',true);" onmouseout="highlightCount('mytickets',false);" class="count" id="mytickets_count"><a onclick="processFilterClick('mytickets','<?php echo $this->lang("My Tickets");?>');" style='cursor:pointer;'><?php echo $this->myticketscount;?></a></span>
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow.gif" /><a onmouseover="highlightCount('mytickets',true);" onmouseout="highlightCount('mytickets',false);" onclick="processFilterClick('mytickets','<?php echo $this->lang("My Tickets");?>');" style='cursor:pointer;'><?php echo $this->lang("My Tickets");?></a>
                </li>
                <li class="">
                    <span onmouseover="highlightCount('unassigned',true);" onmouseout="highlightCount('unassigned',false);" class="count" id="unassigned_count"><a onclick="processFilterClick('unassigned','<?php echo $this->lang("Unassigned Tickets");?>');" style='cursor:pointer;'><?php echo $this->notassignedcount;?></a></span>
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow.gif" /><a onmouseover="highlightCount('unassigned',true);" onmouseout="highlightCount('unassigned',false);" onclick="processFilterClick('unassigned','<?php echo $this->lang("Unassigned Tickets");?>');" style='cursor:pointer;'><?php echo $this->lang("Not Assigned");?></a>
                </li>
                <li class="">
                    <span onmouseover="highlightCount('closed',true);" onmouseout="highlightCount('closed',false);" class="count" id="closed_count"><a onclick="processFilterClick('closedtoday','<?php echo $this->lang("All Tickets Closed Today");?>');" style='cursor:pointer;'><?php echo $this->closedtodaycount;?></a></span>
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow.gif" /><a onmouseover="highlightCount('closed',true);" onmouseout="highlightCount('closed',false);" onclick="processFilterClick('closedtoday','<?php echo $this->lang("All Tickets Closed Today");?>');" style='cursor:pointer;'><?php echo $this->lang("Closed Today");?></a>
                </li>
                
                <li class="">
                    <span onmouseover="highlightCount('ratedtoday',true);" onmouseout="highlightCount('ratedtoday',false);" class="count" id="ratedtoday_count"><a onclick="processFilterClick('ratedtoday','<?php echo $this->lang("All Tickets Rated Today");?>');" style='cursor:pointer;'><?php echo $this->ratedtodaycount;?></a></span>
                    <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow.gif" /><a onmouseover="highlightCount('ratedtoday',true);" onmouseout="highlightCount('ratedtoday',false);" onclick="processFilterClick('ratedtoday','<?php echo $this->lang("All Tickets Rated Today");?>');" style='cursor:pointer;'><?php echo $this->lang("Rated Today");?></a>
                </li>                
                
                <?php foreach ($this->filters as $filter){ ?>
                    <li class="">
                        <span onmouseover="highlightCount('<?php echo $filter['ticketfilter_id'];?>',true);" onmouseout="highlightCount('<?php echo $filter['ticketfilter_id'];?>',false);"  class="count" id="<?php echo $filter['ticketfilter_id'];?>_count"><a onclick="processFilterClick('<?php echo $filter['ticketfilter_id'];?>','<?php echo $filter['ticketfilter_name'];?>',true);" style='cursor:pointer;'><?php echo $filter['ticketfilter_count']?></a></span>
                        <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow.gif" /><a onmouseover="highlightCount('<?php echo $filter['ticketfilter_id'];?>',true);" onmouseout="highlightCount('<?php echo $filter['ticketfilter_id'];?>',false);" onclick="processFilterClick('<?php echo $filter['ticketfilter_id'];?>','<?php echo $filter['ticketfilter_name'];?>',true);" style='cursor:pointer;'><?php echo $filter['ticketfilter_name'];?></a>
                    </li>
                <?php }?>
                <li class="">
                    <img alt="" style="padding-right:0px;" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/elbow-end.gif" /><a id="newfilterlink" href="javascript:createNewFilter();"><span><b>+</b> New Filter</span></a>
                </li>
            </ul>
        </li>
        <li class="filters">
            <a id="recenttoggle" href="javascript:toggleTicketParent('recenttoggle','Ticket_Sidebar_RecentToggle');ce.updateTicketsCache();" class="<?php echo $this->recenttoggleswitch;?>">*</a>
            <a style="text-decoration:none;" href="javascript:toggleTicketParent('recenttoggle','Ticket_Sidebar_RecentToggle');ce.updateTicketsCache();"><img alt="*"  style="position:relative;top:4px;padding-right:1px;" height="16" width="16" src="../templates/admin/images/folder-small.png"/><?php echo $this->lang("Recently Viewed");?></a>
            <ul id="recenttoggle_options" style="display:<?php echo $this->recenttoggle;?>;">
                <?php foreach ($this->recenttickets as $recentticket) { ?>
                    <li class="">
                        <img alt="" class="x-tree-elbow" src="../javascript/ext/images/gray-extend/tree/<?php echo $recentticket['ticketrecent_elbow'];?>.gif" /><a qtip="<?php echo $this->lang("Subject").": ".$recentticket['ticketrecent_subject'];?>" href="index.php?fuse=support&ticketID=<?php echo $recentticket['ticketrecent_id'];?>&view=Admin_ViewTicketMessage"><?php echo $this->lang("Ticket")." #".$recentticket['ticketrecent_label'];?></a>
                    </li>
                <?php } ?>
            </ul>
        </li>

    </ul>
</div>
