<title>Edit Tujuan</title>
<div id="pagetitle">EDIT TUJUAN</div>
<div id="bataspadding">
    <form action="?m=tujuan_update" method="post" enctype="multipart/form-data">
        <?php
			$id = mysqli_real_escape_string($koneksi, $_GET['id']);
			$db = mysqli_query($koneksi, "SELECT * FROM cmas_tujuan WHERE tujuan_id='$_GET[id]'");
			$dt = mysqli_fetch_array($db);
        ?>	
        <input name="tujuan_id" type="hidden" value="<?php echo $dt['tujuan_id']; ?>">

        <div id="wrapgsetting" class="clearfix">
            <div id="gsetting" class="clearfix">
                <div id="gsettinglabel">Status</div>
                <div id="gsettingedit">
                    <select name="tujuan_status">
                        <option value="<?php echo $dt['tujuan_status']; ?>"><?php echo $dt['tujuan_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 id="gsetting" class="clearfix">
				<div id="gsettinglabel">Bus Type</div>
				<div id="gsettingedit">
					<select name="bustype_id">
						<option value="<?php echo $dt['bustype_id']; ?>"><?php echo $dt['bustype_nama']; ?></option>
						<?php
							$btdb = mysqli_query($koneksi, "SELECT * FROM cmas_bustype WHERE bustype_status='Aktif' ORDER BY bustype_id ASC");
							while($btdt = mysqli_fetch_array($btdb)) {
						?>
							<option value="<?php echo $btdt['bustype_id']; ?>"><?php echo $btdt['bustype_nama']; ?></option>
						<?php } ?>
					</select>
				</div>
			</div>
			<div id="gsetting" class="clearfix" style="display:none">
				<div id="gsettingedit">
					<select name="bustype_nama" id="JenisBusTitle">
						<option value="<?php echo $dt['bustype_nama']; ?>"><?php echo $dt['bustype_nama']; ?></option>
					</select>
				</div>
			</div>
            <div id="gsetting" class="clearfix">
                <div id="gsettinglabel">Jumlah Hari</div>
                <div id="gsettingedit">
                    <select name="tujuan_hari" required>
                        <option value="<?php echo $dt['tujuan_hari']; ?>"><?php echo $dt['tujuan_hari']; ?></option>
                        <option value="1">1 Hari</option>
                        <option value="2">2 Hari</option>
                        <option value="3">3 Hari</option>
                        <option value="4">4 Hari</option>
                        <option value="5">5 Hari</option>
                        <option value="6">6 Hari</option>
						<option value="7">7 Hari</option>
                        <option value="8">8 Hari</option>
						<option value="9">9 Hari</option>
                        <option value="10">10 Hari</option>
                    </select>
                </div>
            </div>
			<div id="gsetting" class="clearfix">
                <div id="gsettinglabel">Nama Tujuan</div>
                <div id="gsettingedit">
                    <input name="tujuan_nama" type="text" value="<?php echo $dt['tujuan_nama']; ?>">
                </div>
            </div>
			<div id="gsetting" class="clearfix">
                <div id="gsettinglabel">Biaya Perjalanan</div>
                <div id="gsettingedit">
                    <input name="tujuan_harga" type="text" value="<?php echo $dt['tujuan_harga']; ?>">
                </div>
            </div>
        </div>
        <div id="tombolsubmit">
            <a href="?m=tujuan_indexkat&id=<?php echo $dt['bustype_id']; ?>"><input name="Button" type="button" value="KEMBALI" class="myButton"/></a>
            <input name="submit" type="submit" value="SIMPAN" class="submitbutton"/>
        </div>
    </form>
</div>