function jabfung_peg($kode) { $data = mysql_query("select KdKelJabatan,KdFungsional from m_idpegawai where Nib='{$kode}'"); $rdata = mysql_fetch_array($data); $kdkeljabatan = $rdata['KdKelJabatan']; $kdfungsional = $rdata['KdFungsional']; if ($kdkeljabatan != '' and $kdfungsional != '') { $result = nm_jabfung($kdkeljabatan, $kdfungsional); } else { $result = ''; } return $result; }
function nm_info_jabatan($kdunitkerja, $kode_jabatan) { $data = mysql_query("select nama_jabatan from mst_info_jabatan where kdunitkerja = '{$kdunitkerja}' and kode_jabatan = '{$kode_jabatan}' "); $rdata = mysql_fetch_array($data); $result = trim($rdata['nama_jabatan']); if ($result == '' and substr($kode_jabatan, 0, 3) != '001' and substr($kode_jabatan, 0, 2) != '99') { $result = nm_jabfung(substr($kode_jabatan, 0, 3), substr($kode_jabatan, 3, 2)); } return $result; }