

<?php use_helper('Javascript')?>
<?php echo javascript_include_tag('jquery','menu_effects')?>
<?php echo stylesheet_tag('menu') ?>
<ul class="topnav">
<?php
$c = new Criteria();
$c->add(MenusPeer::ID,-1,Criteria::NOT_EQUAL);
$c->addAscendingOrderByColumn(MenusPeer::ORDEN);
$menus = MenusPeer::doSelect($c);
foreach($menus as $menu):
?>
	<li><?php echo link_to_function($menu->getDescripcion(),'return false')?>
	<?php

	$c = new Criteria();
	$c->add(CredencialesPeer::ID_MENU,$menu->getId());

	if($menu->getId()==2){

		if($sf_user->hasCredential('superadmin')){

		
		}

		else{

	
			break;	

		}
	
	}
	$c->addAscendingOrderByColumn(CredencialesPeer::ORDEN);
	?>
		<ul class="subnav">
		<?php foreach(CredencialesPeer::doSelect($c) as $credencial): 


if($sf_user->hasCredential($credencial->getName())){


?>
			<li><?php echo link_to($credencial->getdescripcion(),$credencial->getRuta())?></li>
		<?php 
}
endforeach; ?>
		</ul>
	</li>
<?php
endforeach; ?>
	<li><a target="blank"  href="http://soporte6.sofhouse.net/projects/websafierp/wiki/comisiones_ini">Ayuda</a></li>
</ul>
