<?php
include("sess_check.php");

if (isset($_GET['perbaiki'])) {
	$sql = "SELECT * FROM usaha WHERE id_usaha='" . $_GET['perbaiki'] . "'";
	$ress = mysqli_query($conn, $sql);
	$data = mysqli_fetch_array($ress);
}
// deskripsi halaman
$pagedesc = "Data Tahun";
$menuparent = "kelas";
include("layout_top.php");
?>
<!-- top of file -->
<!-- Page Content -->
<div id="page-wrapper">
	<div class="container-fluid">
		<div class="row">
			<div class="col-lg-12">
				<h1 class="page-header">Data Surat Usaha</h1>
			</div><!-- /.col-lg-12 -->
		</div><!-- /.row -->

		<div class="row">
			<div class="col-lg-12"><?php include("layout_alert.php"); ?></div>
		</div>

		<div class="row">
			<div class="col-lg-12">
				<form class="form-horizontal" action="skusaha_update2.php" method="POST" enctype="multipart/form-data">
					<div class="panel panel-default">
						<div class="panel-heading">
							<h3>Edit Data</h3>
						</div>
						<div class="panel-body">

							<div class="form-group">
								<label class="control-label col-sm-3">Id pindah</label>
								<div class="col-sm-4">
									<input type="text" name="id_usaha" class="form-control" placeholder="Id Tahun" value="<?php echo $data['id_usaha'] ?>" required>
									<input type="hidden" name="perbaiki" class="form-control" placeholder="ID" value="<?php echo $data['id_usaha'] ?>" required>
								</div>
							</div>

							<div class="form-group">
										<label class="control-label col-sm-3">Nama Perusahaan</label>
										<div class="col-sm-4">
											<input type="text" name="nama_perusahaan" min="0" class="form-control" placeholder="Harga" value="<?php echo $data['nama_perusahaan'] ?>"required>
										</div>
									</div>
							
									<div class="form-group">
										<label class="control-label col-sm-3">Mulai Usaha</label>
										<div class="col-sm-4">
											<input type="text" name="mulai_usaha" min="0" class="form-control" placeholder="Harga" value="<?php echo $data['mulai_usaha'] ?>"required>
										</div>
									</div>

									
									<div class="form-group">
										<label class="control-label col-sm-3">Alamat Usaha</label>
										<div class="col-sm-4">
											<textarea name="alamat_usaha" class="form-control" placeholder="Keterangan" rows="3" required><?php echo $data['alamat_usaha'];?></textarea>
										</div>
							</div>

							<div class="form-group">
										<label class="control-label col-sm-3">Keterangan pindah</label>
										<div class="col-sm-4">
											<textarea name="tujuan" class="form-control" placeholder="Keterangan" rows="3" required><?php echo $data['tujuan'];?></textarea>
										</div>
							</div>
							
						<div class="panel-footer">
							<button type="submit" name="perbarui" class="btn btn-success">Update</button>
						</div>
					</div><!-- /.panel -->
				</form>
			</div><!-- /.col-lg-12 -->
		</div><!-- /.row -->
	</div><!-- /.container-fluid -->
</div><!-- /#page-wrapper -->
<!-- bottom of file -->
<?php
include("layout_bottom.php");
?>