<title>Edit Bus Type</title>
<div id="pagetitle">EDIT BUS TYPE</div>
<div id="bataspadding">
	<form action="?m=bustype_update" method="post" enctype="multipart/form-data">
		<?php 
			$id = mysqli_real_escape_string($koneksi, $_GET['id']);
			$db = mysqli_query($koneksi, "SELECT * FROM cmas_bustype WHERE bustype_id='$id'");
			$dt = mysqli_fetch_array($db);
		?>
		<input name="bustype_id" type="hidden" value="<?php echo $dt['bustype_id']; ?>"/> 
		
		<div id="wrapgsetting" class="clearfix">
			<div id="gsettingleft">
				<div id="gsetting" class="clearfix">
					<div id="gsettinglabel">Bus Type</div>
					<div id="gsettingedit">
						<input name="bustype_nama" type="text" value="<?php echo $dt['bustype_nama']; ?>" />
					</div>
				</div>
			</div>
			<div id="gsettingrite">
				<div id="gsetting" class="clearfix">
					<div id="gsettinglabel">Status</div>
					<div id="gsettingedit">
						<select name="bustype_status">
							<option value="<?php echo $dt['bustype_status']; ?>"><?php echo $dt['bustype_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=bustype_index"><input name="button" type="button" value="KEMBALI" class="myButton"/></a>
			<input name="submit" type="submit" value="SIMPAN" class="submitbutton"/>
		</div>
	</form>
	<div id="infobottom" class="clearfix">
		<div class="infobottomleft">
			<?php $aadb = mysqli_query($koneksi, "SELECT * FROM cmas_admin WHERE admin_id='$dt[posted_id]'"); $aadt = mysqli_fetch_array($aadb); ?>
			Posted by <b><?php echo $aadt['admin_nama']; ?></b> on <b><?php echo date_format(date_create($dt['postdated']), 'd/m/Y H:i:s'); ?></b>
		</div>
		<div class="infobottomrite">
			<?php $abdb = mysqli_query($koneksi, "SELECT * FROM cmas_admin WHERE admin_id='$dt[updated_id]'"); $abdt = mysqli_fetch_array($abdb); ?>
			Updated by <b><?php echo $abdt['updated_nama']; ?></b> on <b><?php echo date_format(date_create($dt['updated']), 'd/m/Y H:i:s'); ?></b>
		</div>
	</div>
</div>		