<?php
$idj= $_GET['idj'];

require_once("../class/class.jefaturas.php");

$Objj = new Jefaturas();
$res_jefs = array();
$res_jefs = $Objj->listar_jefatura_servicio($idj);

$cadenaserv="<select id='servicio' name='servicio'>";
$cadenaserv=$cadenaserv."<option value='0'>DEPENDENCIA DIRECTA</option>";
for($i=0;$i<sizeof($res_jefs);$i++){
$cadenaserv=$cadenaserv."<option value='".$res_jefs[$i]['ids']."'";
	if ($res_jefs[$i]['ids']==$ids){
	$cadenaserv=$cadenaserv." selected ";
	}
$cadenaserv=$cadenaserv.">".$res_jefs[$i]['nom']."</option>";
}
$cadenaserv=$cadenaserv."</select>";


echo $cadenaserv;
?>