    <?php

	$idEvent = "transactionForm";
	$kontak_dagang_transaksi = kontak_dagang_transaksi($exhibitorID, $header_id, $transaksiID, $idEvent);
	//var_dump($kontak_dagang_transaksi);	

	$tgl_transaksi = $kontak_dagang_transaksi["tgl_transaksi"];
	$header_id = $kontak_dagang_transaksi["header_id"];


	$button_label = $_REQUEST["button_label"];
	if ($button_label == "Edit Transaction") {
	
	} else {
		//echo "<br>header_id: ".$header_id;
		//$button_label  = "";
		$button_label = "Edit Transaction";

		echo '
		<br>
		<div class="tabel font15">
			<div style="padding-bottom:7px">
				<strong>'.strtoupper("Data Perusahaan").'</strong>
			</div>
			<div class="content-column nopointer border-top border-bottom border-left border-right" style="margin-top:0">
				<div class="tabel25 padding10 alignCenter">
					<strong>Nama Exhibitor</strong>
				</div>
				<div class="tabel75 border-left padding10">
					'.strtoupper($kontak_dagang_transaksi["companyName"]).'
				</div>
			</div>	
			<div class="content-column nopointer border-bottom border-left border-right">
				<div class="tabel25 padding10 alignCenter">
					<strong>Hall & Nomor Stand</strong>
				</div>
				<div class="tabel75 border-left padding10">';
					foreach($kontak_dagang_transaksi["hallName"] as $value) {
						if ($ctr > 0) echo "<br>";
						echo $value;
						$ctr = 0;
						foreach($kontak_dagang_transaksi["standNumber"] as $value) {
							if ($ctr == 0) echo " &nbsp; | &nbsp; No. Stand: ";
							else ", ";
							echo $value;
							$ctr++;
						}
					}
					echo '
				</div>
			</div>
			<div class="content-column nopointer border-bottom border-left border-right">
				<div class="tabel25 padding10 alignCenter">
					<strong>Tanggal Transaksi</strong>
				</div>
				<div class="tabel75 border-left padding10">
					'.indonesian_date($tglNAMA).'
				</div>
			</div>';
			if ($tglNAMA == $tgl_transaksi && !$button_action) {
				echo '
				<br><br>
				<div style="padding-bottom:7px">
					<strong>'.strtoupper("Data Kontak Dagang").'</strong>
				</div>
				<div class="content-column nopointer border-top border-bottom border-left border-right" style="margin-top:0">
					<div class="tabel25 padding10">
						<strong>Nama Buyer</strong>
					</div>
					<div class="tabel75 border-left padding10">
						'.$kontak_dagang_transaksi["ValueFromForm"]["formValue"]["buyer_name"].'
					</div>
				</div>
				<div class="content-column nopointer border-bottom border-left border-right" style="margin-top:0">
					<div class="tabel25 padding10">
						<strong>Nama Perusahaan</strong>
					</div>
					<div class="tabel75 border-left padding10">
						'.$kontak_dagang_transaksi["ValueFromForm"]["formValue"]["nm_perusahaan"].'
					</div>
				</div>
				<div class="content-column nopointer border-bottom border-left border-right" style="margin-top:0">
					<div class="tabel25 padding10">
						<strong>Negara</strong>
					</div>
					<div class="tabel75 border-left padding10">';
						FindData($kontak_dagang_transaksi["ValueFromForm"]["formValue"]["to_negara"], "form_element_value", $dataTitle, $dataRecord);
						echo $dataRecord;
						echo '
					</div>
				</div>
				<div class="content-column nopointer border-bottom border-left border-right" style="margin-top:0">
					<div class="tabel25 padding10">
						<strong>Kategori Produk</strong>
					</div>
					<div class="tabel75 border-left padding10">';
						echo FindDataSingle("form_element_sub", "elementSubID", $kontak_dagang_transaksi["ValueFromForm"]["formValue"]["product_category"], "elementSubDescription");
						echo '
					</div>
				</div>
				<div class="content-column nopointer border-bottom border-left border-right" style="margin-top:0">
					<div class="tabel25 padding10">
						<strong>Sub Kategori Produk</strong>
					</div>
					<div class="tabel75 border-left padding10">';
						FindData($kontak_dagang_transaksi["ValueFromForm"]["formValue"]["product_sub_category"], "form_element_value", $dataTitle, $dataRecord);
						echo $dataRecord;
						echo '
					</div>
				</div>
				<div class="content-column nopointer border-bottom border-left border-right" style="margin-top:0">
					<div class="tabel25 padding10">
						<strong>Produk Detil</strong>
					</div>
					<div class="tabel75 border-left padding10">
						'.$kontak_dagang_transaksi["ValueFromForm"]["formValue"]["product_detail"].'
					</div>
				</div>
				<div class="content-column nopointer border-bottom border-left border-right" style="margin-top:0">
					<div class="tabel25 padding10">
						<strong>Estimasi Kontrak</strong>
					</div>
					<div class="tabel75 border-left padding10">
						$ '.number_format($kontak_dagang_transaksi["ValueFromForm"]["formValue"]["estimasi_kontrak"], 2) . '
					</div>
				</div>';
			} 
			echo '
		</div>
		<p align="center" class="columntext15" style="margin:10px 0px 0px 0px; padding:0; color:#ffffff; text-align:center">
			<div style="display:block">
				<div style="display:inline-block; text-align:left">
					<form name="formViewKontakDagang" id="formViewKontakDagang" class="form" action="'.$thisPage.'adm1n/'.$curPage1.'" onsubmit="return validate(this)" method="post">
						<div id="submitformViewKontakDagang" class="hvr-sweep-to-right" style="padding:10px 30px; cursor:pointer;">
							<font style="color:#ffffff; text-align:center">
								<< Back to List
							</font>
						</div>
						<input type="hidden" name="action" id="action" value="entryForm" />
						<input type="hidden" name="tglNAMA" id="tglNAMA" value="'.$tglNAMA.'"/>
						<input type="hidden" name="exhibitorID" id="exhibitorID" value="'.$exhibitorID.'"/>
						<input type="hidden" name="button_label" id="button_label" value="'.$button_label.'"/>
						<input type="hidden" name="header_id" id="header_id" value="'.$header_id.'" />
					</form> 
				</div>
				<div style="display:inline-block; text-align:left">
					<form name="formEditKontakDagang" id="formEditKontakDagang" class="form" action="'.$thisPage.'adm1n/'.$curPage1.'" onsubmit="return validate(this)" method="post">
						<div id="submitformEditKontakDagang" class="hvr-sweep-to-right" style="padding:10px 30px; cursor:pointer;">
							<font style="color:#ffffff; text-align:center">
								'.$button_label.' >>
							</font>
						</div>
						<input type="hidden" name="action" id="action" value="'.$button_label.'" />
						<input type="hidden" name="tglNAMA" id="tglNAMA" value="'.$tglNAMA.'"/>
						<input type="hidden" name="exhibitorID" id="exhibitorID" value="'.$exhibitorID.'"/>
						<input type="hidden" name="button_label" id="button_label" value="'.$button_label.'"/>
						<input type="hidden" name="header_id" id="header_id" value="'.$header_id.'" />
					</form> 
				</div>
			</div>
		</p>';
	}
	?>
	