<?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/menu3/stmenu.js"></script>
<?php
$varRutImgLib = "../js/menu3/";
$varRutImgMen = "../images/";
?>
<script type="text/javascript">
<!--
stm_bm(["menu0a7f",850,"","<?php echo $varRutImgLib;?>blank.gif",0,"","",0,0,250,50,1000,1,0,0,"","",0,0,1,1,"default","hand",""],this);
stm_bp("p0",[1,4,0,0,0,2,16,16,100,"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=0,motion=forward,enabled=0,Duration=0.20)",6,"",-2,90,0,0,"#7F7F7F","#333333","",3,0,0,"#666666","",0,0,0,"transparent","",3,"",-1,5,0,"#006666","",3,"",-1,-1,0,"transparent","",3,"",-1,5,0,"#006666","",3,"","","","",0,0,0,0,0,0,0,0]);
stm_ai("p0i0",[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,"#006666",0,"#006666",0,"","",3,3,0,0,"#FFFFFF","#FFFFFF","#FFFFFF","#FFFF00","bold 8pt Verdana","bold 8pt Verdana",0,0],0,22);
stm_ai("p0i1",[6,2,"#006666","",-1,-1,0]);
stm_aix("p0i2","p0i0",[0,"Cambiar Contraseņa","","",-1,-1,0,"clave.php","_self","","","<?php echo $varRutImgMen;?>16x16/change_password.png","<?php echo $varRutImgMen;?>16x16/change_password.png",16,16,0,"","",0,0,0,0,0,"",1,"#006600",0,"","",3,3,0,0,"#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","8pt Verdana","8pt Verdana"]);
stm_aix("p0i3","p0i1",[]);
stm_aix("p0i4","p0i2",[0,"Salir del Sistema","","",-1,-1,0,"../logout.php","_self","","","<?php echo $varRutImgMen;?>16x16/disconnect.png","<?php echo $varRutImgMen;?>16x16/disconnect.png"]);

<?php
$sql1 = "call spQuery_Sistema_Menu_Usuario($_SESSION[_CSYS], $_SESSION[_CUSE],2,'')";
$objMenu->AbrirConexion();
$Menu1 = $objMenu->Query($sql1);
$objMenu->CerrarConexion();
while ($aMenu1 = $objMenu->FetchArray($Menu1)) {
	if(isset($aMenu1["link"])&& $aMenu1["link"]<>"#")	$dir=$ruta.$aMenu1["link"];
	else $dir="#";
?>
stm_aix("p0i5","p0i1",[]);
stm_aix("p0i6","p0i0",[0,"<?php echo $aMenu1["nombre"];?>","","",-1,-1,0,"<?php echo $dir;?>","_self","","","<?php echo $varRutImgMen.$aMenu1["img_out"];?>","<?php echo $varRutImgMen.$aMenu1["img_over"];?>"],0,22);

<?php
$sql2 = "call spQuery_Sistema_Menu_Usuario($_SESSION[_CSYS], $_SESSION[_CUSE],4,'$aMenu1[id_menu]')";
$objMenu->AbrirConexion();
$Menu2 = $objMenu->Query($sql2);
$objMenu->CerrarConexion();
while ($aMenu2 = $objMenu->FetchArray($Menu2)) {
	if(isset($aMenu2["link"])&& $aMenu2["link"]<>"#")	$dir=$ruta.$aMenu2["link"];
	else $dir="#";
	$varIco = ($dir=="#")?$varRutImgLib."arrowaaa.gif":"";
	$varSip = ($dir=="#")?"stEffect(\"slip\")":"";
?>
stm_aix("p0i7","p0i1",[]);
stm_aix("p0i8","p0i2",[0,"<?php echo $aMenu2["nombre"];?>","","",-1,-1,0,"<?php echo $dir;?>","_self","","","<?php echo $varRutImgMen.$aMenu2["img_out"];?>","<?php echo $varRutImgMen.$aMenu2["img_over"];?>",16,16,0,"<?php echo $varIco;?>","<?php echo $varIco;?>",16,9]);
stm_bpx("p1","p0",[1,2,6,0,0,2,16,16,100,"$varSip",-2,"",-2,85,0,0,"#7F7F7F","#333333","",3,1,1,"#999999","",-1,-1,0,"#FFFFF7","",3,"",-1,2,0,"#006666","",3,"",-1,-1,0,"#FFFFF7","",3,"",-1,2]);

<?php
$sql3 = "call spQuery_Sistema_Menu_Usuario($_SESSION[_CSYS], $_SESSION[_CUSE],6,'$aMenu2[id_menu]')";
$objMenu->AbrirConexion();
$Menu3 = $objMenu->Query($sql3);
$objMenu->CerrarConexion();
while ($aMenu3 = $objMenu->FetchArray($Menu3)) {
	if(isset($aMenu3["link"])&& $aMenu3["link"]<>"#")	$dir=$ruta.$aMenu3["link"];
	else $dir="#";
	$varIco = ($dir=="#")?$varRutImgLib."arrowaaa.gif":"";
?>
stm_aix("p1i0","p0i1",[]);
stm_aix("p1i1","p0i2",[0,"<?php echo $aMenu3["nombre"];?>","","",-1,-1,0,"<?php echo $dir;?>","_self","","","<?php echo $varRutImgMen.$aMenu3["img_out"];?>","<?php echo $varRutImgMen.$aMenu3["img_over"];?>",16,16,0,"<?php echo $varIco;?>","<?php echo $varIco;?>",16,9,0,0,1,"#FFFFFF"]);
stm_bp("p2",[1,2,6,0,0,2,16,0,100,"stEffect(\"slip\")",-2,"",-2,85,0,0,"#7F7F7F","#333333","",3,1,1,"#999999"]);
stm_aix("p2i0","p0i1",[]);
<?php
$sql4 = "call spQuery_Sistema_Menu_Usuario($_SESSION[_CSYS], $_SESSION[_CUSE],8,'$aMenu3[id_menu]')";
$objMenu->AbrirConexion();
$Menu4 = $objMenu->Query($sql4);
$objMenu->CerrarConexion();
while ($aMenu4 = $objMenu->FetchArray($Menu4)) {
	if(isset($aMenu4["link"])&& $aMenu4["link"]<>"#")	$dir=$ruta.$aMenu4["link"];
	else $dir="#";
	$varIco = ($dir=="#")?$varRutImgLib."arrowaaa.gif":"";
?>

stm_aix("p2i1","p1i1",[0,"<?php echo $aMenu4["nombre"];?>","","",-1,-1,0,"<?php echo $dir;?>","_self","","","<?php echo $varRutImgMen.$aMenu4["img_out"];?>","<?php echo $varRutImgMen.$aMenu4["img_out"];?>",16,16,0,"","",0,0]);
stm_aix("p2i2","p0i1",[]);
<?php } ?>
stm_ep();
<?php } ?>
stm_aix("p2i2","p0i1",[]);
stm_ep();
<?php } ?>
<?php } ?>
stm_aix("p2i10","p0i1",[]);
stm_em();
//-->
</script>