<div id="ld" style="position:fixed; top:50%; left:50%"><img src="img/ld.gif"></div>			

<?php
	include "php_class/class_mysql.php";
	include "php_class/class_proposal.php";
	
	$DataProposal = new DataProposal;
	
	$idMhs = $_POST['idMhs'];
	$NPM = $_POST['npm'];
	$namaMhs = $_POST['namaMhs'];
	$judul = $_POST['judul'];
	$noUndanganProposal = $_POST['noUndanganProposal'];
	$idPendamping1 = $_POST['idPendamping1'];
	$namaPendamping1 = $_POST['namaPendamping1']; 
	$idPendamping2 = $_POST['idPendamping2'];
	$namaPendamping2 = $_POST['namaPendamping2']; 
	$idPendamping3 = $_POST['idPendamping3'];
	$namaPendamping3 = $_POST['namaPendamping3']; 
	$tglProposal = $_POST['tglProposal'];
	$waktu = $_POST['waktu'];
	$tempat = $_POST['tempat'];
	$ttd = $_POST['ttd'];
	$nipttd = $_POST['nipttd'];	
	$ttdPenguji = $_POST['ttdPenguji'];
	$nipPenguji = $_POST['nipPenguji'];
	$uang1 = $_POST['uang1'];
	$uang2 = $_POST['uang2'];
	$uang3 = $_POST['uang3'];
	$honor1 = $_POST['honor1'];
	$honor2 = $_POST['honor2'];
	$ttdkejur = $_POST['ttdkejur'];
	$nipkejur = $_POST['nipkejur'];
	$ttdwadek2 = $_POST['ttdwadek2'];
	$nipwadek2 = $_POST['nipwadek2'];
	$nipPendamping1 = $_POST['nipPendamping1'];
	$nipPendamping2 = $_POST['nipPendamping2'];
	$nipPendamping3 = $_POST['nipPendamping3'];
	$status = $_POST['status'];
	
	if ($status == 'ada'){
		$DataProposal->edit_proposal($NPM, $noUndanganProposal, $judul, $idPendamping1, $namaPendamping1, $idPendamping2, $namaPendamping2, $idPendamping3, $namaPendamping3, $tglProposal, $waktu, $tempat, $nipPendamping1, $nipPendamping2, $nipPendamping3);
	}else{			
		$DataProposal->add_proposal($idMhs, $NPM, $namaMhs, $noUndanganProposal, $judul, $idPendamping1, $namaPendamping1, $idPendamping2, $namaPendamping2, $idPendamping3, $namaPendamping3, $tglProposal, $waktu, $ttd, $nipttd, $tempat, $uang1, $uang2, $uang3, $ttdPenguji, $nipPenguji, $honor1, $honor2, $ttdkejur, $nipkejur, $ttdwadek2, $nipwadek2, $nipPendamping1, $nipPendamping2, $nipPendamping3);
		}
		
	include "php_class/class_log_sistem.php";
	$DataLogSistem = new DataLogSistem;
	$idOperator = $_SESSION['idOperator'];
	$namaOp = $_SESSION["NamaOperator"];
	$keterangan = "Menambah data proposal : ".$namaMhs." oleh ".$namaOp."";
	$DataLogSistem->add_data_log_sistem($keterangan,$idOperator);
		
	
	echo "<script>window.location='".$base."cetak-proposal/".$idMhs."'</script>"
?>
