<title>Edit Menu Kategori</title>
<div id="pagetitle">EDIT MENU KATEGORI</div>
<div id="batascontent" class="clearfix">
	<form action="?m=menucat_update" method="post" enctype="multipart/form-data">
		<?php
			$id = mysqli_real_escape_string($koneksi, $_GET['id']);
			$db = mysqli_query($koneksi, "SELECT * FROM cmas_menucat WHERE menucat_id='$id'");
			$dt = mysqli_fetch_array($db );
		?>
		<input name="menucat_id" type="hidden" value="<?php echo $dt['menucat_id']; ?>"/> 
		
		<div id="wrapgsetting" class="clearfix">
			<div id="gsettingleft">
				<div id="gsettingtitles">GENERAL</div>
				<div id="gsetting" class="clearfix">
					<div id="gsettinglabel">Menu Kategori</div>
					<div id="gsettingedit">
						<input name="menucat_nama" type="text" value="<?php echo $dt['menucat_nama']; ?>" autocomplete="off" required>
					</div>
				</div>
			</div>
			
			<div id="gsettingrite">
				<div id="gsettingtitles">ATTRIBUTE</div>
				<div id="gsetting" class="clearfix">
					<div id="gsettinglabel">Status</div>
					<div id="gsettingedit">
						<select name="menucat_status">
							<option value="<?php echo $dt["menucat_status"]; ?>"><?php echo $dt["menucat_status"]; ?></option>
							<?php $stdb=mysqli_query($koneksi, "SELECT * FROM cmas_status ORDER BY status_id ASC"); while($stdt=mysqli_fetch_array($stdb)) { ?>
								<option value="<?php echo $stdt['status_nama']; ?>"><?php echo $stdt['status_nama']; ?></option>
							<?php } ?>
						</select>
					</div>
				</div>
			</div>
		</div>
		<div id="tombolsubmit">
			<a href="?m=menucat_index"><input name="button" type="button" value="KEMBALI" class="myButton"/></a>
			<input name="submit" type="submit" value="UPDATE" class="submitbutton"/>
		</div>
	</form>
	<div id="infobottom" class="clearfix">
		<div class="infobottomleft">
			Posted by <b><?php echo $dt['posted_nama']; ?></b> on <b><?php echo date_format(date_create($dt['postdated']), 'd/m/Y H:i:s'); ?></b>
		</div>
		<div class="infobottomrite">
			Updated by <b><?php echo $dt['updated_nama']; ?></b> on <b><?php echo date_format(date_create($dt['updated']), 'd/m/Y H:i:s'); ?></b>
		</div>
	</div>
</div>		