<?
$pre   = '../../';
include  $pre . "common.php";
$title = "2006 US GLOBEC Pan-Regional Synthesis Meeting";
$logo  = false;
include HEAD;

$t = array('m_p','t_a','t_p','w_a','w_p','th_a','th_p');
$query  = "SELECT * FROM workshops WHERE workshop='synth06' ORDER BY last";
$result = $db->sql_query($query);

$out = "<h1>Current List of Participants</h1>\n <br />";

$out .= "<table id=\"part\">\n<tr>\n   <td rowspan=\"2\">&nbsp;</td>\n   <td rowspan=\"2\"><b>Name</b></td>\n
   <td rowspan=\"2\"><b>Affiliation</b></td>\n   <td colspan=\"2\" align=\"center\"><b>Mon</b></td>\n
   <td colspan=\"2\" align=\"center\"><b>Tue</b></td>\n   <td colspan=\"2\" align=\"center\"><b>Wed</b></td>\n
   <td colspan=\"2\" align=\"center\"><b>Thu</b></td>\n</tr>\n<tr>\n   <td width=\"20\">&nbsp;</td>\n
   <td width=\"20\"><b>pm</b></td>\n   <td width=\"20\"><b>am</b></td>\n   <td width=\"20\"><b>pm</b></td>\n
   <td width=\"20\"><b>am</b></td>\n   <td width=\"20\"><b>pm</b></td>\n   <td width=\"20\"><b>am</b></td>\n
   <td width=\"20\"><b>pm</b></td>\n</tr>";

for($i=0;$row = $db->sql_fetchrow($result);$i++){
   $name  = stripslashes($row['last']) . ", " . stripslashes($row['first']);
   $affil = stripslashes($row['institution']);
   $times = explode(";",$row['times']);
   $num   = $i+1;
   $out  .= "<tr>\n";
   $out  .= "   <td>$num</td>\n   <td>$name</td>\n   <td>$affil</td>\n   <td>&nbsp;</td>\n";
   
   $k = 0;
   for($j=0;$j<count($t);$j++){
      if( $times[$k] == $t[$j] ){
         $out .= "   <td align=\"center\"><b>X</b></td>\n";
         $k++;
      }
      else{
         $out .= "   <td>&nbsp;</td>\n";
      }
   }
   
   $out .= "</tr>\n";
}

$out .= '</table>';

echo $out;

include FOOT;
?>
