<table align='center'><tr><td colspan='3' align='center' class='LlenarTablaGarea'>LISTADO DEL PERSONAL</td></tr>
<tr><td width='50' class='facetfilaTD'>CODIGO</td><td width='250' class='facetfilaTD' align='center'>NOMBRE DEL PERSONAL</td><td class='facetfilaTD' width='50' align='center'>VER</td></tr>

<?php

//pregunta por el personal
$_pagi_sql="select a.ug_id as cod, b.ut_codprog as codigo, CONCAT(a.ua_apepat,' ',a.ua_apemat,' ',a.ua_nom) as nombre, ";
$_pagi_sql= $_pagi_sql." b.ut_idserva as idsa from tb_usutrab b  inner join tb_usuasist a on a.ug_id= b.ug_id where b.j_id='$idj' ";
$_pagi_sql= $_pagi_sql." and b.tp_id='$idtp' and b.ut_idserva='$ids' and b.uap_anno='$anno' and b.uap_mes ='$mm' order by nombre";
//Echo $_pagi_sql."<br>";

	$test = new MyPagina;
       $test->sql = $_pagi_sql;
       $result = $test->get_page_result(); 
       $num_rows = $test->get_page_num_rows();  
       $nav_links = $test->navigation(" | ", "currentStyle"); 
	   $nav_info = $test->page_info("al"); 
       $simple_nav_links = $test->back_forward_link(); 
       $total_recs = $test->get_total_rows(); 


		if ($total_recs>=1)
	   {
		 $i = 0;
		 do
   		 {
		 $ugid = mysql_result($result, $i, "cod");
		 $codprog = mysql_result($result, $i, "codigo");
		 $nombre = mysql_result($result, $i, "nombre");
   		 

		echo "<tr><td align='center' width='50' class ='FacetDataTextC'>".$codprog."</td><td width='300' class ='FacetDataTextC'>".$nombre."</td><td align='center' class ='FacetDataTextC'><img src='../img/ver.jpg' width='17' height='17' value='$ugid' onClick=verprog(this.value);></td></tr>";

		$i++;
  		}while($i < $num_rows);}
  
echo "</table><br>";

echo "<table align='center'><tr><td colspan='4' class='FacetFieldCaptionTD' align='center'><center>";
 if ((isset($total_recs))&&($total_recs>=1)){ echo ' Registros(s) del '.$nav_info.' de '.$total_recs.' encontrado(s).' ;}else{ echo '0 Registros(s) encontrado(s).';} 
 echo "</center></td></tr><tr><td colspan='4' class='FacetFieldCaptionTD' align='center'><center>";
 if (isset($total_recs)){ echo $nav_links; }
echo "</center></td></tr></table>"; 
	?>