	<script type="text/javascript" src="<?php echo $thisPage; ?>js/messages.js"></script>
	<link rel="stylesheet" type="text/css" href="<?php echo $thisPage; ?>css/messages.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo $thisPage; ?>css/captcha.css" />
    <?php
	$addProduct = (isset($_POST["button_event"]) ? $_POST["button_event"] : null);
	if ($addProduct == "add") {
		$idEvent = "addProductSubCategory";
		$button_label = "Add Products Sub Category";
		$button_event = $addProduct;
		include ($thisUrl.'adm1n/functions/form_kelengkapan_data.php');
	} else if ($addProduct == "edit") {
		
	} else {
		$sql = 
		" SELECT * FROM form_element_sub ".
		" WHERE elementSubID = '".$elementSubID."'";
		if ($hasil = mysql_query($sql)) {
			if (mysql_num_rows($hasil) > 0) {
				echo '
				<h3 style="margin-bottom:0; padding-bottom:10px">Products Category</h3>
				<div style="margin-top:0; padding-top:0" class="tabel font15">';
					while ($data = mysql_fetch_array($hasil)) {
						echo '
						<div class="content-column nopointer border-top border-bottom border-left border-right">
							<div class="tabel25 padding10 alignCenter">
								<strong>Category\'s Name: </strong>
							</div>
							<div class="tabel75 border-left padding10">
								'.strtoupper($data["elementSubDescription"]).'
							</div>
						</div>';
					}
					echo '
				</div>';
			}
		}
		echo '
		<form name="formAddSub" id="formAddSub" action="'.$thisPage.'adm1n/pages/product-list/" method="post">
			<input type="hidden" name="action" id="action" value="addProduct" />
			<input type="hidden" name="button_event" id="button_event" value="add" />
			<input type="hidden" name="elementSubID" id="elementSubID" value="'.$elementSubID.'" />
		</form>';
		$addNew = "document.formAddSub.submit();";
		echo '
		<br /><br />
		<div style="display:block;">
			<div align="left" style="float:left;">
				<h3>Products Sub Category</h3>
			</div>
			<div align="right" style="float:right; margin-top:10px">
				<input onclick="'.$addNew.'" type="button" name="addProduct" id="addProduct" class="button" value="ADD NEW">
			</div>
		</div>	
		<table width="100%" cellpadding="5" cellspacing="1" border="0" bgcolor="#666666">
			<tr bgcolor="#DDDDDD">
				<td align="center" width="10%"><strong>No</strong></td>
				<td width="65%"><strong>Products\'s Name</strong></td>
				<td colspan="2" align="center" width="20%"><strong>Action</strong></td>
			</tr>';
			$sql = 
			" SELECT * FROM form_element_value ".
			" WHERE elementSubParentID = '".$elementSubID."'" .
			" ORDER BY valueName ";
			$nomor = 0;
			if ($hasil = mysql_query($sql)) {
				while ($data = mysql_fetch_array($hasil)) {
					$nomor++;
					echo '
					<tr bgcolor="#FFFFFF">
						<td align="center">'.$nomor.'</td>
						<td>'.$data["valueName"].'</td>
						<td width="10%" align="center">
							Edit
						</td>
						<td width="10%" align="center">
							Delete
						</td>
					</tr>';
				}
			}
			echo '
		</table>	
		<p>&nbsp;</p>';
	}
	?>





