 <!-- Sidebar -->
 <?php
 $adnumber=0;
for ($i = 1; $i <= 5; $i++) {
    $varName = "menutext" . $i;
    $$varName = "";
	$varName = "menulink" . $i;
    $$varName = "";
}
 if (file_exists("add4.php")){require("add4.php");}else{$add4=0;}
 if ($add4==1){
    require("configmenuads.php");
 }
 
 ?>
        <ul class="navbar-nav bg-gradient-dark sidebar sidebar-dark accordion" id="accordionSidebar">

            <!-- Sidebar - Brand -->
            <a class="d-flex align-items-center justify-content-center" style="text-align:center; margin-top:10px;" href="#">
                <div class="sidebar-brand-icon" >
					<img src="img/logo.png" style="max-width:90%;">
					 
                </div>
				
                
            </a>

            <!-- Divider -->
            <hr class="sidebar-divider my-0">

            <!-- Nav Item - Dashboard -->
            <li class="nav-item">
                <a class="nav-link" href="projects.php">
					<i class="fas fa-clipboard-list"></i>
                    <span>Manage Projects</span></a>
            </li>
			<li class="nav-item">
                <a class="nav-link" href="newproject.php?id=0">
                    <i class="fas fa-rocket"></i>
                    <span>New Project</span></a>
            </li>				
			<li class="nav-item">
                <a class="nav-link" href="categories.php">
                    <i class="fas fa-folder-plus"></i>
                    <span>Manage Categories</span></a>
            </li>			
			<li class="nav-item">
                <a class="nav-link" href="usersettings.php">
                    <i class="fas fa-cog"></i>
                    <span>Settings</span></a>
            </li>
			
<?php

for ($i = 1; $i <= 5; $i++) {
    $menutext = "menutext" . $i;
 	$menulink = "menulink" . $i;
    if ($$menutext!=""){
		$menuout='<li class="nav-item"><a class="nav-link" target="_BLANK" href="'.$$menulink.'"><i class="fas fa-rocket"></i><span> '.$$menutext.'</span></a></li>';
		echo $menuout;
	}
}

?>			
			<li class="nav-item" style="cursor:pointer;">
                <a class="nav-link" href="logout.php">
                    <i class="fas fa-sign-out-alt"></i>
                    <span>Logout</span></a>
            </li>
            <!-- Divider -->
            <hr class="sidebar-divider">

        
        
            <!-- Sidebar Toggler (Sidebar) -->
            <div class="text-center d-none d-md-inline">
                <button class="rounded-circle border-0" id="sidebarToggle"></button>
            </div>

        </ul>
        <!-- End of Sidebar -->