<?php
	include "php_class/class_mysql.php";
	include "php_class/class_proposal.php";
	include "php_class/class_dosen.php";
	$DataDosen = new dataDosen;
	$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']; 
	$Idwadek = $_POST['idWadek'];
			
	$DataProposal->add_penugasan($idMhs, $NPM, $namaMhs, $noUndanganProposal, $judul, $idPendamping1, $namaPendamping1, $idPendamping2, $namaPendamping2);
	$DataDosen->edit_wadek($Idwadek);
	
	
	include "php_class/class_log_sistem.php";
	$DataLogSistem = new DataLogSistem;
	$idOperator = $_SESSION['idOperator'];
	$namaOp = $_SESSION["NamaOperator"];
	$keterangan = "Menambah Data Penugasan : ".$namaMhs." oleh ".$namaOp."";
	$DataLogSistem->add_data_log_sistem($keterangan,$idOperator);
	
	echo "<script>window.location='".$base."cetak-surat-penugasan/".$idMhs."'</script>"
?>
