<?php
	
	
	include "koneksi.php";
	$id=mysqli_real_escape_string($conn,$_GET["id"]);
    echo "ini".$id;	
    $tanggal_ditolak = date('d / m / yy');
	
	//disetujui = 2, ditolak = 1
    $q = "UPDATE data_purchasing_requisition SET status_direktur='1', status_hcga='1',tgl_ditolak_direktur='$tanggal_ditolak' WHERE id=".$id;
	$result = mysqli_query($conn, $q);

	if($result)
	{
		echo "berhasil";
		header("location:persetujuanPrDirektur.php?p=2");
	}
	else
	{
		echo "gagal";
		header("location:persetujuanPrDirektur.php?p=3");
	}
		

?>