<? include ("../settings.php"); ?>
<? include ("session.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Spark Planners Admin Panel</title>
	<meta name="description" content="" />
    <meta name="keywords" content="" />
    <meta name="robots" content="noindex, nofollow" />

    <link rel="stylesheet" type="text/css" media="all" href="css/style.css" />
	<link rel="Stylesheet" type="text/css" href="css/smoothness/jquery-ui-1.7.1.custom.css"  />
	<!--[if IE 7]><link rel="stylesheet" href="css/ie.css" type="text/css" media="screen, projection" /><![endif]-->
	<!--[if IE 6]><link rel="stylesheet" href="css/ie6.css" type="text/css" media="screen, projection" /><![endif]-->
	<link rel="stylesheet" type="text/css" href="markitup/skins/markitup/style.css" />
	<link rel="stylesheet" type="text/css" href="markitup/sets/default/style.css" />
	<link rel="stylesheet" type="text/css" href="css/superfish.css" media="screen">
	<!--[if IE]>
		<style type="text/css">
		  .clearfix {
		    zoom: 1;     /* triggers hasLayout */
		    display: block;     /* resets display for IE/Win */
		    }  /* Only IE can see inside the conditional comment
		    and read this CSS rule. Don't ever use a normal HTML
		    comment inside the CC or it will close prematurely. */
		</style>
	<![endif]-->
	<!-- JavaScript -->
    <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="js/jquery.sparkline.js"></script>
    <script type="text/javascript">
    $(function() {
        /* Sparklines can also take their values from the first argument
        passed to the sparkline() function */
        var table1values = [<? tablescript(1); ?>];
        var table2values = [<? tablescript(2); ?>];
        var table3values = [<? tablescript(3); ?>];
        var table4values = [<? tablescript(4); ?>];
        var table5values = [<? tablescript(5); ?>];
        var table6values = [<? tablescript(6); ?>];
        var table7values = [<? tablescript(7); ?>];
        var table8values = [<? tablescript(8); ?>];
        var table9values = [<? tablescript(9); ?>];
        var table10values = [<? tablescript(10); ?>];
        var table11values = [<? tablescript(11); ?>];
        var table12values = [<? tablescript(12); ?>];
        var table13values = [<? tablescript(13); ?>];
        var table14values = [<? tablescript(14); ?>];
        var table15values = [<? tablescript(15); ?>];
        var table16values = [<? tablescript(16); ?>];
        var table17values = [<? tablescript(17); ?>];
        var table18values = [<? tablescript(18); ?>];
        var table19values = [<? tablescript(19); ?>];
        var table20values = [<? tablescript(20); ?>];
        var table21values = [<? tablescript(21); ?>];
        var table22values = [<? tablescript(22); ?>];
        var table23values = [<? tablescript(23); ?>];
        var table24values = [<? tablescript(24); ?>];
        var table25values = [<? tablescript(25); ?>];
        var table26values = [<? tablescript(26); ?>];
        var table27values = [<? tablescript(27); ?>];
        var table28values = [<? tablescript(28); ?>];
        var table29values = [<? tablescript(29); ?>];
        var table30values = [<? tablescript(30); ?>];
        var table31values = [<? tablescript(31); ?>];
        var table32values = [<? tablescript(32); ?>];
        var table33values = [<? tablescript(33); ?>];
        var table34values = [<? tablescript(34); ?>];
        var table35values = [<? tablescript(35); ?>];
        var table36values = [<? tablescript(36); ?>];
        var table37values = [<? tablescript(37); ?>];
        var table38values = [<? tablescript(38); ?>];
        var table39values = [<? tablescript(39); ?>];
        var table40values = [<? tablescript(40); ?>];
        var table41values = [<? tablescript(41); ?>];
        var table42values = [<? tablescript(42); ?>];
        var table43values = [<? tablescript(43); ?>];
        var table44values = [<? tablescript(44); ?>];
        var table45values = [<? tablescript(45); ?>];
        var table46values = [<? tablescript(46); ?>];
        var table47values = [<? tablescript(47); ?>];
        var table48values = [<? tablescript(48); ?>];
        var table49values = [<? tablescript(49); ?>];
        var table50values = [<? tablescript(50); ?>];

        /* The second argument gives options such as chart type */
        $('.table1').sparkline(table1values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table2').sparkline(table2values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table3').sparkline(table3values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table4').sparkline(table4values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table5').sparkline(table5values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table6').sparkline(table6values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table7').sparkline(table7values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table8').sparkline(table8values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table9').sparkline(table9values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table10').sparkline(table10values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table11').sparkline(table11values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table12').sparkline(table12values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table13').sparkline(table13values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table14').sparkline(table14values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table15').sparkline(table15values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table16').sparkline(table16values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table17').sparkline(table17values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table18').sparkline(table18values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table19').sparkline(table19values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table20').sparkline(table20values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table21').sparkline(table21values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table22').sparkline(table22values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table23').sparkline(table23values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table24').sparkline(table24values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table25').sparkline(table25values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table26').sparkline(table26values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table27').sparkline(table27values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table28').sparkline(table28values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table29').sparkline(table29values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table30').sparkline(table30values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table31').sparkline(table31values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table32').sparkline(table32values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table33').sparkline(table33values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table34').sparkline(table34values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table35').sparkline(table35values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table36').sparkline(table36values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table37').sparkline(table37values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table38').sparkline(table38values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table39').sparkline(table39values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table40').sparkline(table40values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table41').sparkline(table41values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table42').sparkline(table42values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table43').sparkline(table43values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table44').sparkline(table44values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table45').sparkline(table45values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table46').sparkline(table46values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table47').sparkline(table47values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table48').sparkline(table48values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table49').sparkline(table49values, {type: 'pie', width : '40px', height : '40px'} );
        $('.table50').sparkline(table50values, {type: 'pie', width : '40px', height : '40px'} );

    });
    </script>
	<script type="text/javascript" src="js/jquery.tablehover.js"></script>
     <script type="text/javascript" src="js/tooltip.jquery.js"></script>
	 <!--[if IE]><script language="javascript" type="text/javascript" src="excanvas.pack.js"></script><![endif]-->

	<script type="text/javascript">
		$(document).ready(function(){
			$('.tooltip').tooltip({ fadeIn : '500', fadeOut: '500' , fontsize: '12px', bordercolor: '#000000', fontcolor: '#000000'});
			$('#tableone').tableHover();
		});
	</script>
	<style type="text/css">
		td.hover, tr.hover
		{
			background-color: #69f;
		}
		th.hover, tfoot td.hover
		{
			background-color: ivory;
		}
		td.hovercell, th.hovercell
		{
			background-color: #abc;
		}
		td.hoverrow, th.hoverrow
		{
			background-color: #6df;
		}
	</style>
	 <!--[if IE]><script language="javascript" type="text/javascript" src="excanvas.pack.js"></script><![endif]-->
</head>
<body>
<div class="container" id="container">
    <div  id="header">
    	<div id="profile_info">
			<img src="img/avatar.jpg" id="avatar" alt="avatar" />
			<p>Welcome </p>
			<p><strong><?=$_SESSION['user_email'];?></strong>. <a href="logout.php">Log out?</a></p>
		</div>
		<div id="logo"><h1><a href="/">AdmintTheme</a></h1></div>

    </div><!-- end header -->
	    <div id="content" >
		<?include("nav_menu.php");?>
		<div id="content_main" class="clearfix">
			<b><u>Floor Plan</u></b><br><br>
			<table width='100%' id='tableone'>
			<tr>
				<td colspan='14' align='center'><b>STAGE</b></td>
			</tr>
			<tr>
				<td width='7%' align='center'>



					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='8';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='8' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='8';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='8';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table8status' class='tooltip' ><span class='table8'></span><br><?=$table_name;?></a><div id='data_table8status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='2';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='2' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='2';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='2';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table2status' class='tooltip' ><span class='table2'></span><br><?=$table_name;?></a><div id='data_table2status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='3';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='3' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='3';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='3';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table3status' class='tooltip' ><span class='table3'></span><br><?=$table_name;?></a><div id='data_table3status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='4';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='4' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='4';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='4';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table4status' class='tooltip' ><span class='table4'></span><br><?=$table_name;?></a><div id='data_table4status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='5';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='5' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='5';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='5';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table5status' class='tooltip' ><span class='table5'></span><br><?=$table_name;?></a><div id='data_table5status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='6';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='6' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='6';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='6';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table6status' class='tooltip' ><span class='table6'></span><br><?=$table_name;?></a><div id='data_table6status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='7';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='7' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='7';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='7';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table7status' class='tooltip' ><span class='table7'></span><br><?=$table_name;?></a><div id='data_table7status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='1';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='1' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='1';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='1';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table1status' class='tooltip' ><span class='table1'></span><br><?=$table_name;?></a><div id='data_table1status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='26';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='26' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='26';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='26';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table26status' class='tooltip' ><span class='table26'></span><br><?=$table_name;?></a><div id='data_table26status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='27';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='27' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='27';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='27';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table27status' class='tooltip' ><span class='table27'></span><br><?=$table_name;?></a><div id='data_table27status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='28';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='28' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='28';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='28';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table28status' class='tooltip' ><span class='table28'></span><br><?=$table_name;?></a><div id='data_table28status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='29';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='29' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='29';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='29';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table29status' class='tooltip' ><span class='table29'></span><br><?=$table_name;?></a><div id='data_table29status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='30';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='30' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='30';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='30';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table30status' class='tooltip' ><span class='table30'></span><br><?=$table_name;?></a><div id='data_table30status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='31';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='31' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='31';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='31';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table31status' class='tooltip' ><span class='table31'></span><br><?=$table_name;?></a><div id='data_table31status' style='display:none;'><?=$data;?></div>
				</td>
			</tr>
			<tr>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='9';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='9' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='9';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='9';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table9status' class='tooltip' ><span class='table9'></span><br><?=$table_name;?></a><div id='data_table9status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='10';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='10' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='10';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='10';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table10status' class='tooltip' ><span class='table10'></span><br><?=$table_name;?></a><div id='data_table10status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='11';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='11' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='11';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='11';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table11status' class='tooltip' ><span class='table11'></span><br><?=$table_name;?></a><div id='data_table11status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='12';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='12' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='12';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='12';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table12status' class='tooltip' ><span class='table12'></span><br><?=$table_name;?></a><div id='data_table12status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='13';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='13' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='13';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='13';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table13status' class='tooltip' ><span class='table13'></span><br><?=$table_name;?></a><div id='data_table13status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='14';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='14' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='14';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='14';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table14status' class='tooltip' ><span class='table14'></span><br><?=$table_name;?></a><div id='data_table14status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='15';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='15' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='15';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='15';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table15status' class='tooltip' ><span class='table15'></span><br><?=$table_name;?></a><div id='data_table15status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					&nbsp;
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='32';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='32' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='32';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='32';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table32status' class='tooltip' ><span class='table32'></span><br><?=$table_name;?></a><div id='data_table32status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='33';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='33' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='33';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='33';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table33status' class='tooltip' ><span class='table33'></span><br><?=$table_name;?></a><div id='data_table33status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='34';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='34' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='34';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='34';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table34status' class='tooltip' ><span class='table34'></span><br><?=$table_name;?></a><div id='data_table34status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='35';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='35' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='35';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='35';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table35status' class='tooltip' ><span class='table35'></span><br><?=$table_name;?></a><div id='data_table35status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='36';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='36' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='36';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='36';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table36status' class='tooltip' ><span class='table36'></span><br><?=$table_name;?></a><div id='data_table36status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='37';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='37' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='37';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='37';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table37status' class='tooltip' ><span class='table37'></span><br><?=$table_name;?></a><div id='data_table37status' style='display:none;'><?=$data;?></div>
				</td>
			</tr>
			<tr>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='17';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='17' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='17';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='17';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table17status' class='tooltip' ><span class='table17'></span><br><?=$table_name;?></a><div id='data_table17status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='18';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='18' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='18';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='18';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table18status' class='tooltip' ><span class='table18'></span><br><?=$table_name;?></a><div id='data_table18status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='19';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='19' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='19';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='19';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table19status' class='tooltip' ><span class='table19'></span><br><?=$table_name;?></a><div id='data_table19status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='20';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='20' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='20';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='20';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table20status' class='tooltip' ><span class='table20'></span><br><?=$table_name;?></a><div id='data_table20status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='21';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='21' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='21';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='21';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table21status' class='tooltip' ><span class='table21'></span><br><?=$table_name;?></a><div id='data_table21status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='22';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='22' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='22';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='22';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table22status' class='tooltip' ><span class='table22'></span><br><?=$table_name;?></a><div id='data_table22status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='23';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='23' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='23';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='23';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table23status' class='tooltip' ><span class='table23'></span><br><?=$table_name;?></a><div id='data_table23status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					&nbsp;
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='38';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='38' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='38';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='38';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table38status' class='tooltip' ><span class='table38'></span><br><?=$table_name;?></a><div id='data_table38status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='39';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='39' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='39';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='39';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table39status' class='tooltip' ><span class='table39'></span><br><?=$table_name;?></a><div id='data_table39status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='40';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='40' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='40';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='40';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table40status' class='tooltip' ><span class='table40'></span><br><?=$table_name;?></a><div id='data_table40status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='41';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='41' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='41';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='41';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table41status' class='tooltip' ><span class='table41'></span><br><?=$table_name;?></a><div id='data_table41status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='42';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='42' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='42';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='42';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table42status' class='tooltip' ><span class='table42'></span><br><?=$table_name;?></a><div id='data_table42status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='43';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='43' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='43';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='43';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table43status' class='tooltip' ><span class='table43'></span><br><?=$table_name;?></a><div id='data_table43status' style='display:none;'><?=$data;?></div>
				</td>
			</tr>
			<tr>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='25';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='25' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='25';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='25';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table25status' class='tooltip' ><span class='table25'></span><br><?=$table_name;?></a><div id='data_table25status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='16';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='16' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='16';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='16';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table16status' class='tooltip' ><span class='table16'></span><br><?=$table_name;?></a><div id='data_table16status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='24';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='24' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='24';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='24';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table24status' class='tooltip' ><span class='table24'></span><br><?=$table_name;?></a><div id='data_table24status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='44';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='44' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='44';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='44';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table44status' class='tooltip' ><span class='table44'></span><br><?=$table_name;?></a><div id='data_table44status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='45';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='45' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='45';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='45';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table45status' class='tooltip' ><span class='table45'></span><br><?=$table_name;?></a><div id='data_table45status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='46';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='46' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='46';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='46';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table46status' class='tooltip' ><span class='table46'></span><br><?=$table_name;?></a><div id='data_table46status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					&nbsp;
				</td>
				<td width='7%' align='center'>
					&nbsp;
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='47';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='47' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='47';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='47';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table47status' class='tooltip' ><span class='table47'></span><br><?=$table_name;?></a><div id='data_table47status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='48';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='48' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='48';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='48';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table48status' class='tooltip' ><span class='table48'></span><br><?=$table_name;?></a><div id='data_table48status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='49';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='49' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='49';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='49';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table49status' class='tooltip' ><span class='table49'></span><br><?=$table_name;?></a><div id='data_table49status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					<?
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant WHERE tbl_id='50';";
						$result = $qry->querySelectSingle($SQL);
						$total = $result['total'];
						$SQL = "SELECT COUNT(*) as total FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='50' AND a.registrant_id=b.registrant_id;";
						$result = $qry->querySelectSingle($SQL);
						$total_present = $result['total'];
						$data = "<u>$total_present / $total</u><br>";
						$SQL = "SELECT * FROM tbl_registrant WHERE tbl_id='50';";
						$results=$qry->queryMultiSelect($SQL);
						foreach ($results as $result){
							$SQL = "SELECT attendance_datetime FROM tbl_registrant_attendance WHERE registrant_id='".$result['registrant_id']."';";
							$attendance = $qry->querySelectSingle($SQL);
							if ($attendance['attendance_datetime']!= ""){
								$data.="<font color='green'>".$result['registrant_name']."</font><br>";
							}else{
								$data.="<font color='red'>".$result['registrant_name']."</font><br>";
							}
						}
						$SQL = "SELECT * FROM tbl_table WHERE tbl_id='50';";
						$result = $qry->querySelectSingle($SQL);
						$table_name = $result['tbl_name'];
					?>
					<a href='#' id='table50status' class='tooltip' ><span class='table50'></span><br><?=$table_name;?></a><div id='data_table50status' style='display:none;'><?=$data;?></div>
				</td>
				<td width='7%' align='center'>
					&nbsp;
				</td>
				<td width='7%' align='center'>
					&nbsp;
				</td>
			</tr>
			</table>
		</div><!-- end #content_main -->
	    </div><!-- end #content -->
		<? include("footer.php"); ?>
</div><!-- end container -->

</body>
</html>
<?
	function tablescript($tbl_id){
		global $qry;
		$SQL = "SELECT count(*) as total_guest FROM tbl_registrant WHERE tbl_id='$tbl_id'";
		$result = $qry->querySelectSingle($SQL);
		$total_guest = $result['total_guest'];
		$SQL = "SELECT count(*) as present_guest FROM tbl_registrant as a, tbl_registrant_attendance as b WHERE tbl_id='$tbl_id' AND a.registrant_id=b.registrant_id";
		$result = $qry->querySelectSingle($SQL);
		$present_guest = $result['present_guest'];
		$empty_seats = $total_guest - ($present_guest);
		echo "$empty_seats,$present_guest";
	}


?>
