Skip to main content
Sign in
Snippets Groups Projects
Commit 9ca75ddb authored by Tama's avatar Tama
Browse files

fix persetujuan

parent 6e60ad86
Branches master
No related tags found
No related merge requests found
Pipeline #
...@@ -30,7 +30,7 @@ function setujuPenilaian() { ...@@ -30,7 +30,7 @@ function setujuPenilaian() {
$id_pegawai = $nip_login ; $id_pegawai = $nip_login ;
$id_penilai = $nip_atasan ; $id_penilai = $nip_atasan ;
$nip = $id_pegawai ; $nip = $id_pegawai ;
$conn = connect_database(); /* $conn = connect_database();
$sql = "SELECT modified_at FROM penilaian WHERE id_pegawai='$nip'"; $sql = "SELECT modified_at FROM penilaian WHERE id_pegawai='$nip'";
$result = $conn->query($sql); $result = $conn->query($sql);
$lastmod = ""; $lastmod = "";
...@@ -68,11 +68,11 @@ function setujuPenilaian() { ...@@ -68,11 +68,11 @@ function setujuPenilaian() {
} }
} }
$sql_notification = "INSERT INTO notifikasi (username, konten, jenis_konten) VALUES ('$id_penilai', 'Penilaian kepada '$nama' disetujui secara otomatis.' ,'2');"; $sql_notification = "INSERT INTO notifikasi (username, konten, jenis_konten) VALUES ('$id_penilai', 'Penilaian kepada '$nama' disetujui secara otomatis.' ,'2');";
//header( 'Location: ../lihat_penilaian.php' ) ; header( 'Location: ../lihat_penilaian.php' ) ;
//exit(); exit();
} }
} }
*/
$conn = connect_database(); $conn = connect_database();
$id_atasan = getIDAtasan($nip_login); $id_atasan = getIDAtasan($nip_login);
...@@ -109,7 +109,7 @@ function tolakPenilaian($alasan) { ...@@ -109,7 +109,7 @@ function tolakPenilaian($alasan) {
$id_pegawai = $nip_login ; $id_pegawai = $nip_login ;
$id_penilai = $nip_atasan ; $id_penilai = $nip_atasan ;
$nip = $id_pegawai ; $nip = $id_pegawai ;
$conn = connect_database(); /* $conn = connect_database();
$sql = "SELECT modified_at FROM penilaian WHERE id_pegawai='$nip'"; $sql = "SELECT modified_at FROM penilaian WHERE id_pegawai='$nip'";
$result = $conn->query($sql); $result = $conn->query($sql);
$lastmod = ""; $lastmod = "";
...@@ -151,11 +151,11 @@ function tolakPenilaian($alasan) { ...@@ -151,11 +151,11 @@ function tolakPenilaian($alasan) {
} else { } else {
echo "Error updating record: " . $conn->error; echo "Error updating record: " . $conn->error;
} }
//header( 'Location: ../lihat_penilaian.php' ) ; header( 'Location: ../lihat_penilaian.php' ) ;
//exit(); exit();
} }
} }
*/
$conn = connect_database(); $conn = connect_database();
$sql = "UPDATE penilaian SET id_penilai='$id_penilai' , persetujuan_pegawai='2', persetujuan_atasan='0', alasan='$alasan', modified_at=now() WHERE id_pegawai='$id_pegawai'" ; $sql = "UPDATE penilaian SET id_penilai='$id_penilai' , persetujuan_pegawai='2', persetujuan_atasan='0', alasan='$alasan', modified_at=now() WHERE id_pegawai='$id_pegawai'" ;
echo $sql ; echo $sql ;
...@@ -184,7 +184,7 @@ function tolakPenilaian($alasan) { ...@@ -184,7 +184,7 @@ function tolakPenilaian($alasan) {
function tanggapanPenolakan($nip,$alasan) { function tanggapanPenolakan($nip,$alasan) {
//echo "nip : " .$nip."|" ; //echo "nip : " .$nip."|" ;
$conn = connect_database(); /* $conn = connect_database();
$sql = "SELECT modified_at FROM penilaian WHERE id_pegawai='$nip'"; $sql = "SELECT modified_at FROM penilaian WHERE id_pegawai='$nip'";
$result = $conn->query($sql); $result = $conn->query($sql);
$lastmod = ""; $lastmod = "";
...@@ -222,11 +222,11 @@ function tanggapanPenolakan($nip,$alasan) { ...@@ -222,11 +222,11 @@ function tanggapanPenolakan($nip,$alasan) {
{ {
echo "Error save notification" . $conn->error; echo "Error save notification" . $conn->error;
} }
//header( 'Location: ../list_persetujuan_penilaian.php' ) ; header( 'Location: ../list_persetujuan_penilaian.php' ) ;
//exit(); exit();
} }
} }
*/
$conn = connect_database(); $conn = connect_database();
$id_atasan = getIDAtasan($nip); $id_atasan = getIDAtasan($nip);
$sql = "UPDATE penilaian SET tanggapan='$alasan' , persetujuan_pegawai='3', persetujuan_atasan_pejabat='9',id_atasan='$id_atasan', modified_at=now() WHERE id_pegawai='$nip'" ; $sql = "UPDATE penilaian SET tanggapan='$alasan' , persetujuan_pegawai='3', persetujuan_atasan_pejabat='9',id_atasan='$id_atasan', modified_at=now() WHERE id_pegawai='$nip'" ;
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment