<?php
	include("sess_check.php");
	
	if(isset($_GET['identitas'])) {
		$sql = "SELECT * FROM kelurahan WHERE id_kelurahan='". $_GET['identitas'] ."'";
		$ress = mysqli_query($conn, $sql);
		$data = mysqli_fetch_array($ress);
	}
	// deskripsi halaman
	$pagedesc = "Data Identitas";
	$menuparent = "identitas";
	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 Identitas</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="identitas_update.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">Nama Kelurahan</label>
										<div class="col-sm-4">
											<input type="text" name="nama_kelurahan" class="form-control" placeholder="Nama" value="<?php echo $data['nama_kelurahan'] ?>" required>
											<input type="hidden" name="identitas" class="form-control" placeholder="ID" value="<?php echo $data['id_kelurahan'] ?>" required>
										</div>
									</div>
									<div class="form-group">
										<label class="control-label col-sm-3">Nama Pejabat</label>
										<div class="col-sm-4">
											<input type="text" name="nama_pejabat" class="form-control" placeholder="" value="<?php echo $data['nama_pejabat'] ?>"required>
										</div>
									</div>
									<div class="form-group">
										<label class="control-label col-sm-3">Jabatan</label>
										<div class="col-sm-4">
											<input type="text" name="jabatan" class="form-control" placeholder="Telepon" value="<?php echo $data['jabatan'] ?>"required>
										</div>
									</div>
									<div class="form-group">
										<label class="control-label col-sm-3">Alamat</label>
										<div class="col-sm-4">
											<textarea name="alamat" class="form-control" placeholder="jabatan" rows="3" required><?php echo $data['alamat'] ?></textarea>
										</div>
									</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");
?>