function presensi_exif($js){
  global $ar,$db;
  $dt=array();
  //$dt['param']=$js;

  $sql="SELECT id,filename from `prsns7` where filename!='' and `petugas`=".$js['petugas'];
  if(isset($js['width'])) {
    $sql.= " and width=".$js['width'];
  }
  $res=mysqli_query($db,$sql);
  $tot=mysqli_num_rows($res);
  $limit=ceil($tot/5);
  $sql2=$sql." order by rand() limit ".$limit;
  $res2=mysqli_query($db,$sql2);
  //$dt['sql'][1]=$sql8;
  if(mysqli_num_rows($res2)>0){
    $dt['status']=$dt['success']=true;
    $dt['count']=mysqli_num_rows($res2);
    while($r=mysqli_fetch_assoc($res2)) {
      $dt['data'][]=$r;
    }
  } else {
    $dt['error']=true;
    $dt['count']=0;
    $dt['message']="Data not found";        
  }
  return $dt;
}