<?php

session_start();    
require('../conexion.php');

$usuario = $_SESSION['cveUsuario'];
$i=0;
$result = query("SELECT us.id, us.uss_nombre FROM usuarios AS us 
WHERE us.uss_activo_fin = 1 AND us.uss_estatus = 'alta';");

while($row = mysqli_fetch_assoc($result)){
    $rowdata[$i] = $row;
    $i++;
}

if ($i>0){
    $res =  json_encode($rowdata,JSON_UNESCAPED_UNICODE);
} else {
    $res =  '[{"id":"0"}]';	
}
echo $res;
?>