<table border="1" cellpadding="4">
<?php
include("config.inc.php") ;
mysql_select_db($db) ;
## Please Don't delete it. It will Error. You can tell me about bug of program this way ##
$result = mysql_query("select * from member where member_id='$_SESSION[login_true]'") or die ("Err Can not to result");
$dbarr = mysql_fetch_array($result) ;
?>
<?php
$date_ticket = date("j/n/").(date("Y")+543) ;
//echo "$dbarr['member_id']" ;
include "config.inc.php";
$sit = array('','J','I','H','G','F','E','D','C','B','A');
for($i=1;$i<11;$i++){
echo "<tr>";
for($j=1;$j<21;$j++){
$sit_name = $sit[$i].$j;
$sql = "select * from ticket where date_ticket = '$date_ticket' and round_id = $Ron_Old and sit_name = '$sit_name'";
$result = mysql_query($sql) ;
$num_result = mysql_num_rows($result) ;
if($num_result > 0){
echo "<td style=\"cursor:pointer;background-color:red\">$sit_name</td>";
}else{
echo "<td onclick=\"sit('$sit_name');\" style=\"cursor:pointer;background-color:green\">$sit_name</td>";
}