<?php include('header.php'); ?><br />
<div class="data" id="data">
	
</div>
<div id="myModal" class="modal" onclick="javascript:close_popup();" >
	<div class="modal-content">
		<span class="close"></span>

		<div id="popup"></div>
	</div>
</div>
<script type="text/javascript">
	document.getElementById("data").innerHTML = '<img src="../img/load.gif">';
	setTimeout(function() {
		Report("Report");
	}, 0);
	
	function Report(status){
		//
		$.ajax({
			type: "POST",
			url: "data_Report.php",
			data: {
				status : status		
			},
			success: function(data) {
				document.getElementById("data").innerHTML = data;	
			}
		});
	}
	function update_work(id,status){
		var page = document.getElementById("page").innerHTML;
		$.ajax({
			type: "POST",
			url: "save.php",
			data: {
				id : id,
				status : status		
			},
			success: function(data) {
				//document.getElementById("data").innerHTML = data;
				Report(page);	
			}
		});
	}
	function qr_text(){
		document.getElementById("data").innerHTML = '<img src="../img/load.gif">';
		$.ajax({
			type: "POST",
			url: "qr_text.php",
			data: {
						
			},
			success: function(data) {
				document.getElementById("data").innerHTML = data;
			}
		});
	}
	var modal = document.getElementById("myModal");
	function qr_img(id){
		
		$.ajax({
			type: "GET",
			url: "qr.php",
			data: {
				id : id
			},
			success: function(data) {
				modal.style.display = "block"; 
 				document.getElementById("popup").innerHTML = '<img src="qr/'+id+'.png" width="300">';
			}
		});
	}
	
	window.onclick = function(event) {
		if (event.target == modal) {
			modal.style.display = "none";
		}
	}
</script>
<div style="display: none;">
	<div id="page">Report</div>
</div>
<br /><?php include('footer.php'); ?>