<!-- Section -->
<header id="headero">
	</header><!-- Section -->
		</div>
			</div>
			<!-- Sidebar -->
				<div id="sidebar">
					<div class="inner">

						<!-- Menu -->
							<nav id="menu">
								<header class="major">
									<h2>Menu</h2>
								</header>
								<ul>
									<li>
										<span class="opener">Courses</span>
										<ul>
											<li><a href="<?php echo base_url('public/allcourses') ; ?> ">View Courses</a></li>
											<li><a href="<?php echo base_url('public/addcourse') ; ?>">Add Course</a></li>
										</ul>
									</li>

									<li>
										<span class="opener">Training Schedule</span>
										<ul>
											<li><a href="<?php echo base_url('public/schedules') ; ?>">View Schdules</a></li>
											<li><a href="<?php echo base_url('public/addschedule') ; ?>">Add Schedule </a></li>
										</ul>
									</li>
								<li>
										<span class="opener">Students</span>
										<ul>
											<li><a href="<?php echo base_url('public/students') ; ?>">View Students</a></li>
										<li><a href="<?php echo base_url('public/studentsearch') ; ?>">View Student</a></li>
										</ul>
									</li>
								<li>
										<span class="opener">Trainers</span>
										<ul>
											<li><a href="<?php echo base_url('public/trainers') ; ?>">View Trainers</a></li>
										<li><a href="<?php echo base_url('public/trainersearch') ; ?>">View Trainer</a></li>
										</ul>
									</li>
									<li>
										<span class="opener">News</span>
										<ul>
											<li><a href="<?php echo base_url('public/news') ; ?>">View News</a></li>
										<li><a href="<?php echo base_url('public/addnews') ; ?>">Add Article</a></li>
										</ul>
									</li>

								<?php
								 $session = \Config\Services::session();
              $userType = $session->get('userType');
								if($userType==1){
								 ?>

								<li>
										<span class="opener">System Users</span>
										<ul>
											<li><a href="<?php echo base_url('public/users') ; ?>">View Users</a></li>
										<li><a href="<?php echo base_url('public/adduser') ; ?>">Add User</a></li>
										</ul>
									</li>
								<?php
							}else{

								$userId=$session->get('userId');

								 ?>
								 <li>
										<span class="opener">My Profile</span>
										<ul>
											<li><a href="<?php echo base_url('public/updateuser/'.$userId) ; ?>">Change my Details</a></li>
										</ul>
									</li>
								<?php } ?>
									<li><a href="<?php echo base_url('public/logout') ; ?>">Log Out</a></li>
								</ul>
							</nav>
					</div>
				</div>
			<!-----end side bar-->
		</div>

		<!-- Scripts -->
			<script src="<?php  echo base_url('public/assets/js/jquery.min.js') ; ?>"></script>
			<script src="<?php  echo base_url('public/assets/js/browser.min.js') ; ?>"></script>
			<script src="<?php  echo base_url('public/assets/js/breakpoints.min.js') ; ?>"></script>
			<script src="<?php  echo base_url('public/assets/js/util.js') ; ?>"></script>
			<script src="<?php  echo base_url('public/assets/js/main.js') ; ?>"></script>
            
      <?php if($addCourse){     ?>
        <script type="text/javascript" src="<?php  echo base_url('public/assets/editor/scripts/jquery.min.js') ; ?>"></script>
        <script type="text/javascript" src="<?php  echo base_url('public/assets/editor/scripts/module.js') ; ?>"></script>
        <script type="text/javascript" src="<?php  echo base_url('public/assets/editor/scripts/hotkeys.js') ; ?>"></script>
        <script type="text/javascript" src="<?php  echo base_url('public/assets/editor/scripts/dompurify.js') ; ?>"></script>
        <script type="text/javascript" src="<?php  echo base_url('public/assets/editor/scripts/simditor.js') ; ?>"></script>
        <script type="text/javascript" src="<?php  echo base_url('public/assets/editor/scripts/page-demo.js') ; ?>"></script>


      <?php } ?>      

			<script>
var slideIndex = 0;
showSlides();

function showSlides() {
  var i;
  var slides = document.getElementsByClassName("mySlides");
  var dots = document.getElementsByClassName("dot");
  for (i = 0; i < slides.length; i++) {
    slides[i].style.display = "none";
  }
  slideIndex++;
  if (slideIndex > slides.length) {slideIndex = 1}
  for (i = 0; i < dots.length; i++) {
    dots[i].className = dots[i].className.replace(" active", "");
  }
  slides[slideIndex-1].style.display = "block";
  dots[slideIndex-1].className += " active";
  setTimeout(showSlides, 5000); // Change image every 2 seconds
}

</script>
<script>
var editor = new Simditor({
  textarea: $('#editor')
  
});


</script>


	</body>
</html>
