<?php include("includes/top.php"); ?>
			


<!-- Left panel : Navigation area -->
<!-- Note: This width of the aside area can be adjusted through LESS variables -->
<aside id="left-panel">

<!-- NAVIGATION : This navigation is also responsive

			To make this navigation dynamic please make sure to link the node
			(the reference to the nav > ul) after page load. Or the navigation
			will not initialize.
			-->
			<nav>
				<!-- NOTE: Notice the gaps after each icon usage <i></i>..
				Please note that these links work a bit different than
				traditional href="" links. See documentation for details.
				-->

				<!--
					Trecho que monta o menu automático
					
				-->

			<?php
			/*
			* O trecho abaixo busca módulo por módulo o arquivo menu.php
			* No arquivo menu.php ele monta todos os grupos e subgrupos
			*/
			
			
			$path_modulo="";
			$path_os = (strtoupper(substr(PHP_OS, 0, 3)) === "WIN") ? "\\" : "/";
			$aux_dir_modulo = explode($path_os,dirname(__FILE__));
			for ($i=0;$i<count($aux_dir_modulo)-1;$i++){
				$path_modulo.=$aux_dir_modulo[$i]."/";
			}
			
			
			//$path = $path;
			$diretorio = dir($path_modulo);
			
			while($arquivo = $diretorio->read()){
				  if ((file_exists($path_modulo.$arquivo."/menu.php"))&&($arquivo!="includes")){
					if (($personalizado==true)&&(file_exists($path_modulo.$arquivo."/personalizado.txt"))){
						include $path_modulo.$arquivo."/menu.php";
					}
					if ($personalizado==false){
						include $path_modulo.$arquivo."/menu.php";
					}	
				  }
			}
			$diretorio->close();
			
			function normalize_array($array){
				$newarray = array();
				$array_keys = array_keys($array);
				$i=0;
				foreach($array_keys as $key){
					$newarray[$i] = $array[$key];
				$i++;
				}
				return $newarray;
			}
			
			ksort($grupo);
			ksort($menu);
			$grupo_aux = normalize_array($grupo);
			$menu_aux = normalize_array($menu);
				
			/*for ($i=0;$i<count($grupo_aux);$i++){
			    echo "<fieldset>";
				echo "<legend>".$grupo_aux[$i]."</legend>";
				for ($j=0;$j<count($menu_aux[$i]);$j++){
				    echo $menu_aux[$i][$j];
				}
				echo "</fieldset>";
			}*/
			
			
			$legenda_grupo[0] = "fa-cog"; //Configurações
			$legenda_grupo[1] = "fa-envelope-o"; //Boletins
			$legenda_grupo[2] = "fa-share-alt"; //midias sociais
			$legenda_grupo[3] = "fa-desktop"; //legenda conteúdo site
			$legenda_grupo[4] = "fa-dollar";//legenda orçamento
			$legenda_grupo[5] = "fa-user"; //legenda usuários
			
			echo "<ul>";
			echo " <li class=\"active\">
						<a href=\"area_usuario.php?net_id=$net_id\" title=\"Dashboard\"><i class=\"fa fa-lg fa-fw fa-home\"></i> <span class=\"menu-item-parent\">Início</span></a>
					</li>";
					
			foreach ($grupo_aux as $aux_grupo_menu=>$key_grupo_menu){
				echo "<li>";
				echo "<a href=\"#\"><i class=\"fa fa-lg fa-fw ".$legenda_grupo[$aux_grupo_menu]."\"></i> <span class=\"menu-item-parent\">".$grupo_aux[$aux_grupo_menu]."</span></a>";
				echo "<ul>";
				ksort($menu_aux[$aux_grupo_menu]);
				foreach ($menu_aux[$aux_grupo_menu] as $aux_m=>$key_menu){
					echo $menu_aux[$aux_grupo_menu][$aux_m];
				}
				echo "</ul>";
				echo "</li>";
			}
			echo "</ul>";
			?>
		
			<br/>
			<iframe src="nunca_expira.php?<?php echo $sid_get;?>"	style="display:none;"></iframe>
			<!--<a href="javascript:encerrar();"><li>Sair do Sistema</li></a>-->


				
			</nav>
			<span class="minifyme" data-action="minifyMenu"> 
				<i class="fa fa-arrow-circle-left hit"></i> 
			</span>

		</aside>
		<!-- END NAVIGATION -->

		<!-- MAIN PANEL -->
		<div id="main" role="main">

			<!-- MAIN CONTENT -->
			<div id="content">

				

