<?php 
require_once("../includes/academia_constantes.php");
require_once("../includes/funciones_generales.php");
require_once("../includes/clase_sesion.php");
$sesion=new sesion();	

$sesion->set('permiso',permisos($_POST['privilegio']));	

require_once("../includes/lib_lenguaje.php");
$cleguaje=new cLanguage();

if(!comprobar_sesion()){
	mensaje($cleguaje->Phrase('global','ses_cad'),$cleguaje->Phrase('project','institucion'));	
	exit;
}

require_once('../includes/MySQL.php');
$academia = new Servidor_Base_Datos(AC_CONN_HOST,AC_CONN_USER,AC_CONN_PASS,AC_CONN_DB."".$sesion->get('anio'));

?>
<table  height="36" border="0" align="center" cellpadding="3" cellspacing="0" id="tb_ord">
    <tr align="left">
        <th width="36"></th>
    	<th width="431">Nombre de la asignatura</th>
        <th width="86">Abreviatura</th>
        <th width="87">Prioridad</th>
    </tr>
    <tr>
    <td colspan="4">
<ul id="test-list">
<?php
$sql="SELECT cod_asi, nom_asi, abr_asi, pri_asi FROM aca_asignaturas ORDER BY pri_asi ASC";
$academia->instruccion($sql);
$i=1;
?>

<?php
/*	$num=$academia->num_rows();
	for($i=1;$i<=$num;$i++){
		
	}*/
	while($reg=$academia->extraer_registro()){
?>
<li id="listItem_<?php echo $reg['cod_asi'] ?>" class="handle">
<table width="688" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width="36"><img src="images/arrow.png" alt="mover" width="16" height="16" class="handle" /></td>
    	<td width="431"><?php echo $reg["nom_asi"] ?></td>
        <td width="86"><?php echo $reg["abr_asi"] ?></td>
        <td width="87"><?php echo $reg["pri_asi"] ?></td>
    </tr>
</table>
</li>
<?php
$i++;
}
$academia->liberar();
$academia->cerrar();
?>
</ul>
</td>
</tr>
</table>
