<aside id="sidebar-left" class="sidebar-left">

	<div class="sidebar-header">
		<div class="sidebar-title">
			Navigation
		</div>
		<div class="sidebar-toggle d-none d-md-block" data-toggle-class="sidebar-left-collapsed" data-target="html"
			data-fire-event="sidebar-left-toggle">
			<i class="fas fa-bars" aria-label="Toggle sidebar"></i>
		</div>
	</div>

	<div class="nano">
		<div class="nano-content">
			<nav id="menu" class="nav-main" role="navigation">

				<ul class="nav nav-main">
					<li>
						<a class="nav-link" href="index.php">
							<i class="fas fa-home" aria-hidden="true"></i>
							<span>Dashboard</span>
						</a>
					</li>
						<?php if($userrole<4 ){?>
					<li class="nav-parent">
						<a class="nav-link" href="#">
							<i class="fas fa-book" aria-hidden="true"></i>
							<span>Reservations</span>
						</a>
						<ul class="nav nav-children">
						<li>
								<a class="nav-link" href="newreservation.php">
									New Reservation
								</a>
							</li>
							<li>
								<a class="nav-link" href="reservations-local.php">
									Local Reservations
								</a>
							</li>
							<li>
							<a class="nav-link" href="reservations-web.php">
									Website Reservations
								</a>
							</li>
							<li>
							<a class="nav-link" href="avail.php">
									Availability
								</a>
							</li>


						</ul>
					</li>
					<?php } ?>
					<?php if($userrole!=2 ){?>
					<li class="nav-parent">
						<a class="nav-link" href="#">
							<i class="fa fa-car" aria-hidden="true"></i>
							<span>Fleet Management</span>
						</a>
						<ul class="nav nav-children">
							<li>
								<a class="nav-link" href="fleet.php">
									Fleet Overview
								</a>
							</li>
						
							<li>
								<a class="nav-link" href="categories.php">
									Categories
								</a>
							</li>
							<?php if($userrole>4 || $userrole==1 ){?>
								<li>
								<a class="nav-link" href="service-fleet.php">
									Service
								</a>
							</li>
						<?php }?>
						<!--	<li>
								<a class="nav-link" href="filemanager.php">
									Car Photos
								</a>
							</li>-->
							<li>


						</ul>
					</li>
					<?php }?>
					<?php if($userrole<5 ){?>
					<li class="nav-parent">
						<a class="nav-link" href="#">
							<i class="fas fa-file-signature" aria-hidden="true"></i>
							<span>Contracts</span>
						</a>
						<ul class="nav nav-children">
						<li>
								<a class="nav-link" href="contracts.php">
									Contracts
								</a>
							</li>
							<li>
								<a class="nav-link" href="newcontract.php?new=0">
									Reservation to Contract 
								</a>
							</li>
							

						</ul>
					</li>
					<?php }?>
					<li class="nav-parent">
						<a class="nav-link" href="#">
							<i class="fas fa-tasks" aria-hidden="true"></i>
							<span>Task Manager</span>
						</a>
						<ul class="nav nav-children">
						<li>
								<a class="nav-link" href="tasks.php">
									Tasks Overview
								</a>
							</li>
							
							<li>
							<a class="nav-link" href="calendar.php">
									Calendar
								</a>
							</li>
							<li>
								<a class="nav-link" href="newtask.php">
									New Task
								</a>
							</li>
						</ul>
					</li>
				
					<?php if($userrole<4 ){?>
						<li class="nav-parent">
						<a class="nav-link" href="#">
							<i class="fab fa-searchengin" aria-hidden="true"></i>
							<span>Availability </span>
						</a>
						<ul class="nav nav-children">
						    	<li>
							<a class="nav-link" href="avail.php">
									Availability
								</a>
							</li>
					
						    	<?php if($userrole==1){?>
								<li>
								<a class="nav-link" href="availability_groups.php">
									Availability Groups
								</a>
							</li>
								<li>
								<a class="nav-link" href="availability_settings.php">
									Availability Settings
								</a>
							</li>
							<?php } ?>
						</ul>
						</li>
						<?php } ?>
					<?php if($userrole==1){?>
					<li class="nav-parent">
						<a class="nav-link" href="#">
							<i class="fas fa-cloud" aria-hidden="true"></i>
							<span>REST API</span>
						</a>
						<ul class="nav nav-children">
							<li>
								<a class="nav-link" href="apipartner.php">
									API Partner
								</a>
							</li>
							<li>
								<a class="nav-link" href="apipartnerfleet.php">
									API Partner Fleet
								</a>
							</li>
							<li>
								<a class="nav-link" href="apistopsales.php">
									API Stop Sales
								</a>
							</li>
							<li>
								<a class="nav-link" href="apilogs.php?interval=1">
									API Logs
								</a>
								
								<li class="nav-parent"><a class="nav-link" href="#"><span>API Extras</span></a>
								<ul class="nav nav-children">
								    	<li>
								<a class="nav-link" href="api_locations.php">
									API Locations
								</a>
							</li>
							<li>
								<a class="nav-link" href="api_outofhours.php">
									API Out of Hour Fees
								</a>
							</li>
							</li>
	<li>
								<a class="nav-link" href="apilocmodifiers.php">
									API Location Modifier
								</a>
							</li>
								<li>
								<a class="nav-link" href="api_pickup_dropoff_fees.php">
									API Pickup & Dropoff Fees
								</a>
							</li>
								    	</ul>
							</li>
							
							<li class="nav-parent"><a class="nav-link" href="#"><span>Extended Rates</span></a>
								<ul class="nav nav-children">
									<li>
										<a class="nav-link" href="apiextseasons.php">
											API Seasons Dates (Extended)
										</a>
									</li>

									<li>
										<a class="nav-link" href="apiextpartseasons.php">
											API Partner Seasons (Extended)
										</a>
									</li>
									<li>
										<a class="nav-link" href="apiextratesdash.php">
											API Base Rates (Extended)
										</a>
									</li>
								</ul>
							</li>
							<li class="nav-parent"><a class="nav-link" href="#"><span>API Live Checks</span></a>
								<ul class="nav nav-children">
									<li>
										<a class="nav-link" href="api-db-task3.php">
											API Vehicle Data
										</a>
									</li>

									<li>
										<a class="nav-link" href="api-db-task1.php">
											API Availability
										</a>
									</li>
								
								</ul>
							</li>
							<li>
				
					
								

						</ul>
					</li>
								    	<li class="nav-parent">
						<a class="nav-link" href="#">
							<i class="fas fa-cog" aria-hidden="true"></i>
							<span>Settings</span>
						</a>
						<ul class="nav nav-children">
							<li>
								<a class="nav-link" href="settings.php">
									Admin Settings
								</a>
							</li>
			<?php }?>

				</ul>
			</nav>
			<!--
				            <hr class="separator" />
				
				            <div class="sidebar-widget widget-tasks">
				                <div class="widget-header">
				                    <h6>Projects</h6>
				                    <div class="widget-toggle">+</div>
				                </div>
				                <div class="widget-content">
				                    <ul class="list-unstyled m-0">
				                        <li><a href="#">Project 1</a></li>
				                        <li><a href="#">Project 2</a></li>
				                        <li><a href="#">Project 3</a></li>
				                    </ul>
				                </div>
				            </div>
				
				            <hr class="separator" />
				
				            <div class="sidebar-widget widget-stats">
				                <div class="widget-header">
				                    <h6>EDDE Tasks</h6>
				                    <div class="widget-toggle">+</div>
				                </div>
				                <div class="widget-content">
				                    <ul>
				                        <li>
				                            <span class="stats-title">Task 1</span>
				                            <span class="stats-complete">85%</span>
				                            <div class="progress">
				                                <div class="progress-bar progress-bar-primary progress-without-number" role="progressbar" aria-valuenow="85" aria-valuemin="0" aria-valuemax="100" style="width: 85%;">
				                                    <span class="sr-only">85% Complete</span>
				                                </div>
				                            </div>
				                        </li>
				                        <li>
				                            <span class="stats-title">Task 2</span>
				                            <span class="stats-complete">70%</span>
				                            <div class="progress">
				                                <div class="progress-bar progress-bar-primary progress-without-number" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width: 70%;">
				                                    <span class="sr-only">70% Complete</span>
				                                </div>
				                            </div>
				                        </li>
				                        <li>
				                            <span class="stats-title">Task 3</span>
				                            <span class="stats-complete">2%</span>
				                            <div class="progress">
				                                <div class="progress-bar progress-bar-primary progress-without-number" role="progressbar" aria-valuenow="2" aria-valuemin="0" aria-valuemax="100" style="width: 2%;">
				                                    <span class="sr-only">2% Complete</span>
				                                </div>
				                            </div>
				                        </li>
				                    </ul>
				                </div>
				            </div>-->
		</div>

		<script>
			// Maintain Scroll Position
			if (typeof localStorage !== 'undefined') {
				if (localStorage.getItem('sidebar-left-position') !== null) {
					var initialPosition = localStorage.getItem('sidebar-left-position'),
						sidebarLeft = document.querySelector('#sidebar-left .nano-content');

					sidebarLeft.scrollTop = initialPosition;
				}
			}
		</script>


	</div>

</aside>