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

  //$sql="SELECT id, from `ptg_8` where `doc_lengkap`=0 order by rand()";
  $sql="SELECT id,daftar,jenis_tugas,nama,is_pl from `ptg_8` where `diklat_cek`=0 and `status`='stp-3.5' and diklat_pusat=1 order by id";
  //$dt['sql'][1]=$sql;
  $res=mysqli_query($db,$sql);
  if(mysqli_num_rows($res)>0){
    $dt['success']=true;
    $dt['count']=mysqli_num_rows($res);
    while($r=mysqli_fetch_assoc($res)) {
      $dt['data'][]=$r;
    }
  } else {
    $dt['error']=true;
    $dt['count']=0;
    $dt['message']="Data not found";        
  }
  return $dt;
}