LAMPIRAN A: RINCIAN KEGIATAN DOSEN DAN ANGKA KREDITNYA

1 48 LAMPIRAN A: RINCIAN KEGIATAN DOSEN DAN ANGKA KREDITNYA NO UNSUR SUB UNSUR BUTIR KEGIATAN ANGKA KREDIT a. Doktor (S)/Spesialis II 200. Mengikuti p...
Author:  Glenna Makmur

19 downloads 185 Views 814KB Size

Recommend Documents





3. graph.php
Universitas Sumatera Utara

63 header("Expires: ".date("D, j M Y h:i:s", mktime(0, 0, 0, date("n")+1, date("j")+1, 2020))." GMT"); header("Content-Type: image/png"); ##################################################### //bar graph function file ##################################################### function barGraph($value1,$value2,$value3,$value4) { //Create a new image $image = imagecreate(550,150); //Set the colours of the image parts $background = ImageColorAllocate($image,255,255,255); $border = ImageColorAllocate($image,0,0,0); $fill0 = ImageColorAllocate($image,165,206,55); $fill1 = ImageColorAllocate($image,0,173,239); $fill2 = ImageColorAllocate($image,244,131,101); $fill3 = ImageColorAllocate($image,255,241,0); //create the background of the bars ImageFilledRectangle($image,0,0,302,20,$background); ImageFilledRectangle($image,0,30,302,50,$background); ImageFilledRectangle($image,0,60,302,80,$background); ImageFilledRectangle($image,0,90,302,110,$background); //create the bars themselves ImageFilledRectangle($image,1,1,$value1,19,$fill0); ImageFilledRectangle($image,1,31,$value2,49,$fill1); ImageFilledRectangle($image,1,61,$value3,79,$fill2); ImageFilledRectangle($image,1,91,$value4,109,$fill3); //Create the Borders ImageRectangle($image,0,0,300,20,$border); ImageRectangle($image,0,30,300,50,$border); ImageRectangle($image,0,60,300,80,$border); ImageRectangle($image,0,90,300,110,$border); //add labels to the items ImageString($image,5 , 310, ImageString($image,5 , 310, ImageString($image,5 , 310, ImageString($image,5 , 310,

0, "Pendidikan dan Pengajaran",$border); 30,"Penelitian", $border); 60, "Pengabdian Masyarakat", $border); 90, "Penunjang", $border);

//convert this page into a PNG image imagePNG($image); //Delete the image from menory imagedestroy($image); } barGraph( $_SESSION["bar_pendidikan_pengajaran"], $_SESSION["bar_penelitian"], $_SESSION["bar_pengabdian_masyarakat"], $_SESSION["bar_penunjang"]); ?>

4. function.php

'; } function navigasi_ke($alamat) { echo'

Universitas Sumatera Utara

64 <script type="text/javascript"> document.location="'.$alamat.'"; '; } function sapa_pengguna() { $q = mysql_query("select nama_lengkap from data_dosen where nip='".$_SESSION["nip"]."'"); $nama_pengguna = "Sipulan"; while($r = mysql_fetch_array($q)) { $nama_pengguna = $r[0]; } echo ' '.$nama_pengguna.''; } function tampil_jenkel($kode_jenkel) { $q = mysql_query("select jenkel from jenkel where kode_jenkel='".$kode_jenkel."'"); $r = mysql_fetch_array($q); $jenkel = $r[0]; echo $jenkel; } function tampil_agama($kode_agama) { $q = mysql_query("select agama from agama where kode_agama='".$kode_agama."'"); $r = mysql_fetch_array($q); $agama = $r[0]; echo $agama; } function tampil_format_tanggal($tanggalBulanTahun) { $tanggal = $bulan = $tahun = ""; $q = mysql_query("select day('$tanggalBulanTahun'), month('$tanggalBulanTahun'), year('$tanggalBulanTahun')"); while($r = mysql_fetch_array($q)) { $tanggal = $r[0]; $bulan = $r[1]; $tahun = $r[2]; } $namaBulan = ""; $q = mysql_query("select bulan from bulan where kode_bulan=$bulan"); while($r = mysql_fetch_array($q)) { $namaBulan = $r[0]; } $formatTanggal = $tanggal." ".$namaBulan." ".$tahun; echo $formatTanggal; } function tampil_kategori($kode_kategori) { $q = mysql_query("select * from kategori where kode_kategori=".$kode_kategori.""); $r = mysql_fetch_array($q); echo $r[1]; } function tampil_kegiatan($kode_kegiatan) { $q = mysql_query("select * from nilai_kum where kode_aktifitas=".$kode_kegiatan.""); $r = mysql_fetch_array($q);

Universitas Sumatera Utara

65 echo $r[2]; } function get_kum_pendidikan_utama_tambahan() { $kum = 0; $q = mysql_query("select * from pendidikan_dosen where nip='".$_SESSION["nip"]."'"); while($r = mysql_fetch_array($q)) { $q1 = mysql_query("select * from pendidikan_utama where kode_pendidikan=".$r[1].""); $r1 = mysql_fetch_array($q1); $kum += $r1[2]; $q1 = mysql_query("select * from pendidikan_lain where kode_pendidikan=".$r[2].""); $r1 = mysql_fetch_array($q1); $kum += $r1[2]; } return $kum; } function get_kum_ppf_dosen() { $waktu = 0; $kum = 0; $q = mysql_query("select count(waktu_ppf) from ppf_dosen where nip='".$_SESSION["nip"]."'"); $r = mysql_fetch_array($q); $waktu = $r[0]; $waktu /= 60; if($waktu>960) $kum = 15; else if($waktu>641) $kum = 9; else if($waktu>481) $kum = 6; else if($waktu>161) $kum = 3; else if($waktu>81) $kum = 2; else if($waktu>30) $kum = 1; return $kum; } function get_kum_sks_mengajar() { $kum = 0; $q = mysql_query("select kode_jabatan from jabatan_golongan_dosen where nip='".$_SESSION["nip"]."'"); $r = mysql_fetch_array($q); $id_jabatan = $r[0]; if($id_jabatan>1) { $q = mysql_query("select * from sks_mengajar where nip='".$_SESSION["nip"]."'"); while($r = mysql_fetch_array($q)) { $jumlahSKS = $r[4]; if($jumlahSKS>10) { $a = 10 + ($jumlahSKS-10)*0.5; $kum += $a; } else { $a = $jumlahSKS; $kum += $a;

Universitas Sumatera Utara

66 } } } else { $q = mysql_query("select * from sks_mengajar where nip='".$_SESSION["nip"]."'"); while($r = mysql_fetch_array($q)) { $jumlahSKS = $r[4]; if($jumlahSKS>10) { $a= 5 + ($jumlahSKS-10)*0.25; $kum += $a; } else { $a = $jumlahSKS*0.5; $kum += $a; } } } return $kum; } function get_kum_pendidikan_pengajaran() { $kum = 0; $q = mysql_query("select * from aktifitas_dosen where nip='".$_SESSION["nip"]."' and kode_kategori=1"); while($r = mysql_fetch_array($q)) { $q1 = mysql_query("select nilai_kum from nilai_kum where kode_aktifitas=".$r[2].""); $r1 = mysql_fetch_array($q1); $kum += $r1[0]; } return $kum; } function get_kum_penelitian() { $kum = 0; $q = mysql_query("select * from aktifitas_dosen where nip='".$_SESSION["nip"]."' and kode_kategori=2"); while($r = mysql_fetch_array($q)) { $q1 = mysql_query("select nilai_kum from nilai_kum where kode_aktifitas=".$r[2].""); $r1 = mysql_fetch_array($q1); $kum += $r1[0]; } return $kum; } function get_kum_pengabdian_masyarakat() { $kum = 0; $q = mysql_query("select * from aktifitas_dosen where nip='".$_SESSION["nip"]."' and kode_kategori=3"); while($r = mysql_fetch_array($q)) { $q1 = mysql_query("select nilai_kum from nilai_kum where kode_aktifitas=".$r[2].""); $r1 = mysql_fetch_array($q1); $kum += $r1[0]; } return $kum; } function get_kum_penunjang() { $kum = 0; $q = mysql_query("select * from aktifitas_dosen where nip='".$_SESSION["nip"]."' and kode_kategori=4");

Universitas Sumatera Utara

67 while($r = mysql_fetch_array($q)) { $q1 = mysql_query("select nilai_kum from nilai_kum where kode_aktifitas=".$r[2].""); $r1 = mysql_fetch_array($q1); $kum += $r1[0]; } return $kum; } function is_minimal($persentase, $nilai_total, $nilai_input) { $status = 0; $persentase_sekarang = $nilai_input/$nilai_total*100; if($persentase_sekarang>=$persentase) { $status = 1; } return $status; } function is_maximal($persentase, $nilai_total, $nilai_input) { $status = 0; $persentase_sekarang = $nilai_input/$nilai_total*100; if($persentase_sekarang>$persentase) { $status = 1; } return $status; } function tampil_jabatan($kode_jabatan) { $q = mysql_query("select jabatan from jabatan where kode_jabatan=".$kode_jabatan.""); $r = mysql_fetch_array($q); return $r[0]; } function tampil_golongan($kode_golongan) { $q = mysql_query("select golongan from golongan where kode_golongan=".$kode_golongan.""); $r = mysql_fetch_array($q); return $r[0]; } function tampil_saran_tambahan($gol_dicapai) { $q = mysql_query("select kode_golongan from jabatan_golongan_dosen where nip='".$_SESSION["nip"]."'"); $r = mysql_fetch_array($q); $gol_sekarang = $r[0]; $beda = $gol_dicapai-$gol_sekarang; if($beda > 1) { $q = mysql_query("select * from syarat_kredit_kumulatif where id_golongan='".($gol_dicapai)."'"); $r = mysql_fetch_array($q); $id_jabatan = $r[0]; $id_golongan = $r[1]; $q = mysql_query("select * from jabatan where kode_jabatan='".$id_jabatan."'"); $r = mysql_fetch_array($q); $jabatan = $r[1]; $q = mysql_query("select * from golongan where kode_golongan='".$id_golongan."'"); $r = mysql_fetch_array($q); $golongan = $r[2];

Universitas Sumatera Utara

68 $q = mysql_query("select angka_kredit_kumulatif_total from syarat_kredit_kumulatif where id_golongan='".$gol_sekarang."'"); $r = mysql_fetch_array($q); $angka2 = $r[0]; $q = mysql_query("select angka_kredit_kumulatif_total from syarat_kredit_kumulatif where id_golongan='".$gol_dicapai."'"); $r = mysql_fetch_array($q); $angka1 = $r[0]; echo "

- Anda harus menunggu waktu ".(2*$beda)." tahun untuk naik ke ".$jabatan." ".$golongan." atau harus mengumpulkan nilai kum sebanyak ".(30*($angka1-$angka2)/100)." dari unsur utama

"; } } function tampil_saran_tambahan1($gol_dicapai) { $q = mysql_query("select kode_golongan from jabatan_golongan_dosen where nip='".$_SESSION["nip"]."'"); $r = mysql_fetch_array($q); $gol_sekarang = $r[0]; $beda = $gol_dicapai-$gol_sekarang; if($beda > 1) { $q = mysql_query("select * from syarat_kredit_kumulatif where id_golongan='".($gol_dicapai-1)."'"); $r = mysql_fetch_array($q); $id_jabatan = $r[0]; $id_golongan = $r[1]; $q = mysql_query("select * from jabatan where kode_jabatan='".$id_jabatan."'"); $r = mysql_fetch_array($q); $jabatan = $r[1]; $q = mysql_query("select * from golongan where kode_golongan='".$id_golongan."'"); $r = mysql_fetch_array($q); $golongan = $r[1]; echo "- Silahkan segera mengurus kenaikan pangkat untuk menjadi ".$jabatan." ".$golongan." " ; } } ?>

Universitas Sumatera Utara