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

$t      = array('t_p','t_s','w_a','w_p','w_s','th_a','th_p','th_s','f_a');
$ptitle = array(
             'P01' => 'Comparative Ecology of Krill in Coastal and Oceanic Waters around the Pacific Rim',
             'P02' => 'Comparative Analysis of Salmon and Cod Population Responses',
             'P03' => 'Climate Variability and Change in the U.S. GLOBEC Regions as Simulated by the IPCC Climate Models: Ecosystem Implications',
             'P04' => 'Copepods in a Warming Climate: A Pan-Regional Model of Arctic and Northwest Atlantic Systems',
             'P05' => 'Pacific Ocean Boundary Ecosystems: response to natural and anthropogenic climate forcing',
             'P06' => 'The Effect of Varying Freshwater Inputs on Regional Ecosystems in the North Atlantic',
             'P07' => 'End-to-end Energy Budgets in US-GLOBEC Regions',
             'P08' => 'Climate Forcing of Calanus finmarchicus Populations of the North Atlantic',
             'P09' => 'Estimating Ecosystem Model Uncertainties in Pan-Regional Syntheses and Climate Change Impacts on Coastal Domains of the North Pacific Ocean',
             'P10' => 'Life histories of species in the genus Calanus in the North Atlantic and North Pacific Oceans and responses to climate forcing',
             'P11' => 'National Office / Pan-Regional Synthesis Working Group'
          );
$query  = "SELECT last,first,email,projects FROM workshops WHERE workshop='synth08' ORDER BY last";
$result = $db->sql_query($query);

while( $row = $db->sql_fetchrow($result) ){
   $proj = explode(';',$row['projects']);
   foreach($proj as $p){
      ${$p}[] = $row;
   }
}

$out = "<h1>Current Participation Separated by Project</h1>\n <br />";

for($i=1;$i<12;$i++){
   unset($title);
   if($i<10){
      $ind = 'P0' . $i;
      $title = $ptitle[$ind];
   }
   else{
      $ind = 'P' . $i;
      $title = $ptitle[$ind];
   }
   
   $out .= "<table width=\"650\" id=\"part\"><tr>\n   <td colspan=\"3\">\n      <font size=\"+1\"><b>$title</b></font>\n   </td>\n<tr>\n   <td>&nbsp;</td>\n   <td><b>Name</b></td>\n
            <td><b>Email</b></td>\n</tr>";
   $num=0;
   foreach($$ind as $member){
      $name  = stripslashes($member['last']) . ", " . stripslashes($member['first']);
      $email = stripslashes($member['email']);
      $num   = $num+1;
      $out  .= "<tr>\n";
      $out  .= "   <td>$num</td>\n   <td>$name</td>\n   <td>$email</td>\n";
      $out .= "</tr>\n";
   }

   $out .= "</table>\n<br /><br />";
}

echo $out;

include FOOT;
?>
