<?php
include("../bd/sql_variables.php");
$db_conexion= mysql_connect("$sql_host", "$sql_usuario", "$sql_pass") or die(header ("No Disponible Servidor de Base de Datos"));
mysql_select_db("$sql_db");


$cadena = $cadena."<table>";
$cadena = $cadena."<tr><td class ='FacetDataTextC' align='center' colspan='3' width='480'><b><font color='red'>LISTA DE AREAS / DPTOS</font></b></td></tr>";
$cadena = $cadena."<tr><td align='center' colspan='3' width='480'><input type='button' onClick='nuevaJefatura();' value='Agregar Nuevo'></td></tr>";
$cadena = $cadena."<tr><td class ='FacetDataTextC' align='center' width='270'><b>AREA / DPTO</b></td><td class ='FacetDataTextC' align='center' width='170'><b>ABREVIATURA<b></td><td class ='FacetDataTextC' align='center' width='40'><b>EDIT</b></td></td></tr>";
$sql="select j_id as id, j_abrev as abrev, j_desc as nom from tb_jefatura";
$result = mysql_query($sql);
while ($row= mysql_fetch_array($result)){
$id = $row['id'];
$cadena = $cadena."<tr><td>".$row['nom']."</td><td align='center'>".$row['abrev']."</td><td align='center'><img src='../img/b_edit2.gif' onClick='editarJefatura($id)'></td></tr>";
}
$cadena = $cadena."</table>";
echo $cadena;
?>

