
console.log(nopeg)
loadbobot(nopeg);
function loadbobot(nopeg){
    
    // console.log(isObject)

    $.ajax({
        type: 'POST',
        dataType: 'json',
        url: baseURL + '/jsondata/dataforqr',
        async: true,
        data: {
            iparam	    : nopeg,
        },
        success: function(response){
            
            if(response.code == CODE_SUCCESS){
                var data = response.data;
                var datas = data[0];
                console.log(datas);

                $namagelar = datas.nama;
                if(datas.gelar_dpn){
                    $namagelar = datas.gelar_dpn+" "+$namagelar; 
                }

                if(datas.gelar_blk){
                    $namagelar += ", "+datas.gelar_blk;
                }

                $("#kaprodi").html("Kaprodi "+datas.nama_prodi);
                $("#namakap").html($namagelar);
                $("#nip").html("NIP : "+datas.nip);
                $reshtml = '';
                $reshtml += `<h6 class="content-group" id="nip">Telepon : `+datas.telp+`<small class="display-block"></small></h6>
                             <h6 class="content-group" id="nip">Fax : `+datas.fax+`<small class="display-block"></small></h6>
                             <h6 class="content-group" id="nip">Email : `+datas.email+`<small class="display-block"></small></h6>`;
                // if(datas.nim == '131'){
                    
                // }else if (datas.nim == '136'){
                //     $reshtml += `<h6 class="content-group" id="nip">Telepon : +62-22-2504529<small class="display-block"></small></h6>
                //                  <h6 class="content-group" id="nip">Fax : +62-22-2534164<small class="display-block"></small></h6>
                //                  <h6 class="content-group" id="nip">Email : info@ae.itb.ac.id<small class="display-block"></small></h6>`;
                // }else{
                //     $reshtml += `<h6 class="content-group" id="nip">Telepon : +62-22-2508144<small class="display-block"></small></h6>
                //                  <h6 class="content-group" id="nip">Fax : +62-22-2508144<small class="display-block"></small></h6>
                //                  <h6 class="content-group" id="nip">Email : material@material.itb.ac.id<small class="display-block"></small></h6>`;
                // }
             

                $("#contact").html($reshtml);
            } else {
                swal({
                    title: "Alert",
                    text:  response.info+ " Silahkan coba kembali :)",
                    confirmButtonColor: "#2196F3",
                    type: "error"
                });  
            }
            
        },
        error: function(xhr) {
            // loaderPage(false);
            if(xhr.status != 200){
                swal({
                    title: "Galat",
                    text:  xhr.status+"-"+xhr.statusText+"<br> Silahkan coba kembali :)",
                    confirmButtonColor: "#2196F3",
                    type: "error"
                });                        
            }
        }
    });
}