    <?php
	$idEvent = "transactionForm";
	$button_event = $_POST["button_event"];

	if ($button_event == "Update Data") {
		$kontak_dagang_transaksi = kontak_dagang_transaksi($exhibitorID, $header_id, $transaksiID, $idEvent);
        echo $kontak_dagang_transaksi["sql_update"];
		echo '
        <form name="formSubmit" id="formSubmit" class="form" action="'.$thisPage.'adm1n/'.$curPage1.'" method="post">
			<input type="hidden" name="action" id="action" value="entryForm" />
   		</form>';
		/** 
		**/
		if (mysql_query($kontak_dagang_transaksi["sql_update"])) {
			echo '
			<script type="text/javascript">
				document.getElementById(\'formSubmit\').submit(); 
			</script>';
		} else {
			die(mysql_errno($conn) . ": " . mysql_error($conn) . "\n");	
		}

	} else {
		$sql =
		" SELECT * FROM kontak_dagang_transaksi ".
		" WHERE transaksiID = '".$transaksiID."' ";
		//" AND valueID = product_sub_category ".
		//" AND elementSubParentID = product_category ";
		//echo $sql;
		if ($hasil = mysql_query($sql)) {
			while ($data = mysql_fetch_array($hasil)) {
				$buyer_name = $data["buyer_name"];
				$jn_trans = $data["jn_trans"];
				$nm_perusahaan = $data["nm_perusahaan"];
				$to_negara = $data["to_negara"];
				$product_category = $data["product_category"];
				$product_sub_category = $data["product_sub_category"];
				$product_detail = $data["product_detail"];
				$estimasi_kontrak = $data["estimasi_kontrak"];
				$pic = $data["pic"];
				$remark = $data["remark"];				
			}
		}
		$button_event = "Update Data";
		include ($thisUrl.'adm1n/functions/form_kelengkapan_data.php');
	}
	?>
	