
<?php
$department = "";
if($current_user->prvlg_group != "1") {
    $department = " AND department = '{$current_user->department_id}' ";
}
$requests_count = Chat::count_everything(" AND offline = 1 AND ended = 0 {$department} ");

$cur_page = basename($_SERVER['PHP_SELF'] , '.php');  
$main_nav = array();
$main_nav[] = array('icon'=>'dashboard', 'privilege' => 'index' , 'label'=>'Dashboard',
                            'pages'=> array('index'), 'url'=>'index.php', 'badge'=> false , 'badge_class'=> false ,
                            'treeview' => false
                            );
$main_nav[] = array('icon'=>'chat', 'privilege' => 'chatroom' , 'label'=>'Chat Room',
                            'pages'=> array('chatroom' , 'archive'), 'url'=>'chatroom.php', 'badge'=> false , 'badge_class'=> false ,
                            'treeview' => false
                            );
/*$main_nav[] = array('icon'=>'map', 'privilege' => 'map' , 'label'=>'Live Map',
                            'pages'=> array('map'), 'url'=>'map.php', 'badge'=> false , 'badge_class'=> false ,
                            'treeview' => false
                            );*/
$main_nav[] = array('icon'=>'business_center', 'privilege' => 'departments' , 'label'=>'Departments',
                            'pages'=> array('departments'), 'url'=>'departments.php', 'badge'=> false , 'badge_class'=> false ,
                            'treeview' => false
                            );
$main_nav[] = array('icon'=>'group', 'privilege' => 'agents' , 'label'=>'Agents',
                            'pages'=> array('agents'), 'url'=>'agents.php', 'badge'=> false , 'badge_class'=> false ,
                            'treeview' => false
                            );
$main_nav[] = array('icon'=>'live_help', 'privilege' => 'offline_requests' , 'label'=>'Offline Requests',
                            'pages'=> array('offline_requests'), 'url'=>'offline_requests.php', 'badge'=> $requests_count , 'badge_class'=> 'primary' ,
                            'treeview' => false
                            );
$main_nav[] = array('icon'=>'person', 'privilege' => 'profile' , 'label'=>'My Profile',
                            'pages'=> array('profile'), 'url'=>'profile.php', 'badge'=> false , 'badge_class'=> false ,
                            'treeview' => false
                            );
$main_nav[] = array('icon'=>'exit_to_app', 'privilege' => 'index' , 'label'=>'Logout',
                            'pages'=> array('logout'), 'url'=>'logout.php', 'badge'=> false , 'badge_class'=> false ,
                            'treeview' => false
                            );
?>
<div class="col-md-3">
            	<ul class="left-cat">
                    <a href="<?php echo DOMAIN ?>/ACP/labdariba_form.php"><li id="customer-menu">
                            <span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/submisn.png" class="img-responsive" /></span>
                            <span class="fa fa-angle-right span-angel"></span>
                            Labdariba Form
                        </li></a>
                     <a href="<?php echo DOMAIN ?>/ACP/customers.php"><li id="customer-menu">
                            <span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/submisn.png" class="img-responsive" /></span>
                            <span class="fa fa-angle-right span-angel"></span>
                            Customers
                        </li></a>
                        <a href="<?php echo DOMAIN ?>/ACP/emails.php"><li id="email-menu">
                            <span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/submisn.png" class="img-responsive" /></span>
                            <span class="fa fa-angle-right span-angel"></span>
                            Contact Email
                        </li></a>
                    	<a href="<?php echo DOMAIN ?>/ACP/submissions.php"><li id="submission-menu">
                        	<span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/submisn.png" class="img-responsive" /></span>
                        	<span class="fa fa-angle-right span-angel"></span>
                        	Submissions
                        </li></a>
                    	<a href="<?php echo DOMAIN ?>/ACP/add-orders.php"><li id="add-order-menu">
                        	<span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/add-order.png" class="img-responsive" /></span>
                        	<span class="fa fa-angle-right span-angel"></span>
                        	Add Orders
                        </li></a>
						<a href="<?php echo DOMAIN ?>/ACP/devices.php"><li id="device-menu">
                        	<span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/placeorder.png" class="img-responsive" /></span>
                        	<span class="fa fa-angle-right span-angel"></span>
                        	Devices
                        </li></a>
						<a href="<?php echo DOMAIN ?>/ACP/category.php"><li id="cat-menu">
                        	<span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/placeorder.png" class="img-responsive" /></span>
                        	<span class="fa fa-angle-right span-angel"></span>
                        	Category
                        </li></a>
						<a href="<?php echo DOMAIN ?>/ACP/subcategory.php"><li id="subcat-menu">
                        	<span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/placeorder.png" class="img-responsive" /></span>
                        	<span class="fa fa-angle-right span-angel"></span>
                        	Sub Category
                        </li></a>
                    	<a href="<?php echo DOMAIN ?>/ACP/orders.php"><li id="orders-menu">
                        	<span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/orders-hover.png" class="img-responsive" /></span>
                        	<span class="fa fa-angle-right span-angel"></span>
                        	Orders
                        </li></a>
                    	<a href="<?php echo DOMAIN ?>/ACP/Labdariba.php">
                            <li id="lab-menu">
                            	<span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/add-order.png" class="img-responsive" /></span>
                            	<span class="fa fa-angle-right span-angel"></span>
                            	Labdariba
                            </li>
                        </a>
						<a href="<?php echo DOMAIN ?>/ACP/list_cenas.php">
                            <li id="cenasm-menu">
                                <span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/user.png" class="img-responsive" /></span>
                                <span class="fa fa-angle-right span-angel"></span>
                                Cenas
                            </li>
                        </a>
                   <!--     <a href="<?php echo DOMAIN ?>/ACP/list_cenas_table_row.php">
                            <li id="cenas-menu">
                                <span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/user.png" class="img-responsive" /></span>
                                <span class="fa fa-angle-right span-angel"></span>
                                Cenas Page Table
                            </li>
                        </a>-->

                      <!--    <a href="<?php echo DOMAIN ?>/ichat/admin/index">
                            <li id="ichat-dashboard-menu">
                                <span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/user.png" class="img-responsive" /></span>
                                <span class="fa fa-angle-right span-angel"></span>
                                Dashboard
                            </li>
                        </a>-->

                          <a href="<?php echo DOMAIN ?>/ichat/admin/chatroom">
                            <li id="chatroom-menu">
                                <span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/user.png" class="img-responsive" /></span>
                                <span class="fa fa-angle-right span-angel"></span>
                                Chat Room
                            </li>
                        </a>

                          <a href="<?php echo DOMAIN ?>/ichat/admin/departments">
                            <li id="departments-menu">
                                <span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/user.png" class="img-responsive" /></span>
                                <span class="fa fa-angle-right span-angel"></span>
                               Departments
                            </li>
                        </a>

                          <a href="<?php echo DOMAIN ?>/ichat/admin/agents">
                            <li id="agents-menu">
                                <span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/user.png" class="img-responsive" /></span>
                                <span class="fa fa-angle-right span-angel"></span>
                               Agents
                            </li>
                        </a>

                          <a href="<?php echo DOMAIN ?>/ichat/admin/offline_requests">
                            <li id="offline-requests-menu">
                                <span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/user.png" class="img-responsive" /></span>
                                <span class="fa fa-angle-right span-angel"></span>
                                Offline Requests
                            </li>
                        </a>
                         <a href="<?php echo DOMAIN ?>/ichat/admin/profile">
                            <li id="profile-menu">
                                <span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/user.png" class="img-responsive" /></span>
                                <span class="fa fa-angle-right span-angel"></span>
                                My Profile
                            </li>
                        </a>
                    	
						<a href="<?php echo DOMAIN ?>/ichat/admin/logout">
                            <li id="logout-menu">
                            	<span class="span-icons"><img src="<?php echo DOMAIN ?>/ACP/images/logout.png" class="img-responsive" /></span>
                            	<span class="fa fa-angle-right span-angel"></span>
                            	Logout
                            </li>
                        </a>
                    </ul>
            </div>