	<?php
	session_start();
	include_once('fungsi.php');
	
	if(!isset($_SESSION['admin'])){
		header("location: login.php");
	}
	
	$nama= mysqli_real_escape_string($conn,$_GET['id']);
	$id = $_GET['id'];

?>
<!DOCTYPE html
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PENELOLA GIBEON</title>

<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/datepicker3.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">

<!--Icons-->
<script src="js/lumino.glyphs.js"></script>

<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->

</head>

<body>
	<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#sidebar-collapse">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="#"><span>GIBEON</span>Admin</a>
				
			 <ul class="user-menu">
					<li class="dropdown pull-right">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown"><svg class="glyph stroked male-user"><use xlink:href="#stroked-male-user"></use></svg> User <span class="caret"></span></a>
						<ul class="dropdown-menu" role="menu">
							
							<li><a href="Logout.php"><svg class="glyph stroked cancel"><use xlink:href="#stroked-cancel"></use></svg> Logout</a></li>
				
				</ul>
					</li>
				</ul>
				
			</div>
							
		</div><!-- /.container-fluid -->
	</nav>
		
				
		<div class="row">
			<ol class="breadcrumb">
				<li><a href="home.php"><svg class="glyph stroked home"><use xlink:href="#stroked-home"></use></svg></a></li>
				<li class="active">Icons</li>
			</ol>
		</div><!--/.row-->
		<?php
			
			$pemesanan=mysqli_query($conn, "SELECT * FROM pemesanan WHERE id='$id'");
			while($p=mysqli_fetch_array($pemesanan)){
				
			
			
		?>
			<form action="updatedata.php" method="POST">
			<table>
				<tr>
				<td width="200px">ID</td>
				<td width="150px">:</td>
				<td><input type="text" name="id" id="nama" value='<?php echo $p['id'] ?>' readonly> </td>
				</tr>
				
				
				<tr>
				<td width="200px">Nama Pengunjung</td>
				<td width="150px">:</td>
				<td><input type="text" name="nama" id="nama" value='<?php echo $p['namalengkap'] ?>' readonly> </td>
				</tr>
				
				<tr>
				<td>Alamat Pengunjung</td>
				<td>:</td>
				<td><input type="text" name="alamat" id="nama" value='<?php echo $p['alamat'] ?>' readonly></td>
				</tr>
				
				<tr>
				<td>Email Pengunjung</td>
				<td>:</td>
				<td><input type="text" name="email" id="nama" value='<?php echo $p['email'] ?>' readonly></td>
				</tr>
				
				<tr>
				<td>Jumlah Peserta</td>
				<td>:</td>
				<td><input type="text" name="jumlahpeserta" id="nama" value='<?php echo $p['jumlahpeserta'] ?>' readonly></td>
				</tr>
				
				
				<tr>
				<td>Tanggal Mulai</td>
				<td>:</td>
				<td width="300px"><input type="text" name="waktumulai" id="nama" value='<?php echo $p['waktumulai'] ?>' readonly></td>
				</tr> 
				<tr>
				<td>Tanggal Selesai</td>
				<td>:</td>
				<td><input type="text" name="waktuselesai" id="nama" value='<?php echo $p['waktuselesai'] ?>' readonly></td>
				</tr>
				
				<tr>
				<td>Nama Ruangan</td>
				<td>:</td>
				<td><input type="text" name="namaruangan" id="namaruangan"  required></td>
				</tr>
				
				</table>
				    <input type="submit" name="submit" class="btn btn-info" value="Update">
			</form>
			<?php
			}
			?>
			</p>
						
                			
				
	<script src="js/jquery-1.11.1.min.js"></script>
	<script src="js/bootstrap.min.js"></script>
	<script src="js/chart.min.js"></script>
	<script src="js/chart-data.js"></script>
	<script src="js/easypiechart.js"></script>
	<script src="js/easypiechart-data.js"></script>
	<script src="js/bootstrap-datepicker.js"></script>
	<script>
		$('#calendar').datepicker({
		});

		!function ($) {
		    $(document).on("click","ul.nav li.parent > a > span.icon", function(){          
		        $(this).find('em:first').toggleClass("glyphicon-minus");      
		    }); 
		    $(".sidebar span.icon").find('em:first').addClass("glyphicon-plus");
		}(window.jQuery);

		$(window).on('resize', function () {
		  if ($(window).width() > 768) $('#sidebar-collapse').collapse('show')
		})
		$(window).on('resize', function () {
		  if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide')
		})
	</script>	

			