<?php
if(!isset($_SESSION)) session_start();
$VarCon = VarServer("MYSQLI");
$objMenu = new clsConexion($VarCon[0],$VarCon[1],$VarCon[2],$VarCon[3],$VarCon[4]);

$ruta = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
$ruta = str_replace(basename($_SERVER['SCRIPT_FILENAME']),"",$ruta);
$dirImg = "../images/";
?>
<script type="text/javascript" src="../js/menu_marron/stmenu.js"></script>
<?php
$varRutImgLib = "../js/menu_marron/";
$varRutImgMen = "../images/";
?>
<script type="text/javascript">
<!--
stm_bm(["menu4b6c",850,"","<?php echo $varRutImgLib;?>blank.gif",0,"","",0,0,250,0,1000,1,0,0,"","",0,0,1,2,"default","hand",""],this);
stm_bp("p0",[1,4,0,0,2,2,16,7,99,"",-2,"",-2,50,2,3,"#999999","#F6F3E1","",3,1,1,"#215D07"]);
stm_ai("p0i0",[6,1.5,"#215D07","",-1,-1,0]);
stm_ai("p0i1",[0,"Usuario Conectado","","",-1,-1,0,"#","_self","","","<?php echo $varRutImgMen;?>16x16/user_comment.png","<?php echo $varRutImgMen;?>16x16/user_comment.png",16,16,0,"","",0,0,0,0,1,"#D8EBEF",0,"#D8EBEF",0,"../images/bottom-1.gif","../images/bottom-1.gif",3,3,0,0,"#FFAF00 #C89600 #FFAF00 #FFAF00","#FFAF00 #C89600 #FFAF00 #FFAF00","#FFFFFF","#FFFFFF","bold 8pt 'Arial','Verdana'","bold 8pt 'Arial','Verdana'",0,0],230,20);

stm_aix("p0i2","p0i0",[]);
stm_aix("p0i3","p0i1",[1,"<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border:1px solid black\">\r\n<tr>\r\n<td width=\"70\" height=\"22\" valign=\"middle\">\r\n<img src=\"<?php echo $varRutImgMen;?>kuser.png\" width=\"70\" height=\"70\">\r\n</td>\r\n<td><b><font style=\"font:Arial, Verdana; font-size:13px\">ADMIN</font></b><br>\r\n<font style=\"font:Arial, Verdana; font-size:11px\">Administrador del Sistema</font>\r\n</td>\r\n</tr>\r\n</table>","","",-1,-1,0,"#","_self","","","","",16,16,0,"","",0,0,0,0,1,"#FFFFF7",1,"#dac591",0,"","",3,0,0,0,"#FFFFF7","#000000","#000000","#000000","8pt 'Arial','Verdana'","8pt 'Arial','Verdana'"],230,20);
stm_aix("p0i4","p0i3",[0,"Cambiar Clave","","",-1,-1,0,"clave.php","_self","","","<?php echo $varRutImgMen;?>16x16/change_password.png","<?php echo $varRutImgMen;?>16x16/change_password.png"],230,20);
stm_aix("p0i5","p0i3",[0,"Cerrar Sesión","","",-1,-1,0,"../logout.php","_self","","","<?php echo $varRutImgMen;?>16x16/disconnect.png","<?php echo $varRutImgMen;?>16x16/disconnect.png"],230,20);
<?php
$sql = "call spQuery_Sistema_Menu_Usuario($_SESSION[_CSYS], $_SESSION[_CUSE],2,'');";
$objMenu->AbrirConexion();
$Menu = $objMenu->Query($sql);
$objMenu->CerrarConexion();
while ($aMenu = $objMenu->FetchArray($Menu)) {
	if(isset($aMenu["link"])&& $aMenu["link"]<>"#")	$dir=$ruta.$aMenu["link"];
	else $dir="#";
?>
stm_aix("p0i6","p0i0",[]);
stm_aix("p0i7","p0i1",[0,"<?php echo $aMenu["nombre"]?>","","",-1,-1,0,"#","_self","","","<?php echo $varRutImgMen.$aMenu["img_out"];?>","<?php echo $varRutImgMen.$aMenu["img_out"];?>",16,16,0,"","",0,0,0,0,1,"#D8EBEF",0,"#D8EBEF",0,"../images/bottom-1.gif","../images/bottom-1.gif",3,3,0,0,"#FFAF00 #C89600 #FFAF00 #FFAF00","#FFAF00 #C89600 #FFAF00 #FFAF00","#FFFFFF","#FFFFFF","bold 8pt 'Arial','Verdana'","bold 8pt 'Arial','Verdana'",0,0],230,20);
stm_aix("p0i8","p0i0",[]);

	<?php
	$sql = "call spQuery_Sistema_Menu_Usuario($_SESSION[_CSYS], $_SESSION[_CUSE],4,'$aMenu[0]')";
	$objMenu->AbrirConexion();
	$Menu1 = $objMenu->Query($sql);
	$objMenu->CerrarConexion();
	while ($aMenu1 = $objMenu->FetchArray($Menu1)) {
		if(isset($aMenu1["link"])&& $aMenu1["link"]<>"#") $varDir = $ruta.$aMenu1["link"];
		else $varDir = "#";
		$sql = "call spQuery_Sistema_Menu_Usuario($_SESSION[_CSYS], $_SESSION[_CUSE],6,'$aMenu1[0]')";
		$objMenu->AbrirConexion();
		$Menu2 = $objMenu->Query($sql);
		$objMenu->CerrarConexion();
	?>
	stm_aix("p0i9","p0i3",[0,"<?php echo $aMenu1["nombre"];?>","","",-1,-1,0,"<?php echo $varDir;?>","_self","","","<?php echo $varRutImgMen.$aMenu1["img_out"];?>","<?php echo $varRutImgMen.$aMenu1["img_over"];?>",16,16,0,"<?php echo $varRutImgLib;?>black-r.gif","<?php echo $varRutImgLib;?>red1-r.gif",7,7,0,0,1,"#FFFFF7",1,"#dac591",0,"","",3,3],230,20);
stm_bpx("p1","p0",[1,2,0,5,1,5,16,0,100,"progid:DXImageTransform.Microsoft.Inset(,enabled=0,Duration=0.30)",-2,"progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=15,enabled=0,Duration=0.30)",-2,80]);
/*
stm_aix("p1i0","p0i0",[]);
stm_aix("p1i1","p0i7",[0,"Accesos","","",-1,-1,0,"#","_self","","","application_key.png","application_key.png"],230,20);
stm_aix("p1i2","p0i0",[]);
*/
<?php 
while ($aMenu2 = $objMenu->FetchArray($Menu2)) {
	if(isset($aMenu2["link"])&& $aMenu2["link"]<>"#") $varDir = $ruta.$aMenu2["link"];
	else $varDir = "#";
		?>
		stm_aix("p1i3","p0i9",[0,"<?php echo $aMenu2["nombre"];?>","","",-1,-1,0,"<?php echo $varDir;?>","_self","","","<?php echo $varRutImgMen.$aMenu2["img_out"];?>","<?php echo $varRutImgMen.$aMenu2["img_over"];?>",16,16,0,"","",0,0],230,18);
		<?php
		}
		 ?>
stm_ep();
	<?php } ?>
<?php 
}
?>

stm_ep();
stm_em();
//-->
</script>
