<?php
//UNTUK BACA KARTU

@session_start();
require_once("../lib/dbconn.php");
require_once("../lib/functions.php");
//http://localhost/hotel/includes/cetak_card.php?nomor_room=202&tanggal_ci=201512041200&tanggal_co=201512041200&nama=tunggul&idguest=12313

?><html>
	<head>
	<link rel="stylesheet" type="text/css" href="../css/semantic.css">
	<script type="text/javascript" src="../js/jquery.min.js">
		
		
	</script>
	</head>
	
		<body>
			<div class="column">
	
	<table class="ui top attached info message" width="100%">
		<tbody><tr>
			<td align="center">
				<span id="message">Please Wait</span>
				
				<br/>
				<br/>
			
			</td>
			<tr>
			<td align="center">
			
			</td>
			</tr>
			
		</tr>
	</tbody>
	
	</table>
	<div class="ui bottom attached segment">
		<center>
		<br/>
		<br/>
		<br/>
			<span id="loading"><img src="../images/progress.gif" />	</span>
			<span id="complete" style="display:none;"><img src="../images/checkmark.gif" />	</span>
			<br/>
			<br/>
			<button id="closewindow" onClick="self.close();" style="display:none;">Close Window</button>
			
		</center>
	</div>
</div>
			
		</body>
	
</html>

<script type="text/javascript">
		//ajax call ?
		 $.get("readcard.php", function(data, status){
		 		if(data.hasil=="sukses"){
					$("#loading").hide();
					$("#complete").show();
					$("#closewindow").show();
					$("#message").html(data.isidata);
					
				}else{
					$("#closewindow").show();
					alert("Error, " + data.isidata);
				}
		        
		    },"json");
	
	
</script>