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

  $sql="SELECT id,url as filename from `penkin7` where `petugas`=".$js['petugas'];
  if(isset($js['pekerjaan_id'])) {
    $sql.= " and pekerjaan_id=".$js['pekerjaan_id'];
  }
  if(isset($js['width'])) {
    $sql.= " and width=".$js['width'];
  }
  $res=mysqli_query($db,$sql);
  $tot=mysqli_num_rows($res);
  $limit=$tot;
  $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;
}