function Editing($va)
{
    $code = $va['code'];
    $dbRow = scSys::GetKeterangan("*", "code = '{$code}'", "sppd");
    if (!empty($dbRow)) {
        echo '
					with(OBJFORM_NEW.trsppd_laporan.Obj){
						find("#purpose").html("' . $dbRow['purpose'] . '") ; 
						find("#place_to").html("' . $dbRow['place_to'] . '") ; 
						find("#length_journey").html("' . $dbRow['length_journey'] . ' (' . scSys::Terbilang($dbRow['length_journey']) . ') hari") ; 
						find("#date_go").html("' . scDate::String2Date($dbRow['date_go']) . '") ; 
						find("#result").val("' . scSys::CheckText($dbRow['result']) . '") ; 
						find("#result").focus() ;  
					} 
				';
        if ($dbRow['result'] !== "") {
            //echokan
            $cButton = '<button type="button" class="btn btn-success" style="display:inline-block"
								 id="cmdCetak" name="cmdCetak" 
								 onclick="OBJFORM_NEW.trsppd_laporan.Print(&quot;' . $va['code'] . '&quot;)">Cetak</button>';
            echo '
						OBJFORM_NEW.trsppd_laporan.Obj
						.find("#wrapPrint").html("' . scSys::CheckText($cButton) . '") ; 
					';
        }
    }
}
Beispiel #2
0
function Grid1_Load($va)
{
    global $scDb;
    $cUserName = GetSession("cSession_UserName");
    $cLv_Admin = scSys::GetConfig("sc_admin");
    $cLv = GetSession("cSession_SCLevel");
    $cLimit = $va['offset'] . "," . $va['limit'];
    //limit
    $vaOrder = array();
    if (isset($va['sort'])) {
        unset($va['sort'][13]);
        unset($va['sort'][14]);
        foreach ($va['sort'] as $key => $vaValue) {
            $vaOrder[] = $vaValue['field'] . " " . $vaValue['direction'];
        }
    }
    $cOrder = implode(",", $vaOrder);
    if ($cOrder == "") {
        $cOrder = "status ASC";
    }
    //init order grid
    $dTglAwal = scDate::Date2String($va['dTglAwal']);
    $dTglAkhir = scDate::Date2String($va['dTglAkhir']);
    $cWhere_opt = "";
    if ($va['optStatusF'] !== "-") {
        $cWhere_opt = " AND status = '{$va['optStatusF']}' ";
    }
    $vaWhere = array();
    if (isset($va['search'])) {
        unset($va['search'][13]);
        unset($va['search'][14]);
        foreach ($va['search'] as $key => $vaValue) {
            $vaWhere[] = $vaValue['field'] . " like '%" . $vaValue['value'] . "%'";
        }
    }
    //init where grid
    $cWhere = "date >= '{$dTglAwal}' AND date <= '{$dTglAkhir}' " . $cWhere_opt . (!empty($vaWhere) ? " AND (" . implode(" OR ", $vaWhere) . ")" : "");
    $vaReturn = array();
    $dbData = $scDb->Browse("sppd", "*", $cWhere, "", "", $cOrder, $cLimit);
    $dbDataNL = $scDb->Browse("sppd", "*", $cWhere);
    while ($dbRow = $scDb->GetRow($dbData)) {
        $dbRow['recid'] = $dbRow['code'];
        $cStatus = $dbRow['status'];
        $dbRow['code'] = '<a class="a-click" onClick="OBJFORM_NEW.trsppd.Print(\'' . $dbRow['recid'] . '\')">' . $dbRow['recid'] . '</a>';
        $dbRow['code'] = html_entity_decode($dbRow['code']);
        $dbRow['status'] = html_entity_decode(sppd::GetStatus($dbRow['status'], true));
        $dbRow['date'] = scDate::String2Date($dbRow['date']);
        $dbRow['date_go'] = scDate::String2Date($dbRow['date_go']);
        $dbRow['date_back'] = scDate::String2Date($dbRow['date_back']);
        $dbRow['letter_date'] = scDate::String2Date($dbRow['letter_date']);
        $dbRow['nip_pejabat'] = scSys::GetKeteranganOne("nama", "nip = '{$dbRow['nip_pejabat']}'", "pegawai");
        $dbRow['nip_leader'] = scSys::GetKeteranganOne("nama", "nip = '{$dbRow['nip_leader']}'", "pegawai");
        $dbRow['username'] = scSys::GetKeteranganOne("FullName", "UserName = '******'username']}'", "username");
        $vaReturn[] = $dbRow;
    }
    $vaReturn = array("total" => $scDb->Rows($dbDataNL), "records" => $vaReturn);
    echo json_encode($vaReturn);
}
Beispiel #3
0
function LoadSPPD_Pelaporan($va)
{
    global $scDb;
    $cUserName = GetSession("cSession_UserName");
    $cLv_Admin = scSys::GetConfig("sc_admin");
    $cLv = GetSession("cSession_SCLevel");
    $cNip = GetSession("cSession_UserName_Target");
    $cSearch = $va['cSearch'];
    $vaArray = array();
    $cWhere = strpos($cLv_Admin, $cLv) === false ? "code LIKE '%{$cSearch}%' AND (nip_leader = '{$cNip}')" : "code LIKE '%{$cSearch}%'";
    $dbData = $scDb->Browse("sppd", "code,date", $cWhere);
    while ($dbRow = $scDb->GetRow($dbData)) {
        $vaArray[] = array("id" => $dbRow['code'], "text" => $dbRow['code'] . " pada tanggal " . scDate::String2Date($dbRow['date']));
    }
    if (empty($vaArray)) {
        $vaArray[] = array("id" => "scnull", "text" => "Tidak ditemukan");
    }
    echo json_encode($vaArray);
}
Beispiel #4
0
         $vaPengikut[] = scSys::GetKeterangan("nama,golongan,jabatan,nip", "nip = '{$value}'", "pegawai");
     }
 }
 $vaTable2 = array();
 $vaTable2[] = array("1" => "1.", "2" => "Pejabat yang memberi perintah", "3" => ": " . $vaPejabat['jabatan']);
 $vaTable2[] = array("1" => "2.", "2" => "Nama Pegawai yang diperintah", "3" => ": " . $vaLeader['nama']);
 $vaTable2[] = array("1" => "3.", "2" => "a. Pangkat dan Golongan", "3" => ": " . $vaLeader_Gol['Description'] . " / " . $vaLeader_Gol['Title']);
 $vaTable2[] = array("1" => "", "2" => "b. Jabatan", "3" => ": " . $vaLeader['jabatan']);
 $vaTable2[] = array("1" => "", "2" => "c. Tingkat menurut peraturan perjalanan", "3" => ": " . $dbRow['rate_travel']);
 $vaTable2[] = array("1" => "4.", "2" => "Maksud Perjalanan Dinas", "3" => ": " . $dbRow['purpose']);
 $vaTable2[] = array("1" => "5.", "2" => "Alat yang dipergunakan", "3" => ": " . $dbRow['transport']);
 $vaTable2[] = array("1" => "6.", "2" => "a. Tempat Berangkat", "3" => ": " . $dbRow['place_from']);
 $vaTable2[] = array("1" => "", "2" => "b. Tempat Tujuan", "3" => ": " . $dbRow['place_to']);
 $vaTable2[] = array("1" => "7.", "2" => "a. Lamanya Perjalanan Dinas", "3" => ": " . $dbRow['length_journey'] . " (" . scSys::Terbilang($dbRow['length_journey']) . ") hari");
 $vaTable2[] = array("1" => "", "2" => "b. Tanggal Berangkat", "3" => ": " . scDate::String2Date($dbRow['date_go']));
 $vaTable2[] = array("1" => "", "2" => "b. Tanggal Harus Kembali", "3" => ": " . scDate::String2Date($dbRow['date_back']));
 $nRow = 1;
 foreach ($vaPengikut as $key => $vaData) {
     $vaKu = array("1" => "", "2" => "", "3" => "");
     if ($key == 0) {
         $vaKu["1"] = "8.";
         $vaKu["2"] = "Pengikut";
     }
     $vaKu["3"] = ": " . $nRow++ . ". " . $vaData['nama'] . "\n      Nip." . $vaData['nip'];
     $vaTable2[] = $vaKu;
 }
 $vaTable2[] = array("1" => "9.", "2" => "Pembebanan Anggaran", "3" => "");
 $vaTable2[] = array("1" => "", "2" => "a. Instansi", "3" => ": " . $dbRow['government']);
 $vaTable2[] = array("1" => "", "2" => "a. Mata Anggaran", "3" => ": " . $dbRow['budget_from']);
 $vaTable2[] = array("1" => "10.", "2" => "Keterangan Lain-Lain", "3" => ": " . $dbRow['description']);
 $vaDate = scDate::Date2Var($dbRow['date']);
$code = $_GET['code'];
$dbRow = scSys::GetKeterangan("*", "code = '{$code}'", "sppd");
if (!empty($dbRow)) {
    $vaPejabat = scSys::GetKeterangan("nama,golongan,jabatan,nip", "nip = '{$dbRow['nip_pejabat']}'", "pegawai");
    $vaPejabat_Gol = scSys::GetKeterangan("Title,Description", "Id = '{$vaPejabat['golongan']}'", "sc_master");
    $vaLeader = scSys::GetKeterangan("nama,golongan,jabatan,nip", "nip = '{$dbRow['nip_leader']}'", "pegawai");
    $vaLeader_Gol = scSys::GetKeterangan("Title,Description", "Id = '{$vaLeader['golongan']}'", "sc_master");
    $vaPengikut = array();
    foreach (explode(",", $dbRow['nip']) as $key => $value) {
        if ($value !== "") {
            $vaPengikut[] = scSys::GetKeterangan("nama,golongan,jabatan,nip", "nip = '{$value}'", "pegawai");
        }
    }
    $vaTable1 = array();
    $vaTable1[] = array("1" => "Kepada", "2" => ":", "3" => $vaPejabat['nama']);
    $vaTable1[] = array("1" => "Tanggal", "2" => ":", "3" => scDate::String2Date($dbRow['result_date']));
    $vaTable1[] = array("1" => "Perihal", "2" => ":", "3" => "Laporan Hasil perjalanan Dinas ke " . $dbRow['place_to']);
    $vaTable2 = array();
    $vaTable2[] = array("1" => "Nama / NIP", "2" => ":", "3" => $vaLeader['nama']);
    $vaTable2[] = array("1" => "Pangkat / Gol", "2" => ":", "3" => $vaLeader_Gol['Description'] . " / " . $vaLeader_Gol['Title']);
    $vaTable2[] = array("1" => "Jabatan", "2" => ":", "3" => $vaLeader['jabatan']);
    $vaDate = scDate::Date2Var($dbRow['date_go']);
    $vaTable3 = array();
    $vaTable3[] = array("1" => "1.", "2" => "Maksud dan Tujuan", "3" => ":", "4" => $dbRow['purpose']);
    $vaTable3[] = array("1" => "2.", "2" => "Tempat yang dituju", "3" => ":", "4" => $dbRow['place_to']);
    $vaTable3[] = array("1" => "3.", "2" => "Untuk Selama", "3" => ":", "4" => $dbRow['length_journey'] . " (" . scSys::Terbilang($dbRow['length_journey']) . ") hari");
    $vaTable3[] = array("1" => "4.", "2" => "Berangkat Tanggal", "3" => ":", "4" => $vaDate["Tgl"] . " " . $vaDate['Bulan'] . " " . $vaDate['Tahun']);
    $vaDate = scDate::Date2Var($dbRow['result_date']);
    $vaTtd = array();
    $vaTtd[] = array("x" => "", "1" => "Singosari, " . $vaDate["Tgl"] . " " . $vaDate['Bulan'] . " " . $vaDate['Tahun']);
    $vaTtd[] = array("x" => "", "1" => "PETUGAS");
Beispiel #6
0
function Editing($va)
{
    $cKode = $va['code'];
    $dbRow = scSys::GetKeterangan("*", "code = '{$cKode}'", "sppd");
    if (!empty($dbRow)) {
        $vaNip_Pejabat = array("id" => $dbRow['nip_pejabat'], "text" => scSys::GetKeteranganOne("nama", "nip = '{$dbRow['nip_pejabat']}'", "pegawai"));
        $vaNip_Leader = array("id" => $dbRow['nip_leader'], "text" => scSys::GetKeteranganOne("nama", "nip = '{$dbRow['nip_leader']}'", "pegawai"));
        $vaNip = array();
        foreach (explode(",", $dbRow['nip']) as $key => $value) {
            $vaNip[] = array("id" => $value, "text" => scSys::GetKeteranganOne("nama", "nip = '{$value}'", "pegawai"));
        }
        $dbRow['date_go'] = scDate::String2Date($dbRow['date_go']);
        $dbRow['date_back'] = scDate::String2Date($dbRow['date_back']);
        echo '
					with(OBJFORM_NEW.trsppd.Obj){
						find("#code").val("' . $cKode . '") ;
						find("#letter_content").val("' . $dbRow['letter_content'] . '") ;
						find("#nip_pejabat").select2("data",' . json_encode($vaNip_Pejabat) . ') ;
						find("#nip_leader").select2("data",' . json_encode($vaNip_Leader) . ') ;
						find("#rate_travel").val("' . $dbRow['rate_travel'] . '") ;
						find("#nip").select2("data",' . json_encode($vaNip) . ') ;
						find("#purpose").val("' . $dbRow['purpose'] . '") ;
						find("#transport").val("' . $dbRow['transport'] . '") ;
						find("#place_from").val("' . $dbRow['place_from'] . '") ;
						find("#place_to").val("' . $dbRow['place_to'] . '") ;
						find("#length_journey").val("' . $dbRow['length_journey'] . '") ;
						find("#date_go").val("' . $dbRow['date_go'] . '") ;
						find("#date_back").val("' . $dbRow['date_back'] . '") ;
						find("#government").val("' . $dbRow['government'] . '") ; 
						find("#budget_from").val("' . $dbRow['budget_from'] . '") ;
						find("#description").val("' . $dbRow['description'] . '") ;
					}
				';
    }
}
Beispiel #7
0
function Editing($va)
{
    $cNip = $va['cNip'];
    $dbRow = scSys::GetKeterangan("*", "nip = '{$cNip}'", "pegawai");
    if (!empty($dbRow)) {
        $vaNip = array("id" => $dbRow['nip'], "text" => $dbRow['nip']);
        $vaGolongan = scSys::GetKeterangan("Title,Description", "Id = '{$dbRow['golongan']}'", "sc_master");
        $vaGolongan = array("id" => $dbRow['golongan'], "text" => $vaGolongan['Description'] . " / " . $vaGolongan['Title']);
        echo ' 
					with(OBJFORM_NEW.mstpegawai.Obj){
						find("#cNip").select2("data",' . json_encode($vaNip) . ') ;
						find("#cNip").select2("readonly",true) ;
						find("#cNama").val("' . $dbRow['nama'] . '") ;
						find("#cAlamat").val("' . $dbRow['alamat'] . '") ;
						find("#cTempat").val("' . $dbRow['tempat_lahir'] . '") ;
						find("#dTempat_Tgl").val("' . scDate::String2Date($dbRow['tanggal_lahir']) . '") ;
						find("#cGolongan").val("' . $dbRow['golongan'] . '") ;
						find("#dGolongan_Tgl").val("' . scDate::String2Date($dbRow['golongan_tanggal']) . '") ;
						find("#cJabatan").val("' . $dbRow['jabatan'] . '") ;
						find("#dJabatan_Tgl").val("' . scDate::String2Date($dbRow['jabatan_tanggal']) . '") ;
						find("#nKerjaTahun").val("' . $dbRow['kerja_tahun'] . '") ;
						find("#nKerjaBulan").val("' . $dbRow['kerja_bulan'] . '") ;
						find("#cJabatan_Lat").val("' . $dbRow['latihan_jabatan'] . '") ;
						find("#dJabatan_Lat_Tgl").val("' . scDate::String2Date($dbRow['latihan_jabatan_tanggal']) . '") ;
						find("#nJabatan_Lat").val("' . $dbRow['latihan_jabatan_jam'] . '") ;
						find("#cPendidikan").val("' . $dbRow['pendidikan'] . '") ; 
						find("#nThLulus").val("' . $dbRow['pendidikan_lulus'] . '") ;
						find("#cIjazah").val("' . $dbRow['pendidikan_ijazah'] . '") ;
						find("#cCatatan_Mutasi").val("' . $dbRow['catatan_mutasi'] . '") ;
						find("#cKeterangan").val("' . $dbRow['keterangan'] . '") ;
						find("#cno_hp").val("' . $dbRow['no_hp'] . '") ;
					} 
					$("#myTabs li:eq(1) a").tab("show") ; 
				';
    }
}
Beispiel #8
0
<?php

$vaData = array();
$dbData = $scDb->Browse("pegawai", "*");
$nRow = 1;
$vaData[] = array("NO" => 1, "NAMA" => 2, "NIP" => 3, "ALAMAT" => "", "PANGKAT;GOLONGAN / RUANG" => 4, "PANGKAT;TMT" => 5, "JABATAN;NAMA" => 6, "JABATAN;TMT" => 7, "MASA KERJA;THN" => 8, "MASA KERJA;BLN" => 9, "LATIHAN JABATAN;NAMA" => 10, "LATIHAN JABATAN;TGL LULUS" => 11, "LATIHAN JABATAN;JML JAM" => 12, "PENDIDIKAN;NAMA" => 13, "PENDIDIKAN;TAHUN LULUS" => 14, "PENDIDIKAN;TK IJAZAH" => 15, "TEMPAT TANGGAL LAHIR" => 16, "CATATAN MUTASI" => 17, "KETERANGAN" => 18);
while ($dbRow = $scDb->GetRow($dbData)) {
    $vaData[] = array("NO" => $nRow++, "NAMA" => $dbRow['nama'], "NIP" => $dbRow['nip'], "ALAMAT" => $dbRow['alamat'], "PANGKAT;GOLONGAN / RUANG" => $dbRow['golongan'], "PANGKAT;TMT" => scDate::String2Date($dbRow['golongan_tanggal']), "JABATAN;NAMA" => $dbRow['jabatan'], "JABATAN;TMT" => scDate::String2Date($dbRow['jabatan_tanggal']), "MASA KERJA;THN" => $dbRow['kerja_tahun'], "MASA KERJA;BLN" => $dbRow['kerja_bulan'], "LATIHAN JABATAN;NAMA" => $dbRow['latihan_jabatan'], "LATIHAN JABATAN;TGL LULUS" => scDate::String2Date($dbRow['latihan_jabatan_tanggal']), "LATIHAN JABATAN;JML JAM" => $dbRow['latihan_jabatan_jam'], "PENDIDIKAN;NAMA" => $dbRow['pendidikan'], "PENDIDIKAN;TAHUN LULUS" => $dbRow['pendidian_lulus'], "PENDIDIKAN;TK IJAZAH" => $dbRow['pendidikan_ijazah'], "TEMPAT TANGGAL LAHIR" => $dbRow['tempat_lahir'] . " " . scDate::String2Date($dbRow['tanggal_lahir']), "CATATAN MUTASI" => $dbRow['catatan_mutasi'], "KETERANGAN" => $dbRow['ketrangan']);
}
$vaDate = scDate::Date2Var(date("Y-m-d"));
$nFont = 8;
$pdf = new Cezpdf("A3", "L", $vaOpt);
$pdf->ezHeader("<b>UNIT KERJA : DINAS KEHUTANAN DAN PERKEBUNAN KAB. PATI</b>", array("fontSize" => $nFont + 2));
$pdf->ezHeader("<b>KEADAAN : BULAN " . $vaDate['Bulan'] . " " . $vaDate['Tahun'] . "</b>", array("fontSize" => $nFont + 2));
$pdf->ezHeader("");
$pdf->ezTable($vaData, "", "", array("fontSize" => $nFont, "cols" => array("NO" => array("width" => 2, "justification" => "center"), "NAMA" => array("width" => 8, "wrap" => 1), "NIP" => array("width" => 8, "wrap" => 1, "justification" => "center"), "ALAMAT" => array("wrap" => 1), "PANGKAT;GOLONGAN / RUANG" => array("width" => 7, "wrap" => 1), "PANGKAT;TMT" => array("width" => 4, "wrap" => 1, "justification" => "center"), "JABATAN;NAMA" => array("width" => 7, "wrap" => 1), "JABATAN;TMT" => array("width" => 4, "wrap" => 1, "justification" => "center"), "MASA KERJA;THN" => array("width" => 3, "wrap" => 1, "justification" => "center"), "MASA KERJA;BLN" => array("width" => 3, "wrap" => 1, "justification" => "center"), "LATIHAN JABATAN;NAMA" => array("width" => 7, "wrap" => 1), "LATIHAN JABATAN;TGL LULUS" => array("width" => 5, "wrap" => 1, "justification" => "center"), "LATIHAN JABATAN;JML JAM" => array("width" => 4, "wrap" => 1, "justification" => "center"), "PENDIDIKAN;NAMA" => array("width" => 7, "wrap" => 1), "PENDIDIKAN;TAHUN LULUS" => array("width" => 4, "wrap" => 1, "justification" => "center"), "PENDIDIKAN;TK IJAZAH" => array("width" => 4, "wrap" => 1, "justification" => "center"), "TEMPAT TANGGAL LAHIR" => array("width" => 7, "wrap" => 1), "CATATAN MUTASI" => array("width" => 5, "wrap" => 1), "KETERANGAN" => array("width" => 5, "wrap" => 1))));
$pdf->ezStream();