<?php
include("cls_conexion.php");$CNN=new ClsMySQL();include("conexion23.php");
$SYS_TIP="X";
$MNU_USU_ID=vbval($_GET['USER_ID']);
?>

<div id="header">
    <ul class="nav">
    <li >
        <a href="">
        <div style=" width:100px; "> 
            <marquee loop="1" behavior="alternate" scrollamount="12">
            <b>SOUND</b>
            </marquee>
        </div>
        </a>
    </li>            			        
    <?php
    if($MNU_USU_ID==0){
        $s="SELECT id_menu,nombre FROM menu 
			GROUP BY id_menu,nombre                
            ORDER BY col,ord";
        $rs = grs($s);
        while ($r = $rs->fetch_assoc()){
			$MID=$r['id_menu'];
            $MNU=$r['nombre'];
            ?>
            <li><a href=""><?php echo $MNU;?></a>
            <ul>
            <?php
            $z="SELECT sm,url FROM menus
                WHERE id_menu='$MID'
				GROUP BY sm,url 
				ORDER BY sm";
			//echo $z;
            $rz = grs($z);
            while ($f = $rs->fetch_assoc()){
                $SM=$f['sm'];
                $UR=$f['url'];
                $XYZ="";
                //if($UR=="neu_precioz.php")$XYZ=" target=\"_blank\" ";
            ?>
                <li>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>                        
                <td style="padding: 0px 0px"><a href="<?php echo $UR;?>" style="padding-top:5px; padding-bottom:5px" target="_blank"><img src="run.png"></a></td>
                <td style="width:300px;padding: 0px 0px"><a href="<?php echo $UR;?>" <?php echo $XYZ;?> ><?php echo $SM;?></a></td>
                </tr>
                </table>
                </li>   
            <?php
            }
            ?>
            </ul>
            </li>  
        <?php
        }
    ?>            
    <?php	
    }else{
        $s="SELECT ME FROM vusu_men
			WHERE IDU=$MNU_USU_ID AND VA>0
			GROUP BY ME
            ORDER BY ME";
			
        $rs = grs($s);
        while ($r = $rs->fetch_assoc()){
            $MNU=$r['ME'];
            ?>
            <li><a href=""><?php echo $MNU;?></a>
            <ul>
			<?php
            $z="SELECT SM,UR FROM vusu_men 
                WHERE ME='$MNU' AND IDU=$MNU_USU_ID AND VA>0
                ORDER BY SO ";
            $rz = grs($z);
            while ($f = $rz->fetch_assoc()){
                $SM=$f['SM'];
                $UR=$f['UR'];
                $XYZ="";
                if($UR=="neu_precioz.php")$XYZ=" target=\"_blank\" ";
            ?>
                <li>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>                        
                <td style="padding: 0px 0px"><a href="<?php echo $UR;?>" style="padding-top:5px; padding-bottom:5px" target="_blank"><img src="run.png"></a></td>
                <td style="width:300px;padding: 0px 0px"><a href="<?php echo $UR;?>" <?php echo $XYZ;?> ><?php echo $SM;?></a></td>
                </tr>
                </table>
                </li>   
            <?php
            }
            ?>
            </ul>
            </li>  
        <?php
        }
    }
    ?>            
    <li style=" padding-top:0px; padding-bottom:0px">
    <a href="cerrar.php" style="padding-top:7px; padding-bottom:7px">
    <img src="exit.png" style="width:20px; height:20px"  title="SALIR">
    </a>
    </li>			
    </ul>
</div>
