Location: PHPKode > projects > Uniweb > Uniweb/menu.php
<script language="JavaScript">
<!--
function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
//-->
</script>
<?
if (isset($id_sec)){
	if ($id_sec == "5"){
	$sql_menu = "select s.nombre as grupo, m.nombre, m.link, m.barraestado from menus AS m, secciones AS s where (m.id_seccion = s.id_seccion and m.id_seccion = $id_sec) order by m.orden ASC";
	$result_menu = mysql_query($sql_menu);
	$result_menu_tmp = mysql_query($sql_menu);
	$row_menu_tmp = mysql_fetch_array($result_menu_tmp);
	
	}else{
	$sql_menu = "select s.nombre as grupo, m.nombre, m.link, m.barraestado from menus AS m, secciones AS s where (m.id_seccion = s.id_seccion and m.id_seccion = $id_sec) order by m.id_menu";
	$result_menu = mysql_query($sql_menu);
	$result_menu_tmp = mysql_query($sql_menu);
	$row_menu_tmp = mysql_fetch_array($result_menu_tmp);
	}
}
if (isset($curso)){
	$sql_menu = "select s.id_seccion, s.nombre as raiz, c.id_seccion, c.id_curso, c.curso as grupo, a.nombre, a.link, a.barraestado from asignaturas AS a, cursos AS c,secciones AS s where (c.id_seccion = s.id_seccion and a.id_curso = c.id_curso and c.id_curso = $curso ) order by a.nombre";

	$result_menu = mysql_query($sql_menu);
	$result_menu_tmp = mysql_query($sql_menu);
	$row_menu_tmp = mysql_fetch_array($result_menu_tmp);
	if ($row_menu_tmp['nombre'] ==""){
		$sql_menu = "select curso as grupo from cursos where id_curso = '$curso'";
		$result_menu = mysql_query($sql_menu);
		$result_menu_tmp = mysql_query($sql_menu);
		$row_menu_tmp = mysql_fetch_array($result_menu_tmp);
		$vacio = "on";
	}

}
?>
<body bgcolor="#FFFFFF">
<?
include "inc/raiz.inc";
?>
<table width="80%" border=0 cellspacing=1 cellpadding=1 align="center">
  <tr> 
    <td> 
      <div align=center><span class="tit02"><b>
        <? echo $row_menu_tmp['grupo'] ?>
        </b></span></div>
    </td>
  </tr>
  <tr>
    <td bgcolor="#333333"></td>
  </tr>
</table>

<table width="80%" align="center">

  <tr> 
      <td> 
        
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <?
//
//Selecciona Dentro de Apuntes ----> primero
//
if ($vacio =="on"){
?>
<tr> 
          <td><br><div align=center><span class=texto01>Este grupo está vacío de momento</span></div></td>
        </tr>

<?
}else{
while ($row_menu = mysql_fetch_array($result_menu)) { 
?>
        <tr> 
          <td>&nbsp;<a href="<? echo $row_menu['link'] ?>"  
            <font onMouseOver="MM_displayStatusMsg('<? echo $row_menu['barraestado'] ?>');
		return document.MM_returnValue">
            <? echo $row_menu['nombre'] ?>
            </font></a></td>
        </tr>
        <tr> 
          <td>
            <font face="Arial, Helvetica, sans-serif" size="1" color="#333333">&nbsp;&nbsp;&nbsp;&nbsp; 
            <? echo $row_menu['barraestado']?>
            </font></td>
        </tr>
        <tr>
          <td bgcolor="#CCCCCC"></td>
        </tr>
        <?
}
} 
?>
      </table>
      		
      </td>
    </tr>

    <tr> 
      <td> 
        
      </td>
    </tr>
  </table>

  
<div align="center"></div>
  
Return current item: Uniweb