<!-- =============================================== -->
<?php $pagename=basename($_SERVER['PHP_SELF']);?>
<!-- Left side column. contains the sidebar -->
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <!-- Sidebar user panel -->
        <div class="user-panel">
            <div class="pull-left image">
                <?php 
                $profile_image=isset($_SESSION['profile_image']) ? $_SESSION['profile_image'] :''; 
                if(@is_array(getimagesize('image/profile/'.$profile_image))){?>
                  <img src="<?php echo 'image/profile/'.$profile_image;?>" class="img-circle" alt="User Image">  
                <?php }else{?>
                <img src="dist/img/avatar5.png" class="img-circle" alt="User Image">
                <?php }?>
            </div>
            <div class="pull-left info">
                <p><?php echo strtoupper($_SESSION['username']); ?></p>
                <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
            </div>
        </div>
        <!-- sidebar menu: : style can be found in sidebar.less -->
        <ul class="sidebar-menu" data-widget="tree">
            <li class="header">MAIN NAVIGATION</li>            
                        
            <!--<li class="treeview">
                <a href="#">
                    <i class="fa fa-list-ul"></i> <span>Categories</span>
                    <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li><a href="primary-category.php"><i class="fa fa-circle-o"></i> PC List</a></li>        
                </ul>
            </li>

            <li class="treeview">
                <a href="#">
                    <i class="fa fa-list-ul"></i> <span>Secondary Category</span>
                    <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li><a href="secondary-category.php"><i class="fa fa-circle-o"></i>SC List</a></li>           
                </ul>
            </li>-->

            <li class="treeview <?php if($pagename=='services.php' || $pagename=='subservices.php' || $pagename=='serviceprice.php' || $pagename=='servicename.php' || $pagename=='amenitiesservice.php'){?>menu-open<?php }?>">
                <a href="#">
                    <i class="fa fa-gears"></i> <span>Services</span>
                    <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu" <?php if($pagename=='services.php' || $pagename=='subservices.php' || $pagename=='serviceprice.php' || $pagename=='servicename.php' || $pagename=='amenitiesservice.php'){?>style="display:block"<?php }?>>
                    <?php if($_SESSION['role_id']==1){?>
                    <li><a href="services.php" <?php if($pagename=='services.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Services</a></li>
					<li><a href="subservices.php" <?php if($pagename=='subservices.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Sub Services</a></li>
					<li><a href="servicename.php" <?php if($pagename=='servicename.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Service Name</a></li>
					<?php }?>
					<li><a href="serviceprice.php" <?php if($pagename=='serviceprice.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Service Price</a></li>
					<li><a href="amenitiesservice.php" <?php if($pagename=='amenitiesservice.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Amenities Service</a></li>
                </ul>
            </li>
            <?php if($_SESSION['role_id']==1){?>
              <li class="treeview <?php if($pagename=='service-ads.php'){?>menu-open<?php }?>">
                <a href="#">
                    <i class="fa fa-adn"></i> <span>Ads</span>
                    <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu" <?php if($pagename=='service-ads.php'){?>style="display:block"<?php }?>>
                    <li><a href="service-ads.php"><i class="fa fa-circle-o"></i>Ads List</a></li>
                </ul>
            </li>
            <?php }?>
            <?php if($_SESSION['role_id']==2){?>
             <li <?php if($pagename=='timeslot.php'){?>class="menu-open"<?php }?>>
                <a href="timeslot.php">
                    <i class="fa fa-adn"></i> <span>Timeslot</span>
                </a>
            </li>
            <?php }?>
            <!--<li class="treeview">
                <a href="#">
                    <i class="fa fa-list-ul"></i> <span>Description Titles</span>
                    <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li><a href="description-title.php"><i class="fa fa-circle-o"></i>Titles List</a></li>
                </ul>
            </li>

            <li class="treeview">
                <a href="#">
                    <i class="fa fa-link"></i> <span>Descriptions</span>
                    <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <li><a href="descriptions-map.php"><i class="fa fa-circle-o"></i>Descriptions</a></li>
                </ul>
            </li>-->
            <?php if($_SESSION['role_id']==1){?>
             <li <?php if($pagename=='amenities.php'){?>class="menu-open"<?php }?>>
                <a href="amenities.php">
                    <i class="fa fa-adn"></i> <span>Amenities</span>
                </a>
            </li>
           
            <li class="treeview <?php if($pagename=='roles.php'){?>menu-open<?php }?>">
                <a href="#">
                    <i class="fa fa-list"></i> <span>Roles</span>
                    <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu" <?php if($pagename=='roles.php'){?>style="display:block"<?php }?>>
                    <li><a href="roles.php" <?php if($pagename=='roles.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Roles List</a></li>              
                </ul>
            </li>
             
            <li class="treeview <?php if($pagename=='users.php' || $pagename=='admin.php' || $pagename=='service-provider.php' || $pagename=='customer.php'){?>menu-open<?php }?>">
                <a href="#">
                    <i class="fa fa-users"></i> <span>Users</span>
                    <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu" <?php if($pagename=='users.php' || $pagename=='admin.php' || $pagename=='service-provider.php' || $pagename=='customer.php'){?>style="display:block"<?php }?>>
                    <!--<li><a href="users.php" data-type = "0" class ="user_role" <?php if($pagename=='users.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Users</a></li>-->
                    <li><a href="admin.php" data-type = "1" class ="user_role"<?php if($pagename=='admin.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Admin</a></li>
                    <li><a href="service-provider.php" data-type = "2" class ="user_role" <?php if($pagename=='service-provider.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Service Provider</a></li>
                    <li><a href="customer.php" data-type = "3" class ="user_role" <?php if($pagename=='customer.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Customer</a></li>
                </ul>
            </li>
            <?php }?>
            <li class="treeview <?php if($pagename=='wallet.php' || $pagename=='wallet-settings.php'){?>menu-open<?php }?>">
                <a href="#">
                    <i class="fa fa-users"></i> <span>Wallet</span>
                    <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu" <?php if($pagename=='wallet.php' || $pagename=='wallet-settings.php'){?>style="display:block"<?php }?>>
                    <?php if($_SESSION['role_id']==1){?>    
                    <li><a href="wallet-settings.php" data-type = "0" class ="user_role" <?php if($pagename=='wallet-settings.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Settings</a></li>
                    <?php }?>
                     <?php if($_SESSION['role_id']==2){?>
                    <li><a href="subscription.php" data-type = "0" class ="user_role" <?php if($pagename=='wallet-settings.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Yearly Subscription</a></li>
                    <?php }?>
                    <li><a href="wallet.php" data-type = "1" class ="user_role"<?php if($pagename=='wallet.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Wallet</a></li>
                </ul>
            </li>
          <?php if($_SESSION['role_id']==1){?>    
           <li <?php if($pagename=='payment-settings.php'){?>class="menu-open"<?php }?>><a href="payment-settings.php"><i class="fa fa-cog"></i> <span>Payment Settings</span></a></li>
           <li <?php if($pagename=='online-payment.php'){?>class="menu-open"<?php }?>><a href="online-payment.php"><i class="fa fa-cog"></i> <span>Online Payment</span></a></li>
           <?php }?>
           <li <?php if($pagename=='ratings.php'){?>class="menu-open"<?php }?>><a href="ratings.php"><i class="fa fa-book"></i> <span>Reviews & Rating</span></a></li>
            <li <?php if($pagename=='job-request.php'){?>class="menu-open"<?php }?>><a href="job-request.php"><i class="fa fa-book"></i> <span>Job Request</span></a></li>
            <?php if($_SESSION['role_id']==1){?>
            <li <?php if($pagename=='rejection-list.php'){?>class="menu-open"<?php }?>><a href="rejection-list.php"><i class="fa fa-book"></i> <span>Rejection List</span></a></li>
			<li <?php if($pagename=='banners.php'){?>class="menu-open"<?php }?>><a href="banners.php"><i class="fa fa-gears"></i> <span>Banner</span></a>               
            </li>
             <?php }?>
            <li class="treeview <?php if($pagename=='order-report.php' || $pagename=='sales-report.php' || $pagename=='payment-report.php' || $pagename=='vendor-salesreport.php'){?>menu-open<?php }?>">
                <a href="#">
                    <i class="fa fa-file" aria-hidden="true"></i> <span>Report</span>
                    <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu" <?php if($pagename=='order-report.php' || $pagename=='sales-report.php' || $pagename=='payment-report.php' || $pagename=='vendor-salesreport.php'){?>style="display:block"<?php }?>>
                    <li><a href="order-report.php" data-type = "0" class ="user_role" <?php if($pagename=='order-report.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Order Report</a></li>
                    <li><a href="sales-report.php" data-type = "0" class ="user_role" <?php if($pagename=='sales-report.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Service Wise Sales Report</a></li>
                    <li><a href="vendor-salesreport.php" data-type = "0" class ="user_role" <?php if($pagename=='vendor-salesreport.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Vendor Wise Sales Report</a></li>
                    <li><a href="payment-report.php" data-type = "1" class ="user_role"<?php if($pagename=='payment-report.php'){?>style="color:#fff"<?php }?>><i class="fa fa-circle-o"></i>Payment Report</a></li>
                </ul>
            </li>
            <?php if($_SESSION['role_id']==1){?>
             <li <?php if($pagename=='pending-services.php'){?>class="menu-open"<?php }?>>
                <a href="pending-services.php">
                    <i class="fa fa-adn"></i> <span>Pending Job</span>
                </a>
            </li>
            <?php }?>
            <li><a href="logout.php"><i class="fa fa-power-off"></i> <span>Signout</span></a></li>
        </ul>
    </section>
    <!-- /.sidebar -->
</aside>
<!-- =============================================== -->